find_fnv_prime_param

Function find_fnv_prime_param 

Source
pub fn find_fnv_prime_param(s: usize) -> Result<u8>
Expand description

Discovers the smallest prime parameter b for power-of-two size $2^s$ ($s \in [5, 10]$) satisfying the RFC 9923 Section 2.1 constraints:

  1. $0 < b < 256$
  2. $b.\text{count_ones}() \in {4, 5}$
  3. $(p \pmod{2^{40} - 2^{24} - 1}) > (2^{24} + 2^8 + 2^7)$
  4. $p = 256^k + 2^8 + b$ is prime.