nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds > Struct Template Reference

#include <poseidon_mds_matrix.hpp>

+ Collaboration diagram for nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >:

Classes

struct  equivalent_mds_matrix_type
 

Public Types

typedef FieldType::value_type element_type
 
typedef algebra::matrix< element_type, state_words, state_wordsmds_matrix_type
 
typedef algebra::matrix< element_type, state_words - 1, state_words - 1 > mds_submatrix_type
 
typedef poseidon_policy< FieldType, Arity, PartRounds > policy_type
 
typedef algebra::vector< element_type, state_wordsstate_vector_type
 
typedef algebra::vector< element_type, state_words - 1 > substate_vector_type
 

Public Member Functions

mds_matrix_type generate_mds_matrix ()
 
const element_typeget_M_0_0 () const
 
const mds_matrix_typeget_M_i () const
 
const substate_vector_typeget_v (std::size_t v_number) const
 
const substate_vector_typeget_w_hat (std::size_t w_hat_number) const
 
 poseidon_mds_matrix ()
 
void product_with_equivalent_mds_matrix (state_vector_type &A_vector, std::size_t round_number) const
 
void product_with_equivalent_mds_matrix_init (state_vector_type &A_vector, std::size_t round_number) const
 
constexpr void product_with_inverse_mds_matrix_noalias (const state_vector_type &A_vector_in, state_vector_type &A_vector_out) const
 
void product_with_mds_matrix (state_vector_type &A_vector) const
 

Public Attributes

equivalent_mds_matrix_type equivalent_mds_matrix
 
mds_matrix_type mds_matrix
 
mds_matrix_type mds_matrix_inverse
 

Static Public Attributes

constexpr static const std::size_t half_full_rounds = policy_type::half_full_rounds
 
constexpr static const std::size_t part_rounds = policy_type::part_rounds
 
constexpr static const std::size_t state_words = policy_type::state_words
 

Member Typedef Documentation

◆ element_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef FieldType::value_type nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::element_type

◆ mds_matrix_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef algebra::matrix<element_type, state_words, state_words> nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::mds_matrix_type

◆ mds_submatrix_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef algebra::matrix<element_type, state_words - 1, state_words - 1> nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::mds_submatrix_type

◆ policy_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef poseidon_policy<FieldType, Arity, PartRounds> nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::policy_type

◆ state_vector_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef algebra::vector<element_type, state_words> nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::state_vector_type

◆ substate_vector_type

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
typedef algebra::vector<element_type, state_words - 1> nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::substate_vector_type

Constructor & Destructor Documentation

◆ poseidon_mds_matrix()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::poseidon_mds_matrix ( )
inline

Member Function Documentation

◆ generate_mds_matrix()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
mds_matrix_type nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::generate_mds_matrix ( )
inline

◆ get_M_0_0()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
const element_type& nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::get_M_0_0 ( ) const
inline

◆ get_M_i()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
const mds_matrix_type& nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::get_M_i ( ) const
inline

◆ get_v()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
const substate_vector_type& nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::get_v ( std::size_t  v_number) const
inline

◆ get_w_hat()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
const substate_vector_type& nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::get_w_hat ( std::size_t  w_hat_number) const
inline

◆ product_with_equivalent_mds_matrix()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
void nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::product_with_equivalent_mds_matrix ( state_vector_type A_vector,
std::size_t  round_number 
) const
inline

◆ product_with_equivalent_mds_matrix_init()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
void nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::product_with_equivalent_mds_matrix_init ( state_vector_type A_vector,
std::size_t  round_number 
) const
inline

◆ product_with_inverse_mds_matrix_noalias()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
constexpr void nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::product_with_inverse_mds_matrix_noalias ( const state_vector_type A_vector_in,
state_vector_type A_vector_out 
) const
inlineconstexpr

◆ product_with_mds_matrix()

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
void nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::product_with_mds_matrix ( state_vector_type A_vector) const
inline

Member Data Documentation

◆ equivalent_mds_matrix

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
equivalent_mds_matrix_type nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::equivalent_mds_matrix

◆ half_full_rounds

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
constexpr static const std::size_t nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::half_full_rounds = policy_type::half_full_rounds
staticconstexpr

◆ mds_matrix

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
mds_matrix_type nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::mds_matrix

◆ mds_matrix_inverse

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
mds_matrix_type nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::mds_matrix_inverse

◆ part_rounds

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
constexpr static const std::size_t nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::part_rounds = policy_type::part_rounds
staticconstexpr

◆ state_words

template<typename FieldType , std::size_t Arity, std::size_t PartRounds>
constexpr static const std::size_t nil::crypto3::hashes::detail::poseidon_mds_matrix< FieldType, Arity, PartRounds >::state_words = policy_type::state_words
staticconstexpr

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