diff options
author | Yicheng Li <yichengli@chromium.org> | 2019-06-14 18:21:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-09 03:43:59 +0000 |
commit | 83e0848263313dbdaf10ebc887dea548faaf251a (patch) | |
tree | 9e5175d0fdee0265ef0d96fc6705fded4917c246 /include/ec_commands.h | |
parent | 635f21d41c095f138cb711118a7866fcd0b5bcc4 (diff) | |
download | chrome-ec-83e0848263313dbdaf10ebc887dea548faaf251a.tar.gz |
fpsensor: Implement command to read positive_match_secret.
Add EC command to read positive_match_secret on match success.
If the attempt to read is 5 seconds after the match, the read is not
allowed (the readable bit for positive match secret is cleared).
Test that the command can read the data correctly and can
read for each finger only once. Test that attempt to read secret
after deadline will be rejected.
BRANCH=nocturne
BUG=chromium:927095
TEST=make buildall
TEST=tested enrollment, matching and multifinger on DUT nocturne
TEST=tested that if biod requests to download template and secret
for a finger that's not currently matched, reading secret will fail.
Change-Id: Idc734c6392d271e2aaee1cddf7c2c5b81b727b4a
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679372
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 2f83b713d3..f28b9ea3e2 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -6023,6 +6023,17 @@ struct ec_response_fp_encryption_status { uint32_t status; } __ec_align4; +#define EC_CMD_FP_READ_MATCH_SECRET 0x040A +struct ec_params_fp_read_match_secret { + uint16_t fgr; +} __ec_align4; + +/* The positive match secret has the length of the SHA256 digest. */ +#define FP_POSITIVE_MATCH_SECRET_BYTES 32 +struct ec_response_fp_read_match_secret { + uint8_t positive_match_secret[FP_POSITIVE_MATCH_SECRET_BYTES]; +} __ec_align4; + /*****************************************************************************/ /* Touchpad MCU commands: range 0x0500-0x05FF */ |