-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I notice an interesting behaviour when testing CLI. When trying to decrypt an encrypted number using an "incorrect" private key (eg, one that has different keysize to a public key used during encryption) one of the following happens:
IllegalArgumentExceptionis thrown because the ciphertext of the encrypted number is greater than the public key's modulus.DecodeExceptionis thrown because the decrypted value cannot be decoded as a double.- successful decryption process, but the value is incorrect.
It would be good if CLI checks whether the correct private key is used (especially when the encrypted number is successfully decrypted).
Reactions are currently unavailable