Class AgentKeystore
java.lang.Object
ai.badmonkey.agentspaces.identity.AgentKeystore
Persistent agent keys (SPEC §4.2, v0.1.13, TODO-9-10-11 B5), so a subordinate
agent keeps its key, and so its attested identity, across restarts. Layout
under the configured directory, one directory per peer and agent:
<dir>/<peer-id>/<local-name>/agent.key Ed25519 PKCS#8, 0600 <dir>/<peer-id>/<local-name>/agent.pub raw 32 bytes <dir>/<peer-id>/<local-name>/agent-x25519.key X25519 PKCS#8, 0600 <dir>/<peer-id>/<local-name>/agent-x25519.pub raw 32 bytesThe peer level keeps two peers sharing a directory from loading each other's agent keys. Certificates are not stored: the peer re-issues them at start, since the key is what must persist. Agent names are refused, never sanitized, when they could escape the directory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AgentKeystoreA keystore rooted at a directory, created on first use.The keystore root.encryptionKeys(PeerId peer, String localName) The agent's X25519 encryption pair (per-agent key wrap, SPEC §11a.2), loaded or minted and persisted.signingKeys(PeerId peer, String localName) The agent's Ed25519 signing pair, loaded or minted and persisted.
-
Method Details
-
at
A keystore rooted at a directory, created on first use.- Parameters:
directory- the keystore root- Returns:
- the keystore
-
signingKeys
-
encryptionKeys
-
directory
The keystore root.
-