RSA Cheatsheet
I made a RSA cheatsheet so I don’t have to search up about it every time.
To generate a private key
openssl genrsa 2024 > secret.key
To generate a public key
openssl rsa -pubout < secret.key > public.key
To encrypt a plaintext
openssl pkeyutl -encrypt -pubin -inkey public.key -in plaintext -out ciphertext
To decrypt a ciphertext
openssl pkeyutl -decrypt -inkey secret.key -in ciphertext -out plaintext