LibHac icon indicating copy to clipboard operation
LibHac copied to clipboard

Issue deriving sd card key

Open pcartwright81 opened this issue 3 years ago • 4 comments

Found a strange issue with libhac, that I have tried to debug into, but I can not figure out. If I use prod.keys from lockpick rcm the sd key is derived incorrectly. If I pass the sd seed via _keyset.SetSdSeed("hash".ToBytes()) it works.

pcartwright81 avatar Feb 23 '22 14:02 pcartwright81

Does the prod.keys from lockpick contains the correct sd card seed? The same one you use when you pass it manually?

Thealexbarney avatar Feb 24 '22 06:02 Thealexbarney

Yes, and it is the same key that is in ref _keys.DeviceKeys.SdCardEncryptionSeed after the keys are derived. I dumped with Lockpick_RCM 1.9.6 and I am on Firmware > 13.x.x. I also tried copying the lines from prod.keys and creating a console.keys. Errors I get in the console are: Failed to match key device_key_4x Failed to match key eticket_rsa_kek_source Failed to match key eticket_rsa_kekek_source Failed to match key rsa_oaep_kek_generation_source Failed to match key rsa_private_kek_generation_source Failed to match key save_mac_key Failed to match key ssl_rsa_kek_source_x

For this dump the prod keys have all of the console specific information.

pcartwright81 avatar Feb 24 '22 23:02 pcartwright81

Did you ever figure out what was causing this issue?

Thealexbarney avatar Feb 03 '23 06:02 Thealexbarney

I started using another way to get the NSP off of the SD card, I don't think I have tried using this method again.

pcartwright81 avatar Feb 03 '23 20:02 pcartwright81