CDN-FX vs CIAngel, who’s correct?

Discussion in '3DS - Homebrew Development and Emulators' started by gamecaptor, Jun 9, 2016.

  1. gamecaptor
    OP

    gamecaptor R.I.P. Densetsu. Legends never die!

    Member
    GBAtemp Patron
    gamecaptor is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    532
    284
    Jan 22, 2004
    United States
    Hyrule most of the time
    Really this is about any .cia download tool/app, but these two are the only ones I’ve played with.

    My question is simple, who is “correct”. In the interest of preservation, what tool/app would download accurate/good dumps?

    I did a quick test with CIAngel and CDN-FX and I found the file sizes are the same, but the HASH is different, so this leads me to believe there is something different one is doing over the other. I'll throw a third app in the mix when I get a minute.

    Mario Golf DLC
    CIAngel
    Size: 228,470,720 bytes
    MD5: 6240bc24c5374f0d183e549d2e6b2369
    SHA1: 74b2363cd7543078b33b2ba5104f0752144d3fa7
    CRC32: bb0fa73e

    CDN-FX Version pre-2.02
    Size: 228,470,720 bytes
    MD5: a4b469c922adda559abaa409bc52580c
    SHA1: 689fa6f90466fa78d7a175c3b77134c1729ad4e0
    CRC32: 3500f2db

    New Super Mario Bros. DLC
    CIAngel
    Size: 805,632 bytes
    MD5: 5a569b66dd173fa6d93258e270922638
    SHA1: 5e25e47eb9c7026a858fb295f0887a451e6402e7
    CRC32: 3ec8d01f

    CDN-FX Version pre-2.02
    Size: 805,632 bytes
    MD5: 69db126bd7d4fc05f42b17f44b50e921
    SHA1: 874612c7bf940726ad9984bd046093edbb7495ce
    CRC32: 79d7e977

    Sonic & All-Stars Racing Transformed DLC
    CIAngel
    Size: 72,000 bytes
    MD5: ac6f5849c450243a5c85db97360a8766
    SHA1: c751d30d6f01ce05f6781bc3af99817b892f33f8
    CRC32: 86148608

    CDN-FX Version pre-2.02
    Size: 72,000 bytes
    MD5: 0b526ef0af254cc0a6311fc3e2ef2fbb
    SHA1: 06a5893d1a495969fdf1444f92c21c8a292cd6f8
    CRC32: dc054aaa
     
  2. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,730
    6,017
    Oct 30, 2014
    Canada
    actually north korea. please send help
    Are you using tickets from the same source with CDN-FX and CIAngel? If not, then that's the issue.
     
  3. TheCruel

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Yeah, most likely ticket differences. You can build the ticket with some variation and it's still "correct"
     
  4. gamecaptor
    OP

    gamecaptor R.I.P. Densetsu. Legends never die!

    Member
    GBAtemp Patron
    gamecaptor is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    532
    284
    Jan 22, 2004
    United States
    Hyrule most of the time
    I did with CDN-FX, but not CIAngel. I didn't know you could use the ticket.db with CIAngel?

    So then would that imply that using the ticket.db file to create a .cia file would be a good dump?
     
    Last edited by gamecaptor, Jun 9, 2016
  5. Drakia

    Drakia GBAtemp Advanced Maniac

    Member
    1,512
    1,761
    Mar 15, 2008
    Canada
    There is no "correct", because there are signatures in the header that we can't generate without Nintendo's signing key. Pretty much every tool uses junk/placeholder data there (Some to "mark" what CIAs were generated with that program, some use a header from a random CIA they looked at, some just use null values). That's what signature patching fixes in CFW. And that's why the has will almost always vary based on program.
     
    gamecaptor and Tomato Hentai like this.
  6. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    6,856
    4,346
    Jan 17, 2013
    Mexico
    Doesn't each title change during the sign encryption/decryption phase?
     
  7. gamecaptor
    OP

    gamecaptor R.I.P. Densetsu. Legends never die!

    Member
    GBAtemp Patron
    gamecaptor is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    532
    284
    Jan 22, 2004
    United States
    Hyrule most of the time
    Hey Drakia. I know we've discussed this before. Yes, I'm still beating this dead horse :) I want to get it right, or as right as I can, before I start down this path.

    So in my opinion, I would think you would want a null value in the header for it to be considered a "good dump". Um, which app does that :)
     
  8. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    6,856
    4,346
    Jan 17, 2013
    Mexico
    Have you tried downloading the same DLC two times and check both downloads using the same app?
    Like using CDN to get two dumps of the same DLC, and use CIAngel to get another two dumps of the same DLC.
    Then compare the checksums.

    I think I remember that once re-encrypted, the signs change.
     
  9. Drakia

    Drakia GBAtemp Advanced Maniac

    Member
    1,512
    1,761
    Mar 15, 2008
    Canada
    CIAngel doesn't decrypt, so there's no re-encrypt. Two downloads of DLC with CIAngel will have the same hash.

    Oh I don't know off the top of my head, I looked at a lot of things while I was working on CIAngel. I guess NULL where we don't know/can't calculate values would probably be the cleanest way to do it though, you're right.
     
    Tomato Hentai likes this.
  10. gamesquest1

    gamesquest1 Nabnut

    Member
    14,119
    9,454
    Sep 23, 2013
    yeah there will never really be 100% perfect dumps (to the usual scene standard) except for in the cases of the legit cia files or .3ds files , although even with .3ds files its debatable as to whether the header info should be amended to the rom like how gateway do it or just omitted completely as the header info is partially cart unique

    basically i think it will be once the scene dies down a bit and the dust settles before the guys over at no-intro decide on the exact rules for 3ds titles, especially cia files, i think they already decided .3ds would be fine with the unique header omitted for the sakes of user dump verify-ability,

    i guess cia files will probably end up the same with the signature parts dummied out rather than peoples little tool tags as thats kinda the thing no-intro was founded to get rid of in the first place
     
    Last edited by gamesquest1, Jun 9, 2016
    Tomato Hentai and gamecaptor like this.
  11. gamecaptor
    OP

    gamecaptor R.I.P. Densetsu. Legends never die!

    Member
    GBAtemp Patron
    gamecaptor is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    532
    284
    Jan 22, 2004
    United States
    Hyrule most of the time
    Ah, I didn't realize the header info is being omitted?! That's interesting and seems like that would be relevant.

    You're probably right, but I was trying to get a head start on it now for them

    Agreed! Since you can't get the data, I would think just null it out rather then fill it in with junk.
     
    Last edited by gamecaptor, Jun 9, 2016
  12. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    6,856
    4,346
    Jan 17, 2013
    Mexico
    If the downloaded file has or not a header then that should be reflected in the download's size.
    Did you say they were the same size just with different checksums?
     
  13. Drakia

    Drakia GBAtemp Advanced Maniac

    Member
    1,512
    1,761
    Mar 15, 2008
    Canada
    CIAngel, CDN-FX, Shameless, etc all have headers, you can't omit the header and have a working/valid CIA. They just all put different junk data in the header in place of the signatures, hence why their hashes differ.
     
    gamecaptor and ShadowOne333 like this.
  14. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    6,856
    4,346
    Jan 17, 2013
    Mexico
    Oh so that explains it.
    Even a single byte of difference in the header will make the checksums completely different, that's the reason then :P
     
  15. gamesquest1

    gamesquest1 Nabnut

    Member
    14,119
    9,454
    Sep 23, 2013
    the issue is if someone injects a little something into the file, like how gateway adds the cart header into a small unused section of the .3ds file, that data shouldnt really be there, and as every cart has a different unique header putting it there just means every cart would have a different hash
    not really, and afaik the header isnt actually part of the rom itself, its a chip id enquiery or something that is unique to each copy of the game, if they tacked it onto the game then nobody could ever have a matching copy of the game, and seeing as the header info is only used for online play, in the long run in terms of preservation its not really going to hold that much significance as the game runs fine without that info......just not online

    yeah i know, no harm in cataloging stuff, last time i checked they were actually adding cia files, but afaik it wasn't properly standardized yet
    yep, if there is supposed to he a signature there, and each persons signature would be different (with the exception of legit cia files) then imho zero'd out is the most logical "clean" method of dealing with it