Weave documentation
L1fe Crypto

Internals

Compatibility hashing, namespaces, sealed boxes, and return-type boundaries.

Compatibility boundary

The implementation in l1feid/l1fe-crypto/src/lib.rs uses sodiumoxide for cryptographic operations. Its KeyPair, EncryptionKeyPair and Merkle Node are byte-oriented containers. The similarly named weave-crypto package has different implementations and error-return conventions; naming alone does not establish byte-for-byte compatibility.

OperationPublic entry point
Signing keyskey_pair, validate_key_pair
Detached signaturessign, verify
Recipient encryptionencryption_key_pair, encrypt, decrypt
Merkle hashingdata, parent, tree
Buffer hashinghash, hash_into
Discovery and namespace tagsdiscovery_key, namespace

Namespace indices are cast to u8: keep distinct indices in 0..=255 to avoid wraparound collisions.

This crate does not export hkdf_sha256 or derive_nonce. free is a compatibility no-op; calling it does not erase arbitrary caller-owned buffers. Keep serialization and test vectors tied to the exact package and source version.

Source reference

Exact declarations and source provenance · Package features and manifest.

On this page