esp-idf/components/protocomm/proto/sec1.proto
Amey Inamdar d0c777b2e1 Protocomm : Added component core for protocol communication
* This manages secure sessions and provides framework for multiple transports.
* The application can use protocomm layer directly to have application specific extensions for provisioning (or non-provisioning) use cases.
* Following features are available for provisioning :

  * Security - Security0 (no security), Security1 (curve25519 key exchange + AES-CTR encryption)
  * Proof-of-possession support for Security1

* Protocomm requires specific protocol buffer modules for compilation which can be generated from the `.proto` files in the `proto` directory using make.

Co-Authored-By: Amey Inamdar <amey@espressif.com>
Co-Authored-By: Anurag Kar <anurag.kar@espressif.com>
2018-10-02 19:07:28 +05:30

46 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
import "constants.proto";
/* Data structure of Session command1 packet */
message SessionCmd1 {
bytes client_verify_data = 2;
}
/* Data structure of Session response1 packet */
message SessionResp1 {
Status status = 1;
bytes device_verify_data = 3;
}
/* Data structure of Session command0 packet */
message SessionCmd0 {
bytes client_pubkey = 1;
}
/* Data structure of Session response0 packet */
message SessionResp0 {
Status status = 1;
bytes device_pubkey = 2;
bytes device_random = 3;
}
/* A message must be of type Cmd0 / Cmd1 / Resp0 / Resp1 */
enum Sec1MsgType {
Session_Command0 = 0;
Session_Response0 = 1;
Session_Command1 = 2;
Session_Response1 = 3;
}
/* Payload structure of session data */
message Sec1Payload {
Sec1MsgType msg = 1; /*!< Type of message */
oneof payload {
SessionCmd0 sc0 = 20; /*!< Payload data interpreted as Cmd0 */
SessionResp0 sr0 = 21; /*!< Payload data interpreted as Resp0 */
SessionCmd1 sc1 = 22; /*!< Payload data interpreted as Cmd1 */
SessionResp1 sr1 = 23; /*!< Payload data interpreted as Resp1 */
}
}