Project

toy-ore

0.0
No release in over a year
A toy library to get an understanding of how order revealing encryption works. This is an unsafe implementation, only to be used for educational purposes. DO NOT USE IN PRODUCTION.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
>= 0
~> 3.0
 Project Readme

Toy ORE library

A toy ORE library, built for education purposes.

It was built to get an understanding of Order Revealing Encryption works.

This is an unsafe implementation, only to be used for educational purposes.

DO NOT USE IN PRODUCTION.

Installation

Add this line to your application’s Gemfile:

gem "toy-ore"

Run:

bundle install

Or install it yourself as:

gem install toy-ore

Usage

  1. Initialize an ore client:

The default domain size is 1 byte.

ore_client = ToyOre::Scheme::OreScheme.new()
  1. Encrypt:
ct_one = ore_client.encrypt(3)
ct_two = ore_client.encrypt(8)
  1. Compare:
irb(main):004:0> ct_one.left.<=>(ct_two.right)

=> -1