sha256h

SHA256 Hash Part 1 (A64)

SHA256H <Qd>, <Qn>, <Vm>.4S

SHA256 hash part 1 (AArch64 NEON).

Details

SHA256 Hash Part 1 performs the first part of a SHA256 compression function round, operating on 128-bit SIMD registers containing four 32-bit words. The instruction takes hash state values from Qn, a round constant and message schedule word from Vm.4S, and produces updated hash state in Qd. Condition flags are unaffected. This instruction requires AArch64 execution state and the Crypto extension.

Pseudocode Operation

hash_state ← SHA256HashPart1(Qn, Vm.4S)
Qd ← hash_state

Example

SHA256H q0, q1, v2.4s.4S

Encoding

Binary Layout
01011110
00
0
Rm
010
0
00
Rn
Rd
 
Format Crypto
Opcode 0x5E004000
Extension Crypto

Operands

  • Qd
    Destination 128-bit SIMD register
  • Qn
    First source 128-bit SIMD register
  • Vm
    Second source SIMD/FP vector register

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x5E004000 SHA256H <Qd>, <Qn>, <Vm>.4S A64 01011110 | 00 | 0 | Rm | 010 | 0 | 00 | Rn | Rd

Description

SHA256 hash update (part 1).

Operation

AArch64.CheckFPAdvSIMDEnabled();

bits(128) result;
result = SHA256hash(V[d, 128], V[n, 128], V[m, 128], TRUE);
V[d, 128] = result;