Editing Content License

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:
This page will have to be merged with the [[Rif]] one.
The PS4 content license files are like on PSP, PS3 and PSVita the .rif files.


The PS4 content license files are, like on PSP, PS3 and PS Vita, the .rif files.
But for the first time, the format has been changed a lot:
 
* There is only one .rif file (and .idx) per game/app. On PSP, PS3 and PSVita, there were 1 .rif per content (1 for the game + 1 for each DLC)
But for the first time, the format has changed a lot:
* This is handled by adding each DLC license to the game .rif. To know where the license is in the .rif, PS4 generates a .idx file (RIF index).
* There is only one .rif file (and .idx) per game/application. On PSP, PS3 and PS Vita, there was one .rif per content (one for the game and one for each DLC)
* When the .rif is downloaded from PSN by SceShellcore, it is added to the current .rif file of the game (if existing).<br />Then the .idx is generated. ShellCore calls npdrm_ioctl to get a 0x10 bytes HMAC-SHA256 per console key from SAMU.<br />The HMAC is computed over the RIF data and is written to the .idx entry.<br />The aim is both to ensure .rif integrity and to make sure the .rif and .idx can't be copied to another PS4 console.
* This is handled by adding each DLC license to the game .rif. To determine where the license for a specific content is in the .rif, the PS4 generates a .idx file (RIF index).
* When the .rif is downloaded from [[PSN]] by [[SceShellCore]], it is added to the current .rif file of the game (if existing).<br />
Then the .idx is generated. [[SceShellCore]] calls npdrm_ioctl to get a 0x10 bytes HMAC-SHA256 per-console key from SAMU.<br />
The HMAC is computed over the RIF data and is written to the .idx entry.<br />
The aim is both to ensure .rif integrity and to make sure that the .rif and .idx cannot be copied to another PS4 console.


The files an be found in:
The files an be found in:
Line 20: Line 15:
This is a .rif that is not paired with a .idx file.
This is a .rif that is not paired with a .idx file.


For a RIF file that is paired with a .idx file, see [[#RIFA File|RIFA file]].
For a rif file that is paired with a .idx file, see [[#RIFA File|RIFA file]].


The .rif file embeds one or more [[RIF Entry|RIF entry]].
The .rif file embeds one or more [[RIF Entry|RIF entry]].


[[Rif/samples|Sample disc RIF files]].
[[Rif/samples|Sample disc rif files]].


=== RIF Entry ===
=== RIF Entry ===
Line 260: Line 255:
! style="width: 40%" | Remark
! style="width: 40%" | Remark
|-
|-
| [[Entitlement Label]] || <code>0x00</code> || 16 || <code>PLAYROOM00000000</code> ||  
| [[Entitlement label]] || <code>0x00</code> || 16 || <code>PLAYROOM00000000</code> ||  
|-
|-
| RIF Offset || <code>0x10</code> || 8 || <code>00 04 00 00 00 00 00 00</code> || Offset into [[#RIFA File|RIFA file]]
| RIF Offset || <code>0x10</code> || 8 || <code>00 04 00 00 00 00 00 00</code> || Offset into [[#RIFA File|RIFA file]]
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 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)