Author Topic: Nintendo - Nintendo 3DS Decrypted  (Read 48409 times)

riccardo and 1 Guest are viewing this topic.

Offline b2071988

  • Full Member
  • ***
  • Posts: 167
Re: Nintendo - Nintendo 3DS Decrypted
« Reply #225 on: January 09, 2018 - 07:57:43 »
The python script is only for 3DS Roms dumped from gamecards (not games from the eShop, or games converted to 3ds from an eshop source)

There is another python script that can decrypt the RAW content files from the eShop servers to a 'CXI' which can be used in Citra but you need the
decrypted key and seed (if one is used) for the game. See here: [You are not allowed to view links] Register or Login

There are eshop games that have been converted to a 3DS rom in the '3DS DLC' DAT (which I don't collect)
those converted roms should be encrypted with the '0-key' so my script should decrypt them fine (but haven't tested it fully)
If you want to upload the smallest rom that doesn't work I could have a look at it and see why.
('ExHeader Program ID mismatch' - sounds like the rom isn't being decrypted correctly...)


---

edit: 2 New Japanese Roms (edit: added as z009 and z013)

Medarot Classics - Kabuto Version (Japan).3ds
Decrypted Hashes:
Size: 128 MB (134,217,728 bytes)
CRC32: BC47EE71
MD5: A586129BA388D6B8579013368FAC36EC
SHA-1: FE904661F0BEBB63634CB91B2367E15CDECD388A
SHA-256: 1DADE65E878974F2BA754E6CDE1CA0E545DB9A6CAC76E8512C0B9064F5B1BE36

Encrypted Hashes:
Size: 128 MB (134,217,728 bytes)
CRC32: AF6B3046
MD5: 93405E6DBD25CD005E1D0F1AC115DDBC
SHA-1: 42730CDD948506D16B8F66004AF322F5DC672E4C
SHA-256: 814A8DDF8C559F04D57434F6D051C064E418FF15D416F119EC7A34F4E512B5AF

Medarot Classics - Kuwagata Version (Japan).3ds
Decrypted Hashes:
Size: 128 MB (134,217,728 bytes)
CRC32: 580EEC7E
MD5: E7DC91EFC67E9395DF1D561348BA4C23
SHA-1: 4512514C47825B0C894DE45A8DB3363E8FC3D558
SHA-256: B03F188C388FE4EBC6CD6014B5717611FA471C3E30EE5A1A58E80C33C007E15C

Encrypted Hashes:
Size: 128 MB (134,217,728 bytes)
CRC32: D8257E0D
MD5: FAE672A29F3356F5E8357D2C6A2ED38B
SHA-1: 705119B934AE483B710316B76313103035AFC810
SHA-256: 760F57EBD473C7E99787109655EE939C4AB210575E5350092850404E61B2B46F


Download Decrypted Roms: (58.0mb)
Code:
Only registered users can see contents. Please click here to Register or Login.Download Encrypted Roms: (149.6mb)
Code:
Only registered users can see contents. Please click here to Register or Login.
« Last Edit: January 09, 2018 - 16:58:23 by b2071988 »

Online jaymel

  • Newbie
  • *
  • Posts: 20
Re: Nintendo - Nintendo 3DS Decrypted
« Reply #226 on: January 09, 2018 - 12:51:43 »
if you go here
[You are not allowed to view links] Register or Login

and use this
[You are not allowed to view links] Register or Login

and download any of these z157-163

Offline b2071988

  • Full Member
  • ***
  • Posts: 167
Re: Nintendo - Nintendo 3DS Decrypted
« Reply #227 on: January 09, 2018 - 13:41:55 »
z158 is badly converted / not decrypted properly, it still has the SEED encryption which is invalid for 3ds roms.
The 3ds rom needed to be decrypted fully (including the seed encryption) and then re-encrypted / rebuilt with the 'zero-key' or 'Key 0x2C' encryption method.

edit: I've updated the script to decrypt the rom, but it requires a 16 byte <titleid>.dat' seed file (the same that 'FBI' uses) containing the external seed.

edit2: I've attached a 'Python 2.7' script that should be able to decrypt 3ds roms with seed crypto. You will need the seed file to
be named as '<titleid.dat>' (16 bytes) and it should contain the binary seed. I've used the same format FBI uses for its seeds.
This script for decryption only and once the rom is decrypted, you will NOT be able to be re-encrypt it back to the original CRC32.

PS: You can check for seed encryption in the 3ds rom by checking if offset 0x118F has bit 0x20 turned on.

edit3: even the scene has released stuff with SEED encryption, this release "Hako_Boy_Mou_Hito_Hako_JPN_eShop_3DS-Caravan" has it, there may be more releases...

edit4: I found a small bug with my 3ds rom encryption script, the bug only affects roms that use 'zero-key' and have 2 or more partitions (e.g game with manual / update etc).
(Partition 1 and higher was set to always encrypt with 'Key 0x2C', I didn't check if the 'Zero-Key' flag was set which caused the partition to be encrypted with the wrong key)

I've attached the fixed encryption script, Decryption script doesn't have this bug but i've updated it anyway.
« Last Edit: January 09, 2018 - 16:50:34 by b2071988 »

Online jaymel

  • Newbie
  • *
  • Posts: 20
Re: Nintendo - Nintendo 3DS Decrypted
« Reply #228 on: January 09, 2018 - 23:20:46 »
thanks for that
just wondering if you could do a bat file so noobs like myself can use it without hassle

Offline Landcross

  • Newbie
  • *
  • Posts: 45
Re: Nintendo - Nintendo 3DS Decrypted
« Reply #229 on: January 10, 2018 - 12:50:13 »
I've updated my Python 3 (+batch support) port to match your V4 version. See attached files.
NOTE: I haven't tested the seed-file functionality in my version, because I don't know which game (and seed) to use.