tools(evidence): operator identity keygen helper (EvidenceKeygen)#89
Merged
Conversation
`tools/EvidenceKeygen.java` — a single-file JDK source-launch helper (no build, no deps) that generates an Ed25519 signing keypair and prints the three EVIDENCE_* env vars that turn CyclesEvidence on for a self-hosted deployment. Targets the v0.1 raw-hex signer_did path; needs nothing but the operator's own server_id (there is no hosted Cycles / central key). Both values are the raw 32-byte tail of the DER encoding (the extraction LocalEvidenceSigningKey uses); before printing, the tool reconstructs both keys from the EMITTED hex through the same fixed Ed25519 DER prefixes EnvelopeSigner uses and runs the worker's sign/verify pair probe — so it validates the literal bytes it hands over, independent of the generating provider, and can't emit a pair that fails startup. (codex review: tightened the probe from the raw KeyPair objects to the emitted hex; doc claims aligned.) Adds tools/README.md (usage + a verified language-agnostic OpenSSL alternative) and a "Generating the identity" section in the enablement runbook. Operator tooling outside src/ — not in the Maven reactor or jacoco bundle; no service/wire/spec change. AUDIT.md updated.
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.
What
A self-hosted operator helper for enabling CyclesEvidence —
tools/EvidenceKeygen.java. Generates an Ed25519 signing keypair and prints the three env vars that turn evidence on, in the exact formats the reference signer validates.There is no hosted Cycles and no central signing key — every deployment owns its identity. This turns the runbook's "set these three vars" into "run this, copy the output." It targets the shipped v0.1 raw-hex
signer_didpath, so it's not gated on the v0.2did:cycles/JWKS work (cycles-protocol#103).Files
tools/EvidenceKeygen.java— single-file JDK source-launch (java tools/EvidenceKeygen.java https://cycles.example.com/v1); no build, no deps. EmitsEVIDENCE_SERVER_ID,EVIDENCE_SIGNING_SIGNER_DID, and the secretEVIDENCE_SIGNING_PRIVATE_KEY_HEX.tools/README.md— usage, the public/secret placement table, and a verified language-agnostic OpenSSL alternative.docs/evidence-identity-enablement.md— new "Generating the identity" section pointing at the helper.AUDIT.md— entry.Correctness / why it can't emit a bad pair
Both values are the raw 32-byte tail of the DER encoding — the same extraction
LocalEvidenceSigningKeyuses, the same seed/pubkeyEnvelopeSignerre-wraps with the fixed Ed25519 DER prefixes. Before printing, the tool reconstructs both keys from the emitted hex through those exact prefixes and runs the worker's sign/verify pair probe — validating the literal bytes it hands over, independent of the generating provider. Verified:EnvelopeSigner's prefix path (sign→verify ✓);Safety / scope
src/— not in the Maven reactor or the jacoco bundle. No service/wire/spec change.Review
Codex-reviewed (read-only): one Medium — the probe originally validated the raw
KeyPairobjects rather than the emitted hex; tightened to reconstruct-from-emitted-hex via the signer's DER prefixes, and the doc claims aligned. No High/Low.