Pcornel
Identity · Authentication

Password Hashing

Cheat sheet · https://pcornel.dk/topic.php?topic=4477

Back to the Topic

Answer

The verifier record includes algorithm, parameters, unique salt and derived value; optional pepper is protected separately, comparison is constant-time where relevant and parameters can be upgraded after successful authentication.

Remember

  • Password hashing ≠ encryption.
  • General-purpose fast hash ≠ password KDF.
  • Salt ≠ secret and does not replace work factor.
  • Pepper ≠ unique salt or substitute for secure key management.

First checks

  • grep '^<user>' /etc/shadow | cut -d: -f2 | cut -c1-4 — hash algorithm prefix ($y$=yescrypt, $6$=SHA-512)
  • python3 -c 'import argon2' — library availability
  • App password storage review — algorithm

Verify in this order

password → salt + slow KDF → stored hash

Where it usually breaks

First mismatch in identity lifecycle → authenticator/credential → IdP/federation/session → authorization policy → target resource → audit trail; preserve identity/policy/pre-state before mutation.

Authentication → Password Hashing proof map

BoundaryEstablishDoes not establish
Identity and scopeStable subject/account/resource mapping, owner, lifecycle state and expected actionDoes not prove credential control or effective access
Policy and ceremonyEffective entitlement or authenticator/verifier policy plus all fallback pathsConfiguration presence does not prove enforcement or assurance
OutcomeAllowed, denied, failure, expiry/revoke and target read-back tests correlated with telemetryOne success does not prove every interface, session or downstream target
ClosureOriginal end-to-end action retested; residual access/risk, owner and review trigger recordedAdministrative workflow completion alone is not closure

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4477

Confirmation

Confirm action

Continue?