Hello,
I have the following code where I'm loading an RSA pub key to encrypt a message and write it to a file. https://play.golang.org/p/qr6BfWVuHB Then I'm trying to decrypt it with the following openssl command: openssl rsautl -decrypt -inkey private.pem -oaep -in cryptedmessage -out decrypted RSA operation error 11511:error:0407A079:rsa routines:RSA_padding_check_PKCS1_OAEP:oaep decoding error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.30.2/src/crypto/rsa/rsa_oaep.c:199: 11511:error:04065072:rsa routines:RSA_EAY_PRIVATE_DECRYPT:padding check failed:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.30.2/src/crypto/rsa/rsa_eay.c:614: But it doesn't work and I don't know why. If I encrypt and decrypt a message just with openssl using the same pub/priv keys it works of course So its either something with the OAEP padding or I'm doing something else wrong. Either way, any clues would be appreciated. Kind regards, ~ John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.