Skip to content

Sealed caching_sha2 verifier

A MySQL caching_sha2 password verifier is stored in the catalog as a sealed value. It is sealed with the VerifierKey derived from STRATA_AUTH_KEY, see Key hierarchy.

Offset Size Type Meaning
0 1 u8 0x02 (sealed)
1 12 bytes random nonce
13 32 bytes ciphertext of SHA256(SHA256(password))
45 16 bytes tag

Total length: 61 bytes.

The AAD is "strata-caching-sha2-v2\0" ‖ user name.

  • The legacy form 0x01 ‖ stage2 (33 bytes) is still read.
  • A length other than 61, or a first byte other than 2, means the value is not a sealed record (crates/strata-crypto/src/caching_sha2.rs).