L1fe Crypto
Usage
Using `l1fe-crypto` from application code: keypair generation, signatures, encryption, and discovery key derivation.
Purpose
L1FE crypto compatibility crate for keypairs, signatures, encryption, Merkle nodes, namespaces, and discovery keys.
This page follows the real source shape for L1fe Crypto and explains the workflow a developer is likely to use first.
Developer workflow
Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.
Primary types to know
EncryptionKeyPair— l1feid/l1fe-crypto/src/lib.rsKeyPair— l1feid/l1fe-crypto/src/lib.rsNode— l1feid/l1fe-crypto/src/lib.rsCryptoError— l1feid/l1fe-crypto/src/lib.rsNamespaceCount— l1feid/l1fe-crypto/src/lib.rs
Example shape
use l1fe_crypto::{KeyPair, sign, verify};
fn main() {
let kp = KeyPair::generate();
let msg = b"l1fe crypto demo";
let sig = sign(&kp, msg);
assert!(verify(kp.public_key(), msg, &sig));
}