secure_transport: Add support secure transport handshake cmd
Bug: 228796951
Change-Id: Ice5baa830b5c80c91d6e1db6d9ce9b6731ae9fb8
Reviewed-on: https://nugget-os-review.googlesource.com/c/host/generic/+/51244
Presubmit-Verified: TreeHugger Robot <android-build-prod@system.gserviceaccount.com>
Reviewed-by: Brian Murray <brianjmurray@google.com>
diff --git a/nugget/include/app_nugget.h b/nugget/include/app_nugget.h
index f713299..d6342ff 100644
--- a/nugget/include/app_nugget.h
+++ b/nugget/include/app_nugget.h
@@ -521,7 +521,7 @@
* nonce || gsa_psk_state)
*/
struct verify_psk_request {
- char header[VERIFY_PSK_REQ_HEADER_SIZE];
+ uint8_t header[VERIFY_PSK_REQ_HEADER_SIZE];
uint8_t version;
uint8_t nonce[VERIFY_PSK_NONCE_SIZE];
uint8_t gsa_psk_state;
@@ -540,11 +540,21 @@
* Verify GSA GSC pre-shared key command
*
* @param args struct verify_psk_request
- * @param arg_len 63 bytes
+ * @param arg_len 83 bytes
* @param reply psk verification result
* @param reply_len 1 bytes
*/
+#define NUGGET_PARAM_SECURE_TRANSPORT_HANDSHAKE 0x0019
+/*
+ * Secure transport handshak (noise protocol) command
+ *
+ * @param args GSA EC public_key + AES_GCM256("MSGA") + AES_GSC_TAG
+ * @param arg_len 64 + 4 + 16 bytes = 84
+ * @param reply GSC EC public_key + AES_GCM256("MSGB") + AES_GSC_TAG
+ * @param reply_len 64 + 4 + 16 bytes = 84
+ */
+
/****************************************************************************/
/* Test related commands */