Grimlock · X25519 + AES-256-GCM + Argon2id · Go · TypeScript · Python · github.com/privyy/grimlock

Privyy.io — Open Cryptographic Infrastructure

GRIMLOCK

Enterprise-grade encryption engineered for every stack. One protocol. Zero translation layer.

AES-256-GCM
Encryption Cipher
X25519
Key Exchange
Argon2id
Key Derivation
HKDF-SHA512
HKDF
14/14
Cross-compat Tests
v1
Protocol Version
01 Why Grimlock

Everything You Need to Keep Secrets Secret

01

End-to-End Encryption

Ephemeral ECDH key pairs guarantee forward secrecy on every message. Context binding via AAD ties each ciphertext to its conversation and prevents cross-context replay.

02

Cross-Platform Parity

Go and TypeScript implementations are byte-for-byte compatible. Data encrypted by your backend is always decryptable by your frontend — verified by an automated cross-compatibility suite.

03

Versioned Protocol

Encrypted payloads carry version markers. When cryptographic standards evolve, you can migrate gracefully without ever losing access to older data.

04

Secure Key Management

Private keys are encrypted at rest using AES-256-GCM with user-derived keys. Sensitive material is zeroed from memory immediately after use.

05

Recovery Keys

Generate cryptographically secure recovery keys with optional BIP39 mnemonic encoding, so users can always regain access to their own data.

06

Memory Security

Both implementations actively erase key material after use. Go leverages memguard-style techniques; TypeScript uses best-effort zeroing with explicit garbage collection hints.

02 Quick Start

The Same API, Across Every Runtime

Install the package for your platform and start encrypting in minutes. The primitives are identical — only the syntax changes.

TypeScript  /  Node.js & Browser
// npm install @privyy-io/grimlock
import grimlock from '@privyy-io/grimlock';

// Generate key pair
const keyPair = await grimlock.generateKeyPair();

// Derive key from user passcode
const key = await grimlock.derivePasscodeKey(passcode, {
  salt, argon2Params: { timeCost: 4,
    memoryCost: 131072, parallelism: 2 }
});

// Encrypt a message end-to-end
const encrypted = await grimlock.encryptMessage(
  payload, recipientPublicKey, context
);

// Decrypt
const decrypted = await grimlock.decryptMessage(
  encrypted, privateKey, context
);
Go
// go get github.com/privyy/grimlock
import "github.com/privyy/grimlock"

// Generate key pair
keyPair, err := grimlock.GenerateKeyPair()

// Derive key from user passcode
params, _ := grimlock.GenerateDefaultKdfParams()
key, err := grimlock.DerivePasscodeKey(
  "passcode", params
)

// Encrypt a message end-to-end
encrypted, err := grimlock.EncryptMessage(
  payload, recipientPublicKey, context
)

// Decrypt
result, err := grimlock.DecryptMessage(
  encrypted, privateKey, context, nil
)
03 Cryptography

Built on the Standards That Matter

Grimlock does not invent new cryptography. It composes proven, well-audited primitives into a cohesive API — so your security relies on decades of peer review, not on novel code.

Primitive Algorithm Purpose
X25519 Elliptic Curve Diffie-Hellman Ephemeral shared secret for message encryption; forward secrecy per session
AES-256-GCM Authenticated Encryption Message and private key encryption with integrity guarantees
Argon2id Memory-Hard KDF Passcode to encryption key derivation; resistant to GPU brute-force
HKDF-SHA512 Key Derivation Function Recovery key derivation and per-message key expansion
CSPRNG Platform Secure Random All nonces, salts, and ephemeral key material
BIP39 (opt.) Mnemonic Encoding Human-readable recovery key representation
04 Platforms

Where Grimlock Runs

🖥

Go

Full implementation using the Go standard library and golang.org/x/crypto. Ideal for backend services, microservices, and CLIs.

Go ≥ 1.21 x/crypto go get
🌐

TypeScript

Works in both Node.js and the browser via Web Crypto API. Tree-shakeable, fully typed, zero native dependencies required for browser builds.

Node ≥ 18 Browser @noble/curves
🐍

Python

Native Python implementation for data pipelines, scripts, and server-side tooling that must interoperate with Go or TypeScript services.

Python ≥ 3.10 pip install Poetry
05 Get Started

Start Encrypting in Minutes

Open Source · Production Ready

Grimlock is open source and built for real applications.

Read the documentation, explore the source, or drop into the repository and contribute. The full stack awaits.