diff options
author | Joseph Jang <josephjang@google.com> | 2021-12-09 16:15:22 +0800 |
---|---|---|
committer | Joseph Jang <josephjang@google.com> | 2021-12-15 02:57:54 +0000 |
commit | be611e2df82349ea3065928d2a34fa5cc0d8e917 (patch) | |
tree | 6c61131e0844d20bbdc61ef47aa5f5fd2bf78def | |
parent | 4e27e478b25bbef8fc8bb34982c9754c13d78e62 (diff) | |
download | generic-be611e2df82349ea3065928d2a34fa5cc0d8e917.tar.gz |
nugget: Add support GSA key provision command
Bug: 201592534
Change-Id: If059d7f564b7646228e8a5f61b2944829e99ab9f
Reviewed-on: https://nugget-os-review.googlesource.com/c/host/generic/+/48705
Tested-by: Joseph Jang <josephjang@google.com>
Presubmit-Verified: TreeHugger Robot <android-build-prod@system.gserviceaccount.com>
Reviewed-by: Bill Richardson <wfrichar@google.com>
Reviewed-by: Brian Murray <brianjmurray@google.com>
-rw-r--r-- | nugget/include/app_nugget.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nugget/include/app_nugget.h b/nugget/include/app_nugget.h index c278558..da6710e 100644 --- a/nugget/include/app_nugget.h +++ b/nugget/include/app_nugget.h @@ -436,6 +436,29 @@ struct gsc_debug_dump_msg { * @param reply_len 1KB */ +#define GSA_GSC_PAIRING_VERSION 0 +#define EC_P256_PUBLIC_KEY_SIZE 64 +#define EC_P256_PRIVATE_KEY_SIZE 32 +#define PSK_KEY_SIZE 32 +#define HAS_GSA_PUBKEY 0xa3 +struct gsa_gsc_pairing_persist_storage { + uint8_t version; + uint8_t has_gsa_public_key_provision; + uint8_t gsa_public_key[EC_P256_PUBLIC_KEY_SIZE]; + uint8_t gsc_private_key[EC_P256_PRIVATE_KEY_SIZE]; + uint8_t gsc_public_key[EC_P256_PUBLIC_KEY_SIZE]; +}; + +#define NUGGET_PARAM_GSA_KEY_PROVISION 0x0017 +/* + * GSA key provision command + * + * @param args gsa unique public key + * @param arg_len 32 + * @param reply gsc public key + sha256(pre-shared key) + * @param reply_len 64 + 32 + */ + /****************************************************************************/ /* Test related commands */ |