I am looking for a way to encrypt/decrypt data on windows and linux platforms. The data gets encrypted in windows and the same data needs to be decrypted on linux/windows and vice versa.
I understand I need a key to encrypt/decrypt data and have general familiarity with symmetric/asymmetric encryption.
What I am wondering is if there is a way to do the above without storing the key anywhere. I saw lot of discussion threads that assume you are storing the key somewhere secure.
Is it possible to generate a symmetric key based on secret password that only my code knows about and use it for this purpose?
I don't want to store the key anywhere. On each boot up, the key that is generated based on secret password should be able to decrypt data that was encrypted by generated key from previous boot up. Similarly I should be able to encrypt data with this key for later sessions to decrypt.
I read about PBKDF2. It is not clear to me whether it is meant for comparing password hashes or for doing something like above.
I appreciate if you can point me to examples.
Thanks