wiithon.crypto.blocks module
- wiithon.crypto.blocks.decrypt_block(block, title_key)[source]
Decrypt a single 0x8000-byte block
Extracts the IV at offset: 0x3D0 of the block header (16 bytes)
Decrypts the data section (0x400 to end) with AES-128-CBC
Returns the 0x7C00 bytes, decrypted
See: https://wiibrew.org/wiki/Wii_disc#Encrypted :type block:
bytes:param block: Raw encrypted block :type title_key:bytes:param title_key: 16-byte title key
- wiithon.crypto.blocks.decrypt_group(group_data, title_key)[source]
Decrypt an entire group of 64 blocks. Iterates over all 64 blocks in the group, decrypt each one and concatenates
- wiithon.crypto.blocks.encrypt_group(group_data, title_key, h3_ref=None)[source]
Hash and encrypt a full 2MB group Reference: https://wiibrew.org/wiki/Wii_disc#Encrypted
- Parameters:
- Return type:
- Returns:
The encrypted 2MB data as bytes