Skip to content

Add scramble_323_with_hash - #202

Open
MattJackson wants to merge 1 commit into
blackbeam:masterfrom
MattJackson:upstream/scramble-323-with-hash
Open

MattJackson wants to merge 1 commit into
blackbeam:masterfrom
MattJackson:upstream/scramble-323-with-hash

Conversation

@MattJackson

Copy link
Copy Markdown

Adds scramble_323_with_hash, which computes the mysql_old_password challenge response from the password hash returned by hash_password (the OLD_PASSWORD() value) instead of from the plaintext password.

This lets a client or proxy that stores only the hash answer the challenge without keeping the plaintext password in memory.

scramble_323 now hashes the password and delegates to the new function. Its output is unchanged.

Tests pin OLD_PASSWORD('password') and a known scramble for it, and check that both functions produce the same bytes.

scramble_323_with_hash computes the mysql_old_password response from the password hash
returned by hash_password (the OLD_PASSWORD() value) instead of the password, so a client
that only keeps the hash can answer the challenge. scramble_323 now calls it and returns
the same bytes as before. Tests pin OLD_PASSWORD('password') and a scramble for it, and
check that both functions agree.
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.

1 participant