core-identity 0.10.0

Identity management and DID resolution for P47H
Documentation

identity

Cryptographic identities for p47h based on Ed25519.

This crate provides secure, auditable, and memory-safe identity management using industry-standard Ed25519 signatures with proper key hygiene.

Features

  • Ed25519 Signatures: NIST-compliant digital signatures
  • Memory Safety: Automatic zeroization of private keys
  • Blake3 Hashing: Fast public key hashing for lookups
  • libp2p Integration: Seamless conversion to libp2p keypairs

Example

use core_identity::Identity;

# fn example() -> Result<(), Box<dyn std::error::Error>> {
// Generate a new identity
let mut rng = rand::thread_rng();
let identity = Identity::generate(&mut rng)?;

// Sign a message
let message = b"Hello, network!";
let signature = identity.sign(message);

// Verify the signature
use core_identity::verify_signature;
verify_signature(&identity.verifying_key(), message, &signature)?;
# Ok(())
# }