From 84ba4bb756187dac279c70fe6915e3437199d040 Mon Sep 17 00:00:00 2001 From: Louis Collard Date: Mon, 12 Aug 2019 15:54:40 +0800 Subject: cr50: Delete legacy U2F implementation This implementation has been replaced, and is no longer needed. Removing it frees 2376 bytes in flash. BRANCH=none BUG=b:138578925 TEST=test_that ... firmware_IntegratedU2F Signed-off-by: Louis Collard Change-Id: Id5b2009bb1b56ae25de9173acb5d5e67eaf1caa3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1748847 Reviewed-by: Andrey Pronin --- include/u2f.h | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) (limited to 'include/u2f.h') diff --git a/include/u2f.h b/include/u2f.h index 1a445f8f4a..0f54dfc990 100644 --- a/include/u2f.h +++ b/include/u2f.h @@ -44,56 +44,12 @@ typedef struct { uint8_t y[U2F_EC_KEY_SIZE]; // Y-value } U2F_EC_POINT; -// U2F native commands - -#define U2F_REGISTER 0x01 // Registration command -#define U2F_AUTHENTICATE 0x02 // Authenticate/sign command -#define U2F_VERSION 0x03 // Read version string command - -#define U2F_VENDOR_FIRST 0x40 // First vendor defined command -#define U2F_VENDOR_LAST 0xbf // Last vendor defined command - -// U2F_CMD_REGISTER command defines - -#define U2F_REGISTER_ID 0x05 // Version 2 registration identifier -#define U2F_REGISTER_HASH_ID 0x00 // Version 2 hash identintifier - -typedef struct { - uint8_t chal[U2F_CHAL_SIZE]; // Challenge - uint8_t appId[U2F_APPID_SIZE]; // Application id -} U2F_REGISTER_REQ; - -typedef struct { - uint8_t registerId; // Registration identifier (U2F_REGISTER_ID_V2) - U2F_EC_POINT pubKey; // Generated public key - uint8_t keyHandleLen; // Length of key handle - uint8_t keyHandleCertSig[ - U2F_MAX_KH_SIZE + // Key handle - U2F_MAX_ATT_CERT_SIZE + // Attestation certificate - U2F_MAX_EC_SIG_SIZE]; // Registration signature -} U2F_REGISTER_RESP; - -// U2F_CMD_AUTHENTICATE command defines - -// Authentication control byte +// Request Flags. #define U2F_AUTH_ENFORCE 0x03 // Enforce user presence and sign #define U2F_AUTH_CHECK_ONLY 0x07 // Check only #define U2F_AUTH_FLAG_TUP 0x01 // Test of user presence set -typedef struct { - uint8_t chal[U2F_CHAL_SIZE]; // Challenge - uint8_t appId[U2F_APPID_SIZE]; // Application id - uint8_t keyHandleLen; // Length of key handle - uint8_t keyHandle[U2F_MAX_KH_SIZE]; // Key handle -} U2F_AUTHENTICATE_REQ; - -typedef struct { - uint8_t flags; // U2F_AUTH_FLAG_ values - uint8_t ctr[U2F_CTR_SIZE]; // Counter field (big-endian) - uint8_t sig[U2F_MAX_EC_SIG_SIZE]; // Signature -} U2F_AUTHENTICATE_RESP; - // TODO(louiscollard): Add Descriptions. typedef struct { -- cgit v1.2.1