summaryrefslogtreecommitdiff
path: root/include/fpsensor_crypto.h
diff options
context:
space:
mode:
authorYicheng Li <yichengli@chromium.org>2019-06-10 11:44:47 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-14 06:33:00 +0000
commitb5c6cf246deb0ade98bf3e84999984998b67267e (patch)
treed63d161ac18640d0cd07923ca714f2eca91da0d9 /include/fpsensor_crypto.h
parent2d62dee3a8f32499bab8f4b95b84a9eaeea919dc (diff)
downloadchrome-ec-b5c6cf246deb0ade98bf3e84999984998b67267e.tar.gz
fpsensor: Add unit test for derive_encryption_key().
Mock rollback_get_secret() and use it to test derive_encryption_key(). BRANCH=nocturne BUG=chromium:927095 TEST=make -j buildall TEST=tested enrollment, matching and multifinger on nocturne DUT TEST=verified test key vectors by running boringSSL's HKDF (https://boringssl.googlesource.com/boringssl/+/c0b4c72b6d4c6f4828a373ec454bd646390017d4/crypto/hkdf/) locally Change-Id: Ie2f51e4f64788d938e43d0c5c18685d1cfdd001c Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652495 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'include/fpsensor_crypto.h')
-rw-r--r--include/fpsensor_crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fpsensor_crypto.h b/include/fpsensor_crypto.h
index 515955fe03..26fe96a328 100644
--- a/include/fpsensor_crypto.h
+++ b/include/fpsensor_crypto.h
@@ -15,7 +15,7 @@
* @param salt the salt to use in HKDF.
* @return EC_RES_SUCCESS on success and EC_RES_ERROR otherwise.
*/
-int derive_encryption_key(uint8_t *out_key, uint8_t *salt);
+int derive_encryption_key(uint8_t *out_key, const uint8_t *salt);
/**
* Encrypt |plaintext| using AES-GCM128.