diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2017-01-19 15:22:15 +0100 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-29 10:37:40 -0700 |
commit | 28e76b309d595923121e70cbd9e3228affad3a09 (patch) | |
tree | e4ec97f07b5f1b26fbaa79440245eed0110eb991 /board/cr50/board.h | |
parent | 3fdda8b6f1a127bff83ed7e30316a837b941875c (diff) | |
download | chrome-ec-28e76b309d595923121e70cbd9e3228affad3a09.tar.gz |
cr50: add U2F support
Implement U2F (universal second factor authentication) feature
over TPM vendor commands.
The raw U2F APDU as defined by the FIDO Alliance 'U2F Raw Message Formats'
specification can be sent using the VENDOR_CC_U2F_APDU command.
So the vendor command is taking a ISO7816-4:2005 APDU format frame as input
as defined by the spec and returns another APDU using ISO7816-4 status
code.
The APDU is processed by the common U2F code using u2f_apdu_rcv(),
this hardware specific code provides:
- the user physical presence detection (done by the power button press)
returned by the pop_check_presence() callback.
- the connection to the cryptographic hardware to generate/derive the
keys used by the U2F and individual attestation functions.
This feature/vendor command has 3 modes:
- disabled
- U2F (only the commands/flags defined by the U2F specification)
- G2F (the U2F commands plus some extensions for individual attestation)
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=cr50
BUG=b:35545754
TEST=pass U2FTest and HIDTest.
Change-Id: Ic2591f369763fb4ba67926e2b4a0c2cd35330a18
Reviewed-on: https://chromium-review.googlesource.com/518139
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/cr50/board.h')
-rw-r--r-- | board/cr50/board.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h index 14257012ad..9d0ebbce43 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -82,6 +82,9 @@ /* Enable debug cable detection */ #define CONFIG_RDD +/* Also use the cr50 as a second factor authentication */ +#define CONFIG_U2F + /* USB configuration */ #define CONFIG_USB #define CONFIG_USB_CONSOLE @@ -171,6 +174,7 @@ enum device_type { enum nvmem_vars { NVMEM_VAR_CONSOLE_LOCKED = 0, NVMEM_VAR_TEST_VAR, + NVMEM_VAR_U2F_SALT, NVMEM_VARS_COUNT }; @@ -197,6 +201,8 @@ int board_tpm_uses_i2c(void); int board_tpm_uses_spi(void); int board_id_is_mismatched(void); +void power_button_record(void); + #endif /* !__ASSEMBLER__ */ /* USB interface indexes (use define rather than enum to expand them) */ |