mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
Reorganise NXCrypto
This commit is contained in:
parent
427cdbb059
commit
eb04a4341f
1 changed files with 25 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
// AES
|
// AES
|
||||||
namespace crypto
|
namespace crypto
|
||||||
{
|
{
|
||||||
|
@ -67,7 +68,7 @@ namespace crypto
|
||||||
byte_t titlekey_generate_key[0x20] = { 39, 111, 56, 188, 68, 106, 241, 86, 31, 44, 90, 111, 116, 32, 93, 197, 25, 181, 59, 188, 178, 159, 211, 175, 212, 178, 162, 4, 28, 152, 117, 126 };
|
byte_t titlekey_generate_key[0x20] = { 39, 111, 56, 188, 68, 106, 241, 86, 31, 44, 90, 111, 116, 32, 93, 197, 25, 181, 59, 188, 178, 159, 211, 175, 212, 178, 162, 4, 28, 152, 117, 126 };
|
||||||
|
|
||||||
// aes128-cbc keys
|
// aes128-cbc keys
|
||||||
byte_t xci_header_key[16] = { 0x01, 0xc5, 0x8f, 0xe7, 0x2d, 0x13, 0x5a, 0xb2, 0x9a, 0x3f, 0x69, 0x33, 0x95, 0x74, 0xb1 };
|
byte_t xci_header_key[16] = { 0x01, 0xC5, 0x8F, 0xE7, 0x00, 0x2D, 0x13, 0x5A, 0xB2, 0x9A, 0x3F, 0x69, 0x33, 0x95, 0x74, 0xB1 };
|
||||||
byte_t eticket_common_key[16] = { 0x55, 0xA3, 0xF8, 0x72, 0xBD, 0xC8, 0x0C, 0x55, 0x5A, 0x65, 0x43, 0x81, 0x13, 0x9E, 0x15, 0x3B }; // lol this 3ds dev common key
|
byte_t eticket_common_key[16] = { 0x55, 0xA3, 0xF8, 0x72, 0xBD, 0xC8, 0x0C, 0x55, 0x5A, 0x65, 0x43, 0x81, 0x13, 0x9E, 0x15, 0x3B }; // lol this 3ds dev common key
|
||||||
|
|
||||||
byte_t wii_sd_key[16] = { 0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08, 0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D };
|
byte_t wii_sd_key[16] = { 0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08, 0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D };
|
||||||
|
@ -75,15 +76,13 @@ namespace crypto
|
||||||
|
|
||||||
namespace prod
|
namespace prod
|
||||||
{
|
{
|
||||||
// encrypted with ProdNcaHeaderEncryptionKek
|
byte_t master_key[0x20][16] =
|
||||||
byte_t nca_enc_header_key[2][16] =
|
|
||||||
{
|
{
|
||||||
{ 0x5A, 0x3E, 0xD8, 0x4F, 0xDE, 0xC0, 0xD8, 0x26, 0x31, 0xF7, 0xE2, 0x5D, 0x19, 0x7B, 0xF5, 0xD0 },
|
{ 0xC2, 0xCA, 0xAF, 0xF0, 0x89, 0xB9, 0xAE, 0xD5, 0x56, 0x94, 0x87, 0x60, 0x55, 0x27, 0x1C, 0x7D },
|
||||||
{ 0x1C, 0x9B, 0x7B, 0xFA, 0xF6, 0x28, 0x18, 0x3D, 0x71, 0xF6, 0x4D, 0x73, 0xF1, 0x50, 0xB9, 0xD2 }
|
{ 0x54, 0xE1, 0xB8, 0xE9, 0x99, 0xC2, 0xFD, 0x16, 0xCD, 0x07, 0xB6, 0x61, 0x09, 0xAC, 0xAA, 0xA6 },
|
||||||
|
{ 0x4F, 0x6B, 0x10, 0xD3, 0x30, 0x72, 0xAF, 0x2F, 0x25, 0x05, 0x62, 0xBF, 0xF0, 0x6B, 0x6D, 0xA3 },
|
||||||
};
|
};
|
||||||
|
|
||||||
byte_t master_key_0[16] = { 0xC2, 0xCA, 0xAF, 0xF0, 0x89, 0xB9, 0xAE, 0xD5, 0x56, 0x94, 0x87, 0x60, 0x55, 0x27, 0x1C, 0x7D };
|
|
||||||
|
|
||||||
byte_t nca_header_key[2][16] =
|
byte_t nca_header_key[2][16] =
|
||||||
{
|
{
|
||||||
{ 0xAE, 0xAA, 0xB1, 0xCA, 0x08, 0xAD, 0xF9, 0xBE, 0xF1, 0x29, 0x91, 0xF3, 0x69, 0xE3, 0xC5, 0x67 },
|
{ 0xAE, 0xAA, 0xB1, 0xCA, 0x08, 0xAD, 0xF9, 0xBE, 0xF1, 0x29, 0x91, 0xF3, 0x69, 0xE3, 0xC5, 0x67 },
|
||||||
|
@ -91,6 +90,15 @@ namespace crypto
|
||||||
};
|
};
|
||||||
|
|
||||||
byte_t xci_header_key[16] = { 0x01, 0xC5, 0x8F, 0xE7, 0x00, 0x2D, 0x13, 0x5A, 0xB2, 0x9A, 0x3F, 0x69, 0x33, 0x95, 0x74, 0xB1 };
|
byte_t xci_header_key[16] = { 0x01, 0xC5, 0x8F, 0xE7, 0x00, 0x2D, 0x13, 0x5A, 0xB2, 0x9A, 0x3F, 0x69, 0x33, 0x95, 0x74, 0xB1 };
|
||||||
|
/*
|
||||||
|
// encrypted with ProdNcaHeaderEncryptionKek
|
||||||
|
byte_t nca_enc_header_key[2][16] =
|
||||||
|
{
|
||||||
|
{ 0x5A, 0x3E, 0xD8, 0x4F, 0xDE, 0xC0, 0xD8, 0x26, 0x31, 0xF7, 0xE2, 0x5D, 0x19, 0x7B, 0xF5, 0xD0 },
|
||||||
|
{ 0x1C, 0x9B, 0x7B, 0xFA, 0xF6, 0x28, 0x18, 0x3D, 0x71, 0xF6, 0x4D, 0x73, 0xF1, 0x50, 0xB9, 0xD2 }
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue