X25519 DH function.
Functions
fn publicKeyFromEd25519(ed25519_public_key: crypto.sign.Ed25519.PublicKey) IdentityElementError || EncodingError![public_length]u8
Compute the X25519 equivalent to an Ed25519 public eky.
fn recoverPublicKey(secret_key: [secret_length]u8) IdentityElementError![public_length]u8
Compute the public key for a given private key.
fn scalarmult(secret_key: [secret_length]u8, public_key: [public_length]u8) IdentityElementError![shared_length]u8
Compute the scalar product of a public key and a secret scalar. Note that the o…
Compute the scalar product of a public key and a secret scalar. Note that the output should not be used as a shared secret without hashing it first.
Values
public_length | comptime_int | Length (in bytes) of a public key. |
secret_length | comptime_int | Length (in bytes) of a secret key. |
seed_length | comptime_int | Seed (for key pair creation) length in bytes. |
shared_length | comptime_int | Length (in bytes) of the output of the DH function. |