Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kuznechik JS SDK

Vanilla JavaScript implementation of the Kuznechik (GOST R 34.12-2015) symmetric block cipher.

Features

  • Full support for 256-bit keys and 128-bit blocks.
  • Optimized for performance with precomputed inverse S-box and round constants.
  • Verified against standard GOST R 34.12-2015 test vectors.
  • No dependencies.

Installation

Just copy kuznechik.js to your project or use require:

const { Kuznechik } = require("./kuznechik");

Usage

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);

Testing

Run the included test suite:

npm test

License

MIT

About

Vanilla JavaScript implementation of the "Kuznechik" (GOST R 34.12-2015) symmetric block cipher.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages