Encrypt without password, decrypt only with password I'm trying to implement a password manager and I want to achieve this behaviour.


User enters a master password once (eg. when the program is first run) and a key/hash of some sort is derived and stored (from which the original password cannot be recovered)
User can then choose to store data in the password bank eg. 
store --id=myid --data=datatoencrypt. This data is encrypted using AES without having to prompt for a password using the stored key from step 1


At this point the encrypted data stored cannot be recovered without the original password, but new data can be added without the original password

store get --id=myid
Please enter your password: *******
The data is: datatoencrypt


I hope this makes sense. Any pointers on how I can achieve this? (I'm guessing a combination of asymmetric and symmetric encryption
Wouldn't this be just the usual asymmetric encryption, as if you were encrypting e.g. email with GnuPG? 

Create a private key, store it password protected (this is your master password). Anything you need to save, encrypt using the corresponding public key (no need for a password). But only the private key can decrypt your data items, and you need to enter the password to use that.