mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated SM4 with AESENCLAST (markdown)
parent
a62e735b72
commit
471d6d7d34
@ -24,6 +24,9 @@ My question is how to generate all (M1, C1, M2, C2)?
|
|||||||
**Evolution path**
|
**Evolution path**
|
||||||
|
|
||||||
sm4_box_aesenclast <-> sm4_box_aesbox_1 <-> sm4_box_aesbox_2 <-> sm4_box_aesbox_3 <-> sm4_box_aesbox_4
|
sm4_box_aesenclast <-> sm4_box_aesbox_1 <-> sm4_box_aesbox_2 <-> sm4_box_aesbox_3 <-> sm4_box_aesbox_4
|
||||||
|
|
||||||
|
**We note that each affine transform can be constructed from XOR of two 4x8-bit table lookups, which we implement with constant time byte shuffle instructions (each 16-entry table is in a single 128-bit register).**
|
||||||
|
|
||||||
```
|
```
|
||||||
sm4_box_aesenclast
|
sm4_box_aesenclast
|
||||||
y := mm_and_si128(x, const_0f)
|
y := mm_and_si128(x, const_0f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user