View Source NKEYS.Xkeys (nkeys v0.3.0)

Contains functions for using curve (X) keys for sending and receiving encrypted messages

Summary

Functions

Performs authenticated decryption by extracting data from the ed25519 "box". Note that the keys passed to this function need to come from the Nkeys.Keypair struct fields and must not be human-friendly encoded strings.

Performs authenticated encryption by creating a ed25519 "box". Note that the keys passed to this function need to be raw keys, e.g. keypair.public_key and keypair.private_key and must not be in the human-friendly string encoding format.

Functions

Link to this function

open(input, our_secret, their_public)

View Source
@spec open(input :: binary(), our_secret :: binary(), their_public :: binary()) ::
  {:ok, binary()} | :error

Performs authenticated decryption by extracting data from the ed25519 "box". Note that the keys passed to this function need to come from the Nkeys.Keypair struct fields and must not be human-friendly encoded strings.

Link to this function

seal(input, their_public, our_secret)

View Source
@spec seal(input :: binary(), their_public :: binary(), our_secret :: binary()) ::
  binary()

Performs authenticated encryption by creating a ed25519 "box". Note that the keys passed to this function need to be raw keys, e.g. keypair.public_key and keypair.private_key and must not be in the human-friendly string encoding format.