class PoseidonParams

Defined in:

poseidon_parameters.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.str16a_to_big_int(a : Array(String)) #

Convert an array of 64 bits elements, represented as hexa string, into a big integer with LDS (first element of the array are the least significant bits) Horizen big int representation


[View source]
def self.u64a_to_big_int(a : Array(UInt64)) #

Convert an array of 64 bits elements, into a big integer with LDS (first element of the array are the least significant bits) Horizen big int representation


[View source]
def self.zero_pad(input : String, len : Int32) #

[View source]

Instance Method Detail

def calc_final_numbers_fixed(prime, t, alpha, m_bits, security_margin) #

[View source]
def compute_best_params(prime : BigInt, t : Int32, security) #

[View source]
def find_FD_round_numbers(prime, t, alpha, m_bits, security_margin) #

[View source]
def generate_constants(field, n, t, r_ff, r_pp, prime_number) #

Generate round constants parameters are: 1 (0 for binary fields), field size, number of cells, rf, rp, prime


[View source]
def generate_grain #

[View source]
def get_sbox_cost(r_F, r_P, t) #

[View source]
def grain_random_bits(num_bits) #

[View source]
def init_generator #

[View source]
def mds_matrix #

[View source]
def round_constants #

[View source]
def sat_inequiv_alpha(prime, t, r_F, r_P, alpha, m_bits) #

from https://extgit.iaik.tugraz.at/krypto/hadeshash/-/blob/master/code/calc_round_numbers.py


[View source]
def set_horizen_params #

[View source]
def set_mds_matrix(matrix) #

[View source]
def set_params(prime : BigInt, alpha : Int32, rf : Int32, rp : Int32, t : Int32) #

[View source]
def set_round_constants(array) #

[View source]