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.
| Operation | Public entry point |
|---|---|
| Signing keys | key_pair, validate_key_pair |
| Detached signatures | sign, verify |
| Recipient encryption | encryption_key_pair, encrypt, decrypt |
| Merkle hashing | data, parent, tree |
| Buffer hashing | hash, hash_into |
| Discovery and namespace tags | discovery_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.