Prime Field Constants#

Pre-computed constants for the BabyBear and KoalaBear prime fields. These are provided for convenience; the library accepts any suitable prime modulus. Each *_primitive_root_S constant is a primitive 2S-th root of unity modulo the respective prime, for S in the range 1024.

constexpr uint32_t BabyBear  = 2013265921;  // 2^31 - 2^27 + 1
constexpr uint32_t KoalaBear = 2130706433;  // 2^31 - 2^24 + 1

// Example: KoalaBear primitive root for N = 2^14
constexpr uint32_t KoalaBear_primitive_root_14 = 1047035213;