Does anyone know how to decrypt CIA files?

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by laramie, Mar 6, 2015.

  1. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    I have been looking around everywhere and I just want to fully decrypt a CIA game. Any advice?
     


  2. zecoxao

    zecoxao GBAtemp Fan

    Member
    338
    734
    Dec 25, 2013
    i don't think CIA files are encrypted. they're just a compressed package i guess...
    decompress it with makerom tool
    makerom -ciatocci path_to_cia
     
  3. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    I just threw it in the decryption folder, and opened a CMD window there, typed in" makerom -ciatocci_savedatafiler.cia" and got " [SETTING ERROR] Unrecognised argument '-ciatocci_savedatafiler.cia'
    [RESULT] Invalid arguments, see 'makerom -help' "
     
  4. zecoxao

    zecoxao GBAtemp Fan

    Member
    338
    734
    Dec 25, 2013
    looks like you entered the argument together with the input.
     
  5. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    Okay, I tried just inputting the command you typed, " makerom -ciatocci path_to_cia" and it said, " [MAKEROM ERROR] Failed to open: path_to_cia " why does it say it can't find the path?
     
  6. zecoxao

    zecoxao GBAtemp Fan

    Member
    338
    734
    Dec 25, 2013
    because you didn't specify the correct input...
    it's not hard lol
    makerom -ciatocci _savedatafiler.cia
    that should do it, i think
     
  7. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    I've tried that one, I thought that's what it was suppose to be at first but I got this error code; " [MAKEROM ERROR] Failed to open: _savedatafiler.cia "
     
  8. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,506
    1,153
    May 23, 2012
    Is _savedatafiler.cia the filename of the cia you want to decrypt?
     
    zecoxao likes this.
  9. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    The name is "savedatafiler" and the extension is .cia
     
  10. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,506
    1,153
    May 23, 2012
    So then try again without the underscore :P
     
    zecoxao likes this.
  11. gudenau

    gudenau Never a unique idea

    Member
    3,240
    1,216
    Jul 7, 2010
    United States
    /dev/random
    Some CIAs are encrypted, from update CDN for example.
     
    zecoxao likes this.
  12. Asia81

    Asia81 In my Ecchi World <3

    Member
    4,848
    2,340
    Nov 15, 2014
    France
    Albi
    It's workin without undescore.
    but he convert the cia to cci, and rename it to 3ds

    How to extract data ?
     
  13. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    What's the CDN?
     
  14. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    Yeah, My goal is to fully decrypt this cia file, in which case is the SDF, so I can learn exactly how it works and hopefully with a lot of work, and of course a lot of hours sobbing mathematically, I can implement a save process that's not only backwards compatible with the current sate, but also to be able to extract the raw saves of saves that have experienced the 7.x save encryption.
     
  15. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
  16. cearp

    cearp the ticket master

    Member
    7,404
    4,654
    May 26, 2008
    Tuvalu
    i don't think there is compression. they are encrypted, unless they are user repacked without encryption
     
    zecoxao likes this.
  17. zecoxao

    zecoxao GBAtemp Fan

    Member
    338
    734
    Dec 25, 2013
    well, most of the cias i found online, i could easily obtain the decrypted cci from then, so i'm just speaking with my own experience.
    of course it can be different from what i think
     
  18. cearp

    cearp the ticket master

    Member
    7,404
    4,654
    May 26, 2008
    Tuvalu
    no, you are correct, many cias online are done a bit cheaply and hacky (in my opinion) - that is why they don't have encryption
    but my tool (FunkyCIA) makes cias in a more clean standard way, and the original files are left intact, encrypted
    if we ever get any real cias straight form nintendo themselves (like the sdk dev tools) they are encrypted
     
    zecoxao likes this.
  19. laramie
    OP

    laramie GBAtemp Fan

    Member
    499
    162
    Dec 15, 2014
    United States
    So then is there anyway to decrypt them? I'd imagine it'd be just like decrypting a 3ds rom, but I thought if I couldn't decrypt it in cia form, I could convert it into a 3ds format and decrypt it like a game...
     
  20. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,506
    1,153
    May 23, 2012
    The .csu versions of the dev tools from the BigBlueBox pack are all already decrypted, and .csu virtually identical to .cci/.3ds, just with a different file extension. You can extract their contents without any decryption process needed.