pkmn-classic-framework
pkmn-classic-framework copied to clipboard
Research/Implement Pokémon validation signatures (required for Random Matchup)
It seems Random Matchup fails currently after Wiimmfi fixed the matchmaking error, which @mm201 and I theorised is likely due to the signature not being valid (and confirmed the signature is shared to the other peer). As such, this is likely to be a blocking issue for Random Matchup Free mode (and presumably Rating Mode? @zurgeg may now be able to check since Wiimmfi's side of the communication works without issue).
Hopefully it's not an asymmetric key we don't have, or if it is we can make the DS accept our own signatures..
For reference, shutter/Jon's Gen6 server can be found here: https://github.com/PretendoNetwork/PKHaX (they're also sending a zeroed out signature)
Apparently Gen6 is using an RSA-256 signature whose public key gets downloaded once from the server and saved. I don't think Gen5 downloads a key, or, at least, I've never seen any failed requests for it in my logs, but it's something we should test for. (test with a virgin savefile and see if it hits any unique endpoints)
I don't think Gen5 downloads a key,
I'd hope not, since there'd likely be no way to blank (and re-download) that key, but then that might mean its static..
It seems Random Matchup fails currently after Wiimmfi fixed the matchmaking error, which @mm201 and I theorised is likely due to the signature not being valid (and confirmed the signature is shared to the other peer). As such, this is likely to be a blocking issue for Random Matchup Free mode (and presumably Rating Mode? @zurgeg may now be able to check since Wiimmfi's side of the communication works without issue).
Hopefully it's not an asymmetric key we don't have, or if it is we can make the DS accept our own signatures..
I'll try it in a minute.
Just tried. Looks like A) NoSSL is banned on Wiimmfi or B) I was autobanned for some reason or C) I was banned by a mod or D) melonDS is banned. Whatever it is, I can't connect to NAS with 23917. Which is also what happens when you're banned so...
melonDS is banned
you've not been banned, its probably just denied for some reason. Can you DM me your FC on Discord, and I'll ask someone?
melonDS is banned
you've not been banned, its probably just denied for some reason. Can you DM me your FC on Discord, and I'll ask someone?
Turns out I was using the wrong melonDS install.
Oops ;)
Let us know how it goes!
@InternalLoss @mm201 Can confirm. PGL side is working. So yes, this does affect rating mode
Can confirm. PGL side is working. So yes, this does affect rating mode So even rating mode is affected by this? Ok, time to really figure out if it is truly the signature that's the issue..
Can confirm. PGL side is working. So yes, this does affect rating mode So even rating mode is affected by this? Ok, time to really figure out if it is truly the signature that's the issue..
@InternalLoss You could always try the "nop everything relating to whatever isn't working and hope it works" strategy
(Sadly melonDS has no support for debugging)
What we know about this:
- Signature algorithm used is
SHA1withRSA
with a key size of 1024 bits - Signature is over the entire encrypted party data sent to
/pokemon/validate
- RSA public key modulus is unfortunately hardcoded and is:
D987D465E4EEAE582D017315F00EA3400C510B2E51E15D77D03ADCB25C830171F569FBD26A78DC69694DDD2CEFA4A9AAD1A0D9AA99705BF08038F57764EEA5AB7D6A3838678AEC262E952A1CDBB8E2FF68DC932E7F8E3AECD1FE5282EACA4161C2203FF098F79D6735E64414E185FBB3EC043D838D9B4B19072331C3F79857E5
It's been a year since last comment. Any updates on this?