mirror of
https://github.com/QuasarApp/Qt-AES.git
synced 2025-04-27 06:04:32 +00:00
Fixed invShiftRows in Shift 3 (#30)
This must be broken. The indices of iterable inside shift 3 seem random and do not correspond to the AES algorighm. More than that, it should be reversed from shiftRows methods, and shifts 1 and 2 seem normal.
This commit is contained in:
parent
74643b2570
commit
a22e7bd5f9
@ -391,11 +391,11 @@ void QAESEncryption::invShiftRows()
|
||||
it[6] = (quint8)temp;
|
||||
|
||||
//Shift 3
|
||||
temp = (quint8)it[15];
|
||||
it[15] = (quint8)it[3];
|
||||
it[3] = (quint8)it[7];
|
||||
temp = (quint8)it[7];
|
||||
it[7] = (quint8)it[11];
|
||||
it[11] = (quint8)temp;
|
||||
it[11] = (quint8)it[15];
|
||||
it[15] = (quint8)it[3];
|
||||
it[3] = (quint8)temp;
|
||||
}
|
||||
|
||||
QByteArray QAESEncryption::byteXor(const QByteArray &a, const QByteArray &b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user