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++)

View File

@@ -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);