- Joined
- Feb 8, 2009
- Messages
- 82
- Trophies
- 1
- Age
- 36
- Location
- L'Aquila
- Website
- www.psp-cheats.it
- XP
- 484
- Country
Red_Squirrel said:I tried to decrypt 4 different contents of the same WAD (so same titlekey and same IV for all).
If it's 4 different files, it's 4 different IV's.
And as tueidj said, use the index, not the content id!
From Wiibrew again:
CODEContent
Start ÂÂÂÂLength ÂÂÂÂDescription
0x00 ÂÂÂÂ4 ÂÂÂÂContent ID
0x04 ÂÂÂÂ2 ÂÂÂÂIndex //These are the first two bytes of the IV, different for each content
0x06 ÂÂÂÂ2 ÂÂÂÂType
0x08 ÂÂÂÂ8 ÂÂÂÂSize
0x10 ÂÂÂÂ20 ÂÂÂÂSHA1 hash
Red_Squirrel said:But now another little question: "my" decripted contents (at difference of NUSD dec. contents) have some padding at the end of the file (all 0x00 to fill the hex line).
Is it normal? Could be dangerous for wad installing?
WB3000 said:Red_Squirrel said:But now another little question: "my" decripted contents (at difference of NUSD dec. contents) have some padding at the end of the file (all 0x00 to fill the hex line).
Is it normal? Could be dangerous for wad installing?
NUSD reads the actual size of the contents from the TMD, and applies that size to the padded contents to accurately size them. Any careful WAD Packer should take notice and pad accordingly. If you were creating a title from scratch, having the decrypted contents padded would alter the size placed in TMD, potentially having issues. Having the padding remain may also interfere with extracting contents that are U8, etc.