sha1p

SHA1 Parity (A32)

SHA1P.32 <Qd>, <Qn>, <Qm>

SHA1 hash update (Parity).

Pseudocode Operation

Qd[127:96] ← SHA1_PARITY(Qd[127:96], Qn[127:96], Qm[127:96])
Qd[95:64] ← SHA1_PARITY(Qd[95:64], Qn[95:64], Qm[95:64])
Qd[63:32] ← SHA1_PARITY(Qd[63:32], Qn[63:32], Qm[63:32])
Qd[31:0] ← SHA1_PARITY(Qd[31:0], Qn[31:0], Qm[31:0])

Example

SHA1P.32 q0, q1, q2

Encoding

Binary Layout
11110010
31:24
0
23
0
22
01
21:20
Vn
19:16
Vd
15:12
0011
11:8
N
7
Q
6
M
5
0
4
Vm
3:0
 
Format Crypto 3-Reg
Opcode 0xF2100C00
Extension Crypto

Operands

  • Qd
    State
  • Qn
    Hash
  • Qm
    Data

Related

Other forms of sha1p

More in Crypto

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x5E001000 SHA1P <Qd>, <Sn>, <Vm>.4S A64 01011110 | 00 | 0 | Rm | 0 | 001 | 00 | Rn | Rd

Description

SHA1 hash update (parity).

Operation

AArch64.CheckFPAdvSIMDEnabled();

bits(128) x = V[d, 128];
bits(32) y = V[n, 32];    // Note: 32 not 128 bits wide
bits(128) w = V[m, 128];
bits(32) t;

for e = 0 to 3
    t = SHAparity(x<63:32>, x<95:64>, x<127:96>);
    y = y + ROL(x<31:0>, 5) + t + Elem[w, e, 32];
    x<63:32> = ROL(x<63:32>, 30);
    <y, x> = ROL(y:x, 32);
V[d, 128] = x;