Strongroom

Build Status

Strong public-key encryption for arbitrary length data.

Overview

Strongroom combines RSA public-key encryption and AES symmetric-key encryption to encrypt arbitrary length data with a public key, such that it can only be decrypted with the corresponding private key.

Ruby's OpenSSL bindings do all the heavy lifting; Strongroom acts as simple glue-code and as a central point for testing, documentation, collaboration and peer review.

Usage

# Encrypt with public key:
enigma = Strongroom::Encryptor.new("spec/fixtures/public_key").encrypt("secret message")
# => #<Strongroom::Enigma AES-128-CBC ciphertext: 14 bytes, encrypted_key: 256 bytes, iv: 16 bytes>

# Store enigma as US-ASCII YAML text:
s = enigma.serialize
=> "--- \ncipher: AES-128-CBC\nciphertext: |\n  55djlRLf[...]p8w==\n\n"

# Retrieve enigma:
enigma = Strongroom::Enigma.deserialize(s)
# => #<Strongroom::Enigma AES-128-CBC ciphertext: 14 bytes, encrypted_key: 256 bytes, iv: 16 bytes>

# Decrypt with private key:
Strongroom::Decryptor.new("spec/fixtures/private_key").decrypt(enigma)
# => "secret message"

Status

http://travis-ci.org/pda/strongroom.png

Implementation is functionally complete. Documentation is work in progress.

Reading List

License

© 2011 Learnable Pty Ltd
Open Source under the The MIT License.