Hacking SHA1 hash in a TMD

Scarfish

Well-Known Member
OP
Member
Joined
Jan 5, 2009
Messages
101
Trophies
0
XP
54
Country
Netherlands
At the moment I'm playing around a bit with title downloads and for an overview of a tmd file I use this page on WiiBrew TMD.
Here it states that the content int the tmd exists of an ID, an Index, a Type, a Size and a SHA-1 Hash. The problem is that when I compute the SHA-1 hash of the downloaded content it doesn't match with the Hash that was in the content of the tmd file.

Anybody knows exactly where the SHA-1 hash of the content in the tmd file comes from? It doesn't look like its the hash of the downloaded content or could it be the way I get the hash of the downloaded file? I use the SHA1 class from .Net:

CODEbyte[] content = ;
byte[] originalHash = ;

SHA1 sha1Instance = SHA1.Create();
byte[] hash = sha1Instance.ComputeHash(content)

return hash == originalHash;
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
998
Country
It's the SHA1 hash of the decrypted content. You need to get the title key by decrypting the key in the ticket (using the common key and the title ID as the IV) then use that to decrypt the content (use the index as the IV).
 

Scarfish

Well-Known Member
OP
Member
Joined
Jan 5, 2009
Messages
101
Trophies
0
XP
54
Country
Netherlands
Thanks, that clear things up
smile.gif
 
General chit-chat
Help Users
    AncientBoi @ AncientBoi: now that's a better "Explination" ty