ilusm.dev

cryx

extended cryptography: RSA, ECDSA, Ed25519, X25519, ECDH, key derivation, certificates.

Load with: use cryx

Quick example

use cryx

result = cryrgn("value")
prn(result)

Functions

RSA

cryrgn(bits)

Performs the operation. Takes bits.

cryrpu(kp)

Performs the operation. Takes kp.

cryrpv(kp)

Performs the operation. Takes kp.

cryrec(pubkey, pt)

Performs the operation. Takes pubkey, pt.

cryrdc(privkey, ct)

Performs the operation. Takes privkey, ct.

cryrsg(privkey, mh)

Performs the operation. Takes privkey, mh.

cryrvf(pubkey, mh, sig)

Performs the operation. Takes pubkey, mh, sig.

ECDSA

cryecc()

Performs the operation.

cryecg(curve)

Performs the operation. Takes curve.

cryecs(privkey, mh, curve)

Performs the operation. Takes privkey, mh, curve.

cryecv(pubkey, mh, sig, curve)

Performs the operation. Takes pubkey, mh, sig, curve.

Ed25519

cryedg()

Performs the operation.

cryeds(privkey, msg)

Performs the operation. Takes privkey, msg.

cryedv(pubkey, msg, sig)

Performs the operation. Takes pubkey, msg, sig.

X25519 (key exchange)

cryx2g()

Performs the operation.

cryx2d(privkey, pubkey)

Performs the operation. Takes privkey, pubkey.

ECDH

crydhg(curve)

Performs the operation. Takes curve.

crydhs(privkey, pubkey, curve)

Performs the operation. Takes privkey, pubkey, curve.

Key serialization (b64 wire format)

crykwr(kb)

Writes data. Takes kb.

crykuw(b64s)

Performs the operation. Takes b64s.

Hybrid encryption: RSA-KEM + AES-GCM

cryhec(rsa_pub, pt)

Performs the operation. Takes rsa_pub, pt.

cryhdc(rsa_priv, env)

Performs the operation. Takes rsa_priv, env.

Notes

  • Extended crypto - X25519, Ed25519, post-quantum primitives.