From 75acdc8a985be463790b503dbe1d2ba639f0eb43 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 14 Aug 2016 23:32:56 +0200 Subject: [PATCH] Fix setRSAMod0DerivedKeys --- source/crypto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/crypto.c b/source/crypto.c index 3f6dda4a..99ecbff2 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -361,6 +361,12 @@ void setRSAMod0DerivedKeys(void) aes_setkey(0x25, keyX0x25, AES_KEYX, AES_INPUT_BE | AES_INPUT_NORMAL); aes_setkey(0x2F, keyY0x2F, AES_KEYY, AES_INPUT_BE | AES_INPUT_NORMAL); + + /* [3dbrew] The first 0x10-bytes are checked by the v6.0/v7.0 NATIVE_FIRM keyinit function, + when non-zero it clears this block and continues to do the key generation. + Otherwise when this block was already all-zero, it immediately returns. + */ + memset32((void *)0x01FFCD00, 0, 0x10); } }