Curve25519 (Curve25519 v1.0.4) View Source

Curve25519 Diffie-Hellman functions

Link to this section Summary

Types

public or secret key

Functions

Derive the public key from a secret key

Derive a shared secret for a secret and public key

Generate a secret/public key pair

Link to this section Types

Specs

key() :: binary()

public or secret key

Link to this section Functions

Specs

derive_public_key(key()) :: key() | :error

Derive the public key from a secret key

Link to this function

derive_shared_secret(arg1, arg2)

View Source

Specs

derive_shared_secret(key(), key()) :: key() | :error

Derive a shared secret for a secret and public key

Given our secret key and our partner's public key, returns a shared secret which can be derived by the partner in a complementary way.

Specs

generate_key_pair() :: {key(), key()}

Generate a secret/public key pair

Returned tuple contains {random_secret_key, derived_public_key}