TypeScript implementation of the Kuznechik (GOST R 34.12-2015) symmetric block cipher.
- Strongly typed implementation with
Uint8Array. - Full support for 256-bit keys and 128-bit blocks.
- Verified against standard GOST R 34.12-2015 test vectors.
- Easy integration with modern TypeScript projects.
Copy kuznechik.ts to your project.
import { Kuznechik } from "./kuznechik";
const key = new Uint8Array([
/* 32 bytes */
]);
const cipher = new Kuznechik(key);
const plaintext = new Uint8Array([
/* 16 bytes */
]);
const ciphertext = cipher.encrypt(plaintext);
const decrypted = cipher.decrypt(ciphertext);Run tests using ts-node:
npm testMIT