Skip to content

crypto — Overview

A comprehensive, pure Vex cryptographic suite. No OpenSSL, no libsodium — every algorithm is implemented natively with full memory safety.

Module Map

CategoryAlgorithmsFiles
HashesSHA-1, SHA-256, SHA-512, BLAKE2bsha1.vx, sha256.vx, sha512.vx, blake2b.vx
MACsHMAC (any hash)hmac.vx
AEADAES-GCM, ChaCha20-Poly1305aes_gcm.vx, chacha20.vx, poly1305.vx, aead.vx
SymmetricAES (128/256)aes.vx
KDFArgon2id, PBKDF2, HKDFargon2id.vx, pbkdf2.vx, hkdf.vx
SignaturesEd25519ed25519.vx
Key ExchangeX25519 (ECDH)x25519.vx
Field MathCurve25519 fieldfield25519.vx
EncodingHex, Base64hex.vx, base64.vx
UtilitiesByte ops, SIMD helpersbytes.vx, simd.vx, utils.vx

Design Principles

  1. Pure Vex: No C FFI calls — the compiler can inline and vectorize everything
  2. Hardware Acceleration: When Crypto.* builtins are available (AES-NI, ARMv8 CE), they are used transparently
  3. Software Fallbacks: Every algorithm works on every platform via bit intrinsics
  4. Constant-Time: Timing-safe comparison functions in utils.vx

Released under the MIT License.