curve25519

@safe pure nothrow @nogc
ubyte[32]
curve25519
(
in ref ubyte[32] secret
,
in ref ubyte[32] basepoint = publicBasePoint
)

Parameters

secret ubyte[32]

your secret key, the 'exponent'

basepoint ubyte[32]

public key. Default: base point 9

Return Value

Type: ubyte[32]

basepoint^secret.

Examples

ubyte[32] publicKey = curve25519(secretKey);

ubyte[32] sharedKey = curve25519(mySecretKey, herPublicKey);

Meta