---
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export const addRoundKey = (state: number[][], roundKey: number[][]): number[][] => {
|
||||
const result: number[][] = [
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0]
|
||||
]
|
||||
|
||||
for (let row = 0;row < 4;row++) {
|
||||
for (let col = 0;col < 4;col++) {
|
||||
result[row][col] = state[row][col] ^ roundKey[row][col]
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user