Skip to content

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

Open
kleonyuan wants to merge 1 commit into
RustCrypto:masterfrom
kleonyuan:sha2-loongarch-rounds
Open

kleonyuan wants to merge 1 commit into
RustCrypto:masterfrom
kleonyuan:sha2-loongarch-rounds

Conversation

@kleonyuan

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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.

1 participant