AVL AES Key Handling
sequenceDiagram
participant Dev as "Device"
participant Dev_TCP as "Device TCP Session"
participant D2S_TCP as "D2Sphere TCP Session"
participant D2S_DB as "D2Sphere Database"
participant D2S_API as "D2SPhere REST API"
%%Note over Dev,Dev_TCP,D2S_TCP,D2S_DB,D2S_API: create D2Sphere TCP conncetion
autonumber
Dev->>Dev_TCP: create TCP session
Dev_TCP->>D2S_TCP: sent Login plain (contains uuid/IMEI and used enryption mode)
Dev->>Dev_TCP : load AES key from TPM key store to AES module
Dev_TCP->> Dev_TCP : start using enryption
Dev_TCP->>Dev_TCP : parse Login, mode, uuid
D2S_DB->>Dev_TCP : load AES key for uuid
D2S_TCP->>D2S_TCP : start using enryption
Dev_TCP->D2S_TCP: excahnge data
Dev_TCP->D2S_TCP: excahnge data
%%Note over Dev,Dev_TCP,D2S_TCP,D2S_DB,D2S_API: key change via REST API