caching_sha2_password Authentication Plugin

Caching SHA256 first send a SHA256 encrypted password. MySQL server has an in-memory cache of SHA256 key for successful authentication. When a cache hit occur, the connection is validated, if not, using some more steps to a process similar to sha256_password.

Caching SHA256 authentication possible exchanges:

SHA-2 encrypted password

Encryption is XOR(SHA256(password), SHA256(seed, SHA256(SHA256(password))))

"fast" authentication result

result of fast authentication.

  • byte authentication result

0x03 value means success authentication. 0x04 value means continue

Client clear password answer

  • string password without encryption

Public key request

Public key response

RSA encrypted password

RSA encrypted value of XOR(password, seed) using server public key (RSA_PKCS1_OAEP_PADDING).

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?