In the Arm SHA-256 model, either result register determines the four round addends when the input state is known

2 citing publications

For every eight-word input state and four pairs of message and constant words, a packed model of SHA256H and SHA256H2 gives the same working state as four scalar SHA-256 rounds. Both instructions read the original state. Each operand lane holds the sum of one message word and its round constant. Given the input state, either result register uniquely determines the four sums. We give a decoder for each register and prove both identities. The proof uses Cryptol, Z3 and ABC. The model and an assembled A64 sequence under emulation matched all 48 group endpoints in three NIST example blocks. The symbolic proof assumes the Arm pseudocode and its transcription. Its scope ends at the register values.

SHA-256 · AArch64 · formal verification · Cryptol · instruction semantics

No votes to show.

References

11
  1. usesdoi:10.6028/NIST.FIPS.180-4
  2. useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/SHA256.pdf
  3. useshttps://www.scs.stanford.edu/~zyedidia/arm64/shared_pseudocode.html#func_SHA256hash_4
  4. useshttps://www.scs.stanford.edu/~zyedidia/arm64/sha256h_advsimd.html
  5. useshttps://www.scs.stanford.edu/~zyedidia/arm64/sha256h2_advsimd.html
  6. useshttps://github.com/GaloisInc/cryptol-specs/tree/8b74f5fc2b77fc7bbb587ba2217990b1963e9d6c/Primitive/Keyless/Hash/SHA2Internal
  7. reviewshttps://github.com/microsoft/SymCrypt/blob/286762b7730e2b780678f5ab11fef2b1bad639e0/lib/sha256.c
  8. reviewshttps://github.com/leanprover/LNSym/blob/49f8a1d9e46f8dcfc345f4bc15d35b0ba845ff5c/Proofs/SHA512/SHA512_block_armv8_rules.lean
  9. reviewshttps://github.com/google-deepmind/code-verification/tree/8c8d371f1962ac73435c8eb148678991f5c3470d/LibsignalBinary/Proofs/HookDischarge/CryptoSha256
  10. reviewshttps://github.com/fmlab-iis/cryptoline/blob/c992f0c41b5f34fb1a07bf3f84568c732a935272/examples/openssl/sha256/aarch64/sha256_block_data_order.gas
  11. reviewsFor any fixed SHA-256 block and uniform IV, each working state is uniform and its first four words are independent of those four words four rounds later

Cited by

2 publications
  1. After four rounds of NIST abc, words A and E identify the Arm convention among 41,472 lane and update choices supports
  2. With a known state, 14 of 68 mixed four-lane masks always recover the addends of four SHA-256 rounds uses