Utility class for performing common, non-DWN specific encryption operations.

Constructors

Accessors

Methods

  • Decrypts the given cipher stream using AES-256-CTR algorithm.

    Parameters

    • key: Uint8Array
    • initializationVector: Uint8Array
    • cipherStream: Readable

    Returns Promise<Readable>

  • Encrypts the given plaintext stream using AES-256-CTR algorithm.

    Parameters

    • key: Uint8Array
    • initializationVector: Uint8Array
    • plaintextStream: Readable

    Returns Promise<Readable>

  • Decrypt the given plaintext using ECIES (Elliptic Curve Integrated Encryption Scheme) with SECP256K1 for the asymmetric calculations, HKDF as the key-derivation function, and AES-GCM for the symmetric encryption and MAC algorithms.

    Parameters

    Returns Promise<Uint8Array>

  • Encrypts the given plaintext using ECIES (Elliptic Curve Integrated Encryption Scheme) with SECP256K1 for the asymmetric calculations, HKDF as the key-derivation function, and AES-GCM for the symmetric encryption and MAC algorithms.

    Parameters

    • publicKeyBytes: Uint8Array
    • plaintext: Uint8Array

    Returns Promise<EciesEncryptionOutput>