FinalizeRegistrationRequest Input: - password, an opaque byte string containing the client's password. - blind, an OPRF scalar value. - response, a RegistrationResponse structure. - server_identity, the optional encoded server identity. - client_identity, the optional encoded client identity. Output: - record, a RegistrationRecord structure. - export_key, an additional client key. Exceptions: - DeserializeError, when OPRF element deserialization fails. def FinalizeRegistrationRequest(password, blind, response, server_identity, client_identity): evaluated_element = DeserializeElement(response.evaluated_message) oprf_output = Finalize(password, blind, evaluated_element) stretched_oprf_output = Stretch(oprf_output) randomized_password = Extract("", concat(oprf_output, stretched_oprf_output)) (envelope, client_public_key, masking_key, export_key) = Store(randomized_password, response.server_public_key, server_identity, client_identity) record = RegistrationRecord { client_public_key, masking_key, envelope } return (record, export_key)