nil::crypto3::hashes::detail Namespace Reference

Classes

struct  base_poseidon_policy
 Poseidon internal parameters. More...
 
struct  basic_ripemd_policy
 
struct  basic_sha2_policy
 
struct  basic_sha3_policy
 
struct  basic_sha3_policy< 224 >
 
struct  basic_sha3_policy< 256 >
 
struct  basic_sha3_policy< 384 >
 
struct  basic_sha3_policy< 512 >
 
struct  basic_tiger_policy
 
struct  blake2b_functions
 
class  blake2b_padding
 
struct  blake2b_policy
 
struct  ep_map
 
struct  ep_map< Group, PublicParams, uniformity_count, expand_msg_variant, typename std::enable_if<(ExpandMsgVariant::rfc_xmd==expand_msg_variant)>::type >
 
class  expand_message_xmd
 
struct  iso_map
 
class  iso_map< typename algebra::curves::bls12_381::g1_type< Coordinates, Form > >
 
class  iso_map< typename algebra::curves::bls12_381::g2_type< Coordinates, Form > >
 
struct  itr_hash_impl
 
struct  itr_to_curve_impl
 
class  keccak_1600_finalizer
 
struct  keccak_1600_functions
 
class  keccak_1600_padding
 
struct  keccak_1600_policy
 
struct  lookup
 
struct  lookup< ResultT, 3 >
 
struct  m2c_simple_swu
 
struct  m2c_simple_swu_zeroAB
 
struct  map_to_curve
 
struct  map_to_curve< typename algebra::curves::bls12_381::g1_type< Coordinates, Form > >
 
struct  map_to_curve< typename algebra::curves::bls12_381::g2_type< Coordinates, Form > >
 
struct  md4_policy
 
struct  md5_policy
 
class  merkle_damgard_padding
 
struct  nop_finalizer
 
struct  poseidon_constants_operator
 
struct  poseidon_functions
 
struct  poseidon_lfsr
 
struct  poseidon_mds_matrix
 
struct  poseidon_policy
 
struct  poseidon_policy< FieldType, 1, PartRounds, std::enable_if_t< PartRounds==69||PartRounds==55 > >
 
struct  poseidon_policy< FieldType, 10, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 11, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 12, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 13, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 14, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 15, PartRounds, std::enable_if_t< PartRounds==74||PartRounds==59 > >
 
struct  poseidon_policy< FieldType, 16, PartRounds, std::enable_if_t< PartRounds==74||PartRounds==59 > >
 
struct  poseidon_policy< FieldType, 2, PartRounds, std::enable_if_t< PartRounds==69||PartRounds==55 > >
 
struct  poseidon_policy< FieldType, 24, PartRounds, std::enable_if_t< PartRounds==74||PartRounds==59 > >
 
struct  poseidon_policy< FieldType, 3, PartRounds, std::enable_if_t< PartRounds==70||PartRounds==56 > >
 
struct  poseidon_policy< FieldType, 36, PartRounds, std::enable_if_t< PartRounds==75||PartRounds==60 > >
 
struct  poseidon_policy< FieldType, 4, PartRounds, std::enable_if_t< PartRounds==70||PartRounds==56 > >
 
struct  poseidon_policy< FieldType, 5, PartRounds, std::enable_if_t< PartRounds==70||PartRounds==56 > >
 
struct  poseidon_policy< FieldType, 6, PartRounds, std::enable_if_t< PartRounds==70||PartRounds==56 > >
 
struct  poseidon_policy< FieldType, 64, PartRounds, std::enable_if_t< PartRounds==77||PartRounds==61 > >
 
struct  poseidon_policy< FieldType, 7, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 8, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  poseidon_policy< FieldType, 9, PartRounds, std::enable_if_t< PartRounds==72||PartRounds==57 > >
 
struct  range_hash_impl
 
struct  range_to_curve_impl
 
struct  ref_hash_impl
 
struct  ref_to_curve_impl
 
struct  ripemd_functions
 
struct  ripemd_policy
 
struct  ripemd_policy< 128 >
 
struct  ripemd_policy< 160 >
 
struct  ripemd_policy< 256 >
 
struct  ripemd_policy< 320 >
 
struct  sha1_policy
 
struct  sha2_policy
 
struct  sha2_policy< 224 >
 
struct  sha2_policy< 256 >
 
struct  sha2_policy< 384 >
 
struct  sha2_policy< 512 >
 
class  sha3_finalizer
 
struct  sha3_functions
 
class  sha3_padding
 
struct  sha3_policy
 
struct  sha_policy
 
struct  state_adder
 
struct  tiger_functions
 
class  tiger_padding
 
struct  tiger_policy
 
struct  tiger_policy< 192, 3 >
 
struct  value_hash_impl
 
struct  value_to_curve_impl
 

Typedefs

typedef sha_policy sha0_policy
 

Functions

template<typename Field >
constexpr std::size_t get_chunks_per_base_point (std::size_t chunk_bits)
 See definition of c in https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash. More...
 
template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl< detail::value_hash_impl< HashAccumulator > > operator| (const SinglePassRange &r, const detail::value_hash_impl< HashAccumulator > &f)
 
template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl< detail::value_hash_impl< HashAccumulator > > operator| (SinglePassRange &r, const detail::value_hash_impl< HashAccumulator > &f)
 
template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl< detail::value_hash_impl< HashAccumulator > > operator| (std::initializer_list< SinglePassRange > r, const detail::value_hash_impl< HashAccumulator > &f)
 
template<typename FieldParams >
bool sgn0 (const algebra::fields::detail::element_fp2< FieldParams > &e)
 
template<typename FieldParams >
bool sgn0 (const algebra::fields::detail::element_fp< FieldParams > &e)
 

Typedef Documentation

◆ sha0_policy

Function Documentation

◆ get_chunks_per_base_point()

template<typename Field >
constexpr std::size_t nil::crypto3::hashes::detail::get_chunks_per_base_point ( std::size_t  chunk_bits)
constexpr

See definition of c in https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash.

(Fr - 1) / 2

(chunk_bits + 1) * ((2^(c * (chunk_bits + 1)) - 1) / (2^(chunk_bits + 1) - 1))

◆ operator|() [1/3]

template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl<detail::value_hash_impl<HashAccumulator> > nil::crypto3::hashes::detail::operator| ( const SinglePassRange &  r,
const detail::value_hash_impl< HashAccumulator > &  f 
)
inline

◆ operator|() [2/3]

template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl<detail::value_hash_impl<HashAccumulator> > nil::crypto3::hashes::detail::operator| ( SinglePassRange &  r,
const detail::value_hash_impl< HashAccumulator > &  f 
)
inline

◆ operator|() [3/3]

template<typename HashAccumulator , typename SinglePassRange >
detail::range_hash_impl<detail::value_hash_impl<HashAccumulator> > nil::crypto3::hashes::detail::operator| ( std::initializer_list< SinglePassRange >  r,
const detail::value_hash_impl< HashAccumulator > &  f 
)
inline

◆ sgn0() [1/2]

template<typename FieldParams >
bool nil::crypto3::hashes::detail::sgn0 ( const algebra::fields::detail::element_fp2< FieldParams > &  e)
inline

◆ sgn0() [2/2]

template<typename FieldParams >
bool nil::crypto3::hashes::detail::sgn0 ( const algebra::fields::detail::element_fp< FieldParams > &  e)
inline