Add support for importing xci_header_key

This commit is contained in:
Jack 2019-11-01 12:21:12 +08:00
parent ddde730efb
commit 1beb568207
2 changed files with 4 additions and 0 deletions

View file

@ -254,6 +254,9 @@ void extkeys_initialize_settings(hactool_settings_t *settings, FILE *f) {
} else if (strcmp(key, "per_console_key_source") == 0) {
parse_hex_key(keyset->per_console_key_source, value, sizeof(keyset->per_console_key_source));
matched_key = 1;
} else if (strcmp(key, "xci_header_key") == 0) {
parse_hex_key(keyset->xci_header_key, value, sizeof(keyset->xci_header_key));
matched_key = 1;
} else if (strcmp(key, "sd_card_kek_source") == 0) {
parse_hex_key(keyset->sd_card_kek_source, value, sizeof(keyset->sd_card_kek_source));
matched_key = 1;

View file

@ -54,6 +54,7 @@ typedef struct {
unsigned char header_key[0x20]; /* NCA header key. */
unsigned char titlekeks[0x20][0x10]; /* Title key encryption keys. */
unsigned char key_area_keys[0x20][3][0x10]; /* Key area encryption keys. */
unsigned char xci_header_key[0x10]; /* Key for XCI partially encrypted header. */
unsigned char save_mac_key[0x10]; /* Key used to sign savedata. */
unsigned char sd_card_keys[2][0x20];
unsigned char nca_hdr_fixed_key_modulus[0x100]; /* NCA header fixed key RSA pubk. */