Nintendo 3DS .cia file support #2

Open
opened 2026-01-29 22:28:57 +00:00 by claunia · 6 comments
Owner

Originally created by @SamRohod on GitHub (Jan 2, 2021).

Originally assigned to: @mnadareski on GitHub.

Hi SabreTools
Thank you for creating this amazing easy-to-use all-in-one tool.

I use No-Intro database to verify that I have good files. When it comes to .nds & .dsi & .3ds files, your tool always gives the correct hash values (md5) for both encrypted and decrypted files. Is it possible to add .cia files support to your tool?

Tools that decrypt .cia files:

Batch CIA 3DS Decryptor:
https://gbatemp.net/threads/batch-cia-3ds-decryptor-a-simple-batch-file-to-decrypt-cia-3ds.512385/

3DS + CIA Rom Script:
https://anonfiles.com/Fb7fw8Xcob/3DS_CIA_Rom_Script_rar

The two aforementioned tools do decrypt .cia files but the md5 is inconsistent and not matching No-Intro database.
Also neither of them encrypt .cia files back.

Note:
When I tried to encrypt a .cia file, I got [Expected .nds .srl .dsi .3ds] but .ids wasn't included in the list even though it's supported by your tool. Sorry I'm a bit OCD :)

Thank you again

Originally created by @SamRohod on GitHub (Jan 2, 2021). Originally assigned to: @mnadareski on GitHub. Hi SabreTools Thank you for creating this amazing easy-to-use all-in-one tool. I use No-Intro database to verify that I have good files. When it comes to .nds & .dsi & .3ds files, your tool always gives the correct hash values (md5) for both encrypted and decrypted files. Is it possible to add .cia files support to your tool? **Tools that decrypt .cia files:** Batch CIA 3DS Decryptor: https://gbatemp.net/threads/batch-cia-3ds-decryptor-a-simple-batch-file-to-decrypt-cia-3ds.512385/ 3DS + CIA Rom Script: https://anonfiles.com/Fb7fw8Xcob/3DS_CIA_Rom_Script_rar The two aforementioned tools do decrypt .cia files but the md5 is inconsistent and not matching No-Intro database. Also neither of them encrypt .cia files back. Note: When I tried to encrypt a .cia file, I got [Expected .nds .srl .dsi .3ds] but .ids wasn't included in the list even though it's supported by your tool. Sorry I'm a bit OCD :) Thank you again
claunia added the enhancement label 2026-01-29 22:28:58 +00:00
Author
Owner

@mnadareski commented on GitHub (Jul 23, 2021):

I don't check this repo often, so apologies that I missed this when you reported.

For your first part, if you can provide an example for something that didn't encrypt or decrypt properly (assuming you have a properly filled keys.bin file), that would help. Just a link to the Dat-o-Matic page would suffice. I had a user test every single 3DS file for both encrypt and decrypt and everything matched at the time.

For the second part, I can consider doing .cia support, but that's a little more complex. I don't mind eventually porting that sort of functionality. .cia files are structured differently than the .3ds files that are supported currently, so it's a non-trivial addition.

@mnadareski commented on GitHub (Jul 23, 2021): I don't check this repo often, so apologies that I missed this when you reported. For your first part, if you can provide an example for something that didn't encrypt or decrypt properly (assuming you have a properly filled `keys.bin` file), that would help. Just a link to the Dat-o-Matic page would suffice. I had a user test every single 3DS file for both encrypt and decrypt and everything matched at the time. For the second part, I can consider doing `.cia` support, but that's a little more complex. I don't mind eventually porting that sort of functionality. `.cia` files are structured differently than the `.3ds` files that are supported currently, so it's a non-trivial addition.
Author
Owner

@SamRohod commented on GitHub (Nov 10, 2021):

I'm Sorry for the mistake.
Apparently I had wrong keys.bin file.
I changed the title and the original issue post.

@SamRohod commented on GitHub (Nov 10, 2021): I'm Sorry for the mistake. Apparently I had wrong keys.bin file. I changed the title and the original issue post.
Author
Owner

@SamRohod commented on GitHub (Mar 6, 2023):

Any updates regarding this?

@SamRohod commented on GitHub (Mar 6, 2023): Any updates regarding this?
Author
Owner

@mnadareski commented on GitHub (Mar 6, 2023):

Not really, CIA support is still kinda low on my list given the other projects that I maintain. I appreciate the prod, though. Having the decrypt/encrypt working properly is quite a pain each time I've attempted it so far.

@mnadareski commented on GitHub (Mar 6, 2023): Not really, CIA support is still kinda low on my list given the other projects that I maintain. I appreciate the prod, though. Having the decrypt/encrypt working properly is quite a pain each time I've attempted it so far.
Author
Owner

@Dimensional commented on GitHub (Jul 11, 2025):

This is an old enhancement request. There's a python project called Ntool that supports converting CDN to CIA and back, and recently I was able to work on making a reversible decryption routine for CIA creation, meaning can switch between decrypted and encrypted. Turns out all one has to do is set the NoCrypto flag in the NCCH metadata without stripping out the other crypto flags, and altering minimal flags in the TMD with updated hashes, and it would still work. I've tested it myself. Porting to C# on is another story however.

@Dimensional commented on GitHub (Jul 11, 2025): This is an old enhancement request. There's a python project called Ntool that supports converting CDN to CIA and back, and recently I was able to work on making a reversible decryption routine for CIA creation, meaning can switch between decrypted and encrypted. Turns out all one has to do is set the NoCrypto flag in the NCCH metadata without stripping out the other crypto flags, and altering minimal flags in the TMD with updated hashes, and it would still work. I've tested it myself. Porting to C# on is another story however.
Author
Owner

@JohnTravolski commented on GitHub (Sep 3, 2025):

This is an old enhancement request. There's a python project called Ntool that supports converting CDN to CIA and back, and recently I was able to work on making a reversible decryption routine for CIA creation, meaning can switch between decrypted and encrypted. Turns out all one has to do is set the NoCrypto flag in the NCCH metadata without stripping out the other crypto flags, and altering minimal flags in the TMD with updated hashes, and it would still work. I've tested it myself. Porting to C# on is another story however.

This works great, thank you for making this!

@JohnTravolski commented on GitHub (Sep 3, 2025): > This is an old enhancement request. There's a python project called Ntool that supports converting CDN to CIA and back, and recently I was able to work on making a reversible decryption routine for CIA creation, meaning can switch between decrypted and encrypted. Turns out all one has to do is set the NoCrypto flag in the NCCH metadata without stripping out the other crypto flags, and altering minimal flags in the TMD with updated hashes, and it would still work. I've tested it myself. Porting to C# on is another story however. This works great, thank you for making this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/NDecrypt#2