Updated aes_sw binary and fixed a bug in usb_helpers.c

This commit is contained in:
2020-01-11 18:02:40 -05:00
parent 77e2042927
commit 4727861d37
3 changed files with 5 additions and 3 deletions

Binary file not shown.

View File

@@ -154,10 +154,11 @@ unsigned int _start(unsigned char *msg, unsigned int msg_len, unsigned char *key
unsigned char mul2[256], unsigned char mul3[256])
{
unsigned long long start, end;
unsigned char msg_copy[16];
for(int i = 0; i < 16; i++) msg_copy[i] = msg[i];
__asm__ volatile ("mrs %0, cntpct_el0" : "=r" (start));
aes128_encrypt_ecb(msg, msg_len, key, sbox, rc_lookup, mul2, mul3);
task_sleep(120);
aes128_encrypt_ecb(msg_copy, msg_len, key, sbox, rc_lookup, mul2, mul3);
__asm__ volatile ("mrs %0, cntpct_el0" : "=r" (end));
// for(i = 0; i < 256; i++)