algebra/include/nil/crypto3/algebra/marshalling.hpp
Go to the documentation of this file.
162 // return (FieldType::modulus_bits / chunk_size + (FieldType::modulus_bits % chunk_size ? 1 : 0)) *
167 constexpr static inline typename std::enable_if<std::is_same<fr_type, FieldType>::value, size_t>::type
173 constexpr static inline typename std::enable_if<std::is_same<fp_type, FieldType>::value, size_t>::type
179 constexpr static inline typename std::enable_if<std::is_same<gt_type, FieldType>::value, size_t>::type
185 constexpr static inline typename std::enable_if<std::is_same<g1_type, GroupType>::value, size_t>::type
191 constexpr static inline typename std::enable_if<std::is_same<g2_type, GroupType>::value, size_t>::type
A struct representing a BLS12-381 and BLS12-377 curve.
Definition: curves/bls12.hpp:49
policy_type::gt_field_type gt_type
Definition: curves/bls12.hpp:71
Definition: pair.hpp:31
IETF IPsec groups.
Definition: bls12/base_field.hpp:46
Definition: bls12/scalar_field.hpp:46
Definition: algebra/include/nil/crypto3/algebra/type_traits.hpp:105
constexpr static std::enable_if< std::is_same< g2_type, GroupType >::value, size_t >::type element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:192
static std::enable_if< !algebra::is_extended_field< FieldType >::value &&(std::is_same< fp_type, FieldType >::value||std::is_same< fr_type, FieldType >::value) &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, size_t >::type field_element_to_bytes(const typename FieldType::value_type &element, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:257
static std::enable_if< algebra::is_extended_field< FieldType >::value &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, size_t >::type field_element_to_bytes(const typename FieldType::value_type &element, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:267
static std::enable_if< std::is_same< g2_type, GroupType >::value, size_t >::type point_to_bytes(const typename GroupType::value_type &point, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:285
uint8_t chunk_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:147
static std::enable_if< std::is_same< g1_type, GroupType >::value, size_t >::type point_to_bytes(const typename GroupType::value_type &point, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:274
constexpr static std::enable_if< std::is_same< g1_type, GroupType >::value, size_t >::type element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:186
curve_type::scalar_field_type fr_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:142
static std::enable_if< algebra::is_extended_field< FieldType >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value, std::pair< bool, typename FieldType::value_type > >::type field_element_from_bytes(InputFieldValueIterator first, InputFieldValueIterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:213
curve_type::base_field_type fp_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:141
algebra::curves::bls12< 381 > curve_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:140
static std::enable_if< std::is_same< chunk_type, typename std::iterator_traits< InputG1Iterator >::value_type >::value, typename g1_type::value_type >::type g1_point_from_bytes(InputG1Iterator first, InputG1Iterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:221
curve_type::template g2_type g2_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:144
static std::enable_if< std::is_same< chunk_type, typename std::iterator_traits< InputG2Iterator >::value_type >::value, typename g2_type::value_type >::type g2_point_from_bytes(InputG2Iterator first, InputG2Iterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:238
constexpr static std::enable_if< std::is_same< gt_type, FieldType >::value, size_t >::type element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:180
constexpr static std::enable_if< std::is_same< fr_type, FieldType >::value, size_t >::type element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:168
curve_type::gt_type gt_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:145
static std::enable_if< !algebra::is_extended_field< FieldType >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value &&(std::is_same< fp_type, FieldType >::value||std::is_same< fr_type, FieldType >::value), std::pair< bool, typename FieldType::value_type > >::type field_element_from_bytes(InputFieldValueIterator first, InputFieldValueIterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:203
constexpr static std::enable_if< std::is_same< fp_type, FieldType >::value, size_t >::type element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:174
curve_type::template g1_type g1_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:143
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:136
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:45
static std::enable_if< algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, size_t >::type field_element_to_bytes(const field_value_type &element, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:120
static std::enable_if< algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value, std::pair< bool, field_value_type > >::type field_element_from_bytes(InputFieldValueIterator first, InputFieldValueIterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:81
constexpr static size_t field_octets_num
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:54
constexpr static const size_t chunk_size
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:50
static std::enable_if< !algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value, std::pair< bool, field_value_type > >::type field_element_from_bytes(InputFieldValueIterator first, InputFieldValueIterator last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:66
FieldType field_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:46
static std::enable_if< !algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, size_t >::type field_element_to_bytes(const field_value_type &element, OutputIterator out_first, OutputIterator out_last)
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:104
constexpr static size_t modulus_chunks
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:52
uint8_t chunk_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:49
constexpr static size_t get_element_size()
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:56
field_type::value_type field_value_type
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:47
Definition: algebra/include/nil/crypto3/algebra/curves/detail/marshalling.hpp:43