PC tool to encrypt CIA

rvtr

Nintendo DS hoarder
OP
Member
Joined
Oct 18, 2019
Messages
327
Trophies
2
Age
18
Location
$C000-CFFF
Website
randommeaninglesscharacters.com
XP
5,178
Country
Canada
I'm looking for a program I could use to retail encrypt CIAs, preferably one for linux, though at this point I'll take anything :P. Searching online only brings up decryption, so any help would be much appreciated. Thanks!
 

rvtr

Nintendo DS hoarder
OP
Member
Joined
Oct 18, 2019
Messages
327
Trophies
2
Age
18
Location
$C000-CFFF
Website
randommeaninglesscharacters.com
XP
5,178
Country
Canada
I'm trying to revise this guide on installing development firmware. It mentions non-existent firmware archives, and the only sources I know of for development firmware are the SystemUpdaters. I figured I'd work with those since they're pretty easy to find online.

When you extract the firmware CIAs from the SystemUpdaters they're all dev encrypted. These need to be un-encrypted, then re-encrypted to retail, otherwise luma will throw up a "failed to apply x firm patch(es)" error on boot.

I've tested doing this with most of the SystemUpdaters floating around and it works just fine, though I was using a tool a friend made which isn't public yet. I need anything public that could do in place of my friend's tool.
 
Last edited by rvtr,
  • Like
Reactions: SylverReZ

TalentX

Member
Newcomer
Joined
Feb 22, 2022
Messages
14
Trophies
0
Location
Nuernberg
XP
555
Country
Germany
I'm trying to revise this guide on installing development firmware. It mentions non-existent firmware archives, and the only sources I know of for development firmware are the SystemUpdaters. I figured I'd work with those since they're pretty easy to find online.

When you extract the firmware CIAs from the SystemUpdaters they're all dev encrypted. These need to be un-encrypted, then re-encrypted to retail, otherwise luma will throw up a "failed to apply x firm patch(es)" error on boot.

I've tested doing this with most of the SystemUpdaters floating around and it works just fine, though I was using a tool a friend made which isn't public yet.
This is because there is no tool (that I know of) that can re-encrypt CIA files properly after extracting the files.

What you're looking for is Asia81's tool called HackingToolkit9DS which you can find in this thread:
https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-rebuild-3ds-cia-cxi-files.383055/

The go-to format to work with is actually the .3ds format. You should export your payload in this format and work with this instead of CIA. After you're done, you can create a CIA file out of the .3ds format using Godmode9. Working with the CIA format alone will cause you trouble. I do not recommend that.
However, I don't know whether this is helpful for your goal using the guide you shared.
 
  • Like
Reactions: SylverReZ and rvtr

rvtr

Nintendo DS hoarder
OP
Member
Joined
Oct 18, 2019
Messages
327
Trophies
2
Age
18
Location
$C000-CFFF
Website
randommeaninglesscharacters.com
XP
5,178
Country
Canada
This is because there is no tool (that I know of) that can re-encrypt CIA files properly after extracting the files.

What you're looking for is Asia81's tool called HackingToolkit9DS which you can find in this thread:
https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-rebuild-3ds-cia-cxi-files.383055/

The go-to format to work with is actually the .3ds format. You should export your payload in this format and work with this instead of CIA. After you're done, you can create a CIA file out of the .3ds format. Working with the CIA format alone will cause you trouble. I do not recommend that.
However, I don't know whether this is helpful for your goal using the guide you shared.
Thanks, I'll check that out. Definitely looks promising. By default the tool to extract the firmware outputs CIAs, though maybe I can convert to .3ds and then back to CIA?
 

TalentX

Member
Newcomer
Joined
Feb 22, 2022
Messages
14
Trophies
0
Location
Nuernberg
XP
555
Country
Germany
Converting a CIA into 3ds won't do. It'll end up with the same troubles to be expected when working with CIA alone.
With Asia81's tool you can extract .3ds ROMs and repack them again just fine, with all the encryption involved in it.
This works with CIA too, but the repacking part doesn't. You can repack it, but the CIA setup will end up being corrupted. Maybe there is a workaround to this, but I didn't find any back in the past.

I don't know how you create your own CIA. Best way is to create a .3ds ROM from the get-go.
The CIA you can create after you're done with all the works using Godmode9 and your .3ds ROM as source. This way the CIA setup will be fine to use.
 
Last edited by TalentX,
  • Like
Reactions: rvtr

redunka

Well-Known Member
Member
Joined
Nov 26, 2014
Messages
436
Trophies
0
Age
29
XP
2,564
Country
Russia
HackingToolkit9DS extracts and rebuilds files using ctrtool + makerom, which do support both retail and dev encryption, and they also work on Linux.
https://github.com/3DSGuy/Project_CTR
It should also be technically possible to decrypt and re-encrypt dev CIAs with GodMode9, but you would need to either run it on a dev 3DS or make an aeskeydb.bin with dev keys instead of retail ones.
 
  • Like
Reactions: rvtr and TalentX

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: One day away from Juan's birthday