13.07.2015 Views

ДИПЛОМНА РАБОТА - Св. Климент Охридски

ДИПЛОМНА РАБОТА - Св. Климент Охридски

ДИПЛОМНА РАБОТА - Св. Климент Охридски

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Софийски Университет "<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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!