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

insecure practice in password storage #2044

Open
sy2339226 opened this issue Jun 14, 2024 · 0 comments
Open

insecure practice in password storage #2044

sy2339226 opened this issue Jun 14, 2024 · 0 comments

Comments

@sy2339226
Copy link

sy2339226 commented Jun 14, 2024

Is your feature request related to a problem? Please describe.
I've noticed that the project uses an insecure practice in password storage and RSA key size selection. Specifically, the project employs MD5 for hashing passwords, which is a fast and reversible hashing algorithm susceptible to rainbow table attacks. This can be found in pgconn.go at line 446. Furthermore, the RSA key size is currently set at 2048 bits, whereas NIST recommends using 3072 bits or higher for enhanced security. This latter issue is located in generate_certs.go at line 67.

Describe the solution you'd like
I suggest updating the password hashing mechanism to utilize a more secure algorithm, such as Argon2id, scrypt, or bcrypt, which are designed to be resource-intensive and thus protect against offline brute-force attacks. Regarding the RSA key size, I propose increasing it to 3072 bits to align with NIST recommendations and improve cryptographic strength. https://www.keylength.com/en/3/

Describe alternatives you've considered
An alternative for password hashing could involve using PBKDF2 with a high iteration count, although this is less preferred compared to the previously mentioned algorithms due to its relative simplicity and susceptibility to hardware-accelerated attacks. For the RSA key size, there is no real alternative; upgrading to a larger key size is essential for maintaining adequate security levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant