[][src]Module gridiron::digits::util

Functions

exp_by_squaring

This reveals the exponent so it should not be called with secret values.

mul_add
split_u64_to_31b_array

Returns array with least sig in pos 0 and carry in pos 2

split_u64_to_31b

Returns (high, low) where high uses extra bit for carry and low has a cleared 32nd bit

sum_n

Sum t n times. Reveals the value of n.

u32_to_bytes_big_endian

This function assumes that the buf pointer has at least 4 spaces starting at the beginning of the slice. You need to assure this before calling.

unsafe_convert_bytes_to_limbs_mut

Convert the src into the limbs. This does not mod off the value. This will take the first len bytes and split them into 31 bit limbs. Note that this will not check anything about the length of limbs and could be unsafe... BE CAREFUL!