Monday, December 21, 2015

Simon Cipher for 32/64.

The complete iteration for the Simon Cipher where K is the key expansion and C is the encryption block. Using the key block and test block specified by the Simon and Speck specification:
key value: 1918111009080100
test block: 65656877
result: c69be9bb

k[00] 1918 1110 0908 0100 
c[00] 6565 6877 
k[01] 71c3 1918 1110 0908 
c[01] bca2 6565 
k[02] b649 71c3 1918 1110 
c[02] bee3 bca2 
k[03] 56d4 b649 71c3 1918 
c[03] 37ba bee3 
k[04] e070 56d4 b649 71c3 
c[04] 5327 37ba 
k[05] f15a e070 56d4 b649 
c[05] 2ca6 5327 
k[06] c535 f15a e070 56d4 
c[06] 57fa 2ca6 
k[07] dd94 c535 f15a e070 
c[07] 8fcf 57fa 
k[08] 4010 dd94 c535 f15a 
c[08] 873b 8fcf 
k[09] 250a 4010 dd94 c535 
c[09] 687c 873b 
k[10] 6f66 250a 4010 dd94 
c[10] b397 687c 
k[11] e96b 6f66 250a 4010 
c[11] 7c95 b397 
k[12] 4bd8 e96b 6f66 250a 
c[12] 90fa 7c95 
k[13] 0fe5 4bd8 e96b 6f66 
c[13] 3ae5 90fa 
k[14] 7c47 0fe5 4bd8 e96b 
c[14] 7102 3ae5 
k[15] e0ef 7c47 0fe5 4bd8 
c[15] 1587 7102 
k[16] 3e21 e0ef 7c47 0fe5 
c[16] 6fc2 1587 
k[17] 065b 3e21 e0ef 7c47 
c[17] 676f 6fc2 
k[18] 438c 065b 3e21 e0ef 
c[18] c07e 676f 
k[19] f26a 438c 065b 3e21 
c[19] 86bb c07e 
k[20] b5c0 f26a 438c 065b 
c[20] edb7 86bb 
k[21] 8609 b5c0 f26a 438c 
c[21] a552 edb7 
k[22] 9f8e 8609 b5c0 f26a 
c[22] 79d4 a552 
k[23] d8bf 9f8e 8609 b5c0 
c[23] 6041 79d4 
k[24] 09ac d8bf 9f8e 8609 
c[24] 0d11 6041 
k[25] e812 09ac d8bf 9f8e 
c[25] c20c 0d11 
k[26] 2710 e812 09ac d8bf 
c[26] 9eac c20c 
k[27] 2caa 2710 e812 09ac 
c[27] 4c19 9eac 
k[28] 8d14 2caa 2710 e812 
c[28] bf65 4c19 
k[29] fa04 8d14 2caa 2710 
c[29] 3d16 bf65 
k[30] 32f2 fa04 8d14 2caa 
c[30] 7e01 3d16 
k[31] 7db9 32f2 fa04 8d14 
c[31] e9bb 7e01 
k[32] 4d83 7db9 32f2 fa04 
c[32] c69b e9bb
The test vector that was provided by the NSA seems to be explicitly aligned to hit the critical bits in the key expansion. Pretty nice piece of mathematics.

No comments:

Post a Comment