Skip to main content

Crate auths_core

Crate auths_core 

Source
Expand description

§auths-core

Core cryptographic primitives and secure key storage for Auths.

This crate provides:

§Quick Start

use auths_core::storage::keychain::get_platform_keychain;
use auths_core::signing::{StorageSigner, SecureSigner};

// Get the platform-appropriate keychain
let keychain = get_platform_keychain()?;
let signer = StorageSigner::new(keychain);

// Sign with a stored key
let signature = signer.sign_with_alias("my-key", &provider, b"message")?;

§Feature Flags

  • keychain-linux-secretservice — Enable Linux Secret Service backend
  • keychain-windows — Enable Windows Credential Manager backend
  • keychain-file-fallback — Enable encrypted file storage fallback
  • crypto-secp256k1 — Enable secp256k1/BIP340 for Nostr
  • test-utils — Export test utilities (e.g., in-memory keychain for testing)

§Platform Support

PlatformKeychainFeature Required
macOS/iOSKeychain Services(default)
LinuxSecret Servicekeychain-linux-secretservice
WindowsCredential Managerkeychain-windows
AnyEncrypted filekeychain-file-fallback

Re-exports§

pub use agent::AgentCore;
pub use agent::AgentHandle;
pub use agent::AgentSession;
pub use agent::AgentStatus;
pub use agent::add_identity;
pub use agent::agent_sign;
pub use agent::check_agent_status;
pub use agent::list_identities;
pub use agent::remove_all_identities;
pub use crypto::EncryptionAlgorithm;
pub use crypto::SignerKey;
pub use error::AgentError;
pub use error::AuthsErrorInfo;
pub use signing::PrefilledPassphraseProvider;

Modules§

agent
Agent runtime and IPC.
api
Public API types and runtime.
config
Configuration types.
crypto
Cryptographic primitives.
error
Error types for agent and core operations.
keri_did
Newtype for did:keri:<prefix> identifiers.
pairing
Pairing protocol for cross-device identity linking.
paths
Shared path resolution for the Auths home directory.
policy
Policy engine for authorization decisions.
ports
Port traits for dependency injection.
proto
Protocol message types.
server
HTTP server for agent signing (not yet implemented).
signing
Signing abstractions and DID resolution.
storage
Key storage backends.
trust
Trust policy and resolution for verifying identity root keys.
utils
Utility helpers.
witness
Witness infrastructure for split-view defense.