assh/safe_primes.h header reference

Header inclusion [link] 

Members [link] 

Type [link] 

Functions [link] 

  • void assh_safeprime_get(const struct assh_safeprimes_s *desc, size_t bits, uint8_t *bignum, intptr_t *offset)
  • void assh_safeprime_lfsr(uint8_t *data, size_t len, uint32_t poly, uint32_t seed)

Constant [link] 

Members detail [link] 

const struct assh_safeprimes_s assh_safeprimes [link] 

This constant is declared in assh/safe_primes.h source file, line 326.

void assh_safeprime_get(const struct assh_safeprimes_s *desc, size_t bits, uint8_t *bignum, intptr_t *offset) [link] 

This function is for internal use only.

This function is declared in assh/safe_primes.h source file, line 67.

This function generates a base value and offset suitable to generate a safe prime number of the requested bit size.

See also struct assh_safeprimes_s.

void assh_safeprime_lfsr(uint8_t *data, size_t len, uint32_t poly, uint32_t seed) [link] 

This function is for internal use only.

This function is declared in assh/safe_primes.h source file, line 54.

See also struct assh_safeprimes_s.

struct assh_safeprimes_s [link] 

This struct is for internal use only.

This struct is declared in assh/safe_primes.h source file, line 44.

The output of assh_safeprime_lfsr with the most significant bit forced to 1, interpreted as a big number stored least significant byte first, serve as base value to forge a safe prime. A value from the assh_safeprime_offset array must be added to the base value in order to obtain a safe prime number. The array contains offsets for number bit sizes multiple of 8 between 1024 and 16384 bits.

The lfsr polynomial and base seed used to generate the base values are shared by at most 1024 numbers. This allows updating only a subset of the safe prime numbers. The seed used to generate a specific base value is obtained by xoring the base seed and the number bit size.

FieldDescription
uint32_t poly[4];
uint32_t seed[4];
uint32_t offset[1921];
Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:31:03 2020 using MkDoc