diff --git a/c8_payloads/bin/payload_aes_sw.bin b/c8_payloads/bin/payload_aes_sw.bin index 2dca3c0..d6b5b60 100644 Binary files a/c8_payloads/bin/payload_aes_sw.bin and b/c8_payloads/bin/payload_aes_sw.bin differ diff --git a/c8_payloads/src/aes_sw.c b/c8_payloads/src/aes_sw.c index 3424653..65f7522 100644 --- a/c8_payloads/src/aes_sw.c +++ b/c8_payloads/src/aes_sw.c @@ -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++) diff --git a/c8_remote/src/usb_helpers.c b/c8_remote/src/usb_helpers.c index 0c5888c..d64b22b 100644 --- a/c8_remote/src/usb_helpers.c +++ b/c8_remote/src/usb_helpers.c @@ -489,7 +489,7 @@ int ctrl_transfer(struct pwned_device *dev, dev, bmRequestType, bRequest, wValue, wIndex, data, data_len, timeout); #ifdef WITH_ARDUINO - int amount, index, size; + unsigned int amount, index, size; char buf; struct usb_xfer_args args; args.bmRequestType = bmRequestType; @@ -513,6 +513,7 @@ int ctrl_transfer(struct pwned_device *dev, while(amount < data_len) { // get the size of this chunk + size = 0; ard_read(dev, (unsigned char *) &size, 2); checkm8_debug_indent("\treceiving data chunk of size %i\n", size);