def test__inv_linear_transfrom(self): state = strToWordArrayDense("DA4AF5B72FCEB2793F72622CDA894498", 8) Kalyna._inv_mix_cols(state) assert state == strToWordArrayDense("AFF9B83FCDB4966CB66A08CEB5CB2EAD", 8)
def test__inv_shift_rows(self): state = strToWordArrayDense("AFF9B83FCDB4966CB66A08CEB5CB2EAD", 8) Kalyna._inv_shift_rows(state, 2) assert state == strToWordArrayDense("AFF9B83FB5CB2EADB66A08CECDB4966C", 8)
def test__inv_sub_bytes(self): state = strToWordArrayDense("AFF9B83FB5CB2EADB66A08CECDB4966C", 8) Kalyna._inv_sub_bytes(state) assert state == strToWordArrayDense("17AF69BA9A0547EB259BC23A8813BDB0", 8)
def test__linear_transfrom(self): state = strToWordArrayDense("75BB9A4D1790511F713ADFB36BCB452A", 8) Kalyna._mix_cols(state) assert state == strToWordArrayDense("62C97C6E6ABF4133ED5131D624C7C182", 8)
def test__shift_rows(self): state = strToWordArrayDense("75BB9A4D6BCB452A713ADFB31790511F", 8) Kalyna._shift_rows(state, 2) assert state == strToWordArrayDense("75BB9A4D1790511F713ADFB36BCB452A", 8)
def test__sub_bytes(self): state = strToWordArrayDense("050102030405060708090A0B0C0D0E0F", 8) Kalyna._sub_bytes(state) assert state == strToWordArrayDense("75BB9A4D6BCB452A713ADFB31790511F", 8)