You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// AsPasswordString returns the password as defined in https://www.postgresql.org/docs/15/catalog-pg-authid.htmlfunc (passwordScramSha256Password) AsPasswordString() string {
returnfmt.Sprintf(`SCRAM-SHA-256$%d:%s$%s:%s`,
password.Iterations, password.Salt.ToBase64(), password.StoredKey.ToBase64(), password.ServerKey.ToBase64())
About PostgreSQL's password storage
If you execute 'SELECT rolname,rolpassword FROM pg_authid' with enough privileges,
you can see how PostgreSQL stores passwords. In the case of SCRAM-SHA-256,
rolpassword seems to have the following format (using terms used in this implementation):
SCRAM-SHA-256$<iterations>:<salt(base64>$<storedKey(base64>:<serverKey(base64)>
To support the colons, we need a prepare method that would turn these strings into what can go into john.pot, or a 2john script.
The text was updated successfully, but these errors were encountered:
There's apparently a common kind of encoding for SCRAM verifiers, which we don't support yet:
https://github.com/search?q=SCRAM-SHA-256%24&type=code
https://github.com/svenvc/P3/blob/master/P3/P3SCRAM.class.st
To support the colons, we need a
prepare
method that would turn these strings into what can go intojohn.pot
, or a 2john script.The text was updated successfully, but these errors were encountered: