Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Secrets security #35

Open
RaphGL opened this issue Sep 6, 2024 · 3 comments
Open

Improve Secrets security #35

RaphGL opened this issue Sep 6, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@RaphGL
Copy link
Owner

RaphGL commented Sep 6, 2024

stop using SHA256 and instead use a more secure algorithm such as bcrypt, argon2d or argon2id.
this is necessary to prevent user's password from being bruteforced.

@RaphGL RaphGL added the enhancement New feature or request label Sep 6, 2024
@RaphGL RaphGL changed the title Improve Secrets security and change to Argon2id Improve Secrets security Sep 6, 2024
@RaphGL RaphGL added this to the 0.10.0 milestone Sep 18, 2024
@RaphGL RaphGL modified the milestones: 0.10.0, 0.11.0 Oct 30, 2024
@RaphGL RaphGL added bug Something isn't working and removed enhancement New feature or request labels Nov 22, 2024
@RaphGL RaphGL modified the milestones: 0.11.0, 0.12.0 Feb 2, 2025
@raphaelahrens
Copy link
Contributor

Hi,
I looked into this one more and I think the simplest solution would be to use rage/age .

Maybe further move a way from passwords and maybe allow the use of ssh keys, since that would remove the possibility of password reuse. Alternatively you could also use age identifies.

@RaphGL
Copy link
Owner Author

RaphGL commented Feb 18, 2025

@raphaelahrens that looks promising. I'll try and implement that into the program and deprecate the current secrets implementation.

Personally I prefer password based stuff as I use password managers heavily and never repeat the same password anywhere. But I'll take a look at the encryption options they have there, maybe I can default to the recipient based approach and then add a flag that you can use to opt into passwords or ssh? (not sure how necessary SSH is if you can do the recipient method)

@raphaelahrens
Copy link
Contributor

Rage uses scrypt to derive a key from the password, but if I understood your code correct I have to set one password for each file.

So there is a possibility of password reuse.
I don't know how bad it is for scrypt if you have 10 derived keys with the same password, scrypt uses a salt so there is some protection.
Further by finding one password there is a good chance to decrypt all files.

The advantage of a key pair would be that keys are not easy to guessand while you might use a password manager to defend against this, you should not assume that everyone will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants