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
- Initialize an ore client:
The default domain size is 1 byte.
ore_client = ToyOre::Scheme::OreScheme.new()
- Encrypt:
ct_one = ore_client.encrypt(3)
ct_two = ore_client.encrypt(8)
- Compare:
irb(main):004:0> ct_one.left.<=>(ct_two.right)
=> -1