YAWM-ModMii-Edition/source/otp.h

30 lines
555 B
C
Raw Normal View History

2024-03-23 05:43:32 +01:00
#ifndef __OTP_H__
#define __OTP_H__
2024-04-22 15:06:01 +02:00
#define OTP_SIZE 0x80
2024-03-23 05:43:32 +01:00
2024-04-22 15:06:01 +02:00
typedef struct
2024-03-23 05:43:32 +01:00
{
u8 boot1_hash[20];
u8 common_key[16];
u8 ng_id[4];
union { // first two bytes of nand_hmac overlap last two bytes of ng_priv
struct {
u8 ng_priv[30];
u8 _wtf1[18];
};
struct {
u8 _wtf2[28];
u8 nand_hmac[20];
};
};
u8 nand_key[16];
u8 rng_key[16];
u32 unk1;
u32 unk2; // 0x00000007
2024-04-22 15:06:01 +02:00
} otp_t;
2024-03-23 05:43:32 +01:00
2024-04-22 15:06:01 +02:00
u8 otp_read(void *dst, u8 offset, u8 size);
2024-03-23 05:43:32 +01:00
#endif /* __OTP_H__ */