Updated SM4 with AESENCLAST (markdown)

Sun Yimin 2021-10-21 14:53:12 +08:00
parent ad27e8198e
commit 8897cc255d

@ -1,3 +1,14 @@
This is the pure golang code to study SM4 implementation with AESENCLAST instruction.
[sm4 with AESENCLAST](https://gist.github.com/emmansun/ae4677d71c75ff8407d5f5b3a884f5d2)
We combine various linear operations into two affine transforms (one on
each side), A1 and A2. Here affine transform consists of a multiplication
with a 8x8 binary matrix M and addition of a 8-bit constant C.
```
SM4-S(x) = A2(AES-S(A1(x))
A1(x) = M1*x + C1
A2(x) = M2*x + C2
```
The combinations of (M1, C1, M2, C2) are not unique.