1
Fork 0
mirror of https://github.com/naehrwert/scetool.git synced 2025-04-24 13:47:47 +00:00
scetool/src
2018-03-26 11:17:57 +04:00
..
aes.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
aes.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
aes_omac.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
aes_omac.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
bn.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
config.h Updated to v.0.3.1 2018-03-15 00:37:29 +04:00
ec.cpp Fixed ECDSA checking. 2015-04-06 14:16:39 +03:00
ecdsa.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
ecdsa.h Fixed ECDSA checking. 2015-04-06 14:16:39 +03:00
elf.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
elf_inlines.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
frontend.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
frontend.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
getopt.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
getopt.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
keys.cpp Fixed Vsh Curve loader 2018-02-15 22:52:50 +04:00
keys.h Fixed Vsh Curve loader 2018-02-15 22:52:50 +04:00
list.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
list.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
main.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
Makefile Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
mt19937.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
mt19937.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
np.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
np.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
pkg.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
pkg.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
README Updated to v.0.3.1 2018-03-15 00:37:29 +04:00
rvk.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
rvk.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
sce.cpp Header parser fix 2 2018-03-25 21:12:36 +04:00
sce.h Header parser fix 4 2018-03-26 03:04:46 +04:00
sce_inlines.h Header parser fix 2018-03-25 18:13:30 +04:00
self.cpp Added rvkldr auth-id 2018-03-26 11:17:57 +04:00
self.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
sha1.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
sha1.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
spp.cpp Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
spp.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
tables.cpp Added rvkldr auth-id 2018-03-26 11:17:57 +04:00
tables.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
types.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
util.cpp Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
util.h Updated to v.0.3.0 2018-01-23 23:22:15 +04:00
zconf.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00
zlib.h Updated to v. 0.2.10 2014-10-30 01:22:20 +03:00

scetool (C) 2011-2013 by naehrwert
NP local license handling (C) 2012 by flatz

==> Setup <==
 - /data/keys : Keyfile.
 - /data/ldr_curves : Loader curves (7744 bytes).
 - /data/vsh_curves : VSH curves (360 bytes).
 - /data/idps : IDPS as binary file
 - /data/act.dat : act.dat
 - /rifs/* : *.rif files
 - /raps/* : *.rap files
 - /klics/* : *.klic files

==> Keyfile Format <==
 [keyname]
 category={SELF, RVK, PKG, SPP, OTHER}
 revision={00, ..., 18, 8000}
 version={..., 0001000000000000, ...}
 program_type={LV0, LV1, LV2, APP, ISO, LDR, UNK_7, NPDRM}
 key=...
 erk=...
 riv=...
 pub=...
 priv=...
 ctype=...

==> Keyset Example <==
 [metldr]
 category=SELF
 revision=00
 program_type=LDR
 erk=0000000000000000000000000000000000000000000000000000000000000000
 riv=00000000000000000000000000000000
 pub=00000000000000000000000000000000000000000000000000000000000000000000000000000000
 priv=000000000000000000000000000000000000000000
 ctype=00

==> NPDRM Key(set) Names <==
 - [NP_tid]: Title ID OMAC1 key.
 - [NP_ci]: Control info OMAC1 key.
 - [NP_klic_free]: Free klicensee.
 - [NP_klic_key]: klicensee key.
 - [NP_idps_const]: IDPS constant.
 - [NP_rif_key]: rif key.
 - [NP_sig]: Footer signature ECDSA keyset.

==> NPDRM ReActPsn Key(set) Names <==
 - [NP_rap_initial]: RAP initial aes decryption key.
 - [NP_rap_pbox]: RAP permutation box constant.
 - [NP_rap_e1] RAP e1 constant.
 - [NP_rap_e2] RAP e2 constant.

==> Override Keyset <==
 It should be a single hex-string consisting of: 
 32 bytes (Key) 16 bytes (IV) 40 bytes (Pub) 21 bytes (Priv) 1 byte (CType).

==> Help Text <==
USAGE: scetool [options] command
COMMANDS                Parameters            Explanation
 -h, --help                                   Print this help.
 -k, --print-keys                             List keys.
 -i, --print-infos      File-in               Print SCE file info.
 -d, --decrypt          File-in File-out      Decrypt/dump SCE file.
 -e, --encrypt          File-in File-out      Encrypt/create SCE file.
OPTIONS                 Possible Values       Explanation
 -v, --verbose                                Enable verbose output.
 -r, --raw                                    Enable raw value output.
 -t, --template         File-in               Template file (SELF only)
 -0, --category         SELF/RVK/PKG/SPP      SCE File Type
 -1, --compress-data    TRUE/FALSE(default)   Whether to compress data or not.
 -s, --skip-sections    TRUE(default)/FALSE   Whether to skip sections or not.
 -2, --key-revision     e.g. 00,01,...,0A,... Key Revision
 -m, --meta-info        64 bytes              Use provided meta info to decrypt.

 -K, --keyset           32(Key)16(IV)
                        40(Pub)21(Priv)1(CT)  Override keyset.
 -3, --program-auth-id     e.g. 1010000001000003 Authentication ID
 -4, --program-vendor-id   e.g. 01000002         Vendor ID
 -5, --program-type        LV0/LV1/LV2/APP/ISO/
                        LDR/NPDRM             Program Type
 -A, --self-app-version e.g. 0001000000000000 Application Version
 -6, --self-fw-version  e.g. 0003004100000000 Firmware Version
 -7, --self-add-shdrs   TRUE(default)/FALSE   Whether to add ELF shdrs or not.
 -8, --self-ctrl-flags  32 bytes              Override control flags.
 -9, --self-cap-flags   32 bytes              Override capability flags.
 -b, --np-license-type  LOCAL/FREE            License Type
 -c, --np-app-type      SPRX/EXEC/USPRX/UEXEC App Type (U* for updates)
 -f, --np-content-id                          Content ID
 -l, --np-klicensee     16 bytes              Override klicensee.
 -g, --np-real-fname    e.g. EBOOT.BIN        Real Filename
 -j, --np-add-sig       TRUE/FALSE(default)   Whether to add a NP sig. or not.

==> History <==

Version 0.3.1
- Updated Program Authority IDs.
- Fixed Vsh Curve loader.
Version 0.3.0
- Added Internal keys support.
- Added Signed Elf ver.2 decryption support.
- Decrypting header will now use key-bruteforce method.
- Options changed.
- Removed Pub/Priv configs, enabled all features by default.
Version 0.2.14
- Added PS3 Linux support.
- Fixed ECDSA checking.
Version 0.2.13
- Unlocked decryption for self files with network license type.
- Fixed one minor bug with capability flags.
Version 0.2.12
 - Enabled options to compress and skip sections for SPU selfs.
 - Extended information about the NPDRM selfs.
Version 0.2.11
 - Added .klic files support for easy decryption of the free-license-type NPDRM selfs.
 - "PS3" path environment variable will now be searched for "data", "raps" and "klics" directories.
 - Enabled encryption for APP and NPDRM SPU selfs. 
Version 0.2.10
 - Added ECDSA Signature parsing and validation.
 - Added klicensee parsing.
 - Fixed metadata info IV parsing.
 - Enabled Individuals seed functions for <public build> configuration.
Version 0.2.9
 - Plaintext sections will now take less space in metadata header keys array.
 - Added option to specifiy a template SELF to take configuration values from.
 - Added option to override the keyset used for en-/decryption.
 - Fixed NP application types.
 - [Firmware Version] will now be written to control info only.
 - [Application Version] will now be written to application info only.
Version 0.2.8 (intermediate release):
 - Fixed minor bugs where scetool would crash.
 - Added SPP parsing.
 - Decrypting RVK/SPP will now write header+data to file.
Version 0.2.7:
 - Added local NP license handling.
 - Added option to override klicensee.
 - Added option to disable section skipping (in SELF generation).
Version 0.2.5:
 - Added option to use provided metadata info for decryption.
 - "PS3" path environment variable will now be searched for keys/ldr_curves/vsh_curves too.
Version 0.2.4:
 - Added option to display raw values.
 - Moved factory Auth-IDs to <public build> (as they are on ps3devwiki now).
Version 0.2.2:
 - Added options to override control/capability flags (32 bytes each).
 - Fixed where a false keyset would crash scetool when decrypting a file.
 - Some source level changes and optimizations.
Version 0.2.1:
 - zlib is required to use scetool.
 - 'sdk_type' was changed to 'revision' in data/keys.
 
==> Greetings to <==
 - ps3dev.net
 - you know who you are!

==> Trivia <==
 http://bit.ly/QUji89