1
0

feat: use crypto-bigint crate

This commit is contained in:
2025-09-01 17:34:31 +08:00
parent 7713382709
commit bd9c10d89b
4 changed files with 84 additions and 232 deletions

79
Cargo.lock generated
View File

@@ -37,7 +37,7 @@ name = "common"
version = "0.1.0"
dependencies = [
"anyhow",
"rand 0.9.2",
"rand",
]
[[package]]
@@ -65,6 +65,17 @@ version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-bigint"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96272c2ff28b807e09250b180ad1fb7889a3258f7455759b5c3c58b719467130"
dependencies = [
"num-traits",
"rand_core 0.6.4",
"subtle",
]
[[package]]
name = "cryptopal_rs"
version = "0.1.0"
@@ -110,26 +121,6 @@ version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "num-bigint"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
dependencies = [
"num-integer",
"num-traits",
"rand 0.8.5",
]
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.19"
@@ -167,7 +158,7 @@ name = "p11"
version = "0.1.0"
dependencies = [
"common",
"rand 0.9.2",
"rand",
]
[[package]]
@@ -177,7 +168,7 @@ dependencies = [
"anyhow",
"base64",
"common",
"rand 0.9.2",
"rand",
]
[[package]]
@@ -195,7 +186,7 @@ dependencies = [
"anyhow",
"base64",
"common",
"rand 0.9.2",
"rand",
]
[[package]]
@@ -240,6 +231,9 @@ dependencies = [
[[package]]
name = "p20"
version = "0.1.0"
dependencies = [
"base64",
]
[[package]]
name = "p21"
@@ -250,14 +244,14 @@ name = "p22"
version = "0.1.0"
dependencies = [
"common",
"rand 0.9.2",
"rand",
]
[[package]]
name = "p23"
version = "0.1.0"
dependencies = [
"rand 0.9.2",
"rand",
]
[[package]]
@@ -281,10 +275,8 @@ name = "p33"
version = "0.1.0"
dependencies = [
"anyhow",
"num-bigint",
"num-traits",
"crypto-bigint",
"once_cell",
"rand 0.8.5",
]
[[package]]
@@ -369,37 +361,16 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
]
[[package]]
name = "rand"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
dependencies = [
"rand_chacha 0.9.0",
"rand_chacha",
"rand_core 0.9.3",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core 0.6.4",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
@@ -448,6 +419,12 @@ dependencies = [
"crossbeam-utils",
]
[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.103"