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.


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 Ubuntu 14.04 or lower use libsodium-dev from Launchpad:

sudo add-apt-repository -y ppa:chris-lea/libsodium
sudo apt-get update -q
sudo apt-get install -y libsodium-dev

More recent Debian or Ubuntu install libsodium-dev directly from Universe:

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 via EPEL:

sudo yum install epel-release
sudo yum install libsodium-devel

On OS-X use libsodium from Homebrew:

brew install libsodium

News

0.4

  • Update Homebrew URL in configure script
  • Workaround for random WARNING in vignette for null strings
  • Add Travis and README file

0.2

  • Add 2 vignettes

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sodium")

1.1 by Jeroen Ooms, 8 months ago


https://github.com/jeroen/sodium#readme (devel) https://download.libsodium.org/doc/ (upstream)


Report a bug at https://github.com/jeroen/sodium/issues


Browse source code at https://github.com/cran/sodium


Authors: Jeroen Ooms


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests knitr, rmarkdown

System requirements: libsodium (>= 1.0.3)


Imported by homomorpheR, safer.

Suggested by remoter.


See at CRAN