This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 356
Pycryptodome AuthSigner is incorrect #109
Comments
Can you verify it works when you replace the following lines: h = SHA256.new(data)
return pkcs1_15.new(self.rsa_key).sign(h) With this line: return pkcs1_15.new(self.rsa_key).sign(data) |
That won't work either, it requires a hasher instance. |
In other signers it looks like the data comes pre-hashed. Have you tried the code? |
If it's prehashed then it's not going to work with pycryptodome without modifications. |
Do you have any suggestions then? @greateggsgreg added pycryptodome and I assume he tried it out. Did you try anything or is this just theory? |
I've tested everything I've written, also in the documentation it says the format for the public key being sent is PEM with the header, footer, and newlines removed but from other implementations of ADB this doesn't appear to be the case. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've tried to sign tokens with the pycryptodome AuthSigner and it definitely doesn't work. If I remember correctly the token isn't hashed with SHA-256.
The text was updated successfully, but these errors were encountered: