A Modern and Easy-to-Use Crypto Library
Bindings to libsodium: a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more. Sodium uses curve25519, a state-of-the-art Diffie-Hellman function by Daniel Bernstein, which has become very popular after it was discovered that the NSA had backdoored Dual EC DRBG.
About the R package:
Other resources:
# Generate keypair:
key <- keygen()
pub <- pubkey(key)
# Encrypt message with pubkey
msg <- serialize(iris, NULL)
ciphertext <- simple_encrypt(msg, pub)
# Decrypt message with private key
out <- simple_decrypt(ciphertext, key)
Binary packages for OS-X or Windows can be installed directly from CRAN:
install.packages("sodium")
Installation from source on Linux or OSX requires libsodium
. On Debian or Ubuntu install libsodium-dev:
sudo apt-get install -y libsodium-dev
On Fedora we need libsodium-devel:
sudo yum install libsodium-devel
````
On __CentOS / RHEL__ we install [libsodium-devel](https://src.fedoraproject.org/rpms/libsodium) via EPEL:
sudo yum install epel-release sudo yum install libsodium-devel
On __OS-X__ use [libsodium](https://github.com/Homebrew/homebrew-core/blob/master/Formula/libsodium.rb) from Homebrew:
brew install libsodium ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.