Expand description
The device’s side of commands to a machine (#88): see
teter_common::command. Split in steps so a caller (or a test) can
hold a challenge, a sealed command and the channel apart.
Structs§
- Challenge
- A challenge the machine signed.
- Channel
- A command channel to one machine, joined on its relay session.
Constants§
- ANSWER_
TIMEOUT - How long the device waits for each answer of the machine: past what a command that ends a session may take on the machine (reaching its socket, then waiting for its process to go: 35 s), with room for the relay.
Functions§
- check_
challenge - The challenge
nonceandkey, ifsignatureis machinemachine’s (whose public key ismachine_key) of them. - open_
reply - The outcome in machine
machine’s reply to the command bound tononce: checked against its signature bymachine_key, and opened withaccount. - seal_
command commandsigned byaccountformachineandchallenge, sealed to the challenge’s one-time key.