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:
Ilya Chesalin 2020-05-16 03:28:30 +03:00 committed by GitHub
parent 74643b2570
commit a22e7bd5f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)