github.com/jamesruan/sodium (go): Package sodium is a wrapper for https://github.com/jedisct1/libsodium  Most of the functions is a method to the "Bytes" type. They are grouped below:  Sender sign a message with its SecretKey and the receiver can verify the Signature by sender's PublicKey  (Ed25519)  (Ed25519ph)  An anonymous can encrypt a message with an ephemeral key pair and reveiver's PublicKey. The receiver can decrypt the message with its SecretKey. Only the receiver is authenticated.  (X25519-XSalsa20-Poly1305)  Authenticated Box can be used to pass encrypt message from a known sender to a known receiver. The sender and the receiver are both authenticated to each other.  A one-time shared nonce is also generated and passed to protect the key pairs and messages.  (X25519-XSalsa20-Poly1305)  Server and Client exchange their public key and calculates a common session key with their own secret key.  (rx || tx = BLAKE2B-512(p.n || client_pk || server_pk))  One holder of a secret key authenticates the message with MAC.  (HMAC-SHA512256)  Use a secret key and a nonce to protect the key, messages could be encrypted into a SecretBox. The encrypted data's intergrity is checked when decryption.  (XSalsa20-Poly1305)  Use a secret key and a nonce to protect the key, messages could be encrypted. Optional additional data and the message is authenticited with an authentication tag. Both intergrity and authenticity is checked when decryption. The decryption would not be performed unless the authentication tag is verified.  AEADCP* (ChaCha20-Poly1305_IETF) AEADXCP* (XChaCha20-Poly1305_IETF)  High-level streaming API that use AEAD construct. Using `SecretStreamTag_Sync` to indicate the end of message. And this is useful for application to parse the message earlier. Rekeying is automatic. However using `SecretStreamTag_Rekey` explicitly ask for rekeying. Typical usage is sending chunks with `SecretStreamTag_Message`.  XCP (XChaCha20-Poly1305_IETF)  Deriving subkeys from a single high-entropy key  KDF (BLAKE2B)
Keywords: crypto|go|golang|libsodium