Greatly improve experiments

This commit is contained in:
2020-02-27 10:23:21 -05:00
parent bf6153062d
commit 1bd577596b
11 changed files with 519 additions and 568 deletions

View File

@@ -2,6 +2,7 @@
#define CHECKM8_TOOL_BOOTROM_ADDR_H
#include "checkm8_config.h"
#include "bootrom_type.h"
#if CHECKM8_PLATFORM == 8010
@@ -45,7 +46,8 @@
#define ADDR_DFU_RETVAL (int *) 0x180088ac8
#define ADDR_DFU_STATUS (unsigned char *) 0x180088ac0
#define ADDR_DFU_EVENT (unsigned long long *) 0x180088af0
#define ADDR_DFU_EVENT (struct event *) 0x180088af0
#define ADDR_USB_EVENT (struct event *) 0x1800838c8
#else
#error "Unsupported checkm8 platform"

View File

@@ -3,12 +3,21 @@
struct event
{
unsigned long long dat0;
unsigned long long dat1;
unsigned int dat0;
unsigned int dat1;
unsigned long long dat2;
unsigned long long dat3;
} __attribute__ ((packed));
struct aes_sw_bernstein_data
struct aes_constants
{
unsigned char sbox[16][16];
unsigned char rc_lookup[11];
unsigned char mul2[256];
unsigned char mul3[256];
} __attribute__ ((packed));
struct bern_data
{
double t[16][256];
double tsq[16][256];

View File

@@ -0,0 +1,18 @@
#ifndef CHECKM8_TOOL_EXPERIMENTS_H
#define CHECKM8_TOOL_EXPERIMENTS_H
#include "payload.h"
#include "bootrom_type.h"
/* AES Software */
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);
/* System */
void usb_task_exit(struct pwned_device *dev);
/* Power */
void floppysleep(struct pwned_device *dev);
void floppysleep_async(struct pwned_device *dev);
#endif //CHECKM8_TOOL_EXPERIMENTS_H