ROM Hack [Release] FunKeyCIA - make GOOD cias from eshop content, no tickets needed!

BerserkLeon

Not-so-new member
Member
Joined
Mar 22, 2010
Messages
460
Trophies
1
Age
34
Location
Pennsylvania
XP
538
Country
United States
So.. we don't know the actual key but we can code to use it?
We could really use a way to convert dectitlekeys.bin to enc.
BUT, they all came from people already, peeps could just redump the enc ones.

I dunno if its been mentioned but if you have a CIA compiled from funky/groovyCIA you can probably grab the encrypted titlekey from the CIA at 0x2BFF to 0x2C0E
Unless its different for each cia, in which case use ctrtool to extract the tik which you can feed directly to the python script.

Oh yeah, stored in little endian, byte reversed.
 
Last edited by BerserkLeon,

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,725
Trophies
2
XP
8,506
Country
Tuvalu
So... In this program you're generating a ticket using a template. I suggest modifying this to just generate the tickets, install them through this: https://github.com/yifanlu/3DSSystemTools/tree/master/3DSInstallTickets, and installing the games from the eshop.
We could have an online repository to download the keys from, generate and install the tickets, all on the console. And also have a function to upload them. Cool stuff.
yes but i never got that to work, i have a compiled version someone sent me months and months ago but... yeah i forget... i think it just gave me a black screen.
but yes, we could do that. it's a nice idea.
i was thinking of a homebrew to download the cia on there 3ds, but yeah in reality... the ticket and eshop is enough, eshop ccan handle downloads better than homebrew, 1 downloading and 9 lined up in a queue after that etc.
if someone makes 3dsinstalltickets more friendly, let's do it!

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

Nope. Still needs to be signed, as stated above your own post (I think you were ninjad). But These are not tied to any NNID, so without signatures, this is as close as we can get, I imagine...
FunkyCIA (not this thread) is as close as you can get to legit, everything is intact apart from the console id that needs to be broken so that the cia installs. if this wasnt the case we would have pefect legit backups cias.

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

It should possible to encrypt the title keys even if you don't have the title I guess...
yes, true.
but nice to dump them from the console from good eshop tickets, then we know they are accurate.
 
Last edited by cearp,

kidcharlemagne

Well-Known Member
Newcomer
Joined
Sep 8, 2015
Messages
70
Trophies
0
XP
1,645
Country
Taiwan
@d0k3it is technically possible to reencrypt the dumped decrypted keys, but this functionality would also have to be added, and seems a bit backwards, why not just dump the encrypted values straight away.

There is already a huge list of decrypted keys out there, and it can be downloaded as a dectitlekeys.bin file. It would be convenient if that could be easily encrypted and saved as enctitlekeys.bin. Otherwise, all those encrypted keys would have to be collected again.
 

d0k3

3DS Homebrew Legend
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Okay, @cearp, @Xenon Hacks, check this:
https://up1.ca/#cno9FEKjlHocTudjzpeVqw

Latest commit:
https://github.com/d0k3/Decrypt9WIP/commit/74c692791900f377cfc8f9430964adaf0895fc03

I fully trust you will test this and tell me if it does what you need. You can also encrypt a decrypted decTitleKeys.bin file on console. If you want to help me even further, and that goes to @everyone, also make sure that the decrypted titleKey options still work as they should (just compare with the output of the previous Decrypt9WIP release). Write in my D9WIP thread, I'm not watching this one (too much action in here atm :)).

EDIT: And before you call me lazy... my N3DS is currently not available, and it will take some until I have it ready for testing again. So, please help with that new stuff.
 
Last edited by d0k3,

Chris_Highwind

Well-Known Member
Member
Joined
Mar 21, 2010
Messages
437
Trophies
1
Age
33
Location
Mooresville, NC
XP
572
Country
United States
And of course, using FunKeyCIA, I get a permission denied error with make_cdn_cia, and this time there's no option to allow it to run as a program. Something must really not want me playing Ironfall Invasion.
 

Gray_Jack

Well-Known Member
Member
Joined
Jan 13, 2016
Messages
732
Trophies
0
XP
407
Country
@d0k3 D9 gives me this error when trying to encrypt decTitleKeys.bin

Code:
Too many/few entries specified: -1
Titlekey Encrypt (file): failed!
 

demon77

Well-Known Member
Newcomer
Joined
May 4, 2015
Messages
62
Trophies
0
Age
54
XP
169
Country
Belgium
@d0k3 D9 gives me this error when trying to encrypt decTitleKeys.bin

Code:
Too many/few entries specified: -1
Titlekey Encrypt (file): failed!

Nope it's working fine , i tested with my own real ones and they work.

When you try the one from the site that is not good , it's not a real decTitleKeys.bin.
 

TuxSH

Well-Known Member
Member
Joined
Oct 19, 2015
Messages
614
Trophies
1
Age
26
XP
1,295
Country
France
Nope it's working fine , i tested with my own real ones and they work.

When you try the one from the site that is not good , it's not a real decTitleKeys.bin.
It's real, but misses important info.

But since people use it to pirate games, it doesn't matter anyways... the keyY will be the first 0x3D KeyY. ^^'
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,774
Trophies
2
Age
48
Location
Japan
XP
3,672
Country
United States
FunkyCIA (not this thread) is as close as you can get to legit, everything is intact apart from the console id that needs to be broken so that the cia installs. if this wasnt the case we would have pefect legit backups cias.
No way, bro... this is GOLDEN! This most likely was not your intent, but these things certainly do act *ALMOST* just like legit CIAs. I just downloaded KidIcarus (classics version) and installed on my O3DS. Then I deleted it. When visiting e-shop, the re-downloadable section said there was nothing to re-download. BUT I searched for the title manually, and when selecting it, it had the "to Redownload screen" button instead of a purchase button. And indeed, it let me download it from the eshop. I'm now certain that I have a valid, signed ticket now.

Only problem is... how exactly does FuncyCIA2 handle duplicate tickets? Will it automatically see the original ticket as invalid and use the signed one? If so, you've opened the door to turning anything into a "Legit CIA".
 

d0k3

3DS Homebrew Legend
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@d0k3 D9 gives me this error when trying to encrypt decTitleKeys.bin

Code:
Too many/few entries specified: -1
Titlekey Encrypt (file): failed!
Nope it's working fine , i tested with my own real ones and they work.

When you try the one from the site that is not good , it's not a real decTitleKeys.bin.
Right on. I will give you a hint on how to fix that file, though...
  • The first 4 byte of the file need to contain, in big endian, the number of entries to process in this file. D9 can't handle more than 1024 entries, so there's your first problem. (1024 in big endian is 0x00 0x04 0x00 0x00)
  • Each and every of those titlekey entries (starting at offset 0x10, each 0x20 byte long) has a wrong common key index. For eShop titles, set the first four byte (of each 0x20 big entry) to zero, it will work.
And no, I won't clean up this mess. it is just too messed up. You can ask that guy for a encrypted version or try fixing what you got there.
 

Ptrk25

Well-Known Member
Member
Joined
Sep 6, 2015
Messages
524
Trophies
0
Location
::1
XP
1,181
Country
Germany
Only problem is... how exactly does FuncyCIA2 handle duplicate tickets? Will it automatically see the original ticket as invalid and use the signed one? If so, you've opened the door to turning anything into a "Legit CIA".
We can't validate a ticket (on pc), but if a new ticket was added it is almost at the end of the file (ticket.db).
 

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
@d0k3 the D9 you linked to a few posts ago does indeed dump enctitlekey.bin, now all we need is for FunKeyCIA to be able to use this file. Thank you for helping out and listening to my request!
 
  • Like
Reactions: d0k3

noctis90210

Well-Known Member
Member
Joined
Dec 24, 2013
Messages
969
Trophies
0
Age
37
XP
1,635
Country
@d0k3 the D9 you linked to a few posts ago does indeed dump enctitlekey.bin, now all we need is for FunKeyCIA to be able to use this file. Thank you for helping out and listening to my request!

the nfshost site includes dectitlekey.bin (that includes hundrends of content)
will this D9 able to produce enctitlekey.bin from dectitlekey.bin on nfshost?
 

cearp

瓜老外
OP
Developer
Joined
May 26, 2008
Messages
8,725
Trophies
2
XP
8,506
Country
Tuvalu
No way, bro... this is GOLDEN! This most likely was not your intent, but these things certainly do act *ALMOST* just like legit CIAs. I just downloaded KidIcarus (classics version) and installed on my O3DS. Then I deleted it. When visiting e-shop, the re-downloadable section said there was nothing to re-download. BUT I searched for the title manually, and when selecting it, it had the "to Redownload screen" button instead of a purchase button. And indeed, it let me download it from the eshop. I'm now certain that I have a valid, signed ticket now.

Only problem is... how exactly does FuncyCIA2 handle duplicate tickets? Will it automatically see the original ticket as invalid and use the signed one? If so, you've opened the door to turning anything into a "Legit CIA".
this functionality has existed since FunkyCIA that i released in jan last year, it's not new :D
and i write in the op that the cias are redownloadable, not news to me ;) but glad you like it!

you don't have a valid signed ticket though, that's not how this works.
it's just using the ticket that my tool created for you. eshop will not magically give you a legit one when you redownload! I wish :)

it's now how FunkyCIA handles dupes, it about how your 3ds handles them. your 3ds can have multiple titckets of the same title id, i guess the most eprecent one is used.
this doesn't create legit cias. this just does what FunkyCIA does, but without needing a ticket. please understand!
 
Last edited by cearp,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,774
Trophies
2
Age
48
Location
Japan
XP
3,672
Country
United States
How can it be downloaded from the eshop, without a ticket? Doesn't a ticket come in every download? Now I wish I hadn't put a9lh on both of my consoles. I'm willing to bet that (once deleted and re-downloaded from eshop) it will run on stock FW with no hacks. This is the effect I'm referring to, anyway.

And on the subject of overwriting deleted tickets, I used the ticket dumper before and after install. The ticket was NOT tacked on to the end. My (now 2) tickets are on line 73 and 247, with plenty of tickets listed before and afterwards, and not in any kind of alphanumeric order.
 
Last edited by urherenow,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    NinStar @ NinStar: It will actually make it worse