Security & Identity ยท zero-dependency ยท MIT

larzcrypt

Real SHA-256, HMAC and AEAD encryption.

Real SHA-256 (FIPS 180-4) and HMAC-SHA256, PBKDF2 key derivation, and a genuine encrypt-then-MAC AEAD construction. Honest about the ceiling: X25519/Ed25519 need arbitrary-precision integers for the elliptic-curve math, and Larzscript's only numeric type is a double - not a general-purpose asymmetric-crypto library.

larzscript pkg install crypto
View on GitHub →Learn the stack

What you get

Try it

import "crypto" as crypto
print(crypto.sha256("hello"))
print(crypto.hmac("secret", "message"))
let key = crypto.pbkdf2("my-password", "salt123", 10)
let enc = crypto.aead_encrypt(key, "secret data", "ctx")
print(crypto.aead_decrypt(key, enc["ciphertext"], enc["mac"], "ctx"))
Output
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
8b5f48702995c1598c573db1e21866a9b825d4a794d169d7060a03605796360b
secret data

Why it's in the Larz Stack

larzcrypt is a real Larzscript package (larzscript pkg install crypto) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.