From f40ec898cf41ac470b134d529e499b22286b0686 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 30 Jul 2018 01:03:15 +0200 Subject: [PATCH] Also include derreks sighax signature in the source, currently not used --- arm9/source/common/sighax.c | 105 +++++++++++++++++++++++++++++++++++ arm9/source/common/sighax.h | 83 ++------------------------- arm9/source/utils/nandutil.c | 2 +- 3 files changed, 111 insertions(+), 79 deletions(-) create mode 100644 arm9/source/common/sighax.c diff --git a/arm9/source/common/sighax.c b/arm9/source/common/sighax.c new file mode 100644 index 000000000..751bbcae8 --- /dev/null +++ b/arm9/source/common/sighax.c @@ -0,0 +1,105 @@ +#include "common.h" + + +// see https://gist.github.com/SciresM/cdd2266efb80175d37eabbe86f9d8c52 for source +// thanks SciresM, Myria, Normmatt, TuxSH and hedgeberg for the signatures! + +const u8 sig_nand_firm_retail[256] = { + 0xB6, 0x72, 0x45, 0x31, 0xC4, 0x48, 0x65, 0x7A, 0x2A, 0x2E, 0xE3, 0x06, 0x45, 0x7E, 0x35, 0x0A, + 0x10, 0xD5, 0x44, 0xB4, 0x28, 0x59, 0xB0, 0xE5, 0xB0, 0xBE, 0xD2, 0x75, 0x34, 0xCC, 0xCC, 0x2A, + 0x4D, 0x47, 0xED, 0xEA, 0x60, 0xA7, 0xDD, 0x99, 0x93, 0x99, 0x50, 0xA6, 0x35, 0x7B, 0x1E, 0x35, + 0xDF, 0xC7, 0xFA, 0xC7, 0x73, 0xB7, 0xE1, 0x2E, 0x7C, 0x14, 0x81, 0x23, 0x4A, 0xF1, 0x41, 0xB3, + 0x1C, 0xF0, 0x8E, 0x9F, 0x62, 0x29, 0x3A, 0xA6, 0xBA, 0xAE, 0x24, 0x6C, 0x15, 0x09, 0x5F, 0x8B, + 0x78, 0x40, 0x2A, 0x68, 0x4D, 0x85, 0x2C, 0x68, 0x05, 0x49, 0xFA, 0x5B, 0x3F, 0x14, 0xD9, 0xE8, + 0x38, 0xA2, 0xFB, 0x9C, 0x09, 0xA1, 0x5A,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4, 0xBC, 0xA0, + 0x0A, 0x7B, 0x1E, 0x91, 0x3E, 0x09, 0x80, 0xD2, 0x9F, 0xF6, 0x06, 0x1D, 0x8A, 0xA9, 0x44, 0xC6, + 0x63, 0xF2, 0x63, 0x81, 0x27, 0xF7, 0xCC, 0xAB, 0x6F, 0xC7, 0x15, 0x38, 0x47, 0x1A, 0x51, 0x38 +}; + + +// see http://www.sighax.com/ for source of this signature +// thanks derrek, plutoo, yellows8, smea and profi200 + +const u8 sig_nand_firm_retail_alt[256] = { + 0x6E, 0xFF, 0x20, 0x9C, 0x8F, 0x4A, 0xF6, 0x1F, 0x06, 0x24, 0x13, 0xD6, 0x02, 0xCA, 0x6B, 0x4D, + 0xA1, 0xEB, 0x5A, 0xB9, 0xB6, 0xF1, 0xA2, 0xAB, 0x22, 0x6A, 0x71, 0x1D, 0xA2, 0xCC, 0xC2, 0x7C, + 0x74, 0xDE, 0x17, 0x41, 0x14, 0x3B, 0xF6, 0x90, 0x58, 0x28, 0x4C, 0xAF, 0x44, 0x4F, 0x92, 0xA4, + 0x5A, 0xAF, 0xD5, 0xA0, 0x68, 0x04, 0x33, 0x23, 0xD4, 0x8A, 0xF1, 0xD0, 0xEC, 0x05, 0x56, 0x4E, + 0xBC, 0x79, 0xB5, 0x51, 0x34, 0xE9, 0x1A, 0x86, 0xC3, 0x78, 0x8C, 0x97, 0xBC, 0x29, 0xD5, 0xA5, + 0x8A, 0x8A, 0x45, 0x25, 0x58, 0x43, 0xB8, 0x91, 0x22, 0xC7, 0x80, 0x45, 0x42, 0xF7, 0x26, 0x77, + 0xC8, 0xDA, 0x5E, 0xB7, 0x42, 0x9B, 0xAF, 0x18, 0xF7, 0xA8, 0xB0, 0x2E, 0x8B, 0xB9, 0x40, 0xFE, + 0x99, 0x0E, 0x9D, 0xC9, 0x7E, 0xDC, 0xF4, 0x9D, 0xDB, 0x18, 0x09, 0x2C, 0x28, 0x20, 0x6E, 0x74, + 0x67, 0x53, 0xCC, 0x7C, 0x6E, 0x92, 0x36, 0x2A, 0xA8, 0xD5, 0x46, 0xB3, 0x8D, 0x9E, 0x8D, 0x43, + 0x11, 0xA6, 0xB1, 0x93, 0x0D, 0xA1, 0x48, 0x97, 0x80, 0x7E, 0x30, 0x4B, 0x5E, 0x1E, 0xC0, 0x85, + 0x6E, 0xEF, 0xD6, 0x2C, 0xEA, 0xEE, 0xF2, 0x8B, 0x08, 0xBD, 0x80, 0x39, 0x7A, 0x18, 0x15, 0x60, + 0xAE, 0x6F, 0xCE, 0x39, 0xD0, 0x9C, 0x39, 0xDC, 0x3D, 0xED, 0x8C, 0x87, 0x0A, 0xB6, 0xAB, 0xCE, + 0x28, 0x94, 0x94, 0x0C, 0x0E, 0x9C, 0x41, 0x74, 0xF0, 0x13, 0x1A, 0x0D, 0xA0, 0x74, 0x7C, 0x4A, + 0x7A, 0x42, 0xC9, 0xEC, 0x34, 0x87, 0xF1, 0x09, 0xE2, 0x52, 0xB7, 0xA9, 0xB8, 0x65, 0xAE, 0x47, + 0x78, 0x95, 0xE8, 0xD6, 0xA4, 0x2A, 0x07, 0x17, 0xC4, 0x0B, 0xCC, 0xC7, 0xA7, 0x35, 0xF3, 0x3B, + 0x1E, 0x37, 0x66, 0xAB, 0x0E, 0x4B, 0x5D, 0x68, 0x1B, 0xAB, 0x41, 0x07, 0x34, 0xAB, 0x62, 0xB0 +}; + diff --git a/arm9/source/common/sighax.h b/arm9/source/common/sighax.h index 815230789..66dc8dd31 100644 --- a/arm9/source/common/sighax.h +++ b/arm9/source/common/sighax.h @@ -2,81 +2,8 @@ #include "common.h" -// see https://gist.github.com/SciresM/cdd2266efb80175d37eabbe86f9d8c52 for source -// thanks SciresM, Myria, Normmatt, TuxSH and hedgeberg for the signatures! - -u8 sig_nand_firm_retail[256] = { - 0xB6, 0x72, 0x45, 0x31, 0xC4, 0x48, 0x65, 0x7A, 0x2A, 0x2E, 0xE3, 0x06, 0x45, 0x7E, 0x35, 0x0A, - 0x10, 0xD5, 0x44, 0xB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, 0x7B, 0xE9, 0x8E, 0xEF, 0x92, 0xC0, - 0x81, 0x4B, 0x16, 0xB2, 0x15, 0xB3, 0x1D, 0x8C, 0x81, 0x3B, 0xB3, 0x55, 0xCE, 0xA8, 0x13, 0x8F, - 0xB3, 0xBF, 0x23, 0x74, 0x24, 0x68, 0x42, 0xCD, 0x91, 0xE1, 0xF9, 0xAA, 0xFF, 0x76, 0x87, 0x86, - 0x17, 0xCE, 0x02, 0x06, 0x47, 0x77, 0xAE, 0xA0, 0x87, 0x6A, 0x2C, 0x24, 0x5C, 0x78, 0x43, 0x41, - 0xCD, 0xEE, 0x90, 0xD6, 0x91, 0x74, 0x59, 0x08, 0xA6, 0xFF, 0x9C, 0xE7, 0x81, 0x16, 0x67, 0x96, - 0xF9, 0xF1, 0x23, 0x8F, 0x88, 0x4C, 0x84, 0xD6, 0xF1, 0xEE, 0xBB, 0x2E, 0x40, 0xB4, 0xBC, 0xA0, - 0x0A, 0x7B, 0x1E, 0x91, 0x3E, 0x09, 0x80, 0xD2, 0x9F, 0xF6, 0x06, 0x1D, 0x8A, 0xA9, 0x44, 0xC6, - 0x63, 0xF2, 0x63, 0x81, 0x27, 0xF7, 0xCC, 0xAB, 0x6F, 0xC7, 0x15, 0x38, 0x47, 0x1A, 0x51, 0x38 -}; +const u8 sig_nand_firm_retail[256]; +const u8 sig_nand_firm_retail_alt[256]; +const u8 sig_nand_firm_dev[256]; +const u8 sig_nand_ncsd_retail[256]; +const u8 sig_nand_ncsd_dev[256]; diff --git a/arm9/source/utils/nandutil.c b/arm9/source/utils/nandutil.c index 57fbf6085..f20d3798d 100644 --- a/arm9/source/utils/nandutil.c +++ b/arm9/source/utils/nandutil.c @@ -234,7 +234,7 @@ u32 InjectGbaVcSavegame(const char* path, const char* path_vcsave) { u32 RebuildNandNcsdHeader(NandNcsdHeader* ncsd) { // signature (retail or dev) - u8* signature = (IS_DEVKIT) ? sig_nand_ncsd_dev : sig_nand_ncsd_retail; + const u8* signature = (IS_DEVKIT) ? sig_nand_ncsd_dev : sig_nand_ncsd_retail; // encrypted TWL MBR u8 twl_mbr_data[0x200] = { 0 };