KCl v0.4.1 Kcl
A poor NaCl crypto suite substitute
The box and unbox functions exposed here are the equivalent
of NaCl’s:
crypto_box_curve25519xsalsa20poly1305crypto_box_curve25519xsalsa20poly1305_open
Summary
Functions
box up an authenticated packet
derive a public key from a private key
generate a private/public key pair
create an inital state for a peer connection
pre-compute a shared key
unbox an authenticated packet
Types
Functions
Specs
box(binary, nonce, key, key) :: {binary, Kcl.State.t}
box up an authenticated packet
derive a public key from a private key
generate a private/public key pair
Specs
new_connection_state(key, key | nil, key) :: Kcl.State.t
create an inital state for a peer connection
A convenience wrapper around Kcl.State.init and Kcl.State.new_peer
Specs
unbox(binary, nonce, key, key) ::
{binary, Kcl.State.t} |
:error
unbox an authenticated packet
Returns :error when the packet contents cannot be authenticated, otherwise
the decrypted payload and updated state.