Updated SM4 with AESENCLAST (markdown)

Sun Yimin 2022-03-04 14:17:57 +08:00
parent fd0ff5388c
commit 247e0fa63c

@ -13,9 +13,7 @@ A2(x) = M2*x + C2
The combinations of (M1, C1, M2, C2) or (A1, A2) are not unique. The combinations of (M1, C1, M2, C2) or (A1, A2) are not unique.
Known (M1, C1, M2, C2), please reference [sm4 with AESENCLAST](https://gist.github.com/emmansun/ae4677d71c75ff8407d5f5b3a884f5d2) and [AES 和 SM4 S盒複合域實現方法python code](https://gist.github.com/emmansun/9f8d449072f6048538add79bd146b661). In [AES 和 SM4 S盒複合域實現方法python code](https://gist.github.com/emmansun/9f8d449072f6048538add79bd146b661), we found 8 groups of (M1, C1, M2, C2). Known (M1, C1, M2, C2), please reference [sm4 with AESENCLAST](https://gist.github.com/emmansun/ae4677d71c75ff8407d5f5b3a884f5d2) and [AES 和 SM4 S盒複合域實現方法python code](https://gist.github.com/emmansun/9f8d449072f6048538add79bd146b661). In [AES 和 SM4 S盒複合域實現方法python code](https://gist.github.com/emmansun/9f8d449072f6048538add79bd146b661), we found 8 groups of (M1, C1, M2, C2). 其实按[A very compact Rijndael S-box](https://calhoun.nps.edu/bitstream/handle/10945/791/NPS-MA-04-001.pdf?sequence=1&isAllowed=y),这八组对应**E All Possible Bases**的八组正规基1 4 19 22 37 40 55 58另外还有73 76 91 94 109 112 127 130八组正规基其它都是混合基或者多项式基共432组它们都假设trace is unity。
My question is how to generate all (M1, C1, M2, C2)?
``` ```
{(M1, C1, M2, C2) | SM4-S(x) = A2(AES-S(A1(x)), A1(x) = M1*x + C1, A2(x) = M2*x + C2} {(M1, C1, M2, C2) | SM4-S(x) = A2(AES-S(A1(x)), A1(x) = M1*x + C1, A2(x) = M2*x + C2}