Homebrew Official [Download] Decrypt9 - Open Source Decryption Tools (WIP)

  • Thread starter d0k3
  • Start date
  • Views 838,090
  • Replies 4,476
  • Likes 71

key1340

Well-Known Member
Member
Joined
Jul 6, 2015
Messages
193
Trophies
0
Age
33
XP
222
Country
United States
It still seems unreliable. No idea if that is due to differences between O3DS / N3DS. rxTools, btw, doesn't do it differently, either, but it uses a much lower cache size (which also means slower NAND dumping / injection). By the way, there were never problems with NAND dumping in the regular version, correct?

Normal Decrypt9 dumps everything fine each time I have tried.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
We have a new release!

New in this release:
  • Launcher.dat compatibility restored (thanks go to @zoogie )
  • New security checks in place for decrypting and injecting partitions
  • CTR partition dumping and TWL/AGB partition dumping are now separate features.
  • Same for injecting, if you enable Danger Zone stuff.
  • You can now compile the Brahma loader directly from source code
  • Working directory is disabled
  • Titlekey Decryptor (NAND) now checks more thoroughly
  • Included Archshifts and Mixups most recent changes
  • Added rudimentary error checking to Title Decryptor
  • Cleaned up my Github repo - only one branch now
The most important changes are that injecting partitions to the NAND is now a little bit more safe (checks crypto and files first, but still won't save you if you royally mess up and don't have a hardmod ;)), Launcher.dat works again. Also, the main working directory is the root directory again. Titles to decrypt go to /D9titles. If you're unhappy with that, it is just a little change in fs.h to enable it again.

The devs among you will also be happy that you can now compile the complete package, including Brahma loader, directly from my source code. My main branch on Github (actually my only branch now) is the 'master' branch, just in case you wonder.
 
Last edited by d0k3,
  • Like
Reactions: kactusss and zoogie

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Umm ok. I'm trying to use your injection tools (from your TWLN padgen) and obviously it wants a xorpad which i don't have and can't get on n3ds. Suppose i should have explained a little better. lol
I'll build in a TWLN xorpad generator, no problem. Can you send me the TWLN padgen code again (for the offsets)?

BTW, has anyone tested the launcher.dat version of the most recent release? @mixups said there are still problems. And, second request. Could anyone test Pony Pets 3D (J) with the new title decryptor? I did and everything looks well. I'm unsure wether I don't have missed something, though.
 
Last edited by d0k3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Alright, ability to generate TWLN xorpads included with the latest commit (no binary release yet, compile yourself). Testing would be appreciated. I also heard (read) people are still unhappy with the way partition dumping / injection is handled. So... any ideas how to handle it better? For safety, there already is (invisible to the user) checking of the crypto routines and of the files intended for injection. I could enable granular dumping / injection (one menu entry per partition to dump / inject), but that would lead to a whopping 10(!) more menu entries. Guess even @Shadowtrance wouldn't be to happy about cramming this into his visual menu structure.
 
Last edited by d0k3,

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
Alright, ability to generate TWLN xorpads included with the latest commit (no binary release yet, compile yourself). Testing would be appreciated. I also heard (read) people are still unhappy with the way partition dumping / injection is handled. So... any ideas how to handle it better? I could enable granular dumping / injection, but that would lead to a 10(!) more menu entries. Guess even @Shadowtrance wouldn't be to happy about cramming this into his visual menu structure.
My advices:
1. skip injection/dump of firm0/firm1 it's dangerous and serves no purpose as they can't be modified. (restoring the entire nand encrryted image at once is ok)
2. skip dumping/injecting twlp, it's useless (maybe have a separate build for purists but we already have it now)
3. menu would look like this

Dump partitions
A twln
X ctrnand
Y agb_sav *


Inject partitions
A twln
X ctrnand
Y agb_sav *

*Honestly you could probably leave out the agb_sav too. I don't hear about anybody using cheats (and it'll just load from the sdmc anyway, the agb_sav is a temp storage methinks --ask wulfy)

Leave the full 6 partition inject/dump build for devs only.
 
  • Like
Reactions: d0k3

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
My advices:
1. skip injection/dump of firm0/firm1 it's dangerous and serves no purpose as they can't be modified. (restoring the entire nand encrryted image at once is ok)
2. skip dumping/injecting twlp, it's useless (maybe have a separate build for purists but we already have it now)
3. menu would look like this

Dump partitions
A twln
X ctrnand
Y agbfirm *


Inject partitions
A twln
X ctrnand
Y agbfirm *

*Honestly you could probably leave out the agbfirm too. I don't hear about anybody using cheats (and it'll just load from the sdmc anyway, the agb_firm is a temp storage methinks --ask wulfy)

Leave the full 6 partition inject/dump build for devs only.
That idea is not even half bad. AGB firm, afaik, is a title installed in CTRNAND (ie. installed in SysNAND). What you mean is the AGBSAVE (a temp copy of the GBA save file in NAND). And yes, it's usefulness at this point still needs to be confirmed (it most probably has none). FIRM0 / FIRM1 - yeah, pretty useless to the end user. Not dangerous to dump, though, and injection, as with all the other stuff, is only dangerous if the user makes a bad mistake (which may be any kind of modification with these two). As I said, there are also security checks in place now to prevent the worst mistakes.
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
That idea is not even half bad. AGB firm, afaik, is a title installed in CTRNAND (ie. installed in SysNAND). What you mean is the AGBSAVE (a temp copy of the GBA save file in NAND). And yes, it's usefulness at this point still needs to be confirmed (it most probably has none). FIRM0 / FIRM1 - yeah, pretty useless to the end user. Not dangerous to dump, though, and injection, as with all the other stuff, is only dangerous if the user makes a bad mistake (which may be any kind of modification with these two. As I said, there are also security checks in place now.
I amended my post, don't know why I put down agb_firm. :P

Anyway, another easier option maybe is to have partition selector flags via text or binary file. After reading it will skip or dump based on the data.
This will certainly be easier on shadowtrance as he doesn't need to change his gui.

@d0k3 Oh one more thing, save partitions to a work directory! My sd for example has about 50 files in the root already and it's a pain to find the partitions scattered amongst them.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@d0k3 Oh one more thing, save partitions to a work directory! My sd for example has about 50 files in the root already and it's a pain to find the partitions scattered amongst them.

Bringing back the work directory (partially?): If I put dumped partition .bin files into a work directory, the question arises why xorpads / decrypted title keys / seeddb.bin / ... don't go into the same directory. I, too, prefer the work directory, but it is now gone for legacy reasons. Most users just read some tutorial somewhere, try it with my version of Decrypt9 (put everything into the root directory) and if it doesn't work - yeah, then it must be my fault then, on to some other software. Using a work directory on a per case base - I'm not that happy with it either. I'll think about it, though.

Speaking of legacy reasons: The NAND.FAT16.xorpad (which should better be called CTRNAND.FAT16.xorpad) includes unneeded garbage at the beginning. However, each and every tool that allows using that xorpad relies on that garbage at the beginning - so I need to keep it. Another one: Xorpad sizes in general can only be given as MB. Meaning: Even if we'd only need 256 byte of xorpad, we have to generate 1MB, which is 4096 times larger than required. I think this was a questionable design choice from the beginning, but changing it now would require tons of other changes and a lot of testing plus possible incompatibilities with other softwares, so it stays as it is. (and I'll already stop ranting ;))
 
Last edited by d0k3,

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Alright, ability to generate TWLN xorpads included with the latest commit (no binary release yet, compile yourself). Testing would be appreciated. I also heard (read) people are still unhappy with the way partition dumping / injection is handled. So... any ideas how to handle it better? For safety, there already is (invisible to the user) checking of the crypto routines and of the files intended for injection. I could enable granular dumping / injection (one menu entry per partition to dump / inject), but that would lead to a whopping 10(!) more menu entries. Guess even @Shadowtrance wouldn't be to happy about cramming this into his visual menu structure.

Cool. :) I'm looking at it now (just woke up AND have a headache, awesome right? :( ).
No, no and no! lol I got enough menu things to cram in as it is now, not another 10 options please. :P

I amended my post, don't know why I put down agb_firm. :P

Anyway, another easier option maybe is to have partition selector flags via text or binary file. After reading it will skip or dump based on the data.
This will certainly be easier on shadowtrance as he doesn't need to change his gui.

@d0k3 Oh one more thing, save partitions to a work directory! My sd for example has about 50 files in the root already and it's a pain to find the partitions scattered amongst them.

The working directory never went away in my build, i left it there as it posed no problems (from what i can see) and yeah i got enough crap on the root of my sd card as it is. haha

--------------------- MERGED ---------------------------

Also, on the menu side of things... anyone got any ideas for better icons to use?
Atm I'm just using random icon images i have, would be nice to have some better suited icons rather just random ones.

Hmm looks like i run out of menu options after 9 ( 0 - 9 ), once i get to 10 (now) the last one won't show up for some reason... grr :( Looks like I'll just add twln xorpad as a sub menu to the nandfat16 xorpad option like i did with the nand backup/restore rather than its own menu option.

Aaaaaaaand updated and released! :) https://github.com/Shadowtrance/Decrypt9/releases/tag/v1.9-mod

Also, has anyone noticed the buttons are really touchy on old3ds? Just noticed it testing this on my o3ds and n3ds, sub menu options are really touchy on old3ds, say i press A on a menu option, it opens sub menu waiting for input... on old3ds i press A and it sometimes jumps back to the main menu from the sub menu straight away, but on n3ds i press A and it actually sits there and waits for input EVERY TIME like it should... kinda weird.
 
Last edited by Shadowtrance,
  • Like
Reactions: mixups and zoogie

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
guys just want to ask how to use this on n3ds 9.0...
All the instructions you need are in the opening post. If you don't know how to use Ninjhax 1.x check here: smealum.net/ninjhax/

Cool. :) I'm looking at it now (just woke up AND have a headache, awesome right? :( ).
Work hard, party hard :P.

The working directory never went away in my build, i left it there as it posed no problems (from what i can see) and yeah i got enough crap on the root of my sd card as it is. haha
The problem with the work directory is, people just don't read instructions enough to notice that slot0x25keyX.bin / seeddb.bin / ... need to go to the work directory. That goes twice as this is a development fork of a very popular software that doesn't use work directories, so there are contradicting tutorials around the web. Maybe we can work out something both tidy and and noob friendly.

Also, on the menu side of things... anyone got any ideas for better icons to use?
Atm I'm just using random icon images i have, would be nice to have some better suited icons rather just random ones.
I'll look through them and see if I've got any ideas. You need one-colour symbols, correct?

Hmm looks like i run out of menu options after 9 ( 0 - 9 ), once i get to 10 (now) the last one won't show up for some reason... grr :( Looks like I'll just add twln xorpad as a sub menu to the nandfat16 xorpad option like i did with the nand backup/restore rather than its own menu option.
I'll also take a look over your source code and will see if I can remove that limit. BTW, why are you keeping the GUI elements as separate files instead of including them in the bin? Is this because of the 1MB limit for Brahma payloads?

Also, has anyone noticed the buttons are really touchy on old3ds? Just noticed it testing this on my o3ds and n3ds, sub menu options are really touchy on old3ds, say i press A on a menu option, it opens sub menu waiting for input... on old3ds i press A and it sometimes jumps back to the main menu from the sub menu straight away, but on n3ds i press A and it actually sits there and waits for input EVERY TIME like it should... kinda weird.
The HID input routines are not the best, and as they are based on direct memory access, I think there's nothing much that I can do. I can take a look, but don't hope for too much.


And, to @everyone:
There's something wrong with my build system. Meaning - while there are no known problems in my code, if I compile the launcher.dat, it will not work for you. Once I'm nearing near final releases, I'll ask someone else to compile that. For now, if you want to use the launcher.dat version, compile it yourself. You may also release your compiled launcher.dat to others in this thread.
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Work hard, party hard :P.
haha yeah pretty much. :)

The problem with the work directory is, people just don't read instructions enough to notice that slot0x25keyX.bin / seeddb.bin / ... need to go to the work directory. That goes twice as this is a development fork of a very popular software that doesn't use work directories, so there are contradicting tutorials around the web. Maybe we can work out something both tidy and and noob friendly.
Yeah i guess everyone just got used to having everything on sd root.

I'll look through them and see if I've got any ideas. You need one-colour symbols, correct?
I guess so yeah. They're just white atm, easy to see i suppose.

I'll also take a look over your source code and will see if I can remove that limit. BTW, why are you keeping the GUI elements as separate files instead of including them in the bin? Is this because of the 1MB limit for Brahma payloads?
Yeah I'm not sure about the limit tbh, i swear I've had more than 10 before ( 0 - 9 ), as for gui elements being separate, i the few times i tried having them not separate (built in) i couldn't really get it to work. Might be possible and i was just doing something wrong, i dunno.
Plus, once the png files are converted to .bin files they all come out to over 200kb (don't ask me why, i have no idea), even if the original png is only like 15kb.

The HID input routines are not the best, and as they are based on direct memory access, I think there's nothing much that I can do. I can take a look, but don't hope for too much.
Yeah true, it isn't the best. Not a huge deal as it doesn't seem to do it much from what I've noticed.
 
Last edited by Shadowtrance,

happydance

Well-Known Member
Member
Joined
Jul 16, 2009
Messages
598
Trophies
0
XP
349
Country
just wishful thinking but, I tried the Launcher.dat using the Zelda OOT save gateway launcher and it didn't work on 9.0 n3ds
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Yeah I'm not sure about the limit tbh, i swear I've had more than 10 before ( 0 - 9 ), as for gui elements being separate, i the few times i tried having them not separate (built in) i couldn't really get it to work. Might be possible and i was just doing something wrong, i dunno.
Plus, once the png files are converted to .bin files they all come out to over 200kb (don't ask me why, i have no idea), even if the original png is only like 15kb.
Had a quick look.

PNG is a compressed image format, basically almost the same (even similar algorithms) as if you put a BMP file into a ZIP. BIN picture files are uncompressed and therefore much larger - file size is width * heigth * 4 channels (RGB and Alpha). We can't possibly include a PNG decoder in Decrypt9, so uncompressed is our only choice. That's where the big files come from.

What you do with the considerably large splash image files (at least in relation to the maximum payload size of 1MB) is load them from the file directly to the frame buffer. There's no other memory affected the way you do it. If you include the files directly into memory, they have to reside somewhere, and 6MB (total size of all UI graphics) is too big (note: max payload size is 1MB and all the data inside the binary has to fit in there as well). So, that's that. Where the limit of only 10 menu entries comes from, no idea yet. I think it has to do with memory running out or stuff overlapping in memory, though. We need to find a way to prevent these problems.
 
Last edited by d0k3,

hashcheck1

Well-Known Member
Member
Joined
Aug 5, 2013
Messages
473
Trophies
1
Age
43
XP
1,065
Country
Installed ninja eur cia sysnand on my n3ds 9.0fw and boot gateway in gwmode on sysnand. Scanned ninjahax 1.1b and installed exploit on cia. Downloaded latest decrypt and tried both versions but when launched it goes black and goes back to homebrew menu. Any ideas just want to get nand fat16
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1