diff --git a/SM4-with-AESENCLAST.md b/SM4-with-AESENCLAST.md index edab26c..2acad48 100644 --- a/SM4-with-AESENCLAST.md +++ b/SM4-with-AESENCLAST.md @@ -13,9 +13,7 @@ A2(x) = M2*x + C2 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). - -My question is how to generate all (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。 ``` {(M1, C1, M2, C2) | SM4-S(x) = A2(AES-S(A1(x)), A1(x) = M1*x + C1, A2(x) = M2*x + C2}