nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 > Struct Reference

#include <marshalling.hpp>

+ Collaboration diagram for nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >:

Public Types

typedef std::array< std::uint8_t, sizeof_field_elementcompressed_g1_octets
 
typedef std::array< std::uint8_t, 2 *sizeof_field_elementcompressed_g2_octets
 
typedef algebra::curves::bls12_381 curve_type
 
typedef curve_type::template g1_type< algebra::curves::coordinates::affine >::value_type g1_affine_value_type
 
typedef g1_value_type::field_type::value_type g1_field_value_type
 
typedef curve_type::template g1_type ::value_type g1_value_type
 
typedef curve_type::template g2_type< algebra::curves::coordinates::affine >::value_type g2_affine_value_type
 
typedef g2_value_type::field_type::value_type g2_field_value_type
 
typedef curve_type::template g2_type ::value_type g2_value_type
 
typedef g1_field_value_type::integral_type integral_type
 
typedef std::array< std::uint8_t, 2 *sizeof_field_elementuncompressed_g1_octets
 
typedef std::array< std::uint8_t, 4 *sizeof_field_elementuncompressed_g2_octets
 

Static Public Member Functions

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type octets_to_g1_point (const PointOctetsRange &octets)
 
template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type octets_to_g2_point (const PointOctetsRange &octets)
 
static uncompressed_g1_octets point_to_octets (const g1_value_type &point)
 
static uncompressed_g2_octets point_to_octets (const g2_value_type &point)
 
static compressed_g1_octets point_to_octets_compress (const g1_value_type &point)
 
static compressed_g2_octets point_to_octets_compress (const g2_value_type &point)
 

Static Public Attributes

constexpr static const unsigned sizeof_field_element = 48
 

Static Protected Member Functions

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type compressed_to_g1_point (PointOctetsRange &point_octets, std::uint8_t m_byte)
 
template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type compressed_to_g2_point (PointOctetsRange &point_octets, std::uint8_t m_byte)
 
template<typename GroupValueType , typename GroupAffineValueType >
static std::uint8_t evaluate_m_byte (const GroupValueType &point, const GroupAffineValueType &point_affine, bool compression)
 
static bool sign_gf_p (const g1_field_value_type &v)
 
static bool sign_gf_p (const g2_field_value_type &v)
 
template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type uncompressed_to_g1_point (PointOctetsRange &point_octets, std::uint8_t m_byte)
 
template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type uncompressed_to_g2_point (PointOctetsRange &point_octets, std::uint8_t m_byte)
 

Static Protected Attributes

constexpr static const std::uint8_t C_bit = 0x80
 
constexpr static const std::uint8_t I_bit = 0x40
 
constexpr static const std::uint8_t S_bit = 0x20
 

Member Typedef Documentation

◆ compressed_g1_octets

◆ compressed_g2_octets

◆ curve_type

◆ g1_affine_value_type

◆ g1_field_value_type

◆ g1_value_type

typedef curve_type::template g1_type ::value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::g1_value_type

◆ g2_affine_value_type

◆ g2_field_value_type

◆ g2_value_type

typedef curve_type::template g2_type ::value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::g2_value_type

◆ integral_type

◆ uncompressed_g1_octets

◆ uncompressed_g2_octets

Member Function Documentation

◆ compressed_to_g1_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::compressed_to_g1_point ( PointOctetsRange &  point_octets,
std::uint8_t  m_byte 
)
inlinestaticprotected

◆ compressed_to_g2_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::compressed_to_g2_point ( PointOctetsRange &  point_octets,
std::uint8_t  m_byte 
)
inlinestaticprotected

◆ evaluate_m_byte()

template<typename GroupValueType , typename GroupAffineValueType >
static std::uint8_t nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::evaluate_m_byte ( const GroupValueType &  point,
const GroupAffineValueType &  point_affine,
bool  compression 
)
inlinestaticprotected

◆ octets_to_g1_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::octets_to_g1_point ( const PointOctetsRange &  octets)
inlinestatic

◆ octets_to_g2_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::octets_to_g2_point ( const PointOctetsRange &  octets)
inlinestatic

◆ point_to_octets() [1/2]

◆ point_to_octets() [2/2]

◆ point_to_octets_compress() [1/2]

static compressed_g1_octets nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::point_to_octets_compress ( const g1_value_type point)
inlinestatic

◆ point_to_octets_compress() [2/2]

static compressed_g2_octets nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::point_to_octets_compress ( const g2_value_type point)
inlinestatic

◆ sign_gf_p() [1/2]

static bool nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::sign_gf_p ( const g1_field_value_type v)
inlinestaticprotected

◆ sign_gf_p() [2/2]

static bool nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::sign_gf_p ( const g2_field_value_type v)
inlinestaticprotected

◆ uncompressed_to_g1_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g1_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::uncompressed_to_g1_point ( PointOctetsRange &  point_octets,
std::uint8_t  m_byte 
)
inlinestaticprotected

◆ uncompressed_to_g2_point()

template<typename PointOctetsRange , typename = typename std::enable_if< std::is_same<std::uint8_t, typename PointOctetsRange::value_type>::value>::type>
static g2_value_type nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::uncompressed_to_g2_point ( PointOctetsRange &  point_octets,
std::uint8_t  m_byte 
)
inlinestaticprotected

Member Data Documentation

◆ C_bit

constexpr static const std::uint8_t nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::C_bit = 0x80
staticconstexprprotected

◆ I_bit

constexpr static const std::uint8_t nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::I_bit = 0x40
staticconstexprprotected

◆ S_bit

constexpr static const std::uint8_t nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::S_bit = 0x20
staticconstexprprotected

◆ sizeof_field_element

constexpr static const unsigned nil::marshalling::curve_element_serializer< algebra::curves::bls12_381 >::sizeof_field_element = 48
staticconstexpr

The documentation for this struct was generated from the following file: