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

<Security> Password length is "public" #290

Open
Bloodiko opened this issue Apr 4, 2024 · 1 comment
Open

<Security> Password length is "public" #290

Bloodiko opened this issue Apr 4, 2024 · 1 comment
Labels

Comments

@Bloodiko
Copy link

Bloodiko commented Apr 4, 2024

Description

If you choose to encrypt your secret with a password, a potential attacker just needs to look at the link to get the information how long the password is - potentially making brute force attacks easier, as you have a fixed length knowledge about the password.

This is not a serious issue per se, but something that should be addressed eventually.
(Yes, with the limited views of a secret this issue does not exist, as a brute force is impossible if the secret is "accessed" once, even with the wrong password, so you technically have limited tries for your brute force attack, but for those secrets with unlimited views, that does potentially create an issue)

Screenshots

zmcZeANB6oDd_eBpv5SvejC                  // example secret using a 9 length password 
IezrJLGyUOoD3PDFRdLX-FccIpS0kdPC   // example secret without password 

Additional information

you may fix it, by creating the full length encryption key with 32 chars and remove the password length characters from the encryption key while encrypting and decrypting respectively.

There are possibly other ways to fix this, like instead of using an random encryption key, hashing the password with sha256, providing a perfectly safe encryption key (which is exactly 128 bits long, no matter the password length, also creating the possibility of unrestricted password lengths, instead of 32 char passwords maximum as it is currently) , which can be replicated by the user on the decryption end easily.

@Bloodiko Bloodiko added the bug Something isn't working label Apr 4, 2024
@bjarneo
Copy link
Member

bjarneo commented Apr 5, 2024

Fair points, @Bloodiko. It should be fixed.

One thing you forgot to mention here which limits the brute force of the password; rate limiting.

@bjarneo bjarneo added Security and removed bug Something isn't working labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants