Repository navigation
status: janus-status-v1, the signed status a device answers a nonce with - #3
Merged
Merged
Conversation
A home's hub (Apollo's server, later the MATA box) asks a device GET /v1/status?nonce=<64 lowercase hex>; the device answers with its claims and a signature by its own key over: "janus-status-v1\n" | version 1 | nonce(32) | len16(device_did) | len16(owner_did) | len16(adoption_kind) | sha256(adoption bytes)(32) len16 is the adoption envelope's 2-byte big-endian length; unadopted is empty owner and kind and 32 zero bytes. DeviceSigner::sign_prehash over sha256(message): P-256 r||s, low-s, RFC 6979; StatusProof::verify takes the key from device_did and refuses high-s. Kinds: janus-adoption-v1 and mata-statement-v1 (a wallet signed statement container). No allocation: the message is hashed as it is laid out. The test vector pins the chip's bytes for a verifier: a fixed test key, nonce 0..32, both DIDs, the expected message, prehash and signature -- cross-checked with an independent ECDSA (Python cryptography): message rebuilt from the contract by hand, the DID derived from the key, the signature low-s and verifying. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The primitive behind Apollo's hard-toys Track 1 (a device flashed on dldeploy.com appears in Apollo with nobody clicking): a device proves who it is and who owns it, on the LAN, in answer to the verifier's nonce.
rusty_esp_mid_core::status:StatusProof { nonce, device_did, owner_did, adoption_kind, adoption_hash }withunadopted/adopted"janus-status-v1\n" | 1 | nonce(32) | len16(device_did) | len16(owner_did) | len16(adoption_kind) | sha256(adoption)(32)--write,prehash(no allocation),sign(&impl DeviceSigner),verify(key fromdevice_did, high-s refused)janus-adoption-v1,mata-statement-v1;parse_nonce_hex(exactly 64 lowercase hex)Test vector (
status::vector): a fixed test key, nonce 0..32, both DIDs, the expected message, prehash and signature (RFC 6979 deterministic, so a verifier can assert exact bytes). Cross-checked with an independent ECDSA (Pythoncryptography): the message rebuilt from the contract by hand, the DID derived from the key, the signature low-s and verifying.Checks:
cargo test -p rusty_esp_mid-core(58 pass),cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check,cargo check --no-default-featuresfor riscv32imac.Not released: a crates.io release (0.1.4) is a separate step.
🤖 Generated with Claude Code