diff --git a/.gitignore b/.gitignore index 66a47c7..31f4aa4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ arm11/fastboot3DS.elf fastboot3DS.firm fastboot3DS*.7z +fastboot3DS_priv.key diff --git a/arm9/data/fastboot3DS_pubkey.bin b/arm9/data/fastboot3DS_pubkey.bin new file mode 100644 index 0000000..4b705b9 --- /dev/null +++ b/arm9/data/fastboot3DS_pubkey.bin Binary files differ diff --git a/include/arm9/hardware/crypto.h b/include/arm9/hardware/crypto.h index a873e6c..51c6ce5 100644 --- a/include/arm9/hardware/crypto.h +++ b/include/arm9/hardware/crypto.h @@ -312,6 +312,7 @@ /** * @brief Verifies a RSA 2048 SHA 256 signature. + * @brief Note: This function skips the ASN.1 data and is therefore not safe. * * @param[in] encSig Pointer to encrypted source signature. * @param[in] data Pointer to the data to hash. diff --git a/signFirm.sh b/signFirm.sh new file mode 100755 index 0000000..59d28cb --- /dev/null +++ b/signFirm.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +dd if=fastboot3DS.firm of=/tmp/fastboot3DS_firm_header.bin bs=256 count=1 +openssl dgst -sha256 -sign fastboot3DS_priv.key -out /tmp/fastboot3DS_firm_header.sig /tmp/fastboot3DS_firm_header.bin +dd if=/tmp/fastboot3DS_firm_header.sig of=fastboot3DS.firm bs=256 count=1 seek=1 conv=notrunc diff --git a/source/arm9/gui/menu_update.c b/source/arm9/gui/menu_update.c index 405b3cc..de86ac6 100644 --- a/source/arm9/gui/menu_update.c +++ b/source/arm9/gui/menu_update.c @@ -34,7 +34,7 @@ #define MIN_UPDATE_SIZE 0x1000 -static const char *updateFilePath = "sdmc:/fastboot3ds.bin"; +static const char *updateFilePath = "sdmc:/fastboot3DS.firm"; static const char *installPath = "firm0"; bool menuUpdateLoader()