| Crates.io | pocx_hashlib |
| lib.rs | pocx_hashlib |
| version | 1.0.0-rc.5 |
| created_at | 2026-01-10 18:39:20.889109+00 |
| updated_at | 2026-01-10 18:39:20.889109+00 |
| description | Universal cryptographic library for Proof-of-Capacity consensus mechanism. Includes SIMD-optimized Shabal256 hashing and nonce generation with support for SSE2, AVX, AVX2, and AVX512. |
| homepage | https://bitcoin-pocx.org/ |
| repository | https://github.com/PoC-Consortium/pocx |
| max_upload_size | |
| id | 2034527 |
| size | 390,409 |
Core cryptographic library for PoCX with SIMD-optimized Shabal256 implementations.
use pocx_hashlib::{
find_best_quality, calculate_scoop,
generate_nonces, calculate_next_generation_signature
};
// Calculate next generation signature
let next_gen_sig = calculate_next_generation_signature(&old_gen_sig, &public_key);
// Calculate scoop number for current block
let scoop = calculate_scoop(block_height, &next_gen_sig);
// Find best quality in plot data
let (quality, index) = find_best_quality(plot_data, nonce_count, &next_gen_sig);
// Generate nonces for plotting
generate_nonces(
&mut cache, cache_offset,
&address_payload, &seed,
start_nonce, nonce_count
)?;
# Standard build
cargo build --release -p pocx_hashlib
# Run tests
cargo test -p pocx_hashlib
# Benchmarks
cargo bench -p pocx_hashlib
calculate_scoop(height, gen_sig) - Get scoop number for miningfind_best_quality(data, count, gen_sig) - Find best quality in plot datagenerate_nonces(...) - Generate plot file noncescalculate_quality_raw(...) - Calculate individual nonce qualitycalculate_next_generation_signature(old_sig, pub_key) - Calculate next generation signaturedecode_generation_signature(hex) - Parse hex generation signatureMIT License - See LICENSE for details.