Skip to content

sha2: fix round count comment in LoongArch64 SHA-512 backend - #932

Merged
newpavlov merged 1 commit into
RustCrypto:masterfrom
kleonyuan:sha2-loongarch-rounds
Oct 19, 2026
Merged

newpavlov merged 1 commit into
RustCrypto:masterfrom
kleonyuan:sha2-loongarch-rounds

Conversation

@kleonyuan

Copy link
Copy Markdown
Contributor

sha2/src/sha512/loongarch64_asm.rs says "Do 64 rounds of hashing" in front of the unrolled round sequence, but the sequence is rounda!(0..16) plus roundb!(16..79) — 80 rounds, as SHA-512 requires.

64 is the SHA-256 round count; the comment was copied from sha256/loongarch64_asm.rs:106, where it is correct.

Comment-only change, no behavior change. This backend is gated behind cfg(target_arch = "loongarch64"), so it is not compiled on other targets; cargo test -p sha2 passes.

@newpavlov
newpavlov merged commit 1a35dd1 into RustCrypto:master Oct 19, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants