Expand description
Firebase’s modified scrypt, as Utopia\Auth\Hashes\ScryptModified computes it: scrypt
(N = 16384, r = 8, p = 1, 64 bytes) of the password under the salt and its separator, and
the signer key encrypted with AES-256-CTR under the first 32 bytes of that, from a zero IV.
Functions§
- aes_
256_ ctr openssl_encrypt($data, 'aes-256-ctr', $key, OPENSSL_RAW_DATA, str_repeat("\0", 16)):dataXORed with the AES-256 keystream of a big-endian 128-bit counter from zero.- derived_
key scrypt($password, $salt . $separator, 16384, 8, 1, 64), raw:ScryptModified’s derived key. The password is what PHP passes, already throughmb_convert_encoding().- hash
ScryptModified::hash()’s value before itsbase64_encode(): the signer key encrypted under the derived key’s first 32 bytes.