XUtils

RbNaCl

Ruby binding to the Networking and Cryptography (NaCl) library.


Is it any good?

Yes.

libsodium

To use RbNaCl, you will need to install libsodium:

https://github.com/jedisct1/libsodium

At least version 1.0.0 is required.

For OS X users, libsodium is available via homebrew and can be installed with:

brew install libsodium

For FreeBSD users, libsodium is available both via pkgng and ports. To install a binary package:

pkg install libsodium

To install from ports on FreeBSD, use your favorite ports front end (e.g. portmaster or portupgrade), or use make as follows:

cd /usr/ports/security/libsodium; make install clean

RbNaCl gem

Once you have libsodium installed, add this line to your application’s Gemfile:

gem 'rbnacl'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rbnacl

Inside of your Ruby program do:

require 'rbnacl'

…to pull it in as a dependency.

Learn More

While NaCl has designed to be easier-than-usual to use for a crypto library, cryptography is an incredibly difficult subject and it’s always helpful to know as much as you can about it before applying it to a particular use case. That said, the creator of NaCl, Dan Bernstein, has published a number of papers about NaCl. If you are interested in learning more about how NaCl works, it’s recommended that you read them:

For more information on libsodium, please check out the Introducing Sodium blog post

Have a general interest in cryptography? Check out the free course Coursera offers from Stanford University Professor Dan Boneh:

http://crypto-class.org

Important Questions

Is it “Military Grade™”?

Only if your military understands twisted Edwards curves

Does it have a lock with a checkmark?

Sure, here you go:

Checkmarked Lock


Articles

  • coming soon...