@hicaru/ntrup.js
Version:
Pure JavaScript implementation of NTRU Prime post-quantum cryptography algorithm
22 lines • 1.1 kB
TypeScript
import { ParamsConfig } from '../params';
export declare const BITS_SIZE = 6;
export declare const SYS_SIZE = 8;
export declare function usizeArrayToBytes(list: number[]): Uint8Array;
export declare function bytesToUsizeArray(bytes: Uint8Array): number[];
export declare function packBytes(dataBytes: Uint8Array, size: number[], seed: bigint): Uint8Array;
export declare function unpackBytes(bytes: Uint8Array): {
dataBytes: Uint8Array;
size: number[];
seed: bigint;
};
export declare function convertToTernary(num: number): Int8Array;
export declare function convertToDecimal(ternary: Int8Array | ArrayLike<number>): number;
export declare function r3EncodeChunks(r3: Int8Array): Uint8Array;
export declare function r3DecodeChunks(bytes: Uint8Array): Int8Array;
export declare function r3MergeWChunks(chunks: Int8Array[], size: number[], seed: bigint, params: ParamsConfig): Int8Array;
export declare function r3SplitWChunks(input: Int8Array, rng: () => number, params: ParamsConfig): {
chunks: Int8Array[];
size: number[];
seed: bigint;
};
//# sourceMappingURL=r3.d.ts.map