Search code examples
encryptionpasswordsaespassword-protection

Storing all password in one file encrypted with AES 256 CBC


So I have gone through all the questions in here about how not to build your own password manager, and I am not trying to reinvent a wheel. I am trying to understand if I store my passwords on my own laptop in a file and then encrypted with AES-256-CBC just using openssl in mac. I can decrypt and peek at my passwords when I would like it. So, could experts on crypto shed some insights on how secure this would be? Also, let's not talk about redundancy (or what if I lose my laptop), or how hard it is to manage such file. I understand all those, I use 1Password. Here the intention is to understand security. Can someone with access to my laptop crack it to get my passwords?


Solution

  • Where is the key? You should use openssl-enc with the -pbkdf2 option and appropriate parameters to make the key as secret as possible. CBC mode is not considered strong enough, see How to choose an AES encryption mode