Package
agent-os / nexus module
Problem Statement
Three places in agent-governance-python/agent-os/modules/nexus/ skip real cryptography entirely:
1. registry.py line 110 — agent registration accepts any signature without checking it
# TODO: Verify signature against verification key
# For now, trust the signature
2. registry.py line 199 — deregistration also skips verification
3. escrow.py line 360 — fake string used instead of real Ed25519 signing
# TODO: Generate actual signature
signature = f"sig_{requester_did}_{task_hash[:8]}"
AgentIdentity already stores a proper verification_key in ed25519:<base64_public_key> format. The infrastructure is there — the verification calls are just missing.
Proposed Solution
- Add
nexus/crypto.py with Ed25519 sign/verify helpers using the cryptography library
- Wire
verify() into AgentRegistry.register(), update(), and deregister()
- In
ProofOfOutcome.create_escrow(), require a real requester_signature parameter instead of generating a fake one
- Add
private_key_bytes to NexusClient and update _generate_signature() to use real Ed25519
- Add
InvalidSignatureError to exceptions.py
- Add
cryptography>=42.0.0,<44.0 to nexus/pyproject.toml (already used in dmz.py but undeclared)
- Update tests to generate real keypairs and use valid signatures
What the signature covers
- Registration / update: agent signs the manifest hash (same hash computed by
_compute_manifest_hash, which excludes timestamps for determinism)
- Deregistration: agent signs the
agent_did bytes to prove ownership
- Escrow creation: requester signs
"{requester_did}:{provider_did}:{task_hash}:{credits}".encode()
Out of scope
- Nexus server-side key management (the
_sign_registration / _sign_escrow server signatures are placeholders handled separately)
- Remote DMZ mode (tracked separately as NotImplementedError stubs)
Package
agent-os / nexus module
Problem Statement
Three places in
agent-governance-python/agent-os/modules/nexus/skip real cryptography entirely:1.
registry.pyline 110 — agent registration accepts any signature without checking it2.
registry.pyline 199 — deregistration also skips verification# TODO: Verify signature3.
escrow.pyline 360 — fake string used instead of real Ed25519 signingAgentIdentityalready stores a properverification_keyined25519:<base64_public_key>format. The infrastructure is there — the verification calls are just missing.Proposed Solution
nexus/crypto.pywith Ed25519 sign/verify helpers using thecryptographylibraryverify()intoAgentRegistry.register(),update(), andderegister()ProofOfOutcome.create_escrow(), require a realrequester_signatureparameter instead of generating a fake oneprivate_key_bytestoNexusClientand update_generate_signature()to use real Ed25519InvalidSignatureErrortoexceptions.pycryptography>=42.0.0,<44.0tonexus/pyproject.toml(already used indmz.pybut undeclared)What the signature covers
_compute_manifest_hash, which excludes timestamps for determinism)agent_didbytes to prove ownership"{requester_did}:{provider_did}:{task_hash}:{credits}".encode()Out of scope
_sign_registration/_sign_escrowserver signatures are placeholders handled separately)