Topic: generating a publickey.der
1. I generate RSA key pair on embedded platform.
Embedded Platform runs a firmware - no file system as of now.
My peer device runs a mobile operating system (android/iOS).
2. Send the Public Key over to my peer.
What format does my public key have to be, inorder to send it over to my peer?
Like "RsaKeyToDer()" can be used to convert my Private Key to der format, is there any function that could be used for converting my Public Key to der format?
3. My peer uses my Public Key to encrypt his message and sends the encrypted message to me.
4. I use my private key to decrypt the received encrypted message.
I am assuming, I would use "RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &key);" where the last parameter is the key I generated.