yuzu
yuzu copied to clipboard
core: Add support for loading NSPs with personalized tickets.
Adds support for loading personalized (encrypted title key) tickets from NSP files. Previously the relevant code would assume a common key and load in the first 16 bytes of the key area. Now, the code properly reads the ticket and loads it in as personalized or common depending on the type.
This also adds support for eticket_rsa_keypair key material, which was added to the Lockpick_RCM output sometime late last year and can be used instead of needing to derive the key material from other system files. The key pair is also now derived ahead of time and stored in KeyManager instead of re-deriving it every time it is needed.
Finally, this includes an extra commit to simplify down the NSP file type identification to just check the magic value instead of loading the whole NSP, as on my machine at least it was taking a very long time to load the game list. It still takes longer than I'd expect but this change cut the time down significantly.