yawmmde/source/xyzzy.h
2012-12-22 18:35:15 +01:00

74 lines
1.1 KiB
C

typedef struct
{
u8 boot1_hash[20];
u8 common_key[16];
u32 ng_id;
union {
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
} __attribute__((packed)) otp_t;
typedef struct
{
u8 boot2version;
u8 unknown1;
u8 unknown2;
u8 pad;
u32 update_tag;
u16 checksum;
} __attribute__((packed)) eep_ctr_t;
typedef struct
{
union {
struct {
u32 ms_id;
u32 ca_id;
u32 ng_key_id;
u8 ng_sig[60];
eep_ctr_t counters[2];
u8 fill[0x18];
u8 korean_key[16];
};
u8 data[256];
};
} __attribute__((packed)) seeprom_t;
typedef struct {
char text[0x100];
u8 boot1Hash[20];
u8 commonKey[16];
u32 consoleID;
union {
struct {
u8 privateKey[30];
u8 _wtf1[18];
};
struct {
u8 _wtf2[28];
u8 nandHmac[20];
};
};
u8 nandKey[16];
u8 rngKey[16];
u32 unk1;
u32 unk2; // 0x00000007
char blank[136];
u32 ngKeyID;
u8 ngSig[60];
char blank2[440];
} keys;
int keydump();