
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Cerebus was the many headed guardian at the entrance of hell. So... he guards things of little value, kind of like this library. This is a simple library which wraps openssl to provide a (hopefully) secure encryption system for arbitrary strings. The aim was to remove all the hard stuff and make it blindingly easy to encrypt and decrypt strings. Of course, this doesn't mean you can ignore basic crypographic best practices. Play safe, this is serious stuff.
It uses an RSA public key to encryt a Blowfish key which is used to encrypt the data. Decryption uses the RSA private key to decrypt the Blowfish key and then the data. Which is a fairly common pattern. It would be easy to adapt to use AES-256, IDEA or any of the other popular block cyphers.
The main value of this library is hiding the implementation internals of such a common operation. I couldn't find anything off-the-shelf that made this easy.
For regular ruby:
require 'cerebus'
cleartext = 'It is a secret to everybody!'
encrypted = Cerebus.encrypt cleartext, 'test/keys/public.pem'
Decryption is similarly simple.
require 'cerebus'
cleartext = Cerebus.decrypt encrypted_text, 'test/keys/private.pem',
'pass phrase'
Passphrase can be optionally left off and you will be prompted for it on the terminal. For rails just add it to the Gemfile and bundle install.
You can generate some new keys with the included make_keys.sh
script.
Be sure to use a good passphrase and keep your private.pem file stored
safely (whatever that means for the application in question.)
Please fix them and send me a pull request. Or create an issue. Or email me at jonathan (a.t) blazingdev , com.
FAQs
Unknown package
We found that cerebus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.