Please sign in to comment.
Re-implement FixCommonKeyIndex for WAD files
The old implementation of this was not able to distinguish between a title that had the common key index set to 1 because it actually was Korean and a title that had the common key index set to 1 due to fakesigning. This new implementation solves the problem by decrypting a content with each possible common key and checking which result matches the provided SHA-1 hash. The problem that the old implementation causes has only been reported to affect a certain pirated WAD of Chronos Twins DX (WC6EUP), but it's possible that the problem would start affecting more WADs if we add support for the vWii common key (which uses index 2). Adding support for the vWii common key would also prevent us from using the simpler solution of always forcing the index to 0 if the title is not Korean.
- Loading branch information...
Showing with 136 additions and 57 deletions.
- +4 −6 Source/Core/Core/IOS/ES/Formats.cpp
- +1 −2 Source/Core/Core/IOS/ES/Formats.h
- +1 −2 Source/Core/Core/WiiUtils.cpp
- +6 −0 Source/Core/DiscIO/Volume.h
- +22 −40 Source/Core/DiscIO/VolumeVerifier.cpp
- +2 −7 Source/Core/DiscIO/VolumeVerifier.h
- +94 −0 Source/Core/DiscIO/VolumeWad.cpp
- +6 −0 Source/Core/DiscIO/VolumeWad.h