wiithon.crypto

Decryption and encryption of partition data.

Partition data is stored in blocks of 0x8000 bytes, each carrying a header of hashes and its own AES initialisation vector. Reading is straightforward. Writing is not: changing a single byte means recomputing a whole tree of SHA-1 hashes before re-encrypting.

Modules

wiithon.crypto.part_reader module

Random access reads into a partition, decrypting blocks on demand.

wiithon.crypto.part_writer module

Writes a partition, rebuilding the hash tree as it goes.

wiithon.crypto.blocks module

Block and group level decryption and encryption.

wiithon.crypto.keys module

Nintendo common keys, and title key derivation.

wiithon.crypto.layout module

Block, subblock and group sizes.

Warning

COMMON_KEYS contains the Nintendo common keys, required to derive the title key of any retail disc.

See also

Wii ISO Structure and Decryption Process describes the block layout and the hash tree, with sequence diagrams.