Stories Decryption
I'm having issues with the stories decryption (snaps are still okay), have Snapchat's encryption methods changed or are other people experience the same issue? Any ideas as to what they're doing now?
In my case, it wasn't the decryption. but the HTTP Request
pass only the story_id to the get request and nothing else. worked!
No, they haven't changed. Take a look at #45 it's quite similar to your issue but it's for a thumbnail.
Hope this helps.
@NemOry, I am rolling my own implementation and tried this, I am mimicking the request exactly from Snapchat. I am getting back an encrypted blob, but am unable to decrypt it properly using the included keys from the initial request.
@hako I tried this as well (directly from this repo), but ran into the same issues as the OP...here is my code (with the actual values filled in):
$data = $snapchat->getStoryThumb('media_id', 'media_key', 'media_iv');
file_put_contents('thumbnail.png', $data);
When I go to open the PNG file, it is invalid.
My decryption implementation still works. but I am talking about the QT/C++ implementation. I don't use this PHP Lib
Here is my Obj-C implementation: https://gist.github.com/nmock/a7fa590f1d835a88a9f8
I am unsure what I am doing wrong, I have tried combinations of Base64 encoding/decoding options and AES decryption options, but the decrypted data is not valid.
Also, just in trying to decode the key/iv as a test in Python using the latest values from the stories API, using the same code from the GibSec Full Disclosure, it does not seem to be decoding properly (produce any output):
http://ideone.com/IPxQfy
Any ideas what's going wrong here?