[][src]Module exonum_crypto::x25519

X25519 related types and methods used in Diffie-Hellman key exchange.

Structs

PublicKey

Curve25519 public key used in key exchange. This key cannot be directly generated and can only be converted from Ed25519 PublicKey.

SecretKey

Curve25519 secret key used in key exchange. This key cannot be directly generated and can only be converted from Ed25519 SecretKey.

Constants

PUBLIC_KEY_LENGTH

Length of the public Curve25519 key.

SECRET_KEY_LENGTH

Length of the secret Curve25519 key.

Functions

convert_to_private_key

Converts an arbitrary array of data to the Curve25519-compatible private key.

into_x25519_keypair

Converts Ed25519 keys to Curve25519.

into_x25519_public_key

Converts Ed25519 public key to Curve25519 public key.

scalarmult

Calculates the scalar multiplication for X25519.

scalarmult_base

Calculates the public key based on private key for X25519.