Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decryption Fail on building decrypted 190A00 (Megami Meguri) CIA or Deep decrypt it #126

Closed
MelonGx opened this issue Dec 13, 2016 · 22 comments

Comments

@MelonGx
Copy link

MelonGx commented Dec 13, 2016

D9WIP: 20161113
Platform: Retail O3DS, A9LH SysNAND 11.2.0-35J

Selected: [CIA Builder (SysNAND/decr.)]
0x34 KeyY: set up from NAND

is
Use arrow keys and to choose a folder
/title/00040000/00190a00

Building CIA from ID 0004000000190A00
Fetching TMD...
Searching for proper ticket...
Found ticket, injecting...
Console unique info found, wiping...
Writing CIA stub (14656 byte)...
Injecting content id 00000002 (331520 kB)...
Decrypting content id 00000002 (SD)...
Decrypting content id 00000002 (NCCH)...
Code / Crypto: CTR-N-KWMJ / 7x Seed
Loading seed from NAND: ok
Decrypt ExHdr/ExeFS/RomFS (2kB/4839kB/319MB)
Verify ExHdr/ExeFS/RomFS: OK/Fail/Fail
Failed decrypting content
0x generated / 1x failed
CIA Builder (SysNAND/decr.): failed!

Press B to return, START to reboot.

Selected: [CIA Decryptor (deep)]
Opening /files9 ...

Processing CIA "0004000000190A00.cia"
Not a CIA or corrupt file
Failed!

CIA Decryptor (deep): failed!

Press B to return, START to reboot.

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

OK this is completely the same issue as #119.
Awaiting for a new update since all test build links on that issue are invalid now.

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

This looks to me like a bad seed in your NAND (99.9% sure). Can you compile from master and (maybe) provide a proper seeddb.bin?

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

The SEED shouldn't be invalid because this is a self-purchase-self-dump.

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

Just compile from master and try again. A self dump? From a cart? Then it would not have seed crypto.

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

Self-dump from my own purchase at e-shop, but not from installed CIA.

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

Git clone'd it. Stuck on compiling. What am I need to install to be able to "make release"?

(Edit) Nevermind. DL-ed 20161209 from your site. Thanks.

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

OK. You're right.
After re-checking the log of building SEEDDB.bin, I found that the problem was no 190A00 SEED stored inside the NAND.
I don't know whether the game has SEED or not. I'll build an original one (encrypted) to test it somewhere.

(Edit)
But there is a strange thing I just found.
Building SEEDDB.bin with 20161113, it generates one 190A00 SEED but no duplication.
Building SEEDDB.bin with 20161209, it generates neither 190A00 SEED nor its duplication.

@MelonGx MelonGx closed this as completed Dec 13, 2016
@MelonGx MelonGx reopened this Dec 13, 2016
@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

OK. This game does require a SEED.
If installing the original CIA without achieving a SEED, it gives me a SVCBreak (Luma ErrDisp).
After manually achieving the SEED from directly visiting this game's e-shop page, it runs properly.

Then the problem is - why current Decrypt9WIP cannot find the proper SEED of this game?
Will it be a SEED in new format that Decrypt9WIP cannot recognize it?
BTW, my SEEDDB.bin already has 48 SEEDs.
BTW2, Decrypt9WIP cannot recognize this game's SEED on the console I installed the CIA and manually achieved the SEED either.

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

Retry building the decrypted CIA with the ,ost recent build of D9 you just downloaded. Then show me the output.

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

(This time I use the console which installed CIA & manually achieved the SEED to build it.)

D9WIP: 20161209

Selected: [Update SeedDB]
Using RedNAND @ 000001/000001
Searching for seedsave.bin...
Found at 0F3B0000, size 688kB
Creating new seeddb.bin
Found 000400000F700D00 seed (new)
Found 000400000F700C00 seed (new)
Found 000400000F704800 seed (new)
Found 0004000000186700 seed (new)
Found 00040000001A3A00 seed (new)
Found 00040000001AF500 seed (new)
Found 0004000000190E00 seed (new)
Found 00040000001A8E00 seed (new)
Found 000400000F706300 seed (new)
Found 00040000001B4B00 seed (new)
Found 00040000001B4C00 seed (new)
Found 00040000001B4D00 seed (new)
Found 000400000F700D00 seed (duplicate)
Found 000400000F700C00 seed (duplicate)
Found 000400000F704800 seed (duplicate)
Found 0004000000186700 seed (duplicate)
Found 00040000001A3A00 seed (duplicate)
Found 00040000001AF500 seed (duplicate)
Found 0004000000190E00 seed (duplicate)
Found 00040000001A8E00 seed (duplicate)
Found 000400000F706300 seed (duplicate)
Found 00040000001B4B00 seed (duplicate)
Found 00040000001B4C00 seed (duplicate)
Found 00040000001B4D00 seed (duplicate)
Found 12 new seeds, 12 total
Update SeedDB: succeeded!

(*** No 190A00's SEED found.)

Selected: [CIA Builder (EmuNAND/decr.)]
Using RedNAND @ 000001/000001
0x34 KeyY: set up from NAND

id0 is (snip)
Use arrow keys and A to choose a folder
/title/00040000/00190a00

Building CIA from ID 0004000000190A00
Fetching TMD...
Searching for proper ticket...
Found ticket, injecting...
Writing CIA stub (14656 byte)...
Injecting content id 00000002 (331520 kB)...
Decrypting content id 00000002 (SD)...
Decrypting content id 00000002 (NCCH)...
Code / Crypto: CTR-N-KWMJ / 7x Seed
Seed not found in seeddb.bin or NAND!
Try updating your seeddb.bin
Failed decrypting content
0x generated / 1x failed
CIA Builder (EmuNAND/decr.): failed!

Press B to return, START to reboot.

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

So, this looks like the seed is not in your NAND. Can you actually play this title on your console?

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

I just said that, when I installed the encrypted game, not getting the SEED, it crashed and gave me a Luma ErrDisp SVCBreak screen.
After manually getting the SEED by directly visiting the game's e-shop page, the game can be played properly.

I mean the console has already had the SEED but D9WIP 20161209 cannot find it out on both building SEEDDB.bin and decrypting the game.

@d0k3 Do you need my seedsave.bin (the 12 SEEDs one) to analyze it?

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

Yup, show me the seedsave.bin.

@d0k3
Copy link
Owner

d0k3 commented Dec 13, 2016

Also, another thing to try. Grab the latest build of GodMode9 and try to decrypt the CIA file in that (use the A button on the file).

@MelonGx
Copy link
Author

MelonGx commented Dec 13, 2016

seedsave_emu.zip
For decrypting CIA with GodMode9, which one should I decrypt, CIA built by orig or decr?

@d0k3
Copy link
Owner

d0k3 commented Dec 14, 2016

Okay, seen it. The seed is in there (once), but the hash verification for it fails. Any chance you modified the installed NCCH?

Anyways, please try to decrypt the CIA in GodMode9 and let me know how that worked for you.

@MelonGx
Copy link
Author

MelonGx commented Dec 14, 2016

It's impossible because I never edit it.
I'll try to get the game on another console directly from e-shop and extract the SEED to see if it's proper.

@d0k3
No "CIA image options" on the 190A00.CIA built by decr.
"CIA isn't encrypted" on the 190A00.CIA built by orig.

@d0k3
Copy link
Owner

d0k3 commented Dec 14, 2016

I'd still appreciate if you tried GodMode9 (yes, that can decrypt CIAs now, too) ;). If you're afraid of breaking something, use SafeMode9 instead (which also has the CIA decryption stuff).

@MelonGx
Copy link
Author

MelonGx commented Dec 14, 2016

I did use GodMode9 20161213 to process them. That's the result.
CIA (Emu/Decr) - "CIA image options" doesn't exist (*** looks like a bad CIA file)
CIA (Emu/Orig) - "CIA image options" exists, but it reports that CIA isn't encrypted (*** no SEED so no need to be decrypted)

@d0k3
Copy link
Owner

d0k3 commented Dec 14, 2016

Oh, alright. Got it. Is there some public seeddb somewhere? Don't post a link here, but if there is, you could try using this instead, too.

@MelonGx
Copy link
Author

MelonGx commented Dec 14, 2016

@d0k3
New console + Directly got this game from e-shop 2 hours ago - One proper SEED of this game can be recognized & Decrypted successfully.
Old console with 48 SEEDs + Repairing this game on e-shop just now - One proper SEED of this game added & Decrypted successfully.

So this case seems to be Nintendo's fault that they distributed broken SEED?

@MelonGx MelonGx closed this as completed Dec 14, 2016
@d0k3
Copy link
Owner

d0k3 commented Dec 14, 2016

Well, if it keeps on not working on the previous console, you can use the new console to build a proper seeddb. And, well. Nintendo seems to make certain file formats (among them the system save format) deliberately confusing and unintuitive. We don't know everything about the seedsave format, thus our heuristics may fail in some (rare) cases. never experienced it myself, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants