Encrypt multiple RSA keys with same passphrase I have to create and store a bunch of RSA key pairs with openssl. The private keys will be encrypted with the aes256 option and a very long, random password.

Would it be safe to use the same password for all keys? Or is it better to encrypt every key with a different password?
The openssl docs say nothing about this issue, and no answer from the community. So I tried to figure it out with a small experiment. I created a private key (not encrypted) with:

openssl genrsa -out key.pem

Then I encrypted the key twice, using the same password:

openssl rsa -aes256 -in key.pem -out key-enc-1.pem
openssl rsa -aes256 -in key.pem -out key-enc-2.pem


and compared the content of key-enc-1.pem and key-enc-2.pem

Files were completely different so it looks like the AES-encryption is done with a random salt.

So, answering my own question: using openssl genrsa with aes-encryption, it is safe to use the same password for all my private keys.