ubl-crypto
Crypto primitives for the LogLine Workspace.
Features
Hashing
blake3_hex— BLAKE3 hash → hex stringblake3_cid— BLAKE3 hash →Cid32(ubl-types)blake3_cid_chunks— Incremental BLAKE3 →Cid32
Ed25519 Signatures
SecretKey,Keypair— Key management with zeroizesign_cid_hex,verify_cid_hex— Sign/verify CID hex stringssign_bytes,verify_bytes— Sign/verify withubl-typeswrappersderive_public_bytes— DerivePublicKeyBytesfrom secret seed
HMAC
hmac_sign,hmac_verify— HMAC-SHA256 with base64url
DID:key
did_key_encode_ed25519,did_key_decode_ed25519— Ed25519 DID encoding
Key IDs
key_id_v1,key_id_v2— Key identifier formats
Installation
[]
= "0.3"
Quick Example
use ;
// BLAKE3 → Cid32
let cid = blake3_cid;
println!;
// Ed25519 with fixed seed (deterministic)
let sk = ;
let pk = derive_public_bytes;
let sig = sign_bytes;
assert!;
Roadmap
- Key rotation (KID + grace period)
- AEAD for evidence encryption
- KMS adapters
License
MIT OR Apache-2.0 © LogLine Foundation