Skip to content

Some eShop CIAs are incorrectly decrypted #116

@davidmorom

Description

@davidmorom

Hi ihaveamac:

I found a bug on the decryption part of NinFS. Some eShop CIAs that use seed crypto (I think, I'm not 100% sure on this) are not correctly decrypted, and the resulting decrypted.xci is not runnable on Citra/Azahar. The same CIA decrypted on a real 3DS with GodMode9 produces a 100% functional CIA file.

A game that I'm 100% sure is affected by this issue is the EUR version of Alien on the Run, but I know there are more, although I can't remember any others right now.

By comparing the NinFS decrypted files and the GodMode9 decrypted files, I tracked down the problem to the decryption of the .code section of ExeFS. The .code section of NinFS decrypted ExeFS is pure garbage, as if the used key were incorrect.

The worst part is that every tools publicly available to decrypt CIAs produce the same invalid output, maybe they are all based on the same source. Ctrtool.exe, on the other hand, produces a valid ExeFS decrypted file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions