XORPADS question

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Cindakil, Feb 17, 2015.

  1. Cindakil
    OP

    Cindakil Advanced Member

    Newcomer
    92
    11
    Apr 14, 2014
    Serbia, Republic of
    Hi!!

    I have a question that I hope that someone can help me :)

    If I make the xorpads for Pokemon Omega Ruby can I use the same Xorpads for Pokemon Alpha Sapphire for example? Or each game has diferents xorpads?

    THANKS!
     
  2. shinyquagsire23

    shinyquagsire23 SALT/Sm4sh Leak Guy

    Member
    1,961
    3,231
    Nov 18, 2012
    United States
    Las Vegas
    Every game's xorpads are different.
     
  3. AquaX101

    AquaX101 GBAtemp Advanced Fan

    Member
    713
    165
    Apr 15, 2014
    United States
    Somewhere
    No, because here's an example. Lets say I want a cia for AS but I have the xorpads for Tomodachi Life, if I make the cia, the cia would be incorrect and some features of the game would be corrupt and the manual would be different.
     
  4. gudenau

    gudenau Never a unique idea

    Member
    3,244
    1,216
    Jul 7, 2010
    United States
    /dev/random
    How do the XORpads work?
     
  5. shinyquagsire23

    shinyquagsire23 SALT/Sm4sh Leak Guy

    Member
    1,961
    3,231
    Nov 18, 2012
    United States
    Las Vegas
    Basically on normal 3DS hardware the ROMs are decrypted on the fly using a part of the SoC dedicated to crypto. What xorpads do is it allows us to generate the values we need to XOR the original ROM's different sections against in order to get a fully decrypted ROM. If we had the full functionality as to how the crypto was done console-side (and I believe some other keys which we don't have), we could just do it on PC, but for now this two-step method is required.
     
  6. Cindakil
    OP

    Cindakil Advanced Member

    Newcomer
    92
    11
    Apr 14, 2014
    Serbia, Republic of
    Thanks a lot for the answers :D
     
  7. gudenau

    gudenau Never a unique idea

    Member
    3,244
    1,216
    Jul 7, 2010
    United States
    /dev/random
    I know that much, I want to know how the generation works so I could know why the output just happens to decrypt the games with the XOR boolean operation.
     
  8. CalebW

    CalebW Fellow Temper

    Member
    634
    154
    Jun 29, 2012
    United States
    Pixie dust. Along with alien technology.
     
    lemanuel likes this.
  9. sbJFn5r

    sbJFn5r Member

    Newcomer
    24
    28
    Sep 14, 2014
    United States
    Decryption uses AES in counter mode. See the diagram here:
    https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29

    The output of the AES operation on the counter is XORed with the ciphertext to get the decrypted plaintext. If you pass in 0x00 as the ciphertext, you'll get the output of the AES operation on the counter back(Y XOR 0 = Y), you can save that and then perform the final step(XORing with the ciphertext) on your PC.
     
  10. gudenau

    gudenau Never a unique idea

    Member
    3,244
    1,216
    Jul 7, 2010
    United States
    /dev/random

    Why could we not make a large xorpad and just use segments of that?
     
  11. CalebW

    CalebW Fellow Temper

    Member
    634
    154
    Jun 29, 2012
    United States
    Because each xorpad is unique to the game used to create it.