Hacking SHA1 hash in a TMD

  • Thread starter Thread starter Scarfish
  • Start date Start date
  • Views Views 2,263
  • Replies Replies 3

Scarfish

Well-Known Member
Member
Joined
Jan 5, 2009
Messages
101
Reaction score
0
Trophies
1
XP
64
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;
 
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).
 
Thanks, that clear things up
smile.gif
 

Site & Scene News