Add class to compute key proofs for CryptAuth v2 Enrollment
This class is used for the batch computation of key proofs needed for CryptAuth v2 Enrollment. The lone method ComputeKeyProofs() takes a list of key-payload pairs and returns a list of key proof strings, ordered consistent with the input list. The key proofs are used by CryptAuth to verify that the client has the appropriate key material. The CryptAuth v2 Enrollment protocol requires the following key proof formats: - Symmetric keys: The HMAC-SHA256 of the payload, using a key derived from the symmetric key. Specifically, HMAC(HKDF(|key|, salt="CryptAuth Key Proof", info=|key_handle|), |payload|) - Asymmetric keys: A signed, unencrypted, and serialized SecureMessage proto, with the following parameters: - signature_scheme = ECDSA_P256_SHA256, - encryption_scheme = NONE, - verification_key_id = |key_handle|, - body = |payload|, signed with the private key material. The protocol also demands that the |random_session_id|, sent by the CryptAuth server via the SyncKeysResponse, be used as the payload for key proofs. In the future, key crossproofs might be employed, where the payload will consist of other key proofs. Requirements: - An instance of this class should only be used once. - The input list, |key_payload_pairs|, cannot be empty. - Currently, the only supported key types are RAW128 and RAW256 for symmetric keys and P256 for asymmetric keys. Bug: 899080 Change-Id: I3db6dfedd15ef7a51b4ef8953dfb4fc84c5bd550 Reviewed-on: https://chromium-review.googlesource.com/c/1460310 Commit-Queue: Josh Nohle <nohle@chromium.org> Reviewed-by:Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#630601}
Showing
Please register or sign in to comment