For all those wondering, this is the Salsa20 key for Black Ops II fast files on PC.
If you know what to do with it then get cracking. I've tested the key and it works (to a certain extent). I haven't been able to decrypt and uncompress all the data in the fast files, it normally fails with a "Bad state (invalid stored block lengths)" or "Bad state (oversubscribed dynamic bit lengths tree)" error but I am at least able to get some data (mainly .hlsl files). It's probably the code that I'm using.
Credits to whoever made this to decompress/decrypt fast files, I only based my code off this, not copy paste: http://pastebin.com/QEkwa0Re (and no, PC does not use BigEndian, it uses LittleEndian). Basically what it does is first decrypts each section in the fast file using the key and IV according to the section index and uses zlib's deflate algorithm to uncompress the data.
It was quite easy to find the key, all you had to do was look for: "expand 32-byte k" in the game executable and you've found the function where the key is passed into the function known as ECRYPT_keysetup. The functions used in Black Ops 2 for Salsa20 can be found here (or at least a similar variant): http://cr.yp.to/snuffle/salsa20/merged/salsa20.c
Code:
0x64, 0x1D, 0x8A, 0x2F, 0xE3, 0x1D, 0x3A, 0xA6, 0x36, 0x22, 0xBB, 0xC9, 0xCE, 0x85, 0x87, 0x22, 0x9D, 0x42, 0xB0, 0xF8, 0xED, 0x9B, 0x92, 0x41, 0x30, 0xBF, 0x88, 0xB6, 0x5E, 0xDC, 0x50, 0xBE
If you know what to do with it then get cracking. I've tested the key and it works (to a certain extent). I haven't been able to decrypt and uncompress all the data in the fast files, it normally fails with a "Bad state (invalid stored block lengths)" or "Bad state (oversubscribed dynamic bit lengths tree)" error but I am at least able to get some data (mainly .hlsl files). It's probably the code that I'm using.
Credits to whoever made this to decompress/decrypt fast files, I only based my code off this, not copy paste: http://pastebin.com/QEkwa0Re (and no, PC does not use BigEndian, it uses LittleEndian). Basically what it does is first decrypts each section in the fast file using the key and IV according to the section index and uses zlib's deflate algorithm to uncompress the data.
It was quite easy to find the key, all you had to do was look for: "expand 32-byte k" in the game executable and you've found the function where the key is passed into the function known as ECRYPT_keysetup. The functions used in Black Ops 2 for Salsa20 can be found here (or at least a similar variant): http://cr.yp.to/snuffle/salsa20/merged/salsa20.c
A casual conversation between barata and I about Nukem.