Fix CMAC 256-bit polynomial

Also see GH #423
pull/507/head
Jeffrey Walton 2017-09-13 08:41:39 -04:00
parent 172ab40874
commit fca8adc549
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 2 deletions

View File

@ -32,9 +32,9 @@ static void MulU(byte *k, unsigned int length)
break;
case 32:
// https://crypto.stackexchange.com/q/9815/10496
// Polynomial x^256 + x^10 + x^5 + x + 1
// Polynomial x^256 + x^10 + x^5 + x^2 + 1
k[30] ^= 4;
k[31] ^= 0x23;
k[31] ^= 0x25;
break;
case 64:
// https://crypto.stackexchange.com/q/9815/10496