@li0ard/gost341194
Version:
GOST R 34.11-94 hash function in pure TypeScript
13 lines (12 loc) • 506 B
JavaScript
import { sboxes as sboxes_ } from "@li0ard/magma";
export const sboxes = sboxes_;
export const DEFAULT_SBOX = sboxes.ID_GOSTR_3411_94_CRYPTOPRO_PARAM_SET;
export const BLOCKSIZE = 32;
export const C2 = new Uint8Array(32);
export const C3 = new Uint8Array([
0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00,
0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00
]);
export const C4 = new Uint8Array(32);