/// <reference types="node" />
/// <reference types="node" />
import crypto, { CipherKey } from 'crypto';
import { StreamMessage, StreamMessageAESEncrypted, StreamMessageError } from '@streamr/protocol';
import { GroupKey } from './GroupKey';
export declare class DecryptError extends StreamMessageError {
    constructor(streamMessage: StreamMessage, message?: string);
}
export declare const INITIALIZATION_VECTOR_LENGTH = 16;
export declare class EncryptionUtil {
    private static validateRSAPublicKey;
    static encryptWithRSAPublicKey(plaintextBuffer: Uint8Array, publicKey: crypto.KeyLike): Buffer;
    static decryptWithRSAPrivateKey(ciphertext: Uint8Array, privateKey: crypto.KeyLike): Buffer;
    static encryptWithAES(data: Uint8Array, cipherKey: CipherKey): Uint8Array;
    static decryptWithAES(cipher: Uint8Array, cipherKey: CipherKey): Buffer;
    static decryptStreamMessage(streamMessage: StreamMessageAESEncrypted, groupKey: GroupKey): [Uint8Array, GroupKey?] | never;
}
