c1b76fb2d9
* signature: add comments to SignatureType enum entries about the exact signing algorithms and padding schemes used. * signature: rename signatureGetSigType() -> signatureGetTypeFromSignedBlob(). * signature: rename signatureIsValidSigType() -> signatureIsValidType(). * signature: rename signatureGetSigSize() -> signatureGetSigSizeByType(). * signature: rename signatureGetBlockSize() -> signatureGetBlockSizeByType(). * signature: rename signatureGetSig() -> signatureGetSigFromSignedBlob(). * signature: rename signatureGetPayload() -> signatureGetPayloadFromSignedBlob(). * signature: add signatureGetBlockSizeFromSignedBlob(). * cert: add more comments to the code. * cert: update code to match signature interface changes. * cert: add CERT_RSA_PUB_EXP_SIZE macro. * cert: change public_exponent field in CertPublicKeyBlockRsa* structs from u32 to u8 array. * cert: add size field to CertificateChain struct. * cert: rename certGetCommonBlock() -> certGetCommonBlockFromSignedCertBlob. * cert: rename certGetPublicKeySize() -> certGetPublicKeySizeByType(). * cert: rename certGetPublicKeyBlockSize() -> certGetPublicKeyBlockSizeByType(). * cert: rename certIsValidCertificate() -> certIsValidSignedCertBlob(). * cert: rename certGetSignedCertificateSize() -> certGetSignedCertBlobSize(). * cert: rename certGetSignedCertificateHashAreaSize() -> certGetSignedCertBlobHashAreaSize(). * cert: remove certGetPublicKey(), certGetPublicExponent() and certCalculateRawCertificateChainSize(). * cert: add certGetPublicKeyTypeFromCommonBlock(), certGetPublicKeyTypeFromSignedCertBlob(), certGetPublicKeySizeFromSignedCertBlob(), certGetPublicKeyBlockSizeFromSignedCertBlob(), certGetPublicKeyFromSignedCertBlob(), certGetPublicExponentFromSignedCertBlob(), certIsValidCertificate() (w/diff func sig), certGetCommonBlockFromCertificate(), certGetPublicKeyTypeFromCertificate(), certGetPublicKeySizeFromCertificate(), certGetPublicKeyBlockSizeFromCertificate(), certGetPublicKeyFromCertificate(), certGetPublicExponentFromCertificate() and certGetHashAreaSizeFromCertificate() functions. * cert: avoid byteswapping the public key type value in multiple places -- it is now only being done in certGetPublicKeyTypeFromCommonBlock(). * cert: call certFreeCertificateChain() in _certRetrieveCertificateChainBySignatureIssuer() before attempting to retrieve the certificate chain. * cert: other minor changes and corrections. * tik: update code to match signature interface changes. * tik: add missing comments to TikPropertyMask enum entries. * tik: add key_generation, enc_titlekey_str and dec_titlekey_str fields to Ticket struct. * tik: update tikRetrieveTicketByRightsId() to also take in a key_generation argument, instead of getting it from the rights ID (which could fail if it's using a key generation lower than HOS 3.0.1) or the key_generation field from the common ticket block (which could fail if the ticket has been tampered by certain tools). * tik: rename tikGetCommonBlock() -> tikGetCommonBlockFromSignedTicketBlob(). * tik: change function signature for tikGetTicketSectionRecordsBlockSize(). * tik: rename tikIsValidTicket() -> tikIsValidSignedTicketBlob(). * tik: rename tikGetSignedTicketSize() -> tikGetSignedTicketBlobSize(). * tik: rename tikGetSignedTicketHashAreaSize() -> tikGetSignedTicketBlobHashAreaSize(). * tik: rename tikGetEncryptedTitleKeyFromTicket() -> tikGetEncryptedTitleKey(). * tik: add tikIsValidTicket() (w/diff func sig), tikGetCommonBlockFromTicket(), tikGetHashAreaSizeFromTicket(), tikFixTamperedCommonTicket(), tikVerifyRsa2048Sha256Signature() and tikDecryptVolatileTicket() functions. Ticket signature verification is only carried out for common tickets in tikFixTamperedCommonTicket(). * tik: change argument order in tikGetTicketEntryOffsetFromTicketList() and tikRetrieveTicketEntryFromTicketBin(). * tik: add TIK_COMMON_CERT_NAME and TIK_DEV_CERT_ISSUER macros. * tik: use a scoped lock when calling tikRetrieveTicketFromEsSaveDataByRightsId(). * tik: simplify certificate chain retrieval steps in tikConvertPersonalizedTicketToCommonTicket() by always using the XS00000020 certificate. * tik: wipe license_type and property_mask fields in tikConvertPersonalizedTicketToCommonTicket(). * tik: other minor changes and corrections. Other changes include: * keys: fix key generation checks in keysGetNcaKeyAreaKeyEncryptionKey() and keysGetTicketCommonKey(). * rsa: move core logic from rsa2048VerifySha256BasedPssSignature() into a new function: rsa2048VerifySha256BasedSignature(). * rsa: add rsa2048VerifySha256BasedPkcs1v15Signature() function. |
||
---|---|---|
.github | ||
code_templates | ||
host | ||
include | ||
libs | ||
romfs | ||
source | ||
.gitignore | ||
.gitmodules | ||
build.sh | ||
LICENSE.md | ||
Makefile | ||
README.md | ||
todo.txt |
nxdumptool
Nintendo Switch Dump ToolOfficial Discord server: https://discord.gg/SCbbcQx
This branch is used for the development of the ongoing nxdumptool rewrite. Code is highly experimental and lacks a proper UI at this time, but it has been thoroughly tested and should be safe to use. Proof-of-concept (PoC) builds are provided to test different aspects of the codebase.
If a nxdumptool build from the releases page isn't working for whatever you're trying to do (e.g. RomFS dumping), odds are it will work with a PoC build from this particular branch. The old branch will not receive any further updates.
A GitHub workflow is used to automatically build each new commit -- feel free to check it out.
This readme will be updated whenever the rewrite branch is ready for a proper release.
Currently planned changes for this branch include:
- USB ABI (dump data directly to a PC). ✅
- USB Mass Storage device support (FAT, NTFS, EXT). ✅
- Gamecard header dumps. ✅
- Gamecard CardInfo area dumps. ✅
- Gamecard InitialData area dumps. ✅
- Individual NCA dumps (select and dump a specific NCA from a title). ✅
- Individual NCA FS section dumps (select and dump a specific FS section from a specific NCA belonging to a title, in both extracted and raw image forms) (this includes patched RomFS images). ✅
- System title support (e.g. dump qlaunch, shared fonts and much, much more at runtime). ✅
- Better support for NCA BucketTree storages (Indirect, AesCtrEx, Sparse, Compressed), as well as better handling of multi-layered reads in combination with game updates. ✅
- Volatile ticket dumping -- temporary tickets that are downloaded and kept in RAM instead of being written to the eMMC. ✅
- Better memory handling while dealing with compressed NRO binaries. ✅
- Event-driven background threads to manage gamecard insertions/ejections, gamecard application metadata parsing (e.g. the game would be properly identified even if its gamecard has never been used on your console), USB ABI sessions and USB Mass Storage devices. ✅
- Improved support for multigame gamecards and titles with more than one Program NCA (e.g. SM3DAS). ✅
- Control.nacp patching while dumping NSPs (lets you patch screenshot, video, user account and HDCP restrictions). ✅
- Full system update dumps. ❌
- New UI using a customized borealis fork. ⚠️
Legend:
- ✅ - Implemented
- ⚠️ - Partially implemented
- ❌ - Not implemented