RSA.rb: RSA Encryption for Ruby

RSA.rb is a Ruby library that implements the RSA encryption algorithm and the PKCS#1 cryptography standard.

Features

Examples

require 'rsa'

Generating a new RSA key pair

key_pair = RSA::KeyPair.generate(128)

Encrypting a plaintext message

ciphertext = key_pair.encrypt("Hello, world!")

Decrypting a ciphertext message

plaintext = key_pair.decrypt(ciphertext)

Documentation

http://rsa.rubyforge.org/

Dependencies

Installation

The recommended installation method is via RubyGems. To install the latest official release of RSA.rb, do:

% [sudo] gem install rsa             # Ruby 1.9.1+
% [sudo] gem install backports rsa   # Ruby 1.8.x

Download

To get a local working copy of the development repository, do:

% git clone git://github.com/bendiken/rsa.git

Alternatively, you can download the latest development version as a tarball as follows:

% wget http://github.com/bendiken/rsa/tarball/master

Author

Contributors

Refer to the accompanying CREDITS file.

Contributing

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.