Skip to main content

Crate anima_identity

Crate anima_identity 

Source
Expand description

§Anima Identity — Cryptographic Identity for Life Agents

This crate provides the cryptographic operations for agent identity:

  • Seed management: Single 32-byte master seed → dual keypair derivation
  • Ed25519: Agent Auth Protocol compatible authentication + JWT signing
  • secp256k1: Haima-compatible wallet identity for on-chain economics
  • Keystore: Unified interface for creating and managing agent identity

§Key Derivation

MasterSeed (32 bytes, random)
  ├── HKDF(seed, "anima/ed25519/v1")   → Ed25519 private key
  └── HKDF(seed, "anima/secp256k1/v1") → secp256k1 private key

Both keys are cryptographically independent despite sharing a seed. The seed is encrypted at rest using ChaCha20-Poly1305.

Re-exports§

pub use did::generate_did_key;
pub use did::resolve_did_key;
pub use did::verify_did_key;
pub use keystore::AnimaKeystore;
pub use seed::EncryptedSeed;
pub use seed::MasterSeed;

Modules§

did
DID (Decentralized Identifier) generation and resolution.
ed25519
Ed25519 identity operations — Agent Auth Protocol compatible.
keystore
Keystore — unified identity creation from a single seed.
seed
Seed management — the single secret from which all keys derive.