#prime

no-std crypto-primes

Random prime number generation and primality checking library

9 releases (5 breaking)

0.6.0-pre.2 Oct 19, 2024
0.6.0-pre.0 Dec 29, 2023
0.5.0 Aug 21, 2023
0.4.1 Jul 12, 2023
0.2.0 Mar 6, 2023

#154 in Cryptography

Download history 381/week @ 2024-07-11 377/week @ 2024-07-18 336/week @ 2024-07-25 444/week @ 2024-08-01 769/week @ 2024-08-08 593/week @ 2024-08-15 526/week @ 2024-08-22 283/week @ 2024-08-29 301/week @ 2024-09-05 592/week @ 2024-09-12 530/week @ 2024-09-19 684/week @ 2024-09-26 548/week @ 2024-10-03 249/week @ 2024-10-10 540/week @ 2024-10-17 301/week @ 2024-10-24

1,760 downloads per month
Used in 8 crates (2 directly)

Apache-2.0 OR MIT and maybe LGPL-3.0+

130KB
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.9–6MB
~127K SLoC