I'd like to work out a way to encrypt arbitrarily large files using users' RSA key pairs they generated for SSH purposes. They have standard
id_rsa.pub files, and a PEM version of the pub file too. I'd like to reuse these keys for this purpose.
Rather than encrypt the file with AES and then encrypt the secret using the RSA keys, I would like to use a process which involves the generation of just a single encrypted file.
Something like This article where
openssl smime is used, but it requires a cert and key as opposed to pub and private keys. It seems to me there should be a way to this with RSA pub/priv keys, but I can't work it out.