/// import { PrivKey } from '@noble/curves/abstract/utils'; import { PubKey } from '@noble/curves/abstract/weierstrass'; export declare const IV_LENGTH = 16; /** * NIST 8000-56C Rev 1 One Step KDF with the following parameters: * - H(x) is SHA-256(x) * - Fixed info is null * * TODO: * - Implement proper ceiling on reps. * * @param {Buffer} px Input keying material to derive key from. * @param {number} kdLen Length of output in bytes * @returns {Buffer} Output keying material of length kdLen bytes. */ export declare const ConcatKDF: (px: Buffer, kdLen: number) => Buffer; /** * AES-128 CTR encrypt * @param {Uint8Array} encryptionKey * @param {Uint8Array} iv * @param {Uint8Array} plaintext * @returns {Uint8Array} ciphertext */ export declare function AES128Encrypt(encryptionKey: Uint8Array, iv: Uint8Array, plaintext: Uint8Array): Uint8Array; /** * AES-128 CTR encrypt with message authentication * @param {Uint8Array} encryptionKey * @param {Uint8Array} macKey * * @param {Uint8Array} plaintext * @returns {Uint8Array} ciphertext */ export declare function AES128EncryptAndHMAC(encryptionKey: Uint8Array, macKey: Uint8Array, plaintext: Uint8Array): Uint8Array; /** * AES-128 CTR decrypt * @param {Uint8Array} encryptionKey * @param {Uint8Array} iv * @param {Uint8Array} ciphertext * @returns {Uint8Array} plaintext */ export declare function AES128Decrypt(encryptionKey: Uint8Array, iv: Uint8Array, ciphertext: Uint8Array): Uint8Array; /** * AES-128 CTR decrypt with message authentication * @param {Uint8Array} encryptionKey * @param {Uint8Array} macKey * @param {Uint8Array} ciphertext * @returns {Uint8Array} plaintext */ export declare function AES128DecryptAndHMAC(encryptionKey: Uint8Array, macKey: Uint8Array, ciphertext: Uint8Array): Uint8Array; /** * ECIES encrypt * @param {Buffer} pubKeyTo Ethereum pub key, 64 bytes. * @param {Uint8Array} plaintext Plaintext to be encrypted. * @returns {Buffer} Encrypted message, serialized, 113+ bytes */ export declare function Encrypt(pubKeyTo: PubKey, plaintext: Uint8Array): Buffer; /** * ECIES decrypt * @param {Buffer} privKey Ethereum private key, 32 bytes. * @param {Buffer} encrypted Encrypted message, serialized, 113+ bytes * @returns {Buffer} plaintext */ export declare function Decrypt(privKey: PrivKey, encrypted: Buffer): Uint8Array; export declare const ECIES: { Encrypt: typeof Encrypt; Decrypt: typeof Decrypt; AES128EncryptAndHMAC: typeof AES128EncryptAndHMAC; AES128DecryptAndHMAC: typeof AES128DecryptAndHMAC; };