forked from xfwcfw/kelftool
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended keystore and customizable KELF header data #9
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAVENT TESTED IF THIS REIMPLEMENTATION WORKS YET |
work examples: > kelftool.exe decrypt boot.bin boot.elf --keys=arcade
header.UserDefined = 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 (System 2x6 Dongle BootFile)
header.ContentSize = 0X1C77C
header.HeaderSize = 0X80
header.SystemType = 0 (SYSTEM_TYPE_PS2)
header.ApplicationType = 7 (dvdplayer kelf)
header.Flags = 0X22C - kelf:HDR_FLAG2|HDR_FLAG3|HDR_FLAG4_3DES|HDR_FLAG9|
header.BitCount = 0
header.MGZones = 0X3 |Japan|North America|
header.gap = 00 00 00
HeaderSignature = CA C5 4F 5D E6 0B AC 61
Kbit = D8 A0 2B 7E A8 0E A2 7B 18 96 83 C3 13 49 77 8E
Kc = A4 1D A6 98 B4 C5 65 EA A6 A6 A6 87 BA F9 11 50
BitTableSize = 0X28
bitTable.HeaderSize = 0X80
bitTable.BlockCount = 2
bitTable.gap = 00 00 00
Size Signature Flags
bitTable.Blocks[0] = 0001C774 0000000000000000 0 (not encrypted, not signed)
bitTable.Blocks[1] = 00000008 FFE158AB5902B4F0 2 (signed only)
BitTableSignature = E3 A1 1A BD A2 0C 86 20
signature = FF E1 58 AB 59 02 B4 F0 > kelftool.exe decrypt SYSTEM.XLF SYSTEM.ELF
header.UserDefined = 01 00 00 04 00 06 00 4A 00 0E 01 00 00 00 00 02 (DNASLOAD)
header.ContentSize = 0X14E44
header.HeaderSize = 0X80
header.SystemType = 0 (SYSTEM_TYPE_PS2)
header.ApplicationType = 1 (xosdmain)
header.Flags = 0X22C - kelf:HDR_FLAG2|HDR_FLAG3|HDR_FLAG4_3DES|HDR_FLAG9|
header.BitCount = 0
header.MGZones = 0XFF |All regions allowed|
header.gap = 00 00 00
HeaderSignature = 29 A0 93 FA 2F 8D 36 E3
Kbit = D9 4A 2E 56 01 6E A7 31 00 00 00 00 00 00 00 00
Kc = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
BitTableSize = 0X28
bitTable.HeaderSize = 0X80
bitTable.BlockCount = 2
bitTable.gap = 00 00 00
Size Signature Flags
bitTable.Blocks[0] = 00014E34 0000000000000000 0 (not encrypted, not signed)
bitTable.Blocks[1] = 00000010 B70BC5F7CB01927F 3 (encrypted and signed)
BitTableSignature = F4 09 35 19 92 F9 84 49 > kelftool.exe decrypt SYSTEM.XLF a.o
header.UserDefined = 01 00 00 04 00 06 00 4A 00 0E 01 00 00 00 00 02 (DNASLOAD)
header.ContentSize = 0X14E58
header.HeaderSize = 0X80
header.SystemType = 0 (SYSTEM_TYPE_PS2)
header.ApplicationType = 1 (xosdmain)
header.Flags = 0X21C - kirx:HDR_FLAG2|HDR_FLAG3|HDR_FLAG4_1DES|HDR_FLAG9|
header.BitCount = 0
header.MGZones = 0XFF |All regions allowed|
header.gap = 00 00 00
HeaderSignature = C9 9C CD 35 C4 8F CD E9
Kbit = 24 25 1D 05 D1 5E 2D 7D 94 3F 4A 30 3F 28 24 DB
Kc = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
BitTableSize = 0X28
bitTable.HeaderSize = 0X80
bitTable.BlockCount = 2
bitTable.gap = 00 00 00
Size Signature Flags
bitTable.Blocks[0] = 00014E48 0000000000000000 0 (not encrypted, not signed)
bitTable.Blocks[1] = 00000010 003BEB0B63B32769 3 (encrypted and signed)
BitTableSignature = 66 21 D6 C3 AE E5 CF E9 > kelftool.exe decrypt SYSTEM.XLF a.o
header.UserDefined = 01 00 00 04 00 06 00 4A 00 0E 01 00 00 00 00 02 (DNASLOAD)
header.ContentSize = 0X14E58
header.HeaderSize = 0X80
header.SystemType = 0 (SYSTEM_TYPE_PS2)
header.ApplicationType = 1 (xosdmain)
header.Flags = 0X22C - kelf:HDR_FLAG2|HDR_FLAG3|HDR_FLAG4_3DES|HDR_FLAG9|
header.BitCount = 0
header.MGZones = 0XFF |All regions allowed|
header.gap = 00 00 00
HeaderSignature = 8D F2 2B 15 BA 53 98 72
Kbit = 24 25 1D 05 D1 5E 2D 7D 94 3F 4A 30 3F 28 24 DB
Kc = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
BitTableSize = 0X28
bitTable.HeaderSize = 0X80
bitTable.BlockCount = 2
bitTable.gap = 00 00 00
Size Signature Flags
bitTable.Blocks[0] = 00014E48 0000000000000000 0 (not encrypted, not signed)
bitTable.Blocks[1] = 00000010 003BEB0B63B32769 3 (encrypted and signed)
BitTableSignature = 66 21 D6 C3 AE E5 CF E9 |
example of new keystore: [default]
MG_CARDKEY_0=...
MG_CARDIV_0=...
MG_CARDKEY2_0=...
MG_CARDIV2_0=...
MG_CARDKEY_1=...
MG_CARDIV_1=...
MG_CARDKEY2_1=...
MG_CARDIV2_1=...
MG_CARDKEY_2=...
MG_CARDIV_2=...
MG_CARDKEY2_2=...
MG_CARDIV2_2=...
MG_KBIT_MASTER_KEY=...
MG_KC_MASTER_KEY=...
MG_KBIT_IV=...
MG_KC_IV=...
MG_SIG_MASTER_KEY=...
MG_SIG_HASH_KEY=...
MG_ROOTSIG_HASH_KEY=...
MG_ROOTSIG_MASTER_KEY=...
MG_CONTENT_IV=...
MG_CONTENT_TABLE_IV=...
MG_CHALLENGE_IV=...
[retail]
MG_CARDKEY_0=...
MG_CARDIV_0=...
MG_CARDKEY2_0=...
MG_CARDIV2_0=...
MG_CARDKEY_1=...
MG_CARDIV_1=...
MG_CARDKEY2_1=...
MG_CARDIV2_1=...
MG_CARDKEY_2=...
MG_CARDIV_2=...
MG_CARDKEY2_2=...
MG_CARDIV2_2=...
MG_KBIT_MASTER_KEY=...
MG_KC_MASTER_KEY=...
MG_KBIT_IV=...
MG_KC_IV=...
MG_SIG_MASTER_KEY=...
MG_SIG_HASH_KEY=...
MG_ROOTSIG_HASH_KEY=...
MG_ROOTSIG_MASTER_KEY=...
MG_CONTENT_IV=...
MG_CONTENT_TABLE_IV=...
MG_CHALLENGE_IV=...
[arcade]
MG_CARDKEY_0=...
MG_CARDIV_0=...
MG_CARDKEY2_0=...
MG_CARDIV2_0=...
MG_CARDKEY_1=...
MG_CARDIV_1=...
MG_CARDKEY2_1=...
MG_CARDIV2_1=...
MG_CARDKEY_2=...
MG_CARDIV_2=...
MG_CARDKEY2_2=...
MG_CARDIV2_2=...
MG_KBIT_MASTER_KEY=...
MG_KC_MASTER_KEY=...
MG_KBIT_IV=...
MG_KC_IV=...
MG_SIG_MASTER_KEY=...
MG_SIG_HASH_KEY=...
MG_ROOTSIG_HASH_KEY=...
MG_ROOTSIG_MASTER_KEY=...
MG_CONTENT_IV=...
MG_CONTENT_TABLE_IV=...
MG_CHALLENGE_IV=...
OVERRIDE_KBIT=...
OVERRIDE_KC=...
[dev]
MG_CARDKEY_0=...
MG_CARDIV_0=...
MG_CARDKEY2_0=...
MG_CARDIV2_0=...
MG_CARDKEY_1=...
MG_CARDIV_1=...
MG_CARDKEY2_1=...
MG_CARDIV2_1=...
MG_CARDKEY_2=...
MG_CARDIV_2=...
MG_CARDKEY2_2=...
MG_CARDIV2_2=...
MG_KBIT_MASTER_KEY=...
MG_KC_MASTER_KEY=...
MG_KBIT_IV=...
MG_KC_IV=...
MG_SIG_MASTER_KEY=...
MG_SIG_HASH_KEY=...
MG_ROOTSIG_HASH_KEY=...
MG_ROOTSIG_MASTER_KEY=...
MG_CONTENT_IV=...
MG_CONTENT_TABLE_IV=...
MG_CHALLENGE_IV=...
[prototype]
MG_CARDKEY_0=...
MG_CARDIV_0=...
MG_CARDKEY2_0=...
MG_CARDIV2_0=...
MG_CARDKEY_1=...
MG_CARDIV_1=...
MG_CARDKEY2_1=...
MG_CARDIV2_1=...
MG_CARDKEY_2=...
MG_CARDIV_2=...
MG_CARDKEY2_2=...
MG_CARDIV2_2=...
MG_KBIT_MASTER_KEY=...
MG_KC_MASTER_KEY=...
MG_KBIT_IV=...
MG_KC_IV=...
MG_SIG_MASTER_KEY=...
MG_SIG_HASH_KEY=...
MG_ROOTSIG_HASH_KEY=...
MG_ROOTSIG_MASTER_KEY=...
MG_CONTENT_IV=...
MG_CONTENT_TABLE_IV=...
MG_CHALLENGE_IV=... |
@AKuHAK pls check if you see anything out of place |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request checklist
Note: these are not necessarily requirements
Pull Request description