Crate p47h_open_core

Crate p47h_open_core 

Source
Expand description

§p47h-open-core

Cryptographic primitives and policy engine for secure identity management.

This crate provides a unified API for the P47H ecosystem’s core functionality:

  • Identity Management: Ed25519 key generation and DID resolution
  • Policy Engine: Pure RBAC/ABAC authorization without external dependencies
  • WASM Engine: The core logic for browser-based vault operations

§Quick Start

use p47h_open_core::identity::Identity;

// Generate a new cryptographic identity
let mut rng = rand::thread_rng();
let identity = Identity::generate(&mut rng).expect("Failed to generate identity");
println!("Public key hash: {:?}", identity.public_key_hash());

§Architecture

This facade crate re-exports the following modules:

  • identity - Ed25519 identity management (from core-identity)
  • policy - Authorization policy engine (from core-policy)
  • engine - WASM-ready vault engine (from p47h-engine)

§Feature Flags

  • wasm - Enable WebAssembly-specific optimizations (coming soon)

§Security

All cryptographic operations use audited, production-ready libraries:

  • Ed25519 signatures via ed25519-dalek
  • Argon2id key derivation via argon2
  • XChaCha20-Poly1305 encryption via chacha20poly1305
  • Memory zeroization via zeroize

Modules§

engine
Core engine module.
identity
Identity management module.
policy
Policy engine module.

Structs§

Identity
Cryptographic identity based on Ed25519
Policy
A policy containing multiple rules

Enums§

Action
Action that can be performed on a resource
Resource
Resource that can be accessed