lots of changes, some project restructuring and a new experiment

This commit is contained in:
2020-02-27 14:08:53 -05:00
parent 1bd577596b
commit a5d1121675
15 changed files with 455 additions and 186 deletions

View File

@@ -30,4 +30,15 @@ struct bern_data
struct event ev_done;
} __attribute__ ((packed));
#define N_CORR_ENTRIES 1024*256
struct corr_data
{
struct event ev_cont;
int num_cutoff;
unsigned char msg[16];
unsigned char data[N_CORR_ENTRIES];
};
#endif //CHECKM8_TOOL_BOOTROM_TYPE_H

View File

@@ -0,0 +1,14 @@
#ifndef CHECKM8_TOOL_CRYPTO_HOST_H
#define CHECKM8_TOOL_CRYPTO_HOST_H
#include "bootrom_type.h"
void expand_key(unsigned char key[16], unsigned char key_sched[176],
int n, struct aes_constants *c);
void aes128_encrypt_ecb(unsigned char *msg, unsigned int msg_len,
unsigned char key_sched[176], struct aes_constants *c);
struct aes_constants *get_constants();
#endif //CHECKM8_TOOL_CRYPTO_HOST_H

View File

@@ -8,6 +8,9 @@
DEV_PTR_T setup_bern_exp(struct pwned_device *dev);
struct bern_data *get_bern_exp_data(struct pwned_device *dev, DEV_PTR_T async_buf);
DEV_PTR_T setup_corr_exp(struct pwned_device *dev, unsigned char *init_key);
struct corr_data *get_corr_exp_data(struct pwned_device *dev, DEV_PTR_T async_buf);
/* System */
void usb_task_exit(struct pwned_device *dev);

View File

@@ -6,7 +6,8 @@
typedef enum
{
PAYLOAD_AES_BUSY,
PAYLOAD_AES_SW,
PAYLOAD_AES_SW_BERN,
PAYLOAD_AES_SW_CORR,
PAYLOAD_CACHELIB,
PAYLOAD_EXIT_USB_TASK,
PAYLOAD_FLOPPYSLEEP,