Friday, June 7, 2013

All Intermediate Values of Block Cipher PRESENT: One Example


Initial Key: ff ff ff ff ff ff ff ff ff ff
Key(80b) use at 01th Rnd: ff ff ff ff ff ff ff ff ff ff
Key(80b) use at 02th Rnd: 2f ff ff ff ff ff ff ff 7f ff
Key(80b) use at 03th Rnd: 1f ff e5 ff ff ff ff fe ff ff
Key(80b) use at 04th Rnd: 7f ff e3 ff fc bf ff fe 7f ff
Key(80b) use at 05th Rnd: 4f ff ef ff fc 7f ff 95 ff ff
Key(80b) use at 06th Rnd: 8f ff e9 ff fd ff ff 8d 7f f2
Key(80b) use at 07th Rnd: ff fe 51 ff fd 3f ff bc ff f1
Key(80b) use at 08th Rnd: ef fe 3f ff ca 3f ff a4 7f f7
Key(80b) use at 09th Rnd: 3f fe fd ff c7 ff f9 43 ff f4
Key(80b) use at 10th Rnd: df fe 87 ff df bf f8 fb 7f 28
Key(80b) use at 11th Rnd: af e5 1b ff d0 ff fb f2 ff 1f
Key(80b) use at 12th Rnd: 0f e3 f5 fc a3 7f fa 1a 7f 7e
Key(80b) use at 13th Rnd: 9f ef c1 fc 7e bf 94 69 ff 43
Key(80b) use at 14th Rnd: bf e8 73 fd f8 3f 8f d1 72 8d
Key(80b) use at 15th Rnd: 6e 51 b7 fd 0e 7f bf 0 f1 fa
Key(80b) use at 16th Rnd: 5e 3f 4d ca 36 ff a1 c8 77 e0
Key(80b) use at 17th Rnd: ce fc 0b c7 e9 b9 46 d7 f4 39
Key(80b) use at 18th Rnd: 2e 87 39 df 81 78 fd 3f a8 da
Key(80b) use at 19th Rnd: 25 1b 45 d0 e7 3b f0 26 1f a7
Key(80b) use at 20th Rnd: 43 f4 e4 a3 68 ba 1c ee fe 04
Key(80b) use at 21th Rnd: 7f c0 88 7e 9c 94 6d 1d 43 9d
Key(80b) use at 22th Rnd: f8 73 af f8 11 0f d3 98 0d a3
Key(80b) use at 23th Rnd: c1 b4 7f 0e 75 ff 2 2a fa 73
Key(80b) use at 24th Rnd: 0f 4e 78 36 8f e1 ce b4 60 45
Key(80b) use at 25th Rnd: 3c 8 a1 e9 cf 6 d1 f0 39 d6
Key(80b) use at 26th Rnd: c7 3a c7 81 14 3d 39 ec 5a 3e
Key(80b) use at 27th Rnd: 3b 47 d8 e7 58 f0 22 8a a7 3d
Key(80b) use at 28th Rnd: 04 e7 a7 68 fb 1c eb 13 84 51
Key(80b) use at 29th Rnd: d0 8a 20 9c f4 ed 1f 6d 9d 62
Key(80b) use at 30th Rnd: 83 ac 5a 11 44 13 9e 93 23 ed
Key(80b) use at 31th Rnd: a4 7d b0 75 8b 42 28 8d 73 d2
Key(80b) use at 32th Rnd: fe 7a 54 8f b6 0e b1 67 c5 11











Plaintext: ff ff ff ff ff ff ff ff

Round 01 Starts









Round Key: ff ff ff ff ff ff ff ff

State after addRoundKey: 0 0 0 0 0 0 0 0

State after sBoxLayer: cc cc cc cc cc cc cc cc

State after pLayer: ff ff ff ff 0 0 0 0

Round 02 Starts









Round Key: 2f ff ff ff ff ff ff ff

State after addRoundKey: d0 0 0 0 ff ff ff ff

State after sBoxLayer: 7c cc cc cc 22 22 22 22

State after pLayer: 7f 0 ff 0 80 ff 80 0

Round 03 Starts









Round Key: 1f ff e5 ff ff ff ff fe

State after addRoundKey: 60 ff 1a ff 7f 0 7f fe

State after sBoxLayer: ac 22 5f 22 d2 cc d2 21

State after pLayer: c4 b8 4c b8 b7 46 0c 89

Round 04 Starts









Round Key: 7f ff e3 ff fc bf ff fe

State after addRoundKey: bb 47 af 47 4b f9 f3 77

State after sBoxLayer: 88 9d f2 9d 98 2e 2b dd

State after pLayer: fb d7 19 13 0c 3c 3b 87

Round 05 Starts









Round Key: 4f ff ef ff fc 7f ff 95

State after addRoundKey: b4 28 f6 ec f0 43 c4 12

State after sBoxLayer: 89 63 2a 14 2c 9b 49 56

State after pLayer: c4 74 21 4b 3c 91 52 36

Round 06 Starts









Round Key: 8f ff e9 ff fd ff ff 8d

State after addRoundKey: 4b 8b c8 b4 c1 6e ad bb

State after sBoxLayer: 98 38 43 89 45 a1 f7 88

State after pLayer: d3 2b 8 cc 24 2c a5 5c

Round 07 Starts









Round Key: ff fe 51 ff fd 3f ff bc

State after addRoundKey: 2c d5 59 33 d9 13 5a e0

State after sBoxLayer: 64 70 0e bb 7e 5b 0f 1c

State after pLayer: 7 55 e4 e5 a7 d4 23 b6

Round 08 Starts









Round Key: ef fe 3f ff ca 3f ff a4

State after addRoundKey: e8 ab db 1a 6d eb dc 12

State after sBoxLayer: 13 f8 78 5f a7 18 74 56

State after pLayer: 35 90 2b 4f 69 c9 eb 6a

Round 09 Starts









Round Key: 3f fe fd ff c7 ff f9 43

State after addRoundKey: 0a 6e d6 b0 ae 36 12 29

State after sBoxLayer: cf a1 7a 8c f1 ba 56 6e

State after pLayer: e7 b1 c9 8f 6c b7 58 e8

Round 10 Starts









Round Key: df fe 87 ff df bf f8 fb

State after addRoundKey: 38 4f 4e 70 b3 8 a0 13

State after sBoxLayer: b3 92 91 dc 8b c3 fc 5b

State after pLayer: ab ed 3 2e d0 59 ee 5b

Round 11 Starts









Round Key: af e5 1b ff d0 ff fb f2

State after addRoundKey: 4 8 18 d1 0 a6 15 a9

State after sBoxLayer: c9 c3 53 75 cc fa 50 fe

State after pLayer: e0 f3 ab eb 16 33 5f 2a

Round 12 Starts









Round Key: 0f e3 f5 fc a3 7f fa 1a

State after addRoundKey: ef 10 5e 17 b5 4c a5 30

State after sBoxLayer: 12 5c 1 5d 80 94 f0 bc

State after pLayer: 11 ab 33 19 40 0a a7 2a

Round 13 Starts









Round Key: 9f ef c1 fc 7e bf 94 69

State after addRoundKey: 8e 44 f2 e5 3e b5 33 43

State after sBoxLayer: 31 99 26 10 b1 80 bb 9b

State after pLayer: 30 af 4 0 8c 8d f2 cf

Round 14 Starts









Round Key: bf e8 73 fd f8 3f 8f d1

State after addRoundKey: 8f 47 77 fd 74 b2 7d 1e

State after sBoxLayer: 32 9d dd 27 d9 86 d7 51

State after pLayer: 3c e8 1d 9e c3 14 bd cf

Round 15 Starts









Round Key: 6e 51 b7 fd 0e 7f bf 0

State after addRoundKey: 52 b9 aa 63 cd 6b 2 cf

State after sBoxLayer: 6 8e ff ab 47 a8 c6 42

State after pLayer: 3f 38 5c ce 5f 65 0d 40

Round 16 Starts









Round Key: 5e 3f 4d ca 36 ff a1 c8

State after addRoundKey: 61 7 11 4 69 9a ac 88

State after sBoxLayer: a5 cd 55 c9 ae ef f4 33

State after pLayer: b3 f8 7e 7c 80 fb 5d 1b

Round 17 Starts









Round Key: ce fc 0b c7 e9 b9 46 d7

State after addRoundKey: 7d 4 75 bb 69 42 1b cc

State after sBoxLayer: d7 c9 d0 88 ae 96 58 44

State after pLayer: bb e4 e8 5b 40 d0 d8 28

Round 18 Starts









Round Key: 2e 87 39 df 81 78 fd 3f

State after addRoundKey: 95 63 d1 84 c1 a8 25 17

State after sBoxLayer: e0 ab 75 39 45 f3 60 5d

State after pLayer: b1 21 8c eb ba 38 1f 73

Round 19 Starts









Round Key: 25 1b 45 d0 e7 3b f0 26

State after addRoundKey: 94 3a c9 3b 5d 3 ef 55

State after sBoxLayer: e9 bf 4e b8 7 cb 12 0

State after pLayer: f7 30 9c 60 b6 54 72 58

Round 20 Starts









Round Key: 43 f4 e4 a3 68 ba 1c ee

State after addRoundKey: b4 c4 78 c3 de ee 6e b6

State after sBoxLayer: 89 49 d3 4b 71 11 a1 8a

State after pLayer: d9 0b 2a 80 5 89 5d f4

Round 21 Starts









Round Key: 7f c0 88 7e 9c 94 6d 1d

State after addRoundKey: a6 cb a2 fe 99 1d 30 e9

State after sBoxLayer: fa 48 f6 21 ee 57 bc 1e

State after pLayer: d8 cd ac f5 ce d9 89 3a

Round 22 Starts









Round Key: f8 73 af f8 11 0f d3 98

State after addRoundKey: 20 be 3 0d df d6 5a a2

State after sBoxLayer: 6c 81 cb c7 72 7a 0f f6

State after pLayer: 6e 16 cb a7 85 f7 15 a6

Round 23 Starts









Round Key: c1 b4 7f 0e 75 ff 2 2a

State after addRoundKey: af a2 b4 a9 f0 8 17 8c

State after sBoxLayer: f2 f6 89 fe 2c c3 5d 34

State after pLayer: af 64 b3 6d f3 92 a6 1e

Round 24 Starts









Round Key: 0f 4e 78 36 8f e1 ce b4

State after addRoundKey: a0 2a cb 5b 7c 73 68 aa

State after sBoxLayer: fc 6f 48 8 d4 db a3 ff

State after pLayer: d5 bb f8 e3 b0 1f 90 b7

Round 25 Starts









Round Key: 3c 8 a1 e9 cf 6 d1 f0

State after addRoundKey: e9 b3 59 0a 7f 19 41 47

State after sBoxLayer: 1e 8b 0e cf d2 5e 95 9d

State after pLayer: 77 9b 47 b5 55 50 91 af

Round 26 Starts









Round Key: c7 3a c7 81 14 3d 39 ec

State after addRoundKey: b0 a1 80 34 41 6d a8 43

State after sBoxLayer: 8c f5 3c b9 95 a7 f3 9b

State after pLayer: e7 ab 74 58 2a 3d 3b df

Round 27 Starts









Round Key: 3b 47 d8 e7 58 f0 22 8a

State after addRoundKey: dc ec ac bf 72 cd 19 55

State after sBoxLayer: 74 14 f4 82 d6 47 5e 0

State after pLayer: 0a 84 dc fc 89 54 a8 98

Round 28 Starts









Round Key: 4 e7 a7 68 fb 1c eb 13

State after addRoundKey: 0e 63 7b 94 72 48 43 8b

State after sBoxLayer: c1 ab d8 e9 d6 93 9b 38

State after pLayer: bf ad 8a c0 32 56 59 be

Round 29 Starts









Round Key: d0 8a 20 9c f4 ed 1f 6d

State after addRoundKey: 6f 27 aa 5c c6 bb 46 d3

State after sBoxLayer: a2 6d ff 4 4a 88 9a 7b

State after pLayer: 9c 7d 3d 82 ec 47 1c 0b

Round 30 Starts









Round Key: 83 ac 5a 11 44 13 9e 93

State after addRoundKey: 1f d1 67 93 a8 54 82 98

State after sBoxLayer: 52 75 ad eb f3 9 36 e3

State after pLayer: 0f 92 b6 86 6b cf b5 d9

Round 31 Starts









Round Key: a4 7d b0 75 8b 42 28 8d

State after addRoundKey: ab ef 6 f3 e0 8d 9d 54

State after sBoxLayer: f8 12 ca 2b 1c 37 e7 9

State after pLayer: cd 49 88 5c 97 3c a1 b5

The Final(32) addRoundKey Starts









Round Key: fe 7a 54 8f b6 0e b1 67

The ciphertex is: 33 33 dc d3 21 32 10 d2