public_key_of_string v
is public key of 32-bytes string
v
. Null
public key (String.make 32 '\x00'
) is not allowed. It makes a fresh
allocated public key.
public_key_of_int_array v
is public key of 32-bytes int array
v
. It
only verifies v
(no allocation). Null public key (Array.make 32 0
) is
not allowed.
ecdh_inplace ~out ~secret ~public
computes the shared secret between
secret key secret
and public key public
. The result is stored in out
.
ecdh_base_inplace ~out ~secret
is eqauivalent to ecdh with the secret
key secret
and the base point base, with the resulting public key
stored in out
.