hashes: fix doc comment on x86 SHA-NI
What changed, and why it matters
This is a one-word documentation comment fix. It changes an incorrect reference to 'ARM SHA2 intrinsics' to the correct 'x86 SHA-NI intrinsics' in a code comment. No executable code was changed, and there is no security impact.
No security action needed. This is a documentation-only correction and can be treated as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies a single Rust doc comment in hashes/src/sha256/crypto/x86_shani.rs. The function sha256d_64_2way is clearly an x86 SHA-NI implementation (evidenced by the #[target_feature(enable = “sha,sse2,ssse3,sse4.1”)] attribute and the x86_shani.rs filename), but its doc comment incorrectly said ‘ARM SHA2 intrinsics’. The patch corrects this to ‘x86 SHA-NI intrinsics’. No logic, unsafe boundaries, or behavior changed.
Changed components
hashes/src/sha256/crypto/x86_shani.rs (documentation only)Inspect captured patch +1 / −1
diff --git a/hashes/src/sha256/crypto/x86_shani.rs b/hashes/src/sha256/crypto/x86_shani.rs
index 9936b7d5..bdb7c5db 100644
--- a/hashes/src/sha256/crypto/x86_shani.rs
+++ b/hashes/src/sha256/crypto/x86_shani.rs
@@ -276,7 +276,7 @@ pub(super) unsafe fn process_block(state: &mut [u32; 8], block: &[u8]) {
_mm_storeu_si128(state.as_mut_ptr().add(4).cast::<__m128i>(), state1);
}
-/// computes `SHA256d` of two 64-byte inputs in parallel using ARM SHA2 intrinsics.
+/// Computes `SHA256d` of two 64-byte inputs in parallel using x86 SHA-NI intrinsics.
#[target_feature(enable = "sha,sse2,ssse3,sse4.1")]
pub(super) unsafe fn sha256d_64_2way(output: &mut [[u8; 32]; 2], input: &[[u8; 64]; 2]) {
// SHA256 round constants
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.