diff options
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/nwm/uds_data.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/hle/service/nwm/uds_data.cpp b/src/core/hle/service/nwm/uds_data.cpp index fabdf67a8..280c73e05 100644 --- a/src/core/hle/service/nwm/uds_data.cpp +++ b/src/core/hle/service/nwm/uds_data.cpp | |||
| @@ -17,9 +17,6 @@ namespace NWM { | |||
| 17 | 17 | ||
| 18 | using MacAddress = std::array<u8, 6>; | 18 | using MacAddress = std::array<u8, 6>; |
| 19 | 19 | ||
| 20 | // AES Keyslot used to generate the UDS data frame CCMP key. | ||
| 21 | constexpr size_t UDSDataCryptoAESKeySlot = 0x2D; | ||
| 22 | |||
| 23 | /* | 20 | /* |
| 24 | * Generates a SNAP-enabled 802.2 LLC header for the specified protocol. | 21 | * Generates a SNAP-enabled 802.2 LLC header for the specified protocol. |
| 25 | * @returns a buffer with the bytes of the generated header. | 22 | * @returns a buffer with the bytes of the generated header. |
| @@ -94,7 +91,7 @@ static std::array<u8, CryptoPP::AES::BLOCKSIZE> GenerateDataCCMPKey( | |||
| 94 | // keyslot 0x2D. | 91 | // keyslot 0x2D. |
| 95 | using CryptoPP::AES; | 92 | using CryptoPP::AES; |
| 96 | std::array<u8, CryptoPP::MD5::DIGESTSIZE> counter = GetDataCryptoCTR(network_info); | 93 | std::array<u8, CryptoPP::MD5::DIGESTSIZE> counter = GetDataCryptoCTR(network_info); |
| 97 | std::array<u8, AES::BLOCKSIZE> key = HW::AES::GetNormalKey(UDSDataCryptoAESKeySlot); | 94 | std::array<u8, AES::BLOCKSIZE> key = HW::AES::GetNormalKey(HW::AES::KeySlotID::UDSDataKey); |
| 98 | CryptoPP::CTR_Mode<AES>::Encryption aes; | 95 | CryptoPP::CTR_Mode<AES>::Encryption aes; |
| 99 | aes.SetKeyWithIV(key.data(), AES::BLOCKSIZE, counter.data()); | 96 | aes.SetKeyWithIV(key.data(), AES::BLOCKSIZE, counter.data()); |
| 100 | aes.ProcessData(ccmp_key.data(), passphrase_hash.data(), passphrase_hash.size()); | 97 | aes.ProcessData(ccmp_key.data(), passphrase_hash.data(), passphrase_hash.size()); |