Using RSA with 2 keys?

18 views
Skip to first unread message

da...@ftecu.com

unread,
May 20, 2020, 2:33:46 PM5/20/20
to LibTom Projects
I've looked over the PDF (1.18.2) and googled for various examples (as well as this mailing list and github issues), but I'm not able to figure out how to use rsa_encrypt/decrypt_key with 2 keys?

I have 2 keys, say, key_A & key_B, each with public and private keys.  But I can only pass in one key structure to rsa_encrypt_key or rsa_decrypt_key.
So, how do I create a key with key_A private key and key_B public key to encrypt (or key_A public and key_B private to decrypt)?  Importing or setting key function seems to create only 1 set of private/public keys or public key only.

The example code in PDF [10.10] creates only 1 key pair so it's no help at all. [I also looked at rsa_test.c but it seems to use only 1 key pairs, not 2.]

Or did I miss something in the docs about how to do this?

Thanks for any help.  Danny


Reply all
Reply to author
Forward
0 new messages