nil::crypto3::pubkey::detail::bls_basic_functions< policy_type > Struct Template Reference

#include <bls_basic_functions.hpp>

+ Collaboration diagram for nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >:

Public Types

typedef policy_type::bls_serializer bls_serializer
 
typedef policy_type::curve_type curve_type
 
typedef policy_type::gt_value_type gt_value_type
 
typedef policy_type::h2c_policy h2c_policy
 
typedef policy_type::internal_accumulator_type internal_accumulator_type
 
typedef std::pair< std::vector< public_key_type >, std::vector< internal_accumulator_type > > internal_aggregation_accumulator_type
 
typedef std::pair< std::vector< public_key_type >, internal_accumulator_typeinternal_fast_aggregation_accumulator_type
 
typedef policy_type::private_key_type private_key_type
 
typedef policy_type::public_key_serialized_type public_key_serialized_type
 
typedef policy_type::public_key_type public_key_type
 
typedef policy_type::signature_serialized_type signature_serialized_type
 
typedef policy_type::signature_type signature_type
 

Static Public Member Functions

template<typename SignatureRange , typename = typename std::enable_if<std::is_same< signature_type, typename std::iterator_traits< typename SignatureRange::iterator>::value_type>::value>::type>
static void aggregate (signature_type &acc, const SignatureRange &sig_n)
 
template<typename SignatureIterator , typename = typename std::enable_if<std::is_same< signature_type, typename std::iterator_traits<SignatureIterator>::value_type>::value>::type>
static void aggregate (signature_type &acc, SignatureIterator sig_first, SignatureIterator sig_last)
 
static bool aggregate_verify (const internal_aggregation_accumulator_type &acc, const signature_type &sig)
 
static bool aggregate_verify (const internal_fast_aggregation_accumulator_type &acc, const signature_type &sig)
 
static public_key_serialized_type point_to_pubkey (const public_key_type &pk)
 
static signature_serialized_type point_to_signature (const signature_type &sig)
 
static signature_type pop_prove (const private_key_type &sk)
 
static bool pop_verify (const public_key_type &pk, const signature_type &pop)
 
static public_key_type privkey_to_pubkey (const private_key_type &sk)
 
static signature_type sign (const internal_accumulator_type &acc, const private_key_type &sk)
 
template<typename InputRange >
static void update (internal_accumulator_type &acc, const InputRange &range)
 
template<typename InputIterator >
static void update (internal_accumulator_type &acc, InputIterator first, InputIterator last)
 
static bool validate_private_key (const private_key_type &sk)
 
static bool validate_public_key (const public_key_type &pk)
 
static bool verify (const internal_accumulator_type &acc, const public_key_type &pk, const signature_type &sig)
 

Static Public Attributes

constexpr static const std::size_t L
 
constexpr static const std::array< std::uint8_t, 2 > L_os
 
constexpr static const std::size_t private_key_bits = policy_type::private_key_bits
 

Member Typedef Documentation

◆ bls_serializer

template<typename policy_type >
typedef policy_type::bls_serializer nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::bls_serializer

◆ curve_type

template<typename policy_type >
typedef policy_type::curve_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::curve_type

◆ gt_value_type

template<typename policy_type >
typedef policy_type::gt_value_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::gt_value_type

◆ h2c_policy

template<typename policy_type >
typedef policy_type::h2c_policy nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::h2c_policy

◆ internal_accumulator_type

template<typename policy_type >
typedef policy_type::internal_accumulator_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::internal_accumulator_type

◆ internal_aggregation_accumulator_type

template<typename policy_type >
typedef std::pair<std::vector<public_key_type>, std::vector<internal_accumulator_type> > nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::internal_aggregation_accumulator_type

◆ internal_fast_aggregation_accumulator_type

◆ private_key_type

template<typename policy_type >
typedef policy_type::private_key_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::private_key_type

◆ public_key_serialized_type

template<typename policy_type >
typedef policy_type::public_key_serialized_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::public_key_serialized_type

◆ public_key_type

template<typename policy_type >
typedef policy_type::public_key_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::public_key_type

◆ signature_serialized_type

template<typename policy_type >
typedef policy_type::signature_serialized_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::signature_serialized_type

◆ signature_type

template<typename policy_type >
typedef policy_type::signature_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::signature_type

Member Function Documentation

◆ aggregate() [1/2]

template<typename policy_type >
template<typename SignatureRange , typename = typename std::enable_if<std::is_same< signature_type, typename std::iterator_traits< typename SignatureRange::iterator>::value_type>::value>::type>
static void nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::aggregate ( signature_type acc,
const SignatureRange &  sig_n 
)
inlinestatic

◆ aggregate() [2/2]

template<typename policy_type >
template<typename SignatureIterator , typename = typename std::enable_if<std::is_same< signature_type, typename std::iterator_traits<SignatureIterator>::value_type>::value>::type>
static void nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::aggregate ( signature_type acc,
SignatureIterator  sig_first,
SignatureIterator  sig_last 
)
inlinestatic

◆ aggregate_verify() [1/2]

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::aggregate_verify ( const internal_aggregation_accumulator_type acc,
const signature_type sig 
)
inlinestatic

◆ aggregate_verify() [2/2]

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::aggregate_verify ( const internal_fast_aggregation_accumulator_type acc,
const signature_type sig 
)
inlinestatic

◆ point_to_pubkey()

template<typename policy_type >
static public_key_serialized_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::point_to_pubkey ( const public_key_type pk)
inlinestatic

◆ point_to_signature()

template<typename policy_type >
static signature_serialized_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::point_to_signature ( const signature_type sig)
inlinestatic

◆ pop_prove()

template<typename policy_type >
static signature_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::pop_prove ( const private_key_type sk)
inlinestatic

◆ pop_verify()

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::pop_verify ( const public_key_type pk,
const signature_type pop 
)
inlinestatic

◆ privkey_to_pubkey()

template<typename policy_type >
static public_key_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::privkey_to_pubkey ( const private_key_type sk)
inlinestatic

◆ sign()

template<typename policy_type >
static signature_type nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::sign ( const internal_accumulator_type acc,
const private_key_type sk 
)
inlinestatic

◆ update() [1/2]

template<typename policy_type >
template<typename InputRange >
static void nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::update ( internal_accumulator_type acc,
const InputRange &  range 
)
inlinestatic

◆ update() [2/2]

template<typename policy_type >
template<typename InputIterator >
static void nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::update ( internal_accumulator_type acc,
InputIterator  first,
InputIterator  last 
)
inlinestatic

◆ validate_private_key()

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::validate_private_key ( const private_key_type sk)
inlinestatic

◆ validate_public_key()

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::validate_public_key ( const public_key_type pk)
inlinestatic

◆ verify()

template<typename policy_type >
static bool nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::verify ( const internal_accumulator_type acc,
const public_key_type pk,
const signature_type sig 
)
inlinestatic

check if signature point is on the curve

Member Data Documentation

◆ L

template<typename policy_type >
constexpr static const std::size_t nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::L
staticconstexpr
Initial value:
= static_cast<std::size_t>((3 * private_key_bits) / 16) +
static_cast<std::size_t>((3 * private_key_bits) % 16 != 0)
constexpr static const std::size_t private_key_bits
Definition: bls_basic_functions.hpp:70

◆ L_os

template<typename policy_type >
constexpr static const std::array<std::uint8_t, 2> nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::L_os
staticconstexpr
Initial value:
= {static_cast<std::uint8_t>(L >> 8u),
static_cast<std::uint8_t>(L % 0x100)}
constexpr static const std::size_t L
Definition: bls_basic_functions.hpp:71

◆ private_key_bits

template<typename policy_type >
constexpr static const std::size_t nil::crypto3::pubkey::detail::bls_basic_functions< policy_type >::private_key_bits = policy_type::private_key_bits
staticconstexpr

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