Софийски Университет "<strong>Св</strong>. <strong>Климент</strong> <strong>Охридски</strong>" , Факултет по Математика и ИнформатикаМагистърска програма : З И К С М/*f*/ {0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69,0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d} };} // BuildInvSbox()private void BuildRcon(){this.Rcon = new byte[11,4] { {0x00, 0x00, 0x00, 0x00},{0x01, 0x00, 0x00, 0x00},{0x02, 0x00, 0x00, 0x00},{0x04, 0x00, 0x00, 0x00},{0x08, 0x00, 0x00, 0x00},{0x10, 0x00, 0x00, 0x00},{0x20, 0x00, 0x00, 0x00},{0x40, 0x00, 0x00, 0x00},{0x80, 0x00, 0x00, 0x00},{0x1b, 0x00, 0x00, 0x00},{0x36, 0x00, 0x00, 0x00} };} // BuildRcon()private void AddRoundKey(int round){for (int r = 0; r < 4; ++r){for (int c = 0; c < 4; ++c){this.State[r,c] = (byte) ( (int)this.State[r,c] ^(int)w[(round*4)+c,r] );}}} // AddRoundKey()private void SubBytes(){for (int r = 0; r < 4; ++r){for (int c = 0; c < 4; ++c){this.State[r,c] = this.Sbox[ (this.State[r,c] >> 4),(this.State[r,c] & 0x0f) ];}}} // SubBytesprivate void InvSubBytes(){for (int r = 0; r < 4; ++r){for (int c = 0; c < 4; ++c){this.State[r,c] = this.iSbox[ (this.State[r,c] >> 4),(this.State[r,c] & 0x0f) ];}}} // InvSubBytesprivate void ShiftRows(){byte[,] temp = new byte[4,4];for (int r = 0; r < 4; ++r) // copy State into temp[]- 146 -Учебна година : 2007/2008; Летен семестър; Ася Огнянова Григорова; FN 22167
Софийски Университет "<strong>Св</strong>. <strong>Климент</strong> <strong>Охридски</strong>" , Факултет по Математика и ИнформатикаМагистърска програма : З И К С М{}for (int c = 0; c < 4; ++c){temp[r,c] = this.State[r,c];}for (int r = 1; r < 4; ++r) // shift temp into State{for (int c = 0; c < 4; ++c){this.State[r,c] = temp[ r, (c + r) % Nb ];}}} // ShiftRows()private void InvShiftRows(){byte[,] temp = new byte[4,4];for (int r = 0; r < 4; ++r) // copy State into temp[]{for (int c = 0; c < 4; ++c){temp[r,c] = this.State[r,c];}}for (int r = 1; r < 4; ++r) // shift temp into State{for (int c = 0; c < 4; ++c){this.State[r, (c + r) % Nb ] = temp[r,c];}}} // InvShiftRows()private void MixColumns(){byte[,] temp = new byte[4,4];for (int r = 0; r < 4; ++r) // copy State into temp[]{for (int c = 0; c < 4; ++c){temp[r,c] = this.State[r,c];}}for (int c = 0; c < 4; ++c){this.State[0,c] = (byte) ( (int)gfmultby02(temp[0,c]) ^(int)gfmultby03(temp[1,c]) ^(int)gfmultby01(temp[2,c]) ^(int)gfmultby01(temp[3,c]) );this.State[1,c] = (byte) ( (int)gfmultby01(temp[0,c]) ^(int)gfmultby02(temp[1,c]) ^(int)gfmultby03(temp[2,c]) ^(int)gfmultby01(temp[3,c]) );this.State[2,c] = (byte) ( (int)gfmultby01(temp[0,c]) ^(int)gfmultby01(temp[1,c]) ^(int)gfmultby02(temp[2,c]) ^(int)gfmultby03(temp[3,c]) );- 147 -Учебна година : 2007/2008; Летен семестър; Ася Огнянова Григорова; FN 22167
- Page 1 and 2:
Софийски университ
- Page 3 and 4:
Софийски Университ
- Page 5 and 6:
Софийски Университ
- Page 7 and 8:
Софийски Университ
- Page 9 and 10:
Софийски Университ
- Page 11 and 12:
Софийски Университ
- Page 13 and 14:
Софийски Университ
- Page 15 and 16:
Софийски Университ
- Page 17 and 18:
Софийски Университ
- Page 19 and 20:
Софийски Университ
- Page 21 and 22:
Софийски Университ
- Page 23 and 24:
Софийски Университ
- Page 25 and 26:
Софийски Университ
- Page 27 and 28:
Софийски Университ
- Page 29 and 30:
Софийски Университ
- Page 31 and 32:
Софийски Университ
- Page 33 and 34:
Софийски Университ
- Page 35 and 36:
Софийски Университ
- Page 37 and 38:
Софийски Университ
- Page 39 and 40:
Софийски Университ
- Page 41 and 42:
Софийски Университ
- Page 43 and 44:
Софийски Университ
- Page 45 and 46:
Софийски Университ
- Page 47 and 48:
Софийски Университ
- Page 49 and 50:
Софийски Университ
- Page 51 and 52:
Софийски Университ
- Page 53 and 54:
Софийски Университ
- Page 55 and 56:
Софийски Университ
- Page 57 and 58:
Софийски Университ
- Page 59 and 60:
Софийски Университ
- Page 61 and 62:
Софийски Университ
- Page 63 and 64:
Софийски Университ
- Page 65 and 66:
Софийски Университ
- Page 67 and 68:
Софийски Университ
- Page 69 and 70:
Софийски Университ
- Page 71 and 72:
Софийски Университ
- Page 73 and 74:
Софийски Университ
- Page 75 and 76:
Софийски Университ
- Page 77 and 78:
Софийски Университ
- Page 79 and 80:
Софийски Университ
- Page 81 and 82:
Софийски Университ
- Page 83 and 84:
Софийски Университ
- Page 85 and 86:
Софийски Университ
- Page 87 and 88:
Софийски Университ
- Page 89 and 90:
Софийски Университ
- Page 91 and 92:
Софийски Университ
- Page 93 and 94:
Софийски Университ
- Page 95 and 96: Софийски Университ
- Page 97 and 98: Софийски Университ
- Page 99 and 100: Софийски Университ
- Page 101 and 102: Софийски Университ
- Page 103 and 104: Софийски Университ
- Page 105 and 106: Софийски Университ
- Page 107 and 108: Софийски Университ
- Page 109 and 110: Софийски Университ
- Page 111 and 112: Софийски Университ
- Page 113 and 114: Софийски Университ
- Page 115 and 116: Софийски Университ
- Page 117 and 118: Софийски Университ
- Page 119 and 120: Софийски Университ
- Page 121 and 122: Софийски Университ
- Page 123 and 124: Софийски Университ
- Page 125 and 126: Софийски Университ
- Page 127 and 128: Софийски Университ
- Page 129 and 130: Софийски Университ
- Page 131 and 132: Софийски Университ
- Page 133 and 134: Софийски Университ
- Page 135 and 136: Софийски Университ
- Page 137 and 138: Софийски Университ
- Page 139 and 140: Софийски Университ
- Page 141 and 142: Софийски Университ
- Page 143 and 144: Софийски Университ
- Page 145: Софийски Университ
- Page 149 and 150: Софийски Университ