Hacking Decrypt WAD contents using openssl command line...

Red_Squirrel

Well-Known Member
OP
Newcomer
Joined
Feb 8, 2009
Messages
82
Trophies
1
Age
36
Location
L'Aquila
Website
www.psp-cheats.it
XP
484
Country
Italy
Maybe I discover the error, thx to all
smile.gif
 

Leathl

Well-Known Member
Member
Joined
Aug 15, 2009
Messages
239
Trophies
0
Location
Berlin
Website
Visit site
XP
90
Country
Gambia, The
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

Well-Known Member
OP
Newcomer
Joined
Feb 8, 2009
Messages
82
Trophies
1
Age
36
Location
L'Aquila
Website
www.psp-cheats.it
XP
484
Country
Italy
Yes, my error was the use of the same IV for each content
lecture.gif
Thx for the help again
bow.gif

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? And if you know, is there some option in openssl to avoid that padding?
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
the size must be divisible by 16 or else it will fail to install. padding is there to let it be aligned properly. you can check the TMD for the size it needs to be after padding is added. it is the u64 directly before the hash for each TMD content.
 

WB3000

Well-Known Member
Member
Joined
Apr 5, 2007
Messages
674
Trophies
1
Website
wb3000.co.nr
XP
471
Country
United States
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.
 

Red_Squirrel

Well-Known Member
OP
Newcomer
Joined
Feb 8, 2009
Messages
82
Trophies
1
Age
36
Location
L'Aquila
Website
www.psp-cheats.it
XP
484
Country
Italy
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.

So practically I have to delete that extra padding... Thanks for the advice
yay.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Is it safe to update a modded ps3? Can I play online in pirated games? (with ps3hen either...