Last active
June 17, 2019 12:00
-
-
Save lionaneesh/0ede3222f07fc2dfc466689eb659abb1 to your computer and use it in GitHub Desktop.
LED Round Main loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AddKey(state, keyNibbles, 0); | |
| for(i = 0; i < RN/4; i++){ | |
| int a; | |
| for (j = 0; j < 4; j++) { | |
| for (a = 0; a < 4; a++) { | |
| printf("%2d ", state[j][a]); | |
| } | |
| printf("\n"); | |
| } | |
| for(j = 0; j < 4; j++) | |
| { | |
| AddConstants(state, i*4+j); | |
| // dump states | |
| printf("AddConstants:\n"); | |
| int x; | |
| for (x = 0; x < 4; x++) { | |
| for (a = 0; a < 4; a++) { | |
| printf("%2d ", state[x][a]); | |
| } | |
| printf("\n"); | |
| } | |
| SubCell(state); | |
| printf("SubCell:\n"); | |
| for (x = 0; x < 4; x++) { | |
| for (a = 0; a < 4; a++) { | |
| printf("%2d ", state[x][a]); | |
| } | |
| printf("\n"); | |
| } | |
| ShiftRow(state); | |
| printf("ShiftRow:\n"); | |
| for (x = 0; x < 4; x++) { | |
| for (a = 0; a < 4; a++) { | |
| printf("%2d ", state[x][a]); | |
| } | |
| printf("\n"); | |
| } | |
| MixColumn(state); | |
| printf("MixColumn:\n"); | |
| for (x = 0; x < 4; x++) { | |
| for (a = 0; a < 4; a++) { | |
| printf("%2d ", state[x][a]); | |
| } | |
| printf("\n"); | |
| } | |
| } | |
| AddKey(state, keyNibbles, i+1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment