A bit mask gives the exact number of shared RISC-V SHA-2 destinations for two fixed entry states at 32 or 64 bits per word

0 citing publications

Fix two legal SHA-2 entry states for one active RISC-V element group. Allow each instruction to select any ordered pair of n-bit addends, with n equal to 32 or 64. We prove that the four-word destination sets share either zero or 2^(2n-k) values. The number k counts the bit positions where a XOR b differs between states. Two word tests decide whether the sets intersect. A direct inverse gives both selected pairs for each shared destination. With the same state, equality reduces to the previously known test of the two message halves. QEMU agreed on all 8,424 active group pairs and preserved the expected words in 1,248 inactive group pairs. These results apply to two rounds before feed-forward.

SHA-256 · SHA-512 · RISC-V · vector cryptography · instruction semantics · QEMU

No votes to show.

References

6
  1. usesAt 32 or 64 bits per word, RISC-V vsha2ch and vsha2cl give the same four words exactly when the two halves of vs1 match
  2. usesInterleaved SHA-256 gives the sequential digest when each active lane consumes the correct round pair
  3. reviewsWith a known state, 14 of 68 mixed four-lane masks always recover the addends of four SHA-256 rounds
  4. useshttps://docs.riscv.org/reference/isa/v20260120/unpriv/vector-crypto.html
  5. usesdoi:10.6028/NIST.FIPS.180-4
  6. useshttps://github.com/qemu/qemu/blob/v10.2.1/target/riscv/vcrypto_helper.c

Cited by

0 publications

No incoming citations on sciscape.