mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-10 19:16:18 +08:00
Updated SM4 with AESENCLAST (markdown)
parent
cb38028d95
commit
ddf84187f2
@ -177,6 +177,11 @@ func sm4_box_aesenclast_intel(rk uint32, t0, t1, t2, t3, a1l, a1h, a2l, a2h __m1
|
||||
```
|
||||
其实x = mm_shuffle_epi8(x, intelmaskSrows)在mm_aesenclast_si128之前调用,结果也是一样的。
|
||||
|
||||
类似于:
|
||||
```
|
||||
{(M1, C1, M2, C2) | SM4-S(x) = A2(AES-S(A1(x)), A1(x) = M1*x + C1, A2(x) = M2*(x+0x63) + C2 = M2*x + M2*0x63 + C2}
|
||||
```
|
||||
|
||||
## How to calculate lookup table from M, C?
|
||||
$\{ M\times i + C \mid i \in [0,255] \}$
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user