Advertising (This ad goes away for registered users. You can Login or Register)

Calculating title update download links with HMAC key

Open discussions on programming specifically for the PS Vita.
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Proxima
Guru
Posts: 47
Joined: Mon Jan 03, 2011 2:38 pm

Re: Calculating title update download links with HMAC key

Post by Proxima » Thu Sep 03, 2015 1:28 am

Just so you are aware, when the Vita downloads a PKG file, it is over HTTP, not HTTPS.
Advertising

MooMooMan
Posts: 120
Joined: Tue Jul 22, 2014 5:39 pm
Location: McMurdo, Antartica

Re: Calculating title update download links with HMAC key

Post by MooMooMan » Thu Sep 03, 2015 5:09 am

Proxima wrote:Just so you are aware, when the Vita downloads a PKG file, it is over HTTP, not HTTPS.
That isn't very smart, why would it be over HTTP?

I'm not calling you a liar, I'm calling Sony stupid.
Advertising
Ps Vita 1000 3.60 HenKaku
PSP 3000 03g 6.20 LME 2.3 Perm (Black)
PSP 3000 03g 6.20 LME 2.3 Perm (Silver)

yifanlu
Guru
Posts: 760
Joined: Sun Mar 11, 2012 6:42 am
Contact:

Re: Calculating title update download links with HMAC key

Post by yifanlu » Thu Sep 03, 2015 12:57 pm

And why is Sony stupid? When has downloading large files over HTTPS even been a good idea? Do you even know what HTTPS is used for?

User avatar
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: Calculating title update download links with HMAC key

Post by reprep » Thu Sep 03, 2015 12:59 pm

This means it is possible to create URL links for any game/app update .pkg with Game ID, right? So we can download the missing update .pkg files of PSM etc.?

EchoDev
Posts: 68
Joined: Mon Mar 24, 2014 12:46 pm

Re: Calculating title update download links with HMAC key

Post by EchoDev » Thu Sep 03, 2015 1:02 pm

MooMooMan wrote:
EchoDev wrote:If we could manipulate https data to the vita we prolly could feed it our own pkg files right? :lol: Change the pkg file to a different one from the Sony servers to see if it accepts it.

Does anyone know how the sha1sum is calculated in the xml file? It does not seem to be a standard sha1 calculation.
I am willing to bet my manhood that what you are proposing is very difficult at the moment, or down right impossible.

If it were that easy, all you would need to do is set up a router to search for a specific https connection, and reroute it to another site, or better yet, your own home server with the files you need.

The idea is nice though, I wonder if something will ever come of it. I guess all we need is the keys? I don't know, I only code in JavaScript. Lol
You can't just hijack the https connection. The Vita will refuse to use the connection if the certificates don't match.

Hykem
Guru
Posts: 75
Joined: Sat Jan 15, 2011 8:11 pm

Re: Calculating title update download links with HMAC key

Post by Hykem » Thu Sep 03, 2015 3:41 pm

reprep wrote:This means it is possible to create URL links for any game/app update .pkg with Game ID, right? So we can download the missing update .pkg files of PSM etc.?
Pretty much.

Another great contribution from Proxima. Thank you!

User avatar
SMOKE
Retired Mod
Posts: 3673
Joined: Tue Apr 17, 2012 10:00 pm
Location: USA
Contact:

Re: Calculating title update download links with HMAC key

Post by SMOKE » Sat Sep 05, 2015 6:25 pm

Very nice Proxima, always nice to see the things you do :)

Unfortunately, I'm not getting the same result. I'm getting the following link for PCSA00007:

Code: Select all

https://gs-sec.ww.np.dl.playstation.net/pl/np/PCSA00007/c6a6524d5018c043074f3d543b8940be043ad1cd8721ab4a66ccadbd98af2d92/PCSA00007-ver.xml
This is the implementation of hmac_sha256 that I used:
https://gist.github.com/tsupo/112188/ac ... b58b6dff5e

User avatar
qwikrazor87
Guru
Posts: 2874
Joined: Sat Apr 21, 2012 1:23 pm
Location: The North Pole

Re: Calculating title update download links with HMAC key

Post by qwikrazor87 » Sat Sep 05, 2015 6:45 pm

yup, got a different result too using openssl hmac.
PSP 2001 - TA-085 - 6.61 PRO-C2
PS Vita 3G - PCH-1101 - 3.65 HENkaku Ensō
Alcatel phone - Android 8.1.0
Laptop - Toshiba Satellite L305D-S5974 - Ubuntu 16.04 LTS

mr.gas
Guru
Posts: 163
Joined: Sat Apr 05, 2014 6:35 pm
Location: YEMEN

Re: Calculating title update download links with HMAC key

Post by mr.gas » Sat Sep 05, 2015 7:05 pm

this one is working nice .. by frtomtomdu80
https://www.dropbox.com/s/nij7w3o29urgi ... e.exe?dl=0

Proxima
Guru
Posts: 47
Joined: Mon Jan 03, 2011 2:38 pm

Re: Calculating title update download links with HMAC key

Post by Proxima » Sun Sep 06, 2015 3:10 am

http://web.mit.edu/freebsd/head/contrib ... o/sha256.c

This is what I used for my implementation. Not sure why it would vary between implementations. Maybe differences in how the arguments processed.

Post Reply

Return to “Programming and Security”