If I want to protect a private RSA key, do I just XOR the password into the key, or do I do something else? Is it secure?
Edit: I got a good answer from a comment - Hash the password/passphrase with PBKDF and use that as a key for AES to encrypt the RSA private key. Also the passphrase is never stored on the disk. The user is prompted to enter it when starting the programm and it is stored in RAM for a limited amount of time(It will be overwritten later and RAM is cleared anyway on shutdown.)