Use shake without sha3

Rebase the sha3 upgrade work onto current main, take the digest traits from the shake crate, and remove the direct sha3 dependency from the graph.
This commit is contained in:
leemeo3
2026-06-15 15:07:03 +02:00
committed by Ilka Schulz
parent 4238fcd46a
commit cf7c9a25c9
5 changed files with 76 additions and 19 deletions
Generated
+48 -13
View File
@@ -23,7 +23,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
"crypto-common",
"crypto-common 0.1.7",
"generic-array",
]
@@ -243,7 +243,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
dependencies = [
"digest",
"digest 0.10.7",
]
[[package]]
@@ -398,7 +398,7 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"crypto-common 0.1.7",
"inout",
"zeroize",
]
@@ -610,6 +610,15 @@ dependencies = [
"typenum",
]
[[package]]
name = "crypto-common"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
dependencies = [
"hybrid-array",
]
[[package]]
name = "ctrlc"
version = "3.5.2"
@@ -797,10 +806,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
"crypto-common 0.1.7",
"subtle",
]
[[package]]
name = "digest"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
dependencies = [
"crypto-common 0.2.2",
]
[[package]]
name = "dispatch2"
version = "0.3.1"
@@ -1133,6 +1151,15 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "hybrid-array"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da"
dependencies = [
"typenum",
]
[[package]]
name = "id-arena"
version = "2.3.0"
@@ -1254,11 +1281,12 @@ dependencies = [
[[package]]
name = "keccak"
version = "0.1.6"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653"
checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa"
dependencies = [
"cpufeatures 0.2.17",
"cfg-if",
"cpufeatures 0.3.0",
]
[[package]]
@@ -1965,7 +1993,7 @@ dependencies = [
"rosenpass-secret-memory",
"rosenpass-to",
"rosenpass-util",
"sha3",
"shake",
"static_assertions",
"thiserror 2.0.18",
"zeroize",
@@ -2287,13 +2315,14 @@ dependencies = [
]
[[package]]
name = "sha3"
version = "0.10.9"
name = "shake"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874"
checksum = "09057cb2149ad4cbd2da1e26b351f9a4c354219421229c69c3063e6f61947c4a"
dependencies = [
"digest",
"digest 0.11.3",
"keccak",
"sponge-cursor",
]
[[package]]
@@ -2367,6 +2396,12 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "sponge-cursor"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620"
[[package]]
name = "stacker"
version = "0.1.24"
@@ -2601,7 +2636,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
"crypto-common",
"crypto-common 0.1.7",
"subtle",
]
+1 -1
View File
@@ -61,7 +61,7 @@ oqs-sys = { version = "0.11.0", default-features = false, features = [
'kyber',
] }
blake2 = "0.10.6"
sha3 = "0.10.8"
shake = "0.1.0"
chacha20poly1305 = { version = "0.10.1", default-features = false, features = [
"std",
] }
+1 -1
View File
@@ -30,7 +30,7 @@ static_assertions = { workspace = true }
zeroize = { workspace = true }
chacha20poly1305 = { workspace = true }
blake2 = { workspace = true }
sha3 = { workspace = true }
shake = { workspace = true }
rand = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }
@@ -1,7 +1,9 @@
use anyhow::ensure;
use rosenpass_cipher_traits::primitives::{InferKeyedHash, KeyedHash};
use sha3::Shake256;
use sha3::digest::{ExtendableOutput, Update, XofReader};
use shake::{
Shake256,
digest::{ExtendableOutput, Update, XofReader},
};
pub use rosenpass_cipher_traits::algorithms::keyed_hash_shake256::{HASH_LEN, KEY_LEN};
+22 -2
View File
@@ -193,6 +193,10 @@ criteria = "safe-to-run"
version = "0.1.7"
criteria = "safe-to-deploy"
[[exemptions.crypto-common]]
version = "0.2.2"
criteria = "safe-to-deploy"
[[exemptions.ctrlc]]
version = "3.5.2"
criteria = "safe-to-deploy"
@@ -257,6 +261,10 @@ criteria = "safe-to-deploy"
version = "0.10.7"
criteria = "safe-to-deploy"
[[exemptions.digest]]
version = "0.11.3"
criteria = "safe-to-deploy"
[[exemptions.dispatch2]]
version = "0.3.1"
criteria = "safe-to-deploy"
@@ -353,6 +361,10 @@ criteria = "safe-to-deploy"
version = "0.5.12"
criteria = "safe-to-deploy"
[[exemptions.hybrid-array]]
version = "0.4.12"
criteria = "safe-to-deploy"
[[exemptions.id-arena]]
version = "2.3.0"
criteria = "safe-to-deploy"
@@ -393,6 +405,10 @@ criteria = "safe-to-deploy"
version = "0.3.99"
criteria = "safe-to-run"
[[exemptions.keccak]]
version = "0.2.0"
criteria = "safe-to-deploy"
[[exemptions.libc]]
version = "0.2.186"
criteria = "safe-to-deploy"
@@ -637,8 +653,8 @@ criteria = "safe-to-run"
version = "3.5.0"
criteria = "safe-to-run"
[[exemptions.sha3]]
version = "0.10.9"
[[exemptions.shake]]
version = "0.1.0"
criteria = "safe-to-deploy"
[[exemptions.shlex]]
@@ -665,6 +681,10 @@ criteria = "safe-to-deploy"
version = "0.6.4"
criteria = "safe-to-deploy"
[[exemptions.sponge-cursor]]
version = "0.1.0"
criteria = "safe-to-deploy"
[[exemptions.stacker]]
version = "0.1.24"
criteria = "safe-to-deploy"