Project

ope-rb

0.01
No release in over 3 years
Low commit activity in last 3 years
A Ruby implementation of order-preserving encryption
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
~> 2.12.0
 Project Readme

ope-rb

This gem implements order-preserving symmetric encryption, as described in Boldyreva, 2009.

Usage

require 'ope'

cipher = OPE::Cipher.new(key)
a = cipher.encrypt(456789)
b = cipher.encrypt(891234)

puts b > a     # =>  true

Credits

CryptDB provided a reference implementation for the Boldyreva paper. The code from Caesar was helpful in understanding how the scheme worked from a high-level perspective. The hypergeometric distribution code was adapted from a Fortran implementation from the Association for Computing Machinery and a C implementation used by the R project.

License

This software is released under the GNU Affero General Public License.