mirror of
https://github.com/shchmue/Lockpick_RCM.git
synced 2024-12-22 08:55:31 +00:00
keys: Use SE size definitions
This commit is contained in:
parent
43be4ef19f
commit
ffea336ecc
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
|
||||
// Sha256 hash of the null string.
|
||||
static const u8 null_hash[0x20] __attribute__((aligned(4))) = {
|
||||
static const u8 null_hash[SE_SHA_256_SIZE] __attribute__((aligned(4))) = {
|
||||
0xE3, 0xB0, 0xC4, 0x42, 0x98, 0xFC, 0x1C, 0x14, 0x9A, 0xFB, 0xF4, 0xC8, 0x99, 0x6F, 0xB9, 0x24,
|
||||
0x27, 0xAE, 0x41, 0xE4, 0x64, 0x9B, 0x93, 0x4C, 0xA4, 0x95, 0x99, 0x1B, 0x78, 0x52, 0xB8, 0x55};
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void nfc_decrypt_amiibo_keys(key_storage_t *keys, nfc_save_key_t out_nfc_save_ke
|
|||
decrypt_aes_key(KS_AES_ECB, keys, kek, nfc_key_source, 0, 0);
|
||||
|
||||
nfc_keyblob_t __attribute__((aligned(4))) nfc_keyblob;
|
||||
static const u8 nfc_iv[SE_KEY_128_SIZE] = {
|
||||
static const u8 nfc_iv[SE_AES_IV_SIZE] = {
|
||||
0xB9, 0x1D, 0xC1, 0xCF, 0x33, 0x5F, 0xA6, 0x13, 0x2A, 0xEF, 0x90, 0x99, 0xAA, 0xCA, 0x93, 0xC8};
|
||||
se_aes_key_set(KS_AES_CTR, kek, SE_KEY_128_SIZE);
|
||||
se_aes_crypt_ctr(KS_AES_CTR, &nfc_keyblob, sizeof(nfc_keyblob), encrypted_keys, sizeof(nfc_keyblob), &nfc_iv);
|
||||
|
|
Loading…
Reference in a new issue