Error decrypting with Planet Minecraft
Binero opened this issue · 7 comments
The modification doesn't seem to work with Planet Minecraft
[18:24:25] [Thread-87/ERROR]: Unable to decrypt vote record. Make sure that that your public key
[18:24:25] [Thread-87/ERROR]: matches the one you gave the server list.
javax.crypto.BadPaddingException: Decryption error
at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:369) ~[?:?]
at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282) ~[?:?]
at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:371) ~[?:?]
at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:405) ~[?:?]
at javax.crypto.Cipher.doFinal(Cipher.java:2205) ~[?:?]
at me.drex.votifier.rsa.RSA.decrypt(RSA.java:19) ~[fabric-votifier-1.1.3.jar:?]
at me.drex.votifier.VoteReceiver.run(VoteReceiver.java:85) [fabric-votifier-1.1.3.jar:?]
Unsure what causes this. I took the public key from votifier/public.key
. Tried deleting the votifier folder to generate a new key, but that new key didn't work either.
Is this problem specific to planet Minecraft or does it occur on other vote sites as well?
Make sure to double-check that the keys match (no extra spaces, deleted characters...)
I have double checked the keys match. I haven't tried with other voting lists since I am not on them. I tried to find some other people running this mod, but I have been unsuccessful.
I am very sure the keys match. I wonder whether Planet Minecraft mistakes the key for a token. The key doesn't look like a typical RSA key to me. I will do some more testing later today.
I tested with minecraftservers.org, and that gave a similar error.
[19:51:25] [Thread-87/ERROR]: Unable to decrypt vote record. Make sure that that your public key
[19:51:25] [Thread-87/ERROR]: matches the one you gave the server list.
javax.crypto.BadPaddingException: Decryption error
at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:369) ~[?:?]
at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282) ~[?:?]
at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:371) ~[?:?]
at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:405) ~[?:?]
at javax.crypto.Cipher.doFinal(Cipher.java:2205) ~[?:?]
at me.drex.votifier.rsa.RSA.decrypt(RSA.java:19) ~[fabric-votifier-1.1.3.jar:?]
at me.drex.votifier.VoteReceiver.run(VoteReceiver.java:85) [fabric-votifier-1.1.3.jar:?]
I am using the key inside public.key
.
I just tried myself using fabric-votifier-1.1.3.jar
on mctools and couldn't replicate your issue.
I can confirm it works with mctools. Not with Planet Minecraft or minecraftservers.org.
I have recently encountered a similar issue with minecraftservers. Apparently, they have added a whitelist of trusted votifiers and wouldn't handle Fabric Votifiers requests, because it used a different id. I have just committed a fix that fixed this issue for. Maybe this also fixes your problem. Please let me know :D
(Download for this fix: artifacts)
That fixed it on Planet Minecraft too! Thanks!