Editing IDStorage

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 45: Line 45:
= IDStorage certified sections =
= IDStorage certified sections =


IDStorage certified sections are a security measure for critical information. For example PSID and OpenPSID are certified (leaves 0x100, 0x101, 0x120, 0x121). For PSPemu on PS3 and PS Vita, the same sort of certificates are contained in PS3 eEID and PS Vita ID Storage, and Kirk commands are implemented to handle them. Moreover, PS3 eEID certificates use almost the same structure and algorithms, whilst PS Vita extends block sizes from 128 to 192 and 256 bits.
IDStorage certified sections are a security measure for critical information. For example PSID and OpenPSID are certified (leaves 0x100, 0x101, 0x120, 0x121).


Kirk command 0x12 is used to verify IDStorage certificates.
KIRK command 0x12 is used to verify IDStorage certificates.


== Structure ==
== Stucture ==
 
Some of the leaves contain certificates similar in PSP, PS3 and PSVita.
 
Size is 0xB8 bytes: 0x10 bytes of data and 0xA8 bytes of certificate.


{|class="wikitable"
{|class="wikitable"
Line 70: Line 74:
|}
|}


<source lang="C">
= Content =
typedef struct ECDSA160_signature { // size is 0x28
  unsigned char r[0x14];
  unsigned char s[0x14];
} ECDSA160_signature;


typedef struct ids_cert_main_psp { // size is 0xA8
char data[0x10];
char pub_key[0x28]; // ?generated using Kirk command 0xC? sent to Kirk command 0x11 for verification
ECDSA160_signature signature;
char constant_pub_key[0x28]; // hardcoded constant, same in all PSP consoles but depends on the certificate index in ID Storage
char enc_priv_key[0x20]; // decrypted and verified by Kirk command 0x10
} ids_cert_main_psp;
typedef struct ids_cert_psp { // size is 0xB8
ids_cert_main_psp cert_data; // data input for generating enc_aes_cmac_hash
char aes_cmac[0x10]; // verified by Kirk command 0x12
} ids_cert_psp;
</source>
= Content =
{| class="wikitable"
!Key
!Information
!Unique?
|-
|0x4
|Baryon settings/information + extra data since TA-085v1
|Same per model
|-
|0x5
|Clockgen/I2C setup commands
|Same per model
|-
|0x6
|Battery, CPU frequency and general power settings + extra data since TA-085v1
|Same per model
|-
|0x7
|Unknown (exists since TA-085v1/TA-086, changed in TA-088)
|Yes
|-
|0x8
|Brightness hardware control (exists since TA-085v1/TA-086, changed in TA-085v2 and TA-088)
|Same per model
|-
|0x10
|MagicGate
|Yes
|-
|0x11
|MagicGate
|Yes
|-
|0x12
|MagicGate
|Same per model
|-
|0x13
|MagicGate
|Yes
|-
|0x40
|Contains the 0x5 bytes at 0x88 from key 0x10
|Yes
|-
|0x41
|USB (Driver type identifier) (slightly different since TA-085v1)
|Same per model
|-
|0x43
|USB (Device ID) (slightly different since TA-085v1)
|Same per model
|-
|0x44
|WLAN MAC Address (can be rebuilt using Noobz MAC Address Fixer)
|Yes
|-
|0x45
|WLAN Region (can be rebuilt using KeyCleaner)
|Partially
|-
|0x47
|Default parental lock level (first byte is 0x09, rest is empty)
|Same per model
|-
|0x50
|Serial number (not used since TA-082)
|Yes
|-
|0x51
|Firmware the PSP shipped with, and unknown unique data (exists since TA-085v1/TA-086)
|Yes
|-
|0x52
|Unused by PSP - Mostly the same per PSP except for slight variations, could be manufacturing info (exists since TA-085v1)
|Partially
|-
|0x54
|Default XMB background colour and original shell colour (exists since TA-085v1), see section below for more info
|Partially
|-
|0x100
|DNAS, VSH & Internet browser region, ad-hoc region (if missing, official updaters cannot run - error CTA80000025)
|Yes
|-
|0x101
|OpenPSID (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x102
|UMD (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x103
|UMD (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x104
|UMD (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x105
|UMD (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x106
|UMD (non-indexed duplicate at [location of original + 0x8000])
|Yes
|-
|0x120-0x126
|Backup of respective 0x0100-106 key
|Yes
|-
|0x140
|Unknown unique data
|Yes
|}
* Leaves 0x100-0x11F are identical to their backup leaves 0x120-0x13F
* Leaves 0x100-0x11F are identical to their backup leaves 0x120-0x13F
* Old PSP revision haven't leaves 0x046, 0x047
* Old PSP revision haven't leaves 0x046, 0x047
* Very old PSP revisions haven't leaf 0x140
* Very old PSP revisions haven't leaf 0x140
* Leaf 0x50 is maybe Serial Number


= Uses =
= Uses =
Line 234: Line 103:
=== sceChkregGetPsCode ===
=== sceChkregGetPsCode ===


Chkreg (chkreg.prx) reads 2 leaves, 0x100 and 0x102 or 0x120 and 0x122.  
Chkreg (chkreg.prx) reads 2 leaves, 0x100 and 0x102 or 0x120 and 0x122. All contain the PsCode at 3 locations. The 1st occurrence of the PsCode is at 0x38, the second at 0xF0 and the third at 0x1A8. Each occurrence is 0xAF (175 bytes) apart.


It gets PSID from the IdStorage and convert it to PsCode.
Example of PsCode:


Example of PSP PsCode: 00 00 00 01 00 03 00 01
0000000048                          00 00 00 01 00 '''03''' 00 01         ........
0000000240  00 00 00 01 00 '''03''' 00 01                          ........       
0000000416                          00 00 00 01 00 '''03''' 00 01          ........


The return from sceChkregGetPsCode is determined to be valid or invalid via KIRK command 0x12, just like other functions using leaves 0x100, 0x120.
The return from sceChkregGetPsCode is determined to be valid or invalid via KIRK command 0x12, just like other functions using leaves 0x100, 0x120.
Line 288: Line 159:
== Umdman ==
== Umdman ==


Umdman (umdman.prx) reads 5 leafs, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107. The leaf 0x102 is related to the region, and is probably used to determine what UMD video's can be read on the PSP.
Umdman (umdman.prx) reads 1 leaf, 0x102. This leaf is related to the region, and is probably used to determine what UMD video's can be read on the PSP.


== USB ==
== USB ==
Line 387: Line 258:
0x046
0x046
  Empty, however vshmain uses the first byte of this leaf to set a param for vshImposeSetParam.  
  Empty, however vshmain uses the first byte of this leaf to set a param for vshImposeSetParam.  
== Key 0x054 ==
This key controls what the default background color is set to on initial setup and also denotes what color of shell the board shipped with. It was introduced with 02g and consists of 3 bytes on every retail model except 01g (non-existent) and 05g (4 bytes, needs more research). The first byte has 3 options: 00 sets the default color to the "By Month" option, 01 (or any other byte 1 value that's not 00 or 02) will set the color in hexadecimal order from 1-12.bmp or 13-27.bmp that matches byte 2, 02 (only found on 02g so far) will set the default color to a specified color depending on the value of byte 3 if byte 3 is between 00 and 06 (if byte 3 is 07 or higher, then functionality is the same as setting byte 1 to anything other than 00 or 02). Byte 2 can be any hexadecimal number between 00 and 21, anything higher than 21 will result in a default background of solid white with no visible wave. Byte 3 seems to be linked to the color of the original shell and increments chronologically as more colors were released.
A key 0x054 value of 020002 would be a 02g in Ice Silver with a default background color of 26 (middle dark gray/black option), a value of 010410 would be a Spirited Green system with a default background color of 5 (dark green), and a value of 00001D would be a Charcoal Black system that defaults to the "By Month" color option.
==== Key 0x054 Byte 3 Color Table ====
{| class="wikitable mw-collapsible mw-collapsed"
|+
!Byte 3
!Shell Color
!Special Color
(Byte 1 = 02)
!First Release (02g+)
|-
|00
|Piano Black
|26
|September 20th, 2007
|-
|01
|?Ceramic White?
|26
|September 20th, 2007
|-
|02
|Ice Silver
|26
|September 20th, 2007
|-
|03
|?Rose Pink?
|14
|September 20th, 2007
|-
|04
|?Lavender Purple?
|17
|September 20th, 2007
|-
|05
|Felicia Blue
|20
|September 20th, 2007
|-
|06
|?Mint Green?
|23
|February 28th, 2008
|-
|07
|?Deep Red?
|N/A
|December 13th, 2007
|-
|08
|?Matte Bronze?
|N/A
|April 24th, 2008
|-
|09
|
|N/A
|
|-
|0A
|
|N/A
|
|-
|0B
|Metallic Blue
|N/A
|July 17th, 2008
|-
|0C
|Pearl White
|N/A
|October 15th, 2008
|-
|0D
|Mystic Silver
|N/A
|October 14th, 2008
|-
|0E
|Vibrant Blue
|N/A
|March 5th, 2009
|-
|0F
|Radiant Red
|N/A
|March 5th, 2009
|-
|10
|Spirited Green
|N/A
|March 19th, 2009
|-
|11
|?Bright Yellow?
|N/A
|March 19th, 2009
|-
|12
|?Lilac Purple?
|N/A
|October 2009
|-
|13
|Turquoise Green
|N/A
|November 2009
|-
|14
|
|N/A
|
|-
|15
|Blossom Pink
|N/A
|November 2009
|-
|16
|
|N/A
|
|-
|17
|
|N/A
|
|-
|18
|?Black/Red?
|N/A
|February 10, 2011
|-
|19
|?White/Blue?
|N/A
|February 10, 2011
|-
|1A
|Monster Hunter Portable 3rd Hunters Lm. Ed. (3000MHB)
|N/A
|December 1, 2010
|-
|1B
|Camouflage (MGS Peace Walker 3000)
|N/A
|March 18, 2011
|-
|1C
|
|N/A
|
|-
|1D
|Charcoal Black
|N/A
|October 26, 2011
|-
|1E
|Red/Black
|N/A
|November 17, 2011
|-
|1F
|?Sky Blue/Marine Blue?
|N/A
|April 26, 2012
|-
|20
|Ice White
|N/A
|July 2012
|}
<nowiki>*</nowiki>Shell color entries with question marks are guesses based on release date and special color value and need to be verified.


= Legality of distribution =
= Legality of distribution =
Please note that all contributions to PSP Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PSP 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)