From 863bf521deabf4fe02ac2ac665a907181c942c87 Mon Sep 17 00:00:00 2001 From: Fabian Kaczmarczyck Date: Wed, 9 Dec 2020 19:05:03 +0100 Subject: [PATCH] removes extra sha256 --- src/ctap/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ctap/mod.rs b/src/ctap/mod.rs index 67a0e27..55494a0 100644 --- a/src/ctap/mod.rs +++ b/src/ctap/mod.rs @@ -607,10 +607,8 @@ where ) -> Result<[u8; 32], Ctap2StatusCode> { let mut private_key_bytes = [0u8; 32]; private_key.to_bytes(&mut private_key_bytes); - let salt = crypto::sha256::Sha256::hash(&private_key_bytes); - // TODO(kaczmarczyck) KDF? hash salt together with rp_id_hash? let key = self.persistent_store.cred_random_secret(has_uv)?; - Ok(hmac_256::(&key, &salt[..])) + Ok(hmac_256::(&key, &private_key_bytes[..])) } // Processes the input of a get_assertion operation for a given credential