@li0ard/kuznyechik
Version:
Kuznyechik cipher implementation in pure TypeScript
34 lines (33 loc) • 1.33 kB
TypeScript
/**
* Encrypts data using the Counter with Advance Cryptographic Prolongation of Key Material (CTR-ACPKM) mode with Kuznyechik cipher
* @param key Encryption key
* @param data Data to be encrypted
* @param iv Initialization vector
* @returns {Uint8Array}
*/
export declare const encryptCTR_ACPKM: (key: Uint8Array, data: Uint8Array, iv: Uint8Array) => Uint8Array;
/**
* Decrypts data using the Counter with Advance Cryptographic Prolongation of Key Material (CTR-ACPKM) mode with Kuznyechik cipher
* @param key Encryption key
* @param data Data to be decrypted
* @param iv Initialization vector
* @returns {Uint8Array}
*/
export declare const decryptCTR_ACPKM: (key: Uint8Array, data: Uint8Array, iv: Uint8Array) => Uint8Array;
/**
* ACPKM key derivation
* @param key Encryption key
*/
export declare const acpkmDerivation: (key: Uint8Array) => Uint8Array;
/**
* ACPKM master key derivation
* @param key Encryption key
* @param keySize Length of key material
*/
export declare const acpkmDerivationMaster: (key: Uint8Array, keySize: number) => Uint8Array;
/**
* Compute MAC with Advance Cryptographic Prolongation of Key Material (OMAC-ACPKM) with Kuznyechik cipher
* @param key Encryption key
* @param data Input data
*/
export declare const omac_ACPKM: (key: Uint8Array, data: Uint8Array) => Uint8Array;