Skip to content

mcrypto 0.2.0

Latest

Choose a tag to compare

@aelxtpt aelxtpt released this 13 Oct 02:22
7c5ba02

Adds six generic cryptographic and data-processing capabilities in pure Mojo:

  • XEd25519 signatures using raw X25519 keys, with randomized signing, an explicit-randomness API, and strict verification.
  • ML-KEM-512 with FIPS 203 parameters, deterministic test APIs, validated key formats, and implicit ciphertext rejection. ML-KEM-768 and X-Wing share the internal core.
  • HKDF extract and expand for SHA-256 and SHA-512, following RFC 5869.
  • PKCS#7 padding and strict unpadding, separate from raw AES-CBC operations.
  • Unpadded Base64URL encoding and canonical decoding.
  • Bounded decompression for DEFLATE, Zlib, and Gzip, including a total budget across concatenated Gzip members.

Mojo compatibility remains >=1.0.0,<1.1.0. ML-KEM decapsulation now rejects expanded secret keys with inconsistent embedded public-key hashes; valid ML-KEM-768 and X-Wing outputs remain unchanged.

The implementation was validated against public reference vectors, 387 optimized tests, and 55 Linux AddressSanitizer tests. Release validation also passed all 387 optimized tests on macOS arm64 and the actual conda build/install test with Mojo 1.0.0. The conda installation smoke test exercises all six additions, known answers, and rejection paths.

Changes: #2 and #4. Packaging and version metadata: #5.

The Modular community channel update is submitted in modular/modular-community#397. Version 0.2.0 becomes installable from that channel after its maintainers merge and publish the recipe.