cyphr 0.1.0

Cyphr self-sovereign identity protocol
Documentation

cyphr

Rust core library implementation of the Cyphr self-sovereign identity protocol.

This crate provides the core cryptographic state machines, validation logic, and data structures for the protocol:

  • Principal: The core state container (identity, feature level, roots).
  • coz verification: Verification and structural parsing of Coz payloads.
  • Transactions & Commits: Multi-coz atomic commits to mutate identity state.

For storage backends (like FileStore), see the cyphr-storage crate. For the reference command-line interface, see cyphr-cli.

Quick Start

use cyphr::{Principal, Key};
use coz::Algorithm;

fn main() -> cyphr::error::Result<()> {
    // Generate a new key
    let key = Key::generate(Algorithm::ES256)?;

    // Implicit genesis: single key, identity = thumbprint
    let principal = Principal::implicit(key)?;

    println!("Identity (PR): {:?}", principal.pr());
    println!("Level: {:?}", principal.level());
    Ok(())
}

Documentation