saffron-crypto v1.2.0 MIT 8.3k - 98

SIMD-accelerated AES and SHA256 hashing routines.

rnx add saffron-crypto

saffron-crypto

SIMD-accelerated hashing routines over Vec4f lanes. Four parallel digests per instruction, no heap traffic in the hot loop.

Lane mixing

Vectors cross function boundaries as params and returns on every backend:

.rnx
import { Vec4f } from "@std/simd";


let block = new Vec4f(1.0, 2.0, 3.0, 4.0);
let key = Vec4f.splat(0.5);
let scaled = block * key;
print(scaled.dot(key));

Key schedule preview

.rnx
import { Vec4f } from "@std/simd";


let k = Vec4f.splat(1.0);
print(k.get(0), k.get(3));