CreateCredentialResponse Input: - request, a CredentialRequest structure. - server_public_key, the public key of the server. - record, an instance of RegistrationRecord which is the server's output from registration. - credential_identifier, an identifier that uniquely represents the credential. - oprf_seed, the server-side seed of Nh bytes used to generate an oprf_key. Output: - response, a CredentialResponse structure. Exceptions: - DeserializeError, when OPRF element deserialization fails. def CreateCredentialResponse(request, server_public_key, record, credential_identifier, oprf_seed): seed = Expand(oprf_seed, concat(credential_identifier, "OprfKey"), Nok) (oprf_key, _) = DeriveKeyPair(seed, "OPAQUE-DeriveKeyPair") blinded_element = DeserializeElement(request.blinded_message) evaluated_element = BlindEvaluate(oprf_key, blinded_element) evaluated_message = SerializeElement(evaluated_element) masking_nonce = random(Nn) credential_response_pad = Expand(record.masking_key, concat(masking_nonce, "CredentialResponsePad"), Npk + Nn + Nm) masked_response = xor(credential_response_pad, concat(server_public_key, record.envelope)) response = CredentialResponse { evaluated_message, masking_nonce, masked_response } return response