diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-03-28 16:26:38 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-28 10:56:38 +0000 |
| commit | 10012c2fe312a4f7ddc5217adaa6718c91bfb819 (patch) | |
| tree | a5e5124a43465e5a5fed4e32771e92356b37aa5f /ext/node/Cargo.toml | |
| parent | 67e21e71ce6a9c7d0f261219609de61f6dd0c7a3 (diff) | |
feat(ext/node): add `crypto.checkPrime` API (#18465)
Towards #18455
This commit implements `checkPrimeSync` and `checkPrime` in node:crypto
using the Miller-Rabin primality test (fun fact: it actually is a test
for composite numbers)
It first compares the candidate against many known small primes and if
not, proceeds to run the Miller-Rabin primality test.
http://nickle.org/examples/miller-rabin.5c used as reference
implementation.
Diffstat (limited to 'ext/node/Cargo.toml')
| -rw-r--r-- | ext/node/Cargo.toml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index a6a4e36a5..d0a5a40fb 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -25,6 +25,9 @@ indexmap.workspace = true libz-sys = { version = "1.1.8", features = ["static"] } md-5 = "0.10.5" md4 = "0.10.2" +num-bigint.workspace = true +num-integer = "0.1.45" +num-traits = "0.2.14" once_cell.workspace = true path-clean = "=0.1.0" pbkdf2 = "0.12.1" |
