Univrse.Alg.ECIES_BIE1 (Univrse v0.2.0) View Source

ECIES_BIE1 algorithm module.

Implements Electrum-flavoured ECIES encryption and decryption.

Link to this section Summary

Functions

Decrypts the cyphertext with the key using the specified algorithm.

Encrypts the message with the key using the specified algorithm. Returns a three part tuple containing the encrypted cyphertext and any headers to add to the Recipient.

Link to this section Functions

Link to this function

decrypt(alg, encrypted, key, opts \\ [])

View Source

Specs

decrypt(String.t(), binary(), Univrse.Key.t(), keyword()) ::
  {:ok, binary()} | {:error, any()}

Decrypts the cyphertext with the key using the specified algorithm.

Link to this function

encrypt(alg, message, key, opts \\ [])

View Source

Specs

encrypt(String.t(), binary(), Univrse.Key.t(), keyword()) ::
  {:ok, binary(), map()} | {:error, any()}

Encrypts the message with the key using the specified algorithm. Returns a three part tuple containing the encrypted cyphertext and any headers to add to the Recipient.