I have a case where I need to create recovery accounts and I want to create them so that nobody knows the password to them until/unless necessary. Hence, I thought that I would do it using RSA - when the account is created via code, it will generate a random password for it that is then also encrypted with a public key and stored for possible later use.
Since the plaintext will be short, say 160 bits with a 20 character alphanumeric password, there's no need to do RSA->AES symmetric encryption. However, that makes me wonder about the security implications:
Since an attacker could get access to the public key and encrypted password, a chosen plaintext attack would be possible to try to bruteforce the password since RSA is normally deterministic. However, if I use PKCS #1 v1.5 padding (or OAEP), that should be covered, right? Or should there be random padding (anyway) - the plaintext is limited in scope and length?