| Crates.io | p47h-open-core |
| lib.rs | p47h-open-core |
| version | 0.10.1 |
| created_at | 2026-01-03 06:42:00.596769+00 |
| updated_at | 2026-01-15 08:11:07.258184+00 |
| description | Cryptographic primitives and policy engine for secure identity management |
| homepage | https://p47h.com |
| repository | https://github.com/p47h-org/p47h-open-core |
| max_upload_size | |
| id | 2019698 |
| size | 62,755 |
The cryptographic primitive layer for the P47H ecosystem.
This crate provides the low-level Rust implementation of the vault encryption logic, compiled to WebAssembly. It handles key derivation, memory isolation, and stateless authorization primitives.
Included:
Architecture Note: This repository represents the v2 architecture (Rust/WASM) of the P47H core. It supersedes previous prototypes to ensure strict memory safety guarantees.
This is a low-level core library.
If you are a web developer looking to implement secure storage in your application, use the high-level SDK:
Direct usage of this crate is recommended only for:
Layer 1: Core (no_std compatible)
* core-identity (Ed25519, DID generation)
* core-policy (Stateless authorization logic)
Layer 2: Application Logic
* app-if-ipc (Interfaces, Dependency Inversion)
* app-utils (YAML parsing, timestamps)
Layer 3: Engine & Adapters
* p47h-engine (Core engine - pure rlib, reusable)
* p47h-wasm-oss (Open Source WASM bindings - cdylib)
* cli (Command-line tools)
| Algorithm | Purpose | Library |
|---|---|---|
| Ed25519 | Identity signing | ed25519-dalek |
| Argon2id | Key derivation | argon2 |
| XChaCha20-Poly1305 | Authenticated encryption | chacha20poly1305 |
| BLAKE3 | Hashing | blake3 |
| Zeroize | Memory clearing | zeroize |
git clone [https://github.com/p47h-org/p47h-open-core](https://github.com/p47h-org/p47h-open-core)
cd p47h-open-core
cargo build --release --workspace
# Install wasm-pack
cargo install wasm-pack
# Build for web (Open Source WASM wrapper)
cd crates/p47h-wasm-oss
wasm-pack build --target web --release
The output will be in pkg/ directory.
# All tests
cargo test --workspace
# With coverage
cargo tarpaulin --workspace --out Html
cargo clippy --workspace --all-features -- -D warnings
The core maintains unit tests for cryptographic primitives, policy evaluation, and identity management. Tests cover standard vectors and edge cases.
# Run all tests
cargo test --workspace
# Run with verbose output
cargo test --workspace -- --nocapture
Continuous fuzzing infrastructure is initialized using cargo-fuzz (libFuzzer) to detect panics, memory issues, and edge cases in parsing logic.
Available fuzz targets (core-policy):
| Target | Purpose |
|---|---|
fuzz_path_pattern |
Path pattern matching edge cases |
fuzz_policy_from_toml |
TOML policy parsing robustness |
fuzz_wildcard_match |
Wildcard matching correctness |
# Install cargo-fuzz
cargo install cargo-fuzz
# Run a fuzz target (requires nightly)
cd crates/core-policy
cargo +nightly fuzz run fuzz_policy_from_toml
If you discover a security vulnerability, report it via email to:
Do not open public issues for security vulnerabilities. We acknowledge reports within 48 hours.
git checkout -b feature/name)cargo test && cargo clippy)git commit -s)All contributors must sign the Contributor License Agreement (CLA) before their PR can be merged.
See CONTRIBUTING.md for details.
Apache License 2.0. See LICENSE for full terms.