sigpwny / 2024-ectf-uiuc

UIUC's implementation of the Medical Infrastructure Supply Chain (MISC) for MITRE eCTF 2024
Apache License 2.0
5 stars 2 forks source link

Initial protocol for HIDE secure communications layer #2

Closed WhiteHoodHacker closed 7 months ago

WhiteHoodHacker commented 7 months ago

@Suchit25 @adarshk-5 @jimingd2 @Chris5134 @nkozlo3 @sahilagg6 Create a Mermaid diagram for the HIDE secure communication protocol based on the design document and insecure example.

Design doc

Insecure example:

Mermaid documentation:

adarshk-5 commented 7 months ago

HIDE Protocol Communication Layer

All message information is encrypted with the Ascon cryptographic scheme while message types (MSG_REQ, CHAL_SEND, CHAL_RESP, etc) are coded with unencrypted magic bytes.

sequenceDiagram
participant AP as Application Processor
participant C as Component

AP ->> C: MSG_REQ
AP -->> C: Sender ID
AP -->> C: Receiver ID

Note over C: Component generates and stores nonce

C ->> AP: CHAL_SEND
C -->> AP: Sender ID
C -->> AP: Receiver ID
C -->> AP: Nonce

Note over AP: Application Processor receives <br/>and responds to challenge

AP ->> C: CHAL_RESP
AP -->> C: Sender ID
AP -->> C: Receiver ID
AP -->> C: Nonce + 1
AP -->> C: Message

alt Nonce + 1 Incorrect
    Note over C: Component resets to default state
end

Each direction of communication uses a different encryption key.