I am working on implementing communication protocol between a client in c++ and server in golang.
A shared secret need to be encrypted by rsa in golang server, using the public key provided by c++ client. Client in c++ need to use the private key to decrypt and get the shared secret.
Currently I am using EncryptOAEP to encrypt the secret in golang. And decrypt message with RSA_private_decrypt and padding using RSA_PKCS1_OAEP_PADDING
provided by openssl. However this does not convert the encrypted secret back to plain text.
Is there any other rsa decrypted function I need to use to decrypt the cyphertext from golang? Thanks in advance.
Note: prefered function from libcrypto version 1.1