Crate sodalite

Crate sodalite 

Source

Constants§

BOX_NONCE_LEN
BOX_PUBLIC_KEY_LEN
BOX_SECRET_KEY_LEN
HASH_LEN
ONETIMEAUTH_HASH_LEN
ONETIMEAUTH_KEY_LEN
SECRETBOX_KEY_LEN
SECRETBOX_NONCE_LEN
SIGN_LEN
SIGN_PUBLIC_KEY_LEN
SIGN_SECRET_KEY_LEN
STREAM_XSALSA20_KEY_LEN
STREAM_XSALSA20_NONCE_LEN

Functions§

box_
Public key authenticated encryption
box_afternm
Encrypt an authenticate a message m using a nonce n and a precomuted value k (from box_beforenm).
box_beforenm
By splitting box_ into 2 steps: box_beforenm and box_afternm, we can more efficiently compute multiple messages that use the same keys.
box_keypair_seed
Use seed to populate the pub_key and secret_key. seed should be uniformly random and generated with a secure random number generator.
box_open
Decrypt and verify the cipher text c using the recievers secret key sk, the senders public key pk, and the nonce n.
box_open_afternm
Verify and decrypt a cipher text c using a nonce n and a precomuted value k (from box_beforenm).
hash
Hash the message m, returning the result in out.
onetimeauth
Authenticate a message m using a secret key k, return the authenticator in out.
onetimeauth_verify
Check that h is a correct authenticator for message m under secret key k.
reduce
scalarmult
Multiply group element p by an integer n. Result is stored in q.
scalarmult_base
Compute the scalar product of a standard group element and the integer n. Returns the result in q.
secretbox
Encrypt and authenticate message m using nonce n and secret key k.
secretbox_open
Decrypt and verify cipher text c using nonce n and secret key k.
sign_attached
Sign a message m using the signers secret key sk
sign_attached_open
verify an attached signature
sign_keypair_seed
Generate a signature keypair with a public key pk and a secret key sk from the provided seed seed.
stream_salsa20
Fill c_stream with bytes derived from nonce and key.
stream_salsa20_xor
Encrypt message into c_text using nonce and key by xoring message with a stream.
stream_xsalsa20
Fill c_stream with bytes derived from nonce and key.
stream_xsalsa20_xor
Encrypt message into c_text using nonce and key by xoring message with a stream.

Type Aliases§

BoxNonce
BoxPublicKey
BoxSecretKey
Hash
OnetimeauthHash
OnetimeauthKey
SecretboxKey
SecretboxNonce
Sign
SignPublicKey
SignSecretKey
StreamXSalsa20Key
StreamXSalsa20Nonce