Docstoc

Rijndael ENCRYPTION PROCESS

Document Sample
Rijndael ENCRYPTION PROCESS Powered By Docstoc
					NAMA                     : NAUFAL TAWANG Z.A
NIM/KELASA               : 08.11.1926 / S1 TI 5A


                                        RIJNDAEL
                                         ENCRYPTION PROCESS


Plaintext      : NAUFALTAWANGZULF (char)
Cipher key : 08111926AAAAAAAA (char)



Convert “Character” to “Hexadecimal” to “Binary”:
N    A    U     F             4E   41   55    46          01001110   01000001   01010101   01000110
A    L    T     A    hex >>   41   4C   54    41 bin >>   01000001   01001100   01010100   01000001
W    A    N     G             57   41   4E    47          01010111   01000001   01001110   01000111
Z    U    L     F             5A   55   4C    46          01011010   01010101   01001100   01000110

0    8   1      1             30   38   31    31          00110000   00111000   00110001   00110001
1    9   2      6    hex >>   31   39   32    36 bin >>   00110001   00111001   00110010   00110110
A    A   A      A             41   41   41    41          01000001   01000001   01000001   01000001
A    A   A      A             41   41   41    41          01000001   01000001   01000001   01000001


                                             INITIAL ROUND
AddRoundKey
4E       XOR        30   =     01001110         XOR   00110000       =   01111110      =     7E
41       XOR        31   =     01000001         XOR   00110001       =   11110000      =     70
57       XOR        41   =     01010111         XOR   01000001       =   00010110      =     16
5A       XOR        41   =     01011010         XOR   01000001       =   00011011      =     1B

41       XOR        38   =     01000001         XOR   00111000       =   01111001      =     79
4C       XOR        39   =     01001100         XOR   00111001       =   01110101      =     75
41       XOR        41   =     01000001         XOR   01000001       =   00000000      =     00
55       XOR        41   =     01010101         XOR   01000001       =   00010100      =     14

55       XOR        31   =     01010101         XOR   00110001       =   01100100      =     64
54       XOR        32   =     01010100         XOR   00110010       =   01100110      =     66
4E       XOR        41   =     01001110         XOR   01000001       =   00001111      =     0F
4C       XOR        41   =     01001100         XOR   01000001       =   00001101      =     0D
46    XOR    31    =     01000110          XOR     00110001     =    01110111   =   77
41    XOR    36    =     01000001          XOR     00110110     =    01110111   =   77
47    XOR    41    =     01000111          XOR     01000001     =    00000110   =   06
46    XOR    41    =     01000110          XOR     01000001     =    00000111   =   07


                                     Initial Round Results:
                                         7E   79 64     77
                                         70   75 66     77
                                         16   00 0F     06
                                         1B   14 0D     07


ROUND 1
SubBytes
7E   79 64   77                     F3 B6 43       F5
70   75 66   77   sub bytes >>      51 9D 33       F5
16   00 0F   06                     47 63 76       6F
1B   14 0D   07                     AF FA D7       C5



ShiftRows
F3   B6 43 F5                       F3   B6   43 F5
51   9D 33 F5     shift rows >>     9D   33   F5 51
47   63 76 6F                       76   6F   47 63
AF   FA D7 C5                       C5   AF   FA D7

                                                Fix
                                         F3 B6 43 F5
                                  Rotate over 1 byte (blue to red)
                                      51 9D 33 F5 51
                                  Rotate over 2 byte (blue to red)
                                    47 63 76 6F 47 63
                                  Rotate over 3 byte (blue to red)
                                  AF FA D7 C5 AF FA D7
MixColumns


   2    3    1    1                  F3                   F2

   1    2    3    1        x         9D          =        8D

   1    1    2    3                  76                   D6

   3    1    1    2                  C5                   74



Row-1 matrix * first-column after shift rows:
2 x F3 = 2 (11110011)                                3 x 9D = 2 (10011101) XOR 1 (10011101)
       = (11100110) XOR (00011011)                          = (10101110) XOR (11010111)
       = 11111101 = FD                                      = 1111001 = 79


1 x 76 = 1 (01110110)                                1 x C5 = 1 (11000101)
       = 01110110= 76                                       = 11000101= C5

                               (FD) XOR (79) XOR (76) XOR (C5) = F2


Row-2 matrix * first-column after shift rows:
1 x F3 = 1 (11110011)                                2 x 9D = 2 (10011101)
       = 11110011= F3                                       = (01111000) XOR (00011011)
                                                            = 01100011 = 63

3 x 76 = 2 (01110110) XOR 1 (01110110)
                                                     1 x C5 = 1 (11000101)
       = (11100001) XOR (01111101)
                                                            = 11000101= C5
       = 10011101 = 9C

                               (9D) XOR (63) XOR (9C) XOR (30) = 8D


Row-3 matrix * first-column after shift rows:
1 x F3 = 1 (11110011)                                1 x 9D = 1 (10011101)
       = 11110011= F3                                       = 10011101= 9D
2 x 76 = 2 (01110110)                                3 x C5 = 2 (11000101) XOR 1 (11000101)
       = (11111010) XOR (00011011)                           = (01111011) XOR (00110000)
       = 11100001 = E1                                       = 01001011 = 4B

                                (9D) XOR (BC) XOR (E1) XOR (4B) = D6


Row-4 matrix * first-column after shift rows:
3 x F3 = 2 (11110011) XOR 1 (11110011)
                                                     1 x 9D = 1 (10011101)
       = (00100001) XOR (10011101)
                                                             = 10011101= 9D
       = 10111100 = BC

1 x 76 = 1 (01110110)                                2 x C5 = 2 (11000101)
       = 01110110= 76                                        = (01100000) XOR (00011011)
                                                             = 01111011 = 7B

                               (BC) XOR (BC) XOR (7D) XOR (7B) = 74



   2    3    1    1                  B6                    E2
                           x                    =
   1    2    3    1                  33                    CE

   1    1    2    3                  6F                    B1

   3    1    1    2                  AF                    D8



Row-1 matrix * second-column after shift rows:
2 x B6 = 2 (10110110)                                3 x 33 = 2 (00110011) XOR 1 (00110011)
       = (01110000) XOR (00011011)                           = (00111011) XOR (00010000)
       = 01101011 = 6B                                       = 00101011 = 2B


1 x 6F = 1 (01101111)                                1 x AF = 1 (10101111)
       = 01101111= 6F                                        = 00110000 = AF

                                (6B) XOR (76) XOR (2B) XOR (30) = E2
Row-2 matrix * second-column after shift rows:
1 x B6 = 1 (10110110)                               2 x 33 = 2 (00110011)
      = 10110110= B6                                        = (00100000) XOR (00011011)
                                                            = 00111011 = 3B

3 x 6F = 2 (01101111) XOR 1 (01101111)
                                                    1 x AF = 1 (10101111)
      = (11110111) XOR (01110110)
                                                            = 10101111= AF
      = 10000001 = 81

                               (38) XOR (3B) XOR (81) XOR (30) = CE


Row-3 matrix * second-column after shift rows:
1 x B6 = 1 (10110110)                               1 x 33 = 1 (00110011)
      = 10110110= B6                                        = 00110011= 33


2 x 6F = 2 (01101111)                               3 x AF = 2 (10101111) XOR 1 (10101111)
      = (11101100) XOR (00011011)                           = (01111011) XOR (00110000)
      = 11110111 = F7                                       = 01001011 = 4B

                               (38) XOR (10) XOR (F7) XOR (4B) = B1


Row-4 matrix * second-column after shift rows:
3 x B6 = 2 (10110110) XOR 1 (10110110)
                                                    1 x 33 = 1 (00110011)
      = (01101011) XOR (00111000)
                                                            = 00110011= 33
      = 01010011 = 53


1 x 6F = 1 (01101111)                               2 x AF = 2 (10101111)
      = 01101111= 6F                                        = (01100000) XOR (00011011)
                                                            = 01111011 = 7B

                               (53) XOR (10) XOR (76) XOR (7B) = D8
   2    3    1    1                  43                    3F

   1    2    3    1                  F5                    81
                           x         47         =          2D
   1    1    2    3

   3    1    1    2                  FA                    98




Row-1 matrix * third-column after shift rows:
2 x 43 = 2 (11110101)                                3 x F5 = 2 (11110101) XOR 1 (11110101)
       = (00111010) XOR (00011011)                           = (10110010) XOR (01011001)
       = 00100001 = 21                                       = 11110000 = EB


1 x 47 = 1 (01000111)                                1 x FA = 1 (11111010)
       = 01000111= 47                                        = 11111010= FA


                                (21) XOR (EB) XOR (67) XOR (63) = 3F


Row-2 matrix * third-column after shift rows:
1 x 43 = 1 (11110101)                                2 x F5 = 2 (11110101)
       = 11110101= 43                                        = (10110010) XOR (00011011)
                                                             = 10101001= A9

3 x 47 = 2 (01000111) XOR 1 (01000111)
                                                     1 x FA = 1 (11111010)
       = (11010101) XOR (01100111)
                                                             = 01100011 = 63
       = 10110010 = B2

                                (9D) XOR (A9) XOR (B2) XOR (63) = 81


Row-3 matrix * third-column after shift rows:
1 x 43 = 1 (11110101)                                1 x F5 = 1 (11110101)
       = 11110101= 43                                        = 11110101= F5
2 x 47 = 2 (01000111)                               3 x FA = 2 (11111010) XOR 1 (11111010)
       = (11001110) XOR (00011011)                          = (11011101) XOR (01100011)
       = 11010101 = D5                                      = 10111110 = BE

                               (9D) XOR (59) XOR (D5) XOR (BE) = 2D


Row-4 matrix * third-column after shift rows:
3 x 43 = 2 (11110101) XOR 1 (01000011)
                                                    1 x F5 = 1 (11110101)
       = (00100001) XOR (10011101)
                                                            = 11110101= F5
       = 10111100 = BC

1 x 47 = 1 (01000111)                               2 x FA = 2 (11111010)
       = 01000111= 47                                       = (11000110) XOR (00011011)
                                                            = 11011101 = DD

                               (BC) XOR (59) XOR (67) XOR (DD) = 98




   2    3    1    1                  F5                   B6

   1    2    3    1        x         51         =         25

   1    1    2    3                  63                   00

   3    1    1    2                  D7                   83




Row-1 matrix * fourth-column after shift rows:
2 x F5 = 2 (11110101)                               3 x 51 = 2 (01010001) XOR 1 (01010001)
       = (11110110) XOR (00011011)                          = (01100011) XOR (10111100)
       = 11101101 = 3F                                      = 11011111 = 81

1 x 63 = 1 (01100011)                               1 x D7 = 1 (11010111)
       = 01100011= 63                                       = 11010111= D7

                               (ED) XOR (DF) XOR (FA) XOR (6B) = B6
Row-2 matrix * fourth-column after shift rows:
1 x F5 = 1 (11110101)
      = 11110101= F5

2 x 51 = 2 (01010001)
      = (01111000) XOR (00011011)
      = 01100011 = 63

3 x 63 = 2 (01100011) XOR 1 (11111010)
      = (11101111) XOR (11111010)
      = 00010101 = 15

1 x D7 = 1 (11010111)
      = 11010111= D7

                               (FB) XOR (63) XOR (15) XOR (6B) = 25


Row-3 matrix * fourth-column after shift rows:
1 x F5 = 1 (11110101)
      = 11110101= F5

1 x 51 = 1 (01010001)
      = 01010001= 51

2 x 63 = 2 (01100011)
      = (11110100) XOR (00011011)
      = 11101111 = EF

3 x D7 = 2 (11010111) XOR 1 (11010111)
      = (11001101) XOR (01101011)
      = 10100110 = A6

                               (FB) XOR (BC) XOR (EF) XOR (A6) = 00
Row-4 matrix * fourth-column after shift rows:
3 x F5 = 2 (11110101) XOR 1 (11110101)
                                                          1 x 51 = 1 (01010001)
       = (11101101) XOR (11111011)
                                                                   = 01010001= 51
       = 00010110 = 16

1 x63 = 1 (01100011)                                      2 x D7 = 2 (11010111)
       = 01100011= 63                                              = (11010110) XOR (00011011)
                                                                   = 11001101 = CD

                                     (16) XOR (BC) XOR (FA) XOR (CD) = 83


                                           MixColumn Result:
                                             F2    E2    3F   B6
                                             8D    CE    81   25
                                             D6    B1    2D   00
                                             74    D8    98   83

AddRoundKey
F2   E2   3F    B6              34   0C    3D   0C
8D   CE   81    25        XOR   B2   8B    B9   8F
D6   B1   2D    00              C2   83    C2   83
74   D8   98    83              86   C7    86   C7

     add round key 1:
F2        XOR        34     =    11110010          XOR        00110100      =   11000110     =   C6
8D        XOR        B2     =    10001101          XOR        10110010      =   00111111     =   3F
D6        XOR        C2     =    11010110          XOR        11000010      =   00010100     =   14
74        XOR        86     =    01110100          XOR        10000110      =   11110010     =   F2

     add round key 2:
E2        XOR        0C     =    11100010          XOR        00001100      =   11101110     =   EE
CE        XOR        8B     =    11001110          XOR        10001011      =   01000101     =   45
B1        XOR        83     =    10110001          XOR        10000011      =   00110010     =   32
D8        XOR        C7     =    11011000          XOR        11000111      =   00011111     =   1F
     add round key 3:
3F       XOR         3D       =     00111111        XOR        00111101   =   00000010   =   02
81       XOR         B9       =     10000001        XOR        10111001   =   00111000   =   38
2D       XOR         C2       =     00101101        XOR        11000010   =   11101111   =   EF
98       XOR         86       =     10011000        XOR        10000110   =   00011110   =   1E

     add round key 4:
B6       XOR         0C       =     10110110        XOR        00001100   =   10111010   =   BA
25       XOR         8F       =     00100101        XOR        10001111   =   10101010   =   AA
00       XOR         83       =     00000000        XOR        10000011   =   10000011   =   83
83       XOR         C7       =     10000011        XOR        11000111   =   01000100   =   44

     hasil add round key:
C6 EE 02 BA
3F 45 38 AA
14 32 EF 83
F2 1F 1E 44
ROUND 2  ROUND 6

ROUND 7
SubBytes
B0 FC      DA   C3                        E7   B0   57    2E
F7 E4      52   B0        sub bytes >>    68   69   00    E7
A3 66      D3   1C                        0A   33   66    9C
78 D1      07   0F                        BC   3E   C5    76

ShiftRows
E7 B0 57 2E                               E7 B0     57    2E
68 69 00 E7               shift rows >>   69 00     E7    68
0A 33 66 9C                               66 9C     0A    33
BC 3E C5 76                               76 BC     3E    C5
MixColumns
   mixcolumn 1:

   2    3    1     1                 E7       7E

   1    2    3     1       x         69   =   E9

   1    1    2     3                 66       D8

   3    1    1     2                 76       D1


2 x E7 = 2 x 11100111
       = 11000000 XOR 00011011
       = 11011011

3 x 69 = 2 (01101001) XOR 1 (01101001)
       = 11010111 XOR 11100110
       = 00110010

1 x 66 = 1 x 01100110
       = 01100110

1 x 76 = 1 x 01110110
       = 01110110

11011011
00110010
11111010
01001001     XOR
01111110= 7E

1 x E7 = 1 x 11100111
       = 11100111

2 x 69 = 2 x 01101001
       = 11001100 XOR 00011011
       = 11010111

3 x 66 = 2 (01100110) XOR 1 (01100110)
       = 11101111 XOR 11111010
       = 00010101

1 x 76 = 1 x 01110110
       = 01110110
11100000
11010111
00010101
01001001     XOR
11101001= E9

1 x E7 = 1 x 11100111
       = 11100111

1 x 69 = 1 x 01101001
       = 01101001

2 x 66 = 2 x 01100110
       = 11110100 XOR 00011011
       = 11101111

3 x 76 = 2 (01110110) XOR 1 (01110110)
       = 10010010 XOR 01001001
       = 11011011

11100000
11100110
11101111
11011011     XOR
11011000= D8

3 x E7 = 2 (11100111) XOR 1 (11100111)
       = 11011011 XOR 11100000
       = 00111011

1 x 69 = 1 x 01101001
       = 01101001
1 x 66 = 1 x 01100110
       = 01100110

2 x 76 = 2 x 01110110
       = 10010010

00111011
11100110
11111010
10010010     XOR
11010001= D1
    mixcolumn 2:

   2    3    1     1                 B0       5B
                           x         00   =   B3
   1    2    3     1

   1    1    2     3                 9C       4C

   3    1    1     2                 BC       34


2 x B0 = 2 x 10110000
       = 10100000

3 x 00 = 2 (00000000) XOR 1 (00000000)
       = 00000000XOR 10010001
       = 00000000

1x 9C = 1 x 10011100
       = 10011100

1 x BC = 1 x 10111100
       = 10111100

10100000
10101000
01100100
00001011     XOR
01011011= 5B

1 x B0 = 1 x 10110000
       = 10110000


2 x 00 = 2 x 00000000
       = 00000000XOR 00011011
       = 00000000

3 x 9C = 2 (10011100) XOR 1 (10011100)
       = 11001000 XOR 01100100
       = 10101100

1 x BC = 1 x 10111100
       = 10111100
01010000
00111001
10101100
00001011     XOR
10110011= B3

1 x B0 = 1 x 10110000
       = 10110000

1 x 00 = 1 x 00000000
       = 00000000

2 x 9C = 2 x 10011100
       = 11001000

3 x BC = 2 (10111100) XOR 1 (10111100)
       = 00010110 XOR 00001011
       = 00011101

01010000
10010001
11001000
00011101     XOR
01001100= 4C

3 x B0 = 3 (10110000) XOR 1 (10110000)
       = 10100000 XOR 01010000
       = 11110000

1 x 00 = 1 x 00000000
       = 00000000

1x 9C = 1 x 10011100
       = 10011100

2 x BC = 2 x 10111100
       = 00010110

11110000
10010001
01100100
00010110     XOR
00110100= 34
mixcolumn 3:

   2    3      1   1                 57       A8

   1    2      3   1                 E7       A2
                           x              =
   1    1      2   3                 0A       E6

   3    1      1   2                 3E       68


2 x 57 = 2 x 01010111
       = 00100010

3 x E7 = 2 (11100111) XOR 1 (11100111)
       = 11101110 XOR 01110111
       = 10011001

1 x 0A = 1 x 00001010
       = 00001010

1 x 3E = 1 x 00111110
       = 00111110

00100010
10011001
01010111
10110101     XOR
10101000= A8

1 x 57 = 1 x 01010111
       = 01010111

2 x E7 = 2 x 11100111
       = 11101110


3 x 0A = 2 (00001010) XOR 1 (00001010)
       = 10101110 XOR 01010111
       = 11111001

1 x 3E = 1 x 00111110
       = 00111110
00010001
11101110
11111001
10110101     XOR
10110011 = A2

1 x 57 = 1 x 01010111
       = 01010111

1 x E7 = 1 x 11100111
       = 11100111

2 x 0A = 2 x 00001010
       = 10101110

3 x 3E = 2 (00111110) XOR 1 (00111110)
       = 01110001 XOR 10110101
       = 11000100

00010001
01110111
10101110
11000100     XOR
11100110= E6

3 x 57 = 2 (01010111) XOR 1 (01010111)
       = 00100010 XOR 00010001
       = 00110011

1 x E7 = 1 x 11100111
       = 11100111

1 x 0A = 1 x 00001010
       = 00001010

2 x 3E = 2 x 00111110
       = 01101010 XOR 00011011
       = 01110001

00110011
01110111
01010111
01110001     XOR
01101000 = 68
    mixcolumn 4:

   2    3    1     1                 2E       12

   1    2    3     1                 68       6E
                           x              =
   1    1    2     3                 33       74

   3    1    1     2                 C5       B8


2 x 2E = 2 x 00101110
       = 00101000

3 x 68 = 2 (01101000) XOR 1 (01101000)
       = 11111110 XOR 01111111
       = 10000001

1 x 33 = 1 x 00110011
       = 00110011

1 x C5 = 1 x 11000101
       = 11000101

00101000
10000001
11000100
00001101     XOR
00010010 = 12

1 x 2E = 1 x 00101110
       = 00101110

2 x 68 = 2 x 01101000
       = 11111110

3 x 33 = 2 (00110011) XOR 1 (00110011)
       = 10010011 XOR 11000100
       = 01010111

1 x C5 = 1 x 11000101
       = 11000101
00010100
11111110
01010111
00001101     XOR
01101110 = 6E

1 x 2E = 1 x 00101110
       = 00101110

1 x 68 = 1 x 01101000
       = 01101000

2 x 33 = 2 x 00110011
       = 10001000 XOR 00011011
       = 10010011

3 x C5 = 2 (11000101) XOR 1 (11000101)
       = 00011010 XOR 00001101
       = 00010111

00010100
01111111
10010011
00010111     XOR
01110100 = 74

3 x 2E = 2 (00101110) XOR 1 (00101110)
       = 00101000 XOR 00010100
       = 00111100

1 x 68 = 1 x 01101000
       = 01111111

1 x 33 = 1 x 00110011
       = 11000100

2 x C5 = 2 x 11000101
       = 00011010


00111100
01111111
11000100
00011010     XOR
10111000 = B8
     hasil mixcolumns:
7E   5B   A8    12
E9   B3   A2    6E
D8   4C   E6    74
D1   34   68    B8

AddRoundKey
7E 5B A8 12                     AA   7A   EE   E0
E9 B3 A2 6E               XOR   86   88   E3   31
D8 4C E6 74                     7A   CF   70   E1
D1 34 68 B8                     93   CD   51   17

     add round key 1:
7E        XOR        AA     =    01111110       XOR   10101010   =   11010100   =   D4
E9        XOR        86     =    11101001       XOR   10000110   =   01101111   =   6F
D8        XOR        7A     =    11011000       XOR   01111010   =   10101110   =   AE
D1        XOR        93     =    11010001       XOR   10010011   =   01000010   =   42

     add round key 2:
5B        XOR        7A     =    01011011       XOR   01111010   =   00100001   =   21
B3        XOR        88     =    10110011       XOR   10001000   =   00111011   =   3B
4C        XOR        CF     =    01001100       XOR   11001111   =   10000011   =   83
34        XOR        CD     =    00110100       XOR   11001101   =   11111001   =   F9

     add round key 3:
A8        XOR        EE     =    10101000       XOR   11101110   =   01000110   =   46
A2        XOR        E3     =    10100010       XOR   11100011   =   01000001   =   41
E6        XOR        70     =    11100110       XOR   01110000   =   10010110   =   96
68        XOR        51     =    01101000       XOR   01010001   =   00111001   =   39

     add round key 4:
12        XOR        E0     =    00010010       XOR   11100000   =   11110010   =   F2
6E        XOR        31     =    01101110       XOR   00110001   =   01011111   =   5F
74        XOR        E1     =    01110100       XOR   11100001   =   10010101   =   95
B8        XOR        17     =    10111000       XOR   00010111   =   10101111   =   AF



     hasil add round key:
D4 21      46 F2
6F 3B      41 5F
A2 83      96 95
42 F9      39 AF
ROUND 8
SubBytes
D4 21       46       F2                       48    FD   5A 89
6F 3B       41       5F       sub bytes >>    A8    E2   83 CF
A2 83       96       95                       3A    EC   90 2A
42 F9       39       AF                       2C    99   12 79

ShiftRows
48 FD 5A 89                                   48    FD   5A       89
A8 E2 83 CF                   shift rows >>   E2    83   CF       A8
3A EC 90 2A                                   90    2A   3A       EC
2C 99 12 79                                   79    2C   99       12

MixColumns
   mixcolumn 1 :

   2    3        1        1                    48                      44

   1    2        3        1                    E2                      45
                                     x                        =
   1    1        2        3                    90                      1A

   3    1        1        2                    79                      58


2 x 48 = 2 x 01001000
       = 01110000 XOR 00011011
       = 01101011

3 x E2 = 2 (00111101) XOR 1 (00111101)
       = 01111010 XOR 00111101
       = 01000111

1 x 90 = 1 x 10010000
       = 10010000

1 x 79 = 1 x 01111001
       = 01111001



01101011
01000111
10010000
01111001     XOR
01000100= 44
1 x 48 = 1 x 01001000
       = 01001000

2 x E2 = 2 x 11100010
       = 01111010

3 x 90 = 2 (00100001) XOR 1 (00100001)
       = 01000010 XOR 00100001
       = 01100011

1 x 79 = 1 x 01111001
       = 01111001

01001000
01111010
01100011
01111001     XOR
01000101= 45

1 x 48 = 1 x 01001000
       = 01001000

1 x E2 = 1 x 11100010
       = 11100010

2 x 90 = 2 x 10010000
       = 01000010

3 x 79 = 2 (10000000) XOR 1 (10000000)
       = 00011011 XOR 10000000
       = 10011011

01001000
00111101
01000010
10011011     XOR
00011010= 1A



3 x 48 = 2 (10111000) XOR 1 (10111000)
       = 01101011 XOR 10111000
       = 11010011

1 x E2 = 1 x 11100010
       = 11100010
1 x 90 = 1 x 10010000
       = 10010000

2 x 79 = 2 x 10000000
       = 00000000 XOR 00011011
       = 00011011

11010011
11100010
10010000
00011011     XOR
01011000= 58

    mixcolumn 2:

   2    3    1     1                 FD       79

   1    2    3     1       x         83   =   B2

   1    1    2     3                 2A       5E

   3    1    1     2                 2C       ED



2 x FD = 2 x 11111101
       = 10000010 XOR 00011011
       = 10011001

3 x 83 = 2 (01111011) XOR 1 (01111011)
       = 11110110 XOR 01111011
       = 10001101

1 x 2A = 1 x 00101010
       = 00101010

1 x 2C = 1 x 00101100
       = 00101100


10011001
10001101
00101010
00101100     XOR
01111001= 79
1 x FD = 1 x 11111101
       = 11111101

2 x 83 = 2 x 10000011
       = 11110110

3 x 2A = 2 (11011011) XOR 1 (11011011)
       = 10101101 XOR 11011011
       = 01110110

1 x 2C = 1 x 00101100
       = 00101100

11111101
11110110
01110110
00101100     XOR
10110010= B2

1 x FD = 1 x 11111101
       = 11111101

1 x 83 = 1 x 10000011
       = 10000011

2 x 2A = 2 x 00101010
       = 10110110 XOR 00011011
       = 10101101

3 x 2C = 2 (00000011) XOR 1 (00000011)
       = 00000110 XOR 00000011
       = 00000101

11000001
01111011
10101101
00000101     XOR
01011110= 5E


3 x FD = 2 (11000001) XOR 1 (11000001)
       = 10011001 XOR 11000001
       = 01011000

1 x 83 = 1 x 10000011
       = 10000011
1 x 2A = 1 x 00101010
       = 00101010

2 x 2C = 00101100
       = 00000110

01011000
10000011
00101010
00000110     XOR
11101101= ED


    mixcolumn 3:


   2    3    1      1                5A       5D

   1    2    3      1                CF       08
                           x              =

   1    1    2      3                3A       51

   3    1    1      2                99       32



2 x 5A = 2 x 01011010
       = 00010010

3 x CF = 2 (11101000) XOR 1 (11101000)
       = 11001011 XOR 11101000
       = 00100011

1 x 3A = 1 x 00111010
       = 00111010

1 x 99 = 1 x 10011001
       = 10011001


00010010
00100011
00111010
10011001     XOR
01011101= 5D
1 x 5A = 1 x 01011010
       = 01011010

2 x CF = 2 x 11001111
       = 11010000 XOR 00011011
       = 11001011

3 x 3A = 2 (10010110) XOR 1 (10010110)
       = 00110111 XOR 10010110
       = 10100001

1 x 99 = 1 x 01011010
      = 10011001

01011010
11001011
10100001
01011010     XOR
00001000= 08

1 x 5A = 1 x 01011010
       = 01011010

1 x CF = 1 x 11001111
       = 11001111

2 x 96 = 2 x 10010110
       = 00101100 XOR 00011011
       = 00110111

3 x F9 = 2 (11111001) XOR 1 (11111001)
       = 11101001 XOR 11111001
       = 00010000

00001001
11101000
00110111
00010000     XOR
01010001= 51

3 x 09 = 2 (00001001) XOR 1 (00001001)
       = 00010010 XOR 00001001
       = 00011011

1 x E8 = 1 x 11101000
       = 11101000
1 x 96 = 1 x 10010110
       = 10010110

2 x F9 = 2 x 11111001
       = 11110010 XOR 00011011
       = 11101001

00011011
11101000
10010110
11101001     XOR
00110010= 32


    mixcolumn 4:


   2    3    1     1                 89       14

   1    2    3     1                 A8       FF
                           x              =

   1    1    2     3                 EC       D4

   3    1    1     2                 12       E0



2 x 89 = 2 x 10001001
       = 00010010

3 x A8 = 2 (10101000) XOR 1 (10101000)
       = 00000011 XOR 10001100
       = 10001111

1 x EC = 1 x 11101100
       = 11101100

1 x 12 = 1 x 00010010
       = 00010010

00110100
10001111
11101100
00010010     XOR
00010100= 14
1 x 89 = 1 x 10001001
       = 00011010

2 x A8 = 2 x 10101000
       = 00011000 XOR 00011011
       = 00000011

3 x EC = 2 (11101100) XOR 1 (11101100)
       = 01101011 XOR 10111000
       = 11010011

1 x 12 = 1 x 00010010
       = 00010010

10001001
00000011
11010011
00010010     XOR
11111111= FF

1 x 89 = 1 x 10001001
       = 10001001

1 x A8 = 1 x 10101000
       = 10101000

2 x EC = 2 x 11101100
       = 01110000 XOR 00011011
       = 01101011

3 x 12 = 2 (00010010) XOR 1 (00010010)
       = 11011011 XOR 11100000
       = 00111011

10001001
10101000
01101011
00111011     XOR
11010100= D4

3 x 89 = 2 (10001001) XOR 1 (10001001)
       = 00110100 XOR 00011010
       = 00101110

1 x A8 = 1 x 10101000
       = 10001100
1 x EC = 1 x 11101100
       = 10111000

2 x 12 = 2 x 00010010
       = 11000000 XOR 00011011
       = 11011011

00101110
10101000
11101100
11011011     XOR
11100000= E0

     hasil mixcolumns:
44   79   5D 14
45   B2   08 FF
1A   5E   51 D4
58   ED   32 E0

AddRoundKey
44   79   5D 14               ED   97   79 99
45   B2   08 FF         XOR   7E   F6   15 24
1A   5E   51 D4               8A   45   35 D4
58   ED   32 E0               72   BF   EE F9

     add round key 1:
44        XOR     ED      =   01000100      XOR   11101101   =   10101001   =   A9
45        XOR     7E      =   01000101      XOR   01111110   =   00111011   =   3B
1A        XOR     8A      =   00011010      XOR   10001010   =   10010000   =   90
58        XOR     72      =   01011000      XOR   01110010   =   00101010   =   2A

     add round key 2:
79        XOR     97      =   01111001      XOR   10010111   =   11101110   =   EE
B2        XOR     F6      =   10110010      XOR   11110110   =   01000100   =   44
5E        XOR     45      =   01011110      XOR   01000101   =   00011011   =   1B
ED        XOR     BF      =   11101101      XOR   10111111   =   01010010   =   52

     add round key 3:
5D        XOR     79      =   01011101      XOR   01111001   =   00100100   =   24
08        XOR     15      =   00001000      XOR   00010101   =   00011101   =   1D
51        XOR     35      =   01010001      XOR   00110101   =   01100100   =   64
32        XOR     EE      =   00110010      XOR   11101110   =   11011100   =   DC
     add round key 4:
14         XOR           99         =       00010100     XOR       10011001   =   10001101   =   8D
FF         XOR           24         =       11111111     XOR       00100100   =   11011011   =   DB
D4         XOR           D4         =       11010100     XOR       11010100   =   00000000   =   00
E0         XOR           F9         =       11100000     XOR       11111001   =   00011001   =   19

     hasil add round key:
A9       EE 24      8D
3B       44 1D      DB
90       1B 64      00
2A       52 DC      19

ROUND 9
SubBytes
A9 EE          24       8D                       D3    28 36 5D
3B 44          1D       DB       sub bytes >>    E2    1B A4 B9
90 1B          64       00                       60    AF 43 63
2A 52          DC       19                       E5    00 86 D4

ShiftRows
D3 28 36 5D                                      D3 28 36 5D
E2 1B A4 B9                      shift rows >>   1B A4 B9 E2
60 AF 43 63                                      43 63 60 AF
E5 00 86 D4                                      D4 E5 00 86

MixColumns
   mixcolumn 1:

     2     3        1        1                    D3                 07

     1     2        3        1          x         1B           =     F4

     1     1        2        3                    43                 29

     3     1        1        2                    D4                 B5



2 x D3 = 2 x 11010011
       = 10000000
3 x 1B = 2 (00011011) XOR 1 (00011011)
       = 01100001 XOR 10111101
       = 11011100

1 x 43 = 1 x 01000011
       = 01000011
1 x D4 = 1 x 11010100
       = 11010100

10000000
11011100
01000011
11010100     XOR
00000111= 07

1 x D3 = 1 x 11010011
       = 11010011

2 x 1B = 2 x 00011011
       = 01111010 XOR 00011011
       = 01100001

3 x 43 = 2 (01000011) XOR 1 (01000011)
       = 10000110 XOR 01000011
       = 11000101

1 x D4 = 1 x 11010100
       = 11010100

11010011
01100001
11000101
11010100     XOR
11110100= F4

1 x D3 = 1 x 11010011
       = 01000000

1 x 1B = 1 x 00011011
       = 00011011

2 x 43 = 2 x 01000011
       = 10000110


3 x D4 = 2 (11010100) XOR 1 (11010100)
       = 10001100 XOR 01000110
       = 11001010
01000000
00011011
10000110
11001010     XOR
00101001= 29

3 x D3 = 2 (11010011) XOR 1 (11010011)
       = 10000000 XOR 01000000
       = 11000000

1 x 1B = 1 x 00011011
       = 00011011

1 x 43 = 1 x 01000011
       = 01000011

2 x D4 = 2 x 11010100
       = 10001100

11000000
00011011
01000011
10001100     XOR
10110101= B5

    mixcolumn 2:

   2    3    1     1                 28       21

   1    2    3     1       x         A4   =   3B

   1    1    2     3                 63       7E

   3    1    1     2                 E5       6E


2 x 28 = 2 x 00101000
       = 01001110 XOR 00011011
       = 01010101

3 x A4 = 2 (10100100) XOR 1 (10100100)
       = 10100100XOR 00000110
       = 00001010
1 x 63 = 1 x 01100011
       = 01100011
1 x E5 = 1 x 11100101
       = 11100101

01010101
00001010
01100011
11100101     XOR
11101010 = 21

1 x 28 = 1 x 00101000
       = 00101000

2 x A4 = 2 x 10100100
       = 00001100

3 x 63 = 2 (01100011) XOR 1 (01100011)
       = 11101111 XOR 11111010
       = 00010101

1 x E5 = 1 x 11100101
       = 11100101

00101000
00001100
00010101
11100101     XOR
00111011= 3B

1 x 28 = 1 x 00101000
       = 00101000

1 x A4 = 1 x 10100100
       = 10100100

2 x 63 = 2 x 01100011
       = 11110100 XOR 00011011
       = 11101111

3 x E5 = 2 (11100101) XOR 1 (11100101)
       = 10011110 XOR 01001111
       = 11010001
00101000
10100100
11101111
11010001     XOR
01111110= 7E

3 x 28 = 2 (00101000) XOR 1 (00101000)
       = 01010101 XOR 10100111
       = 11110010

1 x A4 = 1 x 10100100
       = 10100100

1 x 63 = 1 x 01100011
       = 01100011

2 x E5 = 2 x 11100101
       = 10011110

11110010
10100100
01100011
10011110     XOR
01101110= 6E

    mixcolumn 3:

   2    3    1     1                 36       DC

   1    2    3     1                 B9       FF
                           x              =
   1    1    2     3                 60       4F

   3    1    1     2                 00       83

2 x 36 = 2 x 00110110
       = 11101110

3 x B9 = 2 (10111001) XOR 1 (10111001)
       = 01111000 XOR 00111100
       = 01000100

1 x 60 = 1 x 01100000
       = 01100000

1 x 00 = 1 x 00000000
       = 00000000
11101110
01000100
01100000
00000000     XOR
11011100= DC

1 x 36 = 1 x 00110110
      = 00110110

2 x B9 = 2 x 10111001
      = 10111001

3 x 60 = 2 (01100000) XOR 1 (01100000)
      = 10010001 XOR 11000101
      = 01010100

1 x 00 = 1 x 00000000
       = 00000000

00110110
01111000
01010100
00000000     XOR
11111111= FF

1 x 36 = 1 x 00110110
      = 00110110

1 x B9 = 1 x 10111001
      = 10111001

2 x 60 = 2 x 01100000
      = 10001010 XOR 00011011
      = 10010001

3 x 00 = 2 (00000000) XOR 1 (00000000)
      = 00000000XOR 00100101
      = 01101111

00110110
10111001
10010001
01101111     XOR
01001111= 4F
3 x 36 = 2 (01110111) XOR 1 (01110111)
      = 11101110 XOR 01110111
      = 10011001

1 x B9 = 1 x 10111001
      = 10111001

1 x 60 = 1 x 01100000
       = 01100000

2 x 00 = 2 x 00000000
       = 00000000

10011001
10111001
01100000
01001010     XOR
10000011= 83


    mixcolumn 4:


   2    3    1     1                 5D       AE

   1    2    3     1       x         E2   =   EE

   1    1    2     3                 AF       6B

   3    1    1     2                 86       BD


2 x 5D = 2 x 01011101
       = 10111100 XOR 00011011
       = 10100111

3 x E2 = 2 (11100010) XOR 1 (11100010)
       = 11001001 XOR 11101001
       = 00100000

1 x AF = 1 x 10101111
       = 10101111

1 x 86 = 1 x 10000110
       = 10000110
10100111
00100000
10101111
01000000     XOR
10101110= AE

1 x 5D = 1 x 01011110
       = 01011110

2 x E2 = 2 x 11100010
       = 11010010 XOR 00011011
       = 11001001

3 x AF = 2 (10101111) XOR 1 (10101111)
       = 10010111 XOR 11000110
       = 01010001

1 x 86 = 1 x 10000110
       = 10000110

01011110
11100010
01010001
10000110     XOR
11101110= EE

1 x 5D = 1 x 01011110
       = 01011110

1 x E2 = 1 x 11100010
       = 11100010

2 x AF = 2 x 10101111
       = 10001100 XOR
       = 10010111

3 x 86 = 2 (10000110) XOR 1 (10000110)
       = 10000000 XOR 01000000
       = 11000000

01011110
11100010
10010111
11000000     XOR
01101011= 6B
3 x 5D = 2 (01011110) XOR 1 (01011110)
       = 10100111 XOR 11011110
       = 01111001

1 x E2 = 1 x 11100010
       = 11100010

1 x AF = 1 x 10101111
       = 10101111

2 x 86 = 2 x 10000110
       = 10000000

01111001
11100010
10101111
10000000     XOR
10111101= BD

      hasil mixcolumns:
07 21 DC AE
F4 3B FF EE
29 7E 4F 6B
85 6E 83 BD

AddRoundKey
07    21 DC AE                 C0   57 2E B7
F4    3B FF EE           XOR   36   C0 D5 F1
29    7E 4F 6B                 13   56 63 B7
85    6E 83 BD                 9C   23 CD 34

      add round key 1:
 07       XOR      C0      =    00000111   XOR   11000000   =   11000111   =   C7
 F4       XOR      36      =    11110100   XOR   00110110   =   11000010   =   C2
 29       XOR      13      =    00101001   XOR   00010011   =   00111010   =   3A
 85       XOR      9C      =    10000101   XOR   10011100   =   00011001   =   19

      add round key 2:
 21       XOR      57      =    00100001   XOR   01010111   =   01110110   =   76
 3B       XOR      C0      =    00111011   XOR   11000000   =   11111011   =   FB
 7E       XOR      56      =    01111110   XOR   01010110   =   00101000   =   28
 6E       XOR      23      =    01101110   XOR   00100011   =   01001101   =   4D
     add round key 3:
DC        XOR     2E        =    11011100            XOR        00101110   =   11110010   =   F2
FF        XOR     D5        =    11111111            XOR        11010101   =   00101010   =   2A
4F        XOR     63        =    01001111            XOR        01100011   =   00101100   =   2C
83        XOR     CD        =    10000011            XOR        11001101   =   01001110   =   4E

     add round key 4:
AE        XOR     B7        =    10101110            XOR        10110111   =   00011001   =   19
EE        XOR     F1        =    11101110            XOR        11110001   =   00011111   =   1F
6B        XOR     B7        =    01101011            XOR        10110111   =   11011100   =   DC
BD        XOR     34        =    10111101            XOR        00110100   =   10001001   =   89

     hasil add round key:
C7 76 F2 19
C2 FB 2A 1F
3A 28 2C DC
19 4D 4E 89

ROUND 10
SubBytes
C7 76 F2 19                                  C6 38      89 D4
C2 FB 2A 1F             sub bytes >>         25 0F      E5 C0
3A 28 2C DC                                  80 34      71 86
19 4D 4E 89                                  D4 E3      2F A7

ShiftRows
C6 38 89        D4                           C6 38      89 D4
25 0F E5        C0      shift rows >>        OF E5      C0 25
80 34 71        86                           71 86      80 34
D4 E3 2F        A7                           A7 D4      E3 2F

AddRoundKey
C6   38   89 D4                 57      00    2E   99
OF   E5   C0 25         XOR     9F      5F    8A   7B
71   86   80 34                 0B      5D    3E   89
A7   D4   E3 2F                 35      16    DB   EF

     add round key 1:
C6        XOR     57        =    11000110            XOR        01010111   =   10010001   =   91
0F        XOR     9F        =    00001111            XOR        10011111   =   10010000   =   90
71        XOR     0B        =    01110001            XOR        00001011   =   01111010   =   7A
A7        XOR     35        =    10100111            XOR        00110101   =   10010010   =   92
     add round key 2:
38       XOR      00     =     00111000         XOR   00000000   =   00111000   =   38
E5       XOR      5F     =     11100101         XOR   01011111   =   10111010   =   BA
86       XOR      5D     =     10000110         XOR   01011101   =   11011011   =   DB
D4       XOR      16     =     11010100         XOR   00010110   =   11000010   =   C2

     add round key 3:
89       XOR      2E     =     10001001         XOR   00101110   =   10100111   =   A7
C0       XOR      8A     =     11000000         XOR   10001010   =   01001010   =   4A
80       XOR      3E     =     10000000         XOR   00111110   =   10111110   =   BE
E3       XOR      DB     =     11100011         XOR   11011011   =   00111000   =   38

     add round key 4:
D4       XOR      99     =     11010100         XOR   11001000   =   01001101   =   4D
25       XOR      7B     =     00100101         XOR   01111011   =   01011110   =   5E
34       XOR      89     =     00110100         XOR   10001001   =   10111101   =   BD
2F       XOR      EF     =     00101111         XOR   11101111   =   11000000   =   C0




     hasil add round key (OutPut/CipherText):

91    38    A7    4D
90    BA    4A    5E
7A    DB    BE    BD
92    C2    38    C0
RIJNDAEL: KEY SCHEDULE

cipherkey : 08111926AAAAAAAA
0 8 1 1               30 38 31              31          00110000    00111000   00110001     00110001
1 9 2 6 hex >> 31 39 32                     36 bin >>   00110001    00111001   00110010     00110110
A A A A               41 41 41              41          01000001    01000001   01000001     01000001
A A A A               41 41 41              41          01000001    01000001   01000001     01000001

RCon:
01 02    04   08   10   20   40   80   1B   36
00 00    00   00   00   00   00   00   00   00
00 00    00   00   00   00   00   00   00   00
00 00    00   00   00   00   00   00   00   00

ROUND KEY 1
   RotWord & SubBytes dari cipherkey[0] kolom 4 adalah: (*1)
31                  36                   05
36 rot word >>      41 sub bytes >> 83
41                  41                   83
41                  31                   C7
   pencarian roundkey[1] kolom 1 adalah:
   cipherkey[0] kolom ke 1 XOR (*1) XOR Rcon kolom ke 1:
30 XOR 05 XOR 01 = 0011000 XOR 00000101                            XOR   00000001   =   00110100   =   34
31 XOR 83 XOR 00 = 0011001 XOR 10000011                            XOR   00000000   =   10110010   =   B2
41 XOR 83 XOR 00 = 0100001 XOR 00101100                            XOR   00000000   =   11000010   =   C2
41 XOR C7 XOR 00 = 0100001 XOR 11000111                            XOR   00000000   =   10000110   =   86

     pencarian roundkey[1] kolom 2 adalah:
     cipherkey[0] kolom ke 2 XOR roundkey[1] kolom ke 1:
38     XOR    34 =      00111000     XOR     00110100      =   00001100    =   0C
39     XOR    B2 =      00111001     XOR     10110010      =   10001011    =   8B
41     XOR C2 =         01000001     XOR     11000010      =   10000011    =   83
41     XOR    86 =      01000001     XOR     10000110      =   11000111    =   C7

     pencarian roundkey[1] kolom 3 adalah:
     cipherkey[0] kolom ke 3 XOR roundkey[1] kolom ke 2:
31     XOR    0C =      00110001     XOR     00001100      =   00111101    =   3D
32     XOR 8B =         00110010     XOR     10001011      =   10111001    =   B9
41     XOR    83 =      01000001     XOR     10000011      =   11000010    =   C2
41     XOR    C7 =      01000001     XOR     11000111      =   10000110    =   86

  pencarian roundkey[1] kolom 4 adalah:
  cipherkey[0] kolom ke 4 XOR roundkey[1] kolom ke 3:
31 XOR 3D =          00110001     XOR     00111101    =        00001100    =   0C
36 XOR B9 =          00110110     XOR     10111001    =        10001111    =   8F
41    XOR     C2        =   01000001   XOR   11000010     =   10000011   =   83
41    XOR     86        =   01000001   XOR   10000110     =   11000111   =   C7

     hasil round key[1]:
34    0C    3D     0C
B2    8B    B9     8F
C2    83    C2     83
86    C7    86     C7


ROUND KEY 2  ROUND KEY 6


ROUND KEY 7
   RotWord & SubBytes dari roundkey[6] kolom 4 adalah: (*1)
0E                D2                    B5
D2 rot word >>    91 sub bytes >> 81
91                46                    5A
46                0E                    AB



     pencarian roundkey[7] kolom 1 adalah:
     roundkey[6] kolom ke 1 XOR (*1) XOR Rcon kolom ke 7:
5F     XOR B5 XOR         40 = 01011111 XOR 10110101           XOR   01000000     =   10101010   = AA
07     XOR 81 XOR         00 = 00000111 XOR 10000001           XOR   00000000     =   10000110   = 86
20     XOR 5A XOR         00 = 00100000 XOR 01011010           XOR   00000000     =   01111010   = 7A
38     XOR AB XOR         00 = 00111000 XOR 10101011           XOR   00000000     =   10010011   = 93

     pencarian roundkey[7] kolom 2 adalah:
     roundkey[6] kolom ke 2 XOR roundkey[7] kolom ke 1:
D0    XOR     AA        =   01111001   XOR   10101010     =   01111010   =   7A
0E    XOR     86        =   11011110   XOR   10000110     =   10001000   =   88
B5    XOR     7A        =   10001001   XOR   01111010     =   11001111   =   CF
5E    XOR     93        =   00011010   XOR   10010011     =   11001101   =   CD

     pencarian roundkey[7] kolom 3 adalah:
     roundkey[6] kolom ke 3 XOR roundkey[7] kolom ke 2:
94    XOR     7A        =   10010100   XOR   01111010     =   11101110   =   EE
6B    XOR     88        =   01101011   XOR   10001000     =   11100011   =   E3
BF    XOR     CF        =   10111111   XOR   11001111     =   01110000   =   70
9C    XOR     CD        =   10011100   XOR   11001101     =   01010001   =   51
     pencarian roundkey[7] kolom 4 adalah:
     roundkey[6] kolom ke 4 XOR roundkey[7] kolom ke 3:
0E    XOR        EE        =   00111010   XOR   00011001   =   00100011   =   E0
D2    XOR        E3        =   11001000   XOR   10110000   =   01111000   =   31
91    XOR        70        =   00000111   XOR   01110111   =   01110000   =   E1
46    XOR        51        =   01100101   XOR   11000010   =   10100111   =   17



     hasil round key[7]:
AA    7A    EE        E0
86    88    E3        31
7A    CF    70        E1
93    CD    51        17


ROUND KEY 8
   RotWord & SubBytes dari roundkey[7] kolom 4 adalah: (*1)
E0                31                    C7
31   rot word >>  E1 sub bytes >> F8
E1                17                    F0
17                E0                    E1




     pencarian roundkey[8] kolom 1 adalah:
     roundkey[7] kolom ke 1 XOR (*1) XOR Rcon kolom ke 8:
AA     XOR C7 XOR         80 = 10101010 XOR 11000111            XOR   10000000     =   11101101   =   ED
86     XOR F8      XOR    00 = 10000110 XOR 11111000            XOR   00000000     =   01111110   =   7E
7A     XOR F0      XOR    00 = 01111010 XOR 11110000            XOR   00000000     =   10001010   =   8A
93     XOR E1 XOR         00 = 10010011 XOR 11100001            XOR   00000000     =   01110010   =   72

     pencarian roundkey[8] kolom 2 adalah:
     roundkey[7] kolom ke 2 XOR roundkey[8] kolom ke 1:
7A    XOR     ED           =   01111010   XOR   11101101   =   10010111   =   97
88    XOR     7E           =   10001000   XOR   01111110   =   11110110   =   F6
CF    XOR     8A           =   11001111   XOR   10001010   =   01000101   =   45
CD    XOR     72           =   11001101   XOR   01110010   =   10111111   =   BF

     pencarian roundkey[8] kolom 3 adalah:
     roundkey[7] kolom ke 3 XOR roundkey[8] kolom ke 2:
EE    XOR        97        =   11101110   XOR   10010111   =   01111001   =   79
E3    XOR        F6        =   11100011   XOR   11110110   =   00010101   =   15
70    XOR        45        =   01110000   XOR   01000101   =   00110101   =   35
51    XOR        BF        =   01010001   XOR   10111111   =   11101110   =   EE
     pencarian roundkey[8] kolom 4 adalah:
     roundkey[7] kolom ke 4 XOR roundkey[8] kolom ke 3:
E0    XOR        79        =   11100000   XOR   01111001   =   10011001   =   99
31    XOR        15        =   00110001   XOR   00010101   =   00100100   =   24
E1    XOR        35        =   11100001   XOR   00110101   =   11010100   =   D4
17    XOR        EE        =   00010111   XOR   11101110   =   11111001   =   F9



     hasil round key[8]:
ED    97    79        99
7E    F6    15        24
8A    45    35        D4
72    BF    EE        F9


ROUND KEY 9
   RotWord & SubBytes dari roundkey[8] kolom 4 adalah: (*1)
99                24                    36
24   rot word >> D4 sub bytes >> 48
D4                F9                    99
F9                99                    EE


     pencarian roundkey[9] kolom 1 adalah:
     roundkey[8] kolom ke 1 XOR (*1) XOR Rcon kolom ke 9:
ED     XOR 36 XOR         1B = 11101101 XOR 00110110            XOR   00011011     =   11000000   =   C0
7E     XOR 48 XOR         00 = 01111110 XOR 01001000            XOR   00000000     =   00110110   =   36
8A     XOR 99 XOR         00 = 10001010 XOR 10011001            XOR   00000000     =   00010011   =   13
72     XOR EE XOR         00 = 01110010 XOR 11101110            XOR   00000000     =   10011100   =   9C

     pencarian roundkey[9] kolom 2 adalah:
     roundkey[8] kolom ke 2 XOR roundkey[9] kolom ke 1:
97    XOR        C0        =   10010111   XOR   11000000   =   01010111   =   57
F6    XOR        36        =   11110110   XOR   00110110   =   11000000   =   C0
45    XOR        13        =   01000101   XOR   00010011   =   01010110   =   56
BF    XOR        9C        =   10111111   XOR   10011100   =   00100011   =   23

     pencarian roundkey[9] kolom 3 adalah:
     roundkey[8] kolom ke 3 XOR roundkey[9] kolom ke 2:
79    XOR        57        =   01111001   XOR   01010111   =   00101110   =   2E
15    XOR        C0        =   00010101   XOR   11000000   =   11010101   =   D5
35    XOR        56        =   00110101   XOR   01010110   =   01100011   =   63
EE    XOR        23        =   11101110   XOR   00100011   =   11001101   =   CD
     pencarian roundkey[9] kolom 4 adalah:
     roundkey[8] kolom ke 4 XOR roundkey[9] kolom ke 3:
99    XOR     2E        =   10011001   XOR   00101110      =   10111111   =   BF
24    XOR     D5        =   00100100   XOR   11010101      =   11110001   =   F1
D4    XOR     63        =   11010100   XOR   01100011      =   10110111   =   B7
F9    XOR     CD        =   11111001   XOR   11001101      =   00110100   =   34



     hasil round key[9]:
C0    57    2E     BF
36    C0    D5     F1
13    56    63     B7
9C    23    CD     34


ROUND KEY 10
   RotWord & SubBytes dari roundkey[9] kolom 4 adalah: (*1)
BF                F1                    A1
F1   rot word >>  B7 sub bytes >> A9
B7                34                    18
34                BF                    08


     pencarian roundkey[10] kolom 1 adalah:
     roundkey[9] kolom ke 1 XOR (*1) XOR Rcon kolom ke 10:
C0     XOR A1 XOR         36 = 11000000 XOR 10100001            XOR   00110110     =   01010111   =   57
36     XOR A9 XOR         00 = 00110110 XOR 10101001            XOR   00000000     =   10011111   =   9F
13     XOR 18 XOR         00 = 00010011 XOR 00011000            XOR   00000000     =   00001011   =   0B
9C     XOR 08 XOR         00 = 10011100 XOR 00001000            XOR   00000000     =   00110101   =   35

     pencarian roundkey[10] kolom 2 adalah:
     roundkey[9] kolom ke 2 XOR roundkey[10] kolom ke 1:
57    XOR     57        =   01010111   XOR   01010111      =   00000000   =   00
C0    XOR     9F        =   11000000   XOR   10011111      =   01011111   =   5F
56    XOR     0B        =   01010110   XOR   00001011      =   01011101   =   5D
23    XOR     35        =   00100011   XOR   00110101      =   00010110   =   16

     pencarian roundkey[10] kolom 3 adalah:
     roundkey[9] kolom ke 3 XOR roundkey[10] kolom ke 2:
2E    XOR     00        =   00101110   XOR   00000000      =   00101110   =   2E
D5    XOR     5F        =   11010101   XOR   01011111      =   10001010   =   8A
63    XOR     5D        =   01100011   XOR   01011101      =   00111110   =   3E
CD    XOR     16        =   11001101   XOR   00010110      =   11011011   =   DB
     pencarian roundkey[10] kolom 4 adalah:
     roundkey[9] kolom ke 4 XOR roundkey[10] kolom ke 3:
BF    XOR    2E        =    10111111   XOR   00101110      =   10011001   =   99
F1    XOR    8A        =    11110001   XOR   10001010      =   01111011   =   7B
B7    XOR    3E        =    10110111   XOR   00111110      =   10001001   =   89
34    XOR    DB        =    00110100   XOR   11011011      =   11101111   =   EF

     hasil round key[10]:
57    00    2E    99
9F    5F    8A    7B
0B    5D    3E    89
35    16    DB    EF

				
DOCUMENT INFO