#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

#252 in Cryptography

Download history 31/week @ 2023-12-16 4/week @ 2023-12-23 167/week @ 2023-12-30 269/week @ 2024-01-06 239/week @ 2024-01-13 210/week @ 2024-01-20 173/week @ 2024-01-27 215/week @ 2024-02-03 169/week @ 2024-02-10 78/week @ 2024-02-17 116/week @ 2024-02-24 245/week @ 2024-03-02 183/week @ 2024-03-09 253/week @ 2024-03-16 381/week @ 2024-03-23 270/week @ 2024-03-30

1,150 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
~122K SLoC