#prime #numbers #miller-rabin #generation #primality #strong #checking

no-std crypto-primes

Random prime number generation and primality checking library

7 releases (breaking)

0.6.0-pre.0 Dec 29, 2023
0.5.0 Aug 21, 2023
0.4.1 Jul 12, 2023
0.4.0 Jun 28, 2023
0.1.0 Jan 21, 2023

#249 in Cryptography

Download history 217/week @ 2024-01-11 284/week @ 2024-01-18 125/week @ 2024-01-25 207/week @ 2024-02-01 203/week @ 2024-02-08 89/week @ 2024-02-15 111/week @ 2024-02-22 165/week @ 2024-02-29 264/week @ 2024-03-07 226/week @ 2024-03-14 269/week @ 2024-03-21 323/week @ 2024-03-28 454/week @ 2024-04-04 396/week @ 2024-04-11 247/week @ 2024-04-18 251/week @ 2024-04-25

1,388 downloads per month
Used in 3 crates (2 directly)

Apache-2.0 OR MIT and maybe LGPL-3.0+

125KB
2K SLoC

Prime number tools for crypto-bigint

crate Docs License Build Status Coverage

This library implements prime number generation and primality checking for crypto-bigint integers. In particular:

  • Generating random primes and safe primes of given bit size;
  • Sieving iterator;
  • Miller-Rabin test;
  • Strong and extra strong Lucas tests, and Lucas-V test.

See the documentation for the specific tests for more information and references.

Dependencies

~0.8–6MB
~121K SLoC