README.md in blind_index-1.0.1 vs README.md in blind_index-1.0.2

- old
+ new

@@ -14,11 +14,11 @@ ## Leakage An important consideration in searchable encryption is leakage, which is information an attacker can gain. Blind indexing leaks that rows have the same value. If you use this for a field like last name, an attacker can use frequency analysis to predict the values. In an active attack where an attacker can control the input values, they can learn which other values in the database match. -Here’s a [great article](https://blog.cryptographyengineering.com/2019/02/11/attack-of-the-week-searchable-encryption-and-the-ever-expanding-leakage-function/) on leakage in searchable encryption. Blind indexing has the same leakage as deterministic encryption. +Here’s a [great article](https://blog.cryptographyengineering.com/2019/02/11/attack-of-the-week-searchable-encryption-and-the-ever-expanding-leakage-function/) on leakage in searchable encryption. Blind indexing has the same leakage as [deterministic encryption](#alternatives). ## Installation Add this line to your application’s Gemfile: @@ -292,12 +292,15 @@ end ``` ## Alternatives -One alternative to blind indexing is to use a deterministic encryption scheme, like [AES-SIV](https://github.com/miscreant/miscreant). In this approach, the encrypted data will be the same for matches. +One alternative to blind indexing is to use a deterministic encryption scheme, like [AES-SIV](https://github.com/miscreant/miscreant). In this approach, the encrypted data will be the same for matches. We recommend blind indexing over deterministic encryption because: +1. You can keep encryption consistent for all fields (both searchable and non-searchable) +2. Blind indexing supports expressions + ## Upgrading ### 1.0.0 1.0.0 brings a number of improvements. Here are a few to be aware of: @@ -333,11 +336,11 @@ And add to your model ```ruby class User < ApplicationRecord - blind_index :email, key: ENV["USER_EMAIL_BLIND_INDEX_KEY"], legacy: true, rotate: true + blind_index :email, key: ENV["USER_EMAIL_BLIND_INDEX_KEY"], legacy: true, rotate: {} end ``` > For more sensitive fields, use `rotate: {slow: true}` @@ -414,7 +417,7 @@ ```sh git clone https://github.com/ankane/blind_index.git cd blind_index bundle install -rake test +bundle exec rake test ```