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

Update Password_Storage_Cheat_Sheet.md #1226

Merged
merged 6 commits into from
Nov 18, 2023
Merged

Update Password_Storage_Cheat_Sheet.md #1226

merged 6 commits into from
Nov 18, 2023

Conversation

jmanico
Copy link
Member

@jmanico jmanico commented Nov 16, 2023

Big update from Robert Thorton

Thank you for submitting a Pull Request (PR) to the Cheat Sheet Series.

🚩 If your PR is related to grammar/typo mistakes, please double-check the file for other mistakes in order to fix all the issues in the current cheat sheet.

Please make sure that for your contribution:

  • In case of a new Cheat Sheet, you have used the Cheat Sheet template.
  • All the markdown files do not raise any validation policy violation, see the policy.
  • All the markdown files follow these format rules.
  • All your assets are stored in the assets folder.
  • All the images used are in the PNG format.
  • Any references to websites have been formatted as TEXT
  • You verified/tested the effectiveness of your contribution (e.g., the defensive code proposed is really an effective remediation? Please verify it works!).
  • The CI build of your PR pass, see the build status here.

If your PR is related to an issue, please finish your PR text with the following line:

This PR covers issue #.

Thank you again for your contribution 😃

Big update from Robert Thorton
Copy link
Collaborator

@szh szh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some proofreading comments, but otherwise looks great! Thank you!

cheatsheets/Password_Storage_Cheat_Sheet.md Outdated Show resolved Hide resolved
cheatsheets/Password_Storage_Cheat_Sheet.md Outdated Show resolved Hide resolved
cheatsheets/Password_Storage_Cheat_Sheet.md Outdated Show resolved Hide resolved
cheatsheets/Password_Storage_Cheat_Sheet.md Outdated Show resolved Hide resolved
cheatsheets/Password_Storage_Cheat_Sheet.md Outdated Show resolved Hide resolved
@jmanico jmanico merged commit d9d84e4 into master Nov 18, 2023
6 checks passed
@jmanico jmanico deleted the password-edits branch November 18, 2023 18:04
@kwwall
Copy link
Collaborator

kwwall commented Nov 21, 2023

@jmanico - Just an FYI, I am starting the requested code review today. Had been working on a PR for a new ESAPI release.

@kwwall
Copy link
Collaborator

kwwall commented Nov 21, 2023

@jmanico - Sorry I was late to this requested review. This is great work. The only minor comment that I would have is the paragraph under the "Peppering" section that states:

For example, one peppering strategy is hashing the passwords as usual (using a password hashing algorithm) and then using HMAC or encrypting the hashes with a symmetrical encryption key before storing the password hash in the database, with the key acting as the pepper.

I personally would recommend changing the part "then using HMAC or encrypting the hashes with a symmetrical encryption key" (should be "symmetric encryption key", not "symmetrical" BTW), to instead ONLY refer to using HMACs. I'd recommend revising it as something like this:

For example, one peppering strategy is hashing the passwords as usual (using a password hashing algorithm) and then using an  HMAC (e.g., HMAC-SHA256, HMAC-SHA512, depending on the desired output length) on the original password hash before storing the password hash in the database, with the pepper acting as the HMAC  key.

I recommend using an HMAC over symmetric encryption because there's just less to get wrong using HMACs than there is correctly implementing the encryption / decryption using a symmetric cipher.

Regardless of whether that change is made or not though, the last part of that paragraph, where it states:

... with the key acting as the pepper.

is incorrect. It should say

... with the pepper acting as the key.

Otherwise, looks good.

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

Successfully merging this pull request may close these issues.

3 participants