@hicaru/ntrup.js
Version:
Pure JavaScript implementation of NTRU Prime post-quantum cryptography algorithm
15 lines • 827 B
TypeScript
import type { ChaChaRng } from "@hicaru/chacharand.js";
import { ParamsConfig } from '../params';
import { PrivKey } from '../key/priv_key';
import { PubKey } from '../key/pub_key';
import { Rq } from '../poly/rq';
import { R3 } from '../poly/r3';
export declare function rqDecrypt(c: Rq, privKey: PrivKey, params: ParamsConfig): R3;
export declare function r3Encrypt(r: R3, pubKey: PubKey, params: ParamsConfig): Rq;
export declare function staticBytesEncrypt(bytes: Uint8Array, pubKey: PubKey, params: ParamsConfig): Uint8Array;
export declare function staticBytesDecrypt(cipherBytes: Uint8Array, privKey: PrivKey, params: ParamsConfig): Uint8Array;
export declare function generateKeyPair(rng: ChaChaRng, params: ParamsConfig, maxAttempts?: number): {
sk: PrivKey;
pk: PubKey;
};
//# sourceMappingURL=cipher.d.ts.map