diff --git a/Cargo.lock b/Cargo.lock index 62833ad..7973c05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -260,7 +260,7 @@ dependencies = [ [[package]] name = "ghash" -version = "0.6.0-rc.5" +version = "0.6.0-rc.6" dependencies = [ "hex-literal", "polyval", @@ -387,7 +387,7 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.9.0-rc.5" +version = "0.9.0-rc.6" dependencies = [ "cpufeatures", "hex-literal", @@ -397,7 +397,7 @@ dependencies = [ [[package]] name = "polyval" -version = "0.7.0-rc.7" +version = "0.7.0-rc.8" dependencies = [ "cpubits", "cpufeatures", diff --git a/ghash/Cargo.toml b/ghash/Cargo.toml index e66a315..c3c6b64 100644 --- a/ghash/Cargo.toml +++ b/ghash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghash" -version = "0.6.0-rc.5" +version = "0.6.0-rc.6" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" description = """ @@ -16,7 +16,7 @@ rust-version = "1.85" edition = "2024" [dependencies] -polyval = { version = "0.7.0-rc.7", features = ["hazmat"] } +polyval = { version = "0.7.0-rc.8", features = ["hazmat"] } # optional dependencies zeroize = { version = "1", optional = true, default-features = false } diff --git a/poly1305/Cargo.toml b/poly1305/Cargo.toml index 00fc0fe..4f5b674 100644 --- a/poly1305/Cargo.toml +++ b/poly1305/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "poly1305" -version = "0.9.0-rc.5" +version = "0.9.0-rc.6" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" description = "The Poly1305 universal hash function and message authentication code" diff --git a/polyval/Cargo.toml b/polyval/Cargo.toml index 23be17a..b3e2c40 100644 --- a/polyval/Cargo.toml +++ b/polyval/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polyval" -version = "0.7.0-rc.7" +version = "0.7.0-rc.8" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" description = """ @@ -83,7 +83,7 @@ trivially_copy_pass_by_ref = "warn" std_instead_of_alloc = "warn" std_instead_of_core = "warn" suspicious_arithmetic_impl = "allow" # POLYVAL arithmetic ops are atypical -#undocumented_unsafe_blocks = "warn" TODO +undocumented_unsafe_blocks = "warn" unnecessary_safety_comment = "warn" unwrap_in_result = "warn" unwrap_used = "warn" diff --git a/polyval/src/backend/intrinsics.rs b/polyval/src/backend/intrinsics.rs index 1c76406..10d4fa5 100644 --- a/polyval/src/backend/intrinsics.rs +++ b/polyval/src/backend/intrinsics.rs @@ -53,6 +53,7 @@ impl State { pub(crate) fn proc_block(&mut self, block: &Block) { self.acc = if self.has_intrinsics() { + // SAFETY: we have just used CPU feature detection to ensure intrinsics are available unsafe { intrinsics_impl::proc_block(&self.expanded_key, self.acc, block) } } else { (self.acc + block.into()) * self.expanded_key.h1 @@ -61,6 +62,7 @@ impl State { pub(crate) fn proc_par_blocks(&mut self, par_blocks: &ParBlocks) { if self.has_intrinsics() { + // SAFETY: we have just used CPU feature detection to ensure intrinsics are available self.acc = unsafe { intrinsics_impl::proc_par_blocks(&self.expanded_key, self.acc, par_blocks) };