Crate core_identity

Crate core_identity 

Source
Expand description

§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;

// 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)?;

Modules§

hash
Hash provider abstraction for identity operations

Structs§

Identity
Cryptographic identity based on Ed25519
SerializableVerifyingKey
Serializable representation of a public key

Enums§

IdentityError
Specific errors for cryptographic identity operations

Functions§

verify_signature
Verifies a signature for a given message and public key

Type Aliases§

Result
Specific Result type for identity operations