IOS/ES: Handle personalised tickets properly
IOS unpersonalises device-specific ("personalised") tickets prior to
storing them on the NAND.
This commit is contained in:
1 parent
71273c05a9
commit
9c31d6f5c5
8 files changed
+93
-7
No files matched your search
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
@@ -179,6 +180,19 @@ const u8* EcWii::GetNGSig() const
|
||||
return BootMiiKeysBin.ng_sig;
|
||||
}
|
||||
|
||||
std::array<u8, 16> EcWii::GetSharedSecret(const EcWii::ECCKey& peer_public_key) const
|
||||
{
|
||||
EcWii::ECCKey shared_secret;
|
||||
point_mul(shared_secret.data(), GetNGPriv(), peer_public_key.data());
|
||||
|
||||
std::array<u8, 20> sha1;
|
||||
mbedtls_sha1(shared_secret.data(), shared_secret.size() / 2, sha1.data());
|
||||
|
||||
std::array<u8, 16> aes_key;
|
||||
std::copy_n(sha1.cbegin(), aes_key.size(), aes_key.begin());
|
||||
return aes_key;
|
||||
}
|
||||
|
||||
void EcWii::InitDefaults()
|
||||
{
|
||||
memset(&BootMiiKeysBin, 0, sizeof(BootMiiKeysBin));
|
||||
|
||||
Reference in new issue
Block a user