R bindings to libsodium
HTML C R Other
Latest commit 023e301 Dec 14, 2016 @jeroenooms add cleanup script
Permalink
Failed to load latest commit information.
R Rename arg Oct 11, 2015
inst/doc Fix more CMD check warnings Jul 6, 2016
man Roxygenize Jul 6, 2016
revdep Save revdep results Jul 6, 2016
src changes Oct 9, 2015
tools changes Oct 9, 2015
vignettes Fix more CMD check warnings Jul 6, 2016
windows/sodium-1.0.3 add windows libraries Oct 4, 2015
.Rbuildignore Save revdep results Jul 6, 2016
.gitignore Render vignettes Jul 6, 2016
.travis.yml Revert Jul 7, 2016
DESCRIPTION Bump Jul 6, 2016
LICENSE 2016 bump Jan 3, 2016
NAMESPACE Roxygenize Jul 6, 2016
NEWS Bump Jul 6, 2016
README.md For Solaris 10. Tested. Jul 8, 2016
appveyor.yml Add CI stuff Apr 12, 2016
cleanup add cleanup script Dec 14, 2016
configure Fix Jul 5, 2016
sodium.Rproj First commit Oct 4, 2015

README.md

sodium

A Modern and Easy-to-Use Crypto Library

Build Status AppVeyor Build Status Coverage Status CRAN_Status_Badge CRAN RStudio mirror downloads Github Stars

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.

Documentation

About the R package:

Other resources:

Hello World

# 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)

Installation

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

On Solaris 10 we can have libsodium_dev from OpenCSW:

pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i libsodium_dev 
/usr/sbin/pkgchk -L CSWlibsodium-dev # list files