Add an xtime
implementation
This commit is contained in:
parent
87f3102a45
commit
b3c10424a4
11
aes/aes.cpp
11
aes/aes.cpp
|
@ -100,7 +100,16 @@ void shiftRows(t_state s) {
|
|||
}
|
||||
|
||||
uint8_t xtime(uint8_t a) {
|
||||
return 0; /* ??? */
|
||||
uint8_t mask;
|
||||
|
||||
if (a & 0b10000000) {
|
||||
mask = 0x1B;
|
||||
}
|
||||
else {
|
||||
mask = 0x00;
|
||||
}
|
||||
|
||||
return ((a << 1) ^ mask) & 0xFF;
|
||||
}
|
||||
|
||||
// not mandatory - mix a single column
|
||||
|
|
Loading…
Reference in a new issue