Home › Security

Security

Crypto primitives you can actually use, auth, secrets and defending real systems.

Crypto primitives

Pick these, never roll your own.

AEAD (AES-GCM, ChaCha20-Poly1305)

low

Authenticated encryption that encrypts and detects tampering in one call; the only kind of symmetric encryption you should use.

O(n) per message; AES-GCM order of 1 cycle/byte with AES-NI, ChaCha20-Poly1305 order of 1-3 cycles/byte with SIMD

Password hashing (Argon2id)

low

Memory-hard, salted, deliberately slow hashing so stolen password databases can't be cracked cheaply on GPUs.

O(t·m) time and O(m) memory per hash; tuned to order of 10-100 ms and 19-64 MiB

Digital signatures (Ed25519)

low

Small, fast, deterministic public-key signatures that prove who produced a message; the default for tokens, releases and protocols.

sign order of 10-20 µs, verify order of 30-60 µs per core; 32 B public key, 64 B signature

Cryptographic hashes (SHA-2, BLAKE3)

low

Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.

O(n); SHA-256 order of 1-2 GB/s per core with SHA extensions, BLAKE3 order of several GB/s per core and parallel across cores

TLS 1.3

medium

The standard encrypted, authenticated transport; one round trip, only forward-secret AEAD suites, and little left to misconfigure.

full handshake 1 RTT (0-RTT on resumption, replayable); handshake CPU order of 0.1-1 ms; bulk AEAD at GB/s per core

rsa cryptosystem

Planned.

ECDSA signatures

low

The elliptic-curve signature standardised in FIPS 186-5 (P-256) and used by secp256k1 ledgers; 64-byte signatures, but a repeated or biased nonce leaks the private key.

sign one fixed-base scalar multiplication; verify one double-scalar multiplication; 64 B raw signature, 33 or 65 B public key

ECDH key exchange (X25519, P-256)

low

Each side multiplies the other's public curve point by its own scalar and both get the same point; always validate the peer key and run the result through a KDF.

one scalar multiplication per side (255 ladder steps for X25519); 32 B public key (X25519), 65 B (P-256 uncompressed)

Message authentication codes (HMAC, CMAC, Poly1305, KMAC)

low

A keyed short tag proving a message is unmodified and came from a key holder; pick HMAC, CMAC, KMAC or a one-time polynomial MAC by what primitive you already have.

O(n) per message; HMAC-SHA256 costs the hash of the message plus 2 compressions, CMAC one block-cipher call per 16 B

HKDF key derivation (extract-and-expand)

low

HMAC-based two-step key derivation: extract a uniform pseudorandom key from any secret, then expand it into as many context-bound keys as you need.

extract 1 HMAC; expand ceil(L/HashLen) sequential HMACs; L at most 255*HashLen (8160 B with SHA-256)

csprng

Planned.

keccak sha3

Planned.

post quantum kem

Planned.

Authentication & authorization

Proving who someone is and what they may do.

Sessions vs tokens

low

Opaque server-side sessions in cookies for browsers, short-lived signed tokens between services; revocation decides most cases.

OAuth 2 and OpenID Connect

low

Delegated authorization (OAuth 2) and login on top of it (OIDC); use authorization code + PKCE for every user-facing client.

Passkeys (WebAuthn)

low

Phishing-resistant login with a per-site key pair held by the device or password manager; the server stores only a public key.

Authorization models (RBAC, ABAC, ReBAC)

low

How to decide who may do what to which object; roles for coarse rules, relationships for sharing, and checks on every object.

JSON Web Token (JWT)

low

A signed, URL-safe token carrying claims; the verifier's job is the checklist (pinned algorithm, key by kid, exp, aud, iss), not the format.

verify O(n) in token size: one hash pass plus one MAC or signature check; claim checks O(1)

mfa

Planned.

One-time codes (HOTP, TOTP)

low

Short numeric codes derived from a shared secret plus a counter or the clock (HOTP, TOTP), or random codes sent by SMS or email; safe only with expiry, single use and attempt limits.

one HMAC-SHA-1 per candidate code; verify with a +-1 step window costs 3 HMACs, about 2.8 µs measured

saml

Planned.

scim provisioning

Planned.

scram authentication

Planned.

Password-authenticated key exchange (PAKE)

low

Both sides blind a Diffie-Hellman message with a password-derived group element, so an attacker gets one guess per run and nothing to brute-force offline.

SPAKE2 about 4 scalar multiplications per side, 2 messages plus 2 confirmation tags; an active attacker tests one password per run

ldap directory

Planned.

AKA (authentication and key agreement)

medium

Symmetric-key challenge-response in which a chip and its home server prove knowledge of one key, with a sequence number for freshness, and derive session keys.

card: 3 to 5 keyed-function calls per challenge (Milenage: 5 AES-128 blocks); serving side: 1 comparison; toy functions 8.5 ns per card check measured

Application security

The bugs attackers actually use.

Operational security

Keys, dependencies and blast radius.

Applied cryptography

Using primitives correctly: key wrapping, disk and format-preserving encryption, constant-time code.

Multi-party & privacy-preserving crypto

Splitting trust across parties and computing on data nobody sees whole.

Shamir secret sharing (k-of-n)

low

Split a secret into n shares so any k reconstruct it and any k-1 reveal nothing at all, using a random polynomial over a finite field.

split O(n*k) field multiplications per secret byte; combine O(k^2) once for the weights, then O(k) per byte; each share is as long as the secret

threshold cryptography

Planned.

threshold ecdsa mpc

Planned.

secure multiparty computation

Planned.

private set intersection

Planned.

homomorphic encryption

Planned.

mix networks

Planned.

bls signature aggregation

Planned.

selective disclosure credentials

Planned.

secure aggregation

Planned.

Proof systems

Succinct and zero-knowledge proofs: commitments, arithmetization, recursion.

sigma protocols

Planned.

sumcheck protocol

Planned.

fiat shamir transform

Planned.

pairing based cryptography

Planned.

multi scalar multiplication

Planned.

algebraic hash poseidon

Planned.

circuit arithmetization

Planned.

polynomial commitment schemes

Planned.

proof recursion folding

Planned.

Access control & request signing

Enforcing decisions on every request: policies, capabilities, signed requests, approvals.

Certificates & PKI

Issuing, validating and auditing certificates and signatures.

Secure channels & messaging

Authenticated encrypted transports and end-to-end messaging protocols.

Hardware trust

Keys and measurements anchored in hardware: HSMs, enclaves, TPMs, secure boot.

Sandboxing & isolation

Confining untrusted code: syscall filters, microVMs, in-process sandboxes, side channels.

Process sandboxing

medium

Run risky work in a separate, deliberately powerless process and let a small privileged broker do the few things it needs, over a narrow pipe.

one extra process per sandbox; per-message cost is one pipe round trip, setup costs a spawn (3.6-4.2 ms measured on a Mac)

microvm isolation

Planned.

isolate multitenancy

Planned.

software fault isolation

Planned.

microarchitectural side channels

Planned.

egress proxy filtering

Planned.

seccomp bpf

Planned.

syscall interception

Planned.

guard pages memory sandboxing

Planned.

Abuse & bot defense

Telling real users from bots and abusers without hurting real users.

Threat detection & malware analysis

Finding malicious files, processes and hosts.

yara rule matching

Planned.

fuzzy hashing

Planned.

binary emulation

Planned.

memory integrity scanning

Planned.

process tree tracking

Planned.

os event tracing

Planned.

network service fingerprinting

Planned.

port scanning

Planned.

code obfuscation

Planned.

Privacy engineering

Releasing data and statistics without exposing individuals.

differential privacy

Planned.

privacy budget accounting

Planned.

randomized response

Planned.

k anonymity

Planned.

data deidentification

Planned.

Data masking

medium

Hide sensitive field values from people and systems that don't need them, by masked copies or role-based masking at read time, while keeping joins and formats working.

O(1) per value; one HMAC-SHA256 (about 2 compression calls with cached key state) per pseudonymised value

salted visitor hashing

Planned.

invisible watermarking

Planned.