bmh-gh / cli_pass

A password manager for cli
MIT License
1 stars 0 forks source link

Password encryption #3

Open bmh-gh opened 1 year ago

bmh-gh commented 1 year ago

Select a strong symmetrical encryption system like AES-256 or ChaCha20 to encrypt passwords.

bmh-gh commented 1 year ago

It works fine with AES-256, but the ECB Mode is not quite safe. Maybe it should be switched with the GCM. CTR wouldn't be safe either, because it is not clear how many passwords there will be and if the IV repeats, it is not safe anymore.

bmh-gh commented 1 year ago

Further it is not quite sure if private final SecretKey k; can just be saved in the class like this. Some research is needed

bmh-gh commented 1 year ago

Maybe implement a ChaCha20 algorithm. Standardized in RFC 8439: https://www.rfc-editor.org/rfc/rfc8439