Editing Sealedkey / pfsSKKey

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
sealedkey file is located in sce_sys folder of savedata/trophies. It is not PFS encrypted.
=== File Structure ===
 
It is used as a per savedata/trophy key in PFS encryption/decryption whilst gamedata/addcont uses klicensee.
 
== File Structure ==


{| class="wikitable"
{| class="wikitable"
|-
! Offset !! Size !! Description
! Offset !! Size !! Description
|-
|-
| 0x0 || 0x8 || Magic "pfsSKKey"
| 0x0 || 0x8 || magic "pfsSKKey"
|-
|-
| 0x8 || 0x4 || Type (always 2)
| 0x8 || 0x4 || Type (always 2)
|-
|-
| 0xC || 0x4 || Padding / unk
| 0xC || 0x4 || 00 Filler
|-
|-
| 0x10 || 0x10 || IV for encrypted key
| 0x10 || 0x10 || IV for encrypted key
Line 19: Line 16:
|-
|-
| 0x30 || 0x20 || HMAC Value
| 0x30 || 0x20 || HMAC Value
|-
|}
|}
== Decryption ==


The first step is to check the HMAC of the file. The process is to use the HMAC key from the [[Keys#PFS_Secret_Keys]] page to check the HMAC at position 0x30 in the file. If it is correct, it proceeds to use the pfsSKKey_EncKey to decrypt the value at +0x20 using the value at +0x10 as the IV.
The first step is to check the HMAC of the file. The process is to use the HMAC key from the [[Keys#PFS_Secret_Keys]] page to check the HMAC at position 0x30 in the file. If it is correct, it proceeds to use the pfsSKKey_EncKey to decrypt the value at +0x20 using the value at +0x10 as the IV.
Please note that all contributions to Vita Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see Vita Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)