I use a provided public key to RSA encrypt a password, but when I send the encrypted password back, the private key is unable to decrypt it. I am guessing there must be a difference in configuration, however I have confirmed all other settings:
encType=oaep
hashFunction=sha256
keyLength=kl2048
outputFormat=base64
I use the .FromPublicKey method to import the public key I was given; and .Encrypt function to generate the encrypted password.
Could there be other settings for RSA that I am unaware of, or perhaps are assumed?
e.g. MGF1 padding - what is the state of MGF1 padding, given the above settings?
Is there any other reason you can think of, for the encryption I made to fail decryption by the consumer of my encrypted password?