Expand description
A paired device’s key, and the signature its send requests carry (agentmux-mobile’s SPEC_SEND_FROM_THE_PHONE_2026_10_13 §4, §5.2.1).
Sending makes the phone the operator for an agent, so the viewer token
alone isn’t enough: a request also carries a signature by a key made in
the phone’s hardware key store at pairing, which never leaves it. srv
keeps the public half (db_viewer_devices.device_key) and checks:
amxv-sig-v1
<METHOD>
<path as sent, no query>
<X-Amxv-Timestamp, unix ms>
<lowercase hex SHA-256 of the body>joined by \n. The phone’s key is ECDSA P-256 (the one curve Android’s
Keystore and iOS’s Secure Enclave both hold in hardware), sent as the
65-byte uncompressed point, signing SHA-256 with a DER signature. A
32-byte key is Ed25519, the shape pairing accepted first; it verifies too.
Structs§
- Nonce
Log - The nonces of signed opens seen lately, per device.
Enums§
- Device
Key - A device’s public key, parsed from its stored base64.
Constants§
- MAX_
NONCES - The most nonces remembered at once. Past it an open is refused rather than a nonce forgotten.
- MAX_
SKEW_ MS - How far a request’s timestamp may be from srv’s clock, either way.
- NONCE_
HEADER - The header carrying the nonce of a signed open.
- NONCE_
MEMORY_ MS - How long a nonce is remembered: longer than a timestamp stays fresh either way, so a replay is either stale or remembered.
- OPEN_
SIG_ VERSION - The first line of the text a computer signs to open a feed (docs/specs/SPEC_REMOTE_PANES_WATCH_AND_DRIVE_AN_AGENT_ON_ANOTHER_COMPUTER_2026_11_20.md §3):
- SIGNATURE_
HEADER - The header carrying the signature, standard base64.
- SIG_
VERSION - The first line of the signed text; a new format gets a new tag.
- TIMESTAMP_
HEADER - The header carrying the signing time, unix ms.
Functions§
- fresh
- Whether a request signed at
timestamp_msis fresh atnow_ms. - nonce_
shape_ ok - Whether
noncehas the shape a nonce must: 16 to 128 characters of letters, digits,-and_. - open_
signed_ text - The text a computer’s feed open signs.
- signed_
text - The text a request’s signature covers.