Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Order Revealing Encryption for Cloud Data

Avatar for Dan Draper Dan Draper
January 30, 2020

Order Revealing Encryption for Cloud Data

With significant data breaches becoming the daily norm, our approaches to storing data in the cloud, especially with 3rd party providers need to radically improve.

With the “holy grail” of Fully Homomorphic Encryption (FHE) still years away from practicality, Order Revealing Encryption (ORE) offers a compelling stepping stone to significant data security improvements.

In this talk, I introduce both FHE and ORE, practical examples and how, in particular, ORE can allow for new security models for protecting data in the cloud.

Links
PG Secret: https://github.com/coderdan/pg_secret (contributions welcome!)
NuFHE https://github.com/nucypher/nufhe
Paillier Ruby https://github.com/DaylightingSociety/Paillier
Block ORE Paper https://www.cs.virginia.edu/dwu4/papers/BlockORE.pdf
The state of HE: https://homomorphicencryption.org

Avatar for Dan Draper

Dan Draper

January 30, 2020
Tweet

More Decks by Dan Draper

Other Decks in Technology

Transcript

  1. Who is CrypoAUSTRALIA? •A small not-for-profit started by security and

    privacy enthusiasts. •We are for finding practical ways of dealing with the modern privacy and cybersecurity challenges. •We are looking for corporate sponsorship to continue our work. •Do you do Bitcoin?
  2. OAIC - Q3 2019 245 Data breaches 62% malicious attacks

    42% contained financial details 27% contained health information
  3. Online encryption - storing the CTs ID Name Email Age

    1 a1cf45... bdf3a... 1abc1... 2 f4a34... 9cda1... bbc34... 3 ... INSERT INTO users (name, email) VALUES (‘a1cf45...’, ‘bdf3a…’);
  4. Querying SELECT name FROM users where id = 1; --

    => a1cf45… (decrypt client side)
  5. Querying SELECT name FROM users where email = ??; E

    AES (‘[email protected]’, k) => atJTx_tFRqDOTCxLdz5f5Sv6YM... E AES (‘[email protected]’, k) => u1R1UsaYeZq7MKUBI8oebUyem... E AES (‘[email protected]’, k) => pG1xAtbe6nFRwxhvy5vPAchsJi... AES is Chosen Plaintext Secure!* *When using appropriate modes such as GCM, CCM or CBC
  6. Querying - Reduced Security Assumption SELECT name FROM users where

    email = ??; E HMAC (‘[email protected]’, k) => rRoXBH1OAg8cLyKWZMDKeDkiIekPzMs... HMAC is deterministic (not CPA secure) E HMAC (‘[email protected]’, k) => rRoXBH1OAg8cLyKWZMDKeDkiIekPzMs... E HMAC (‘[email protected]’, k) => rRoXBH1OAg8cLyKWZMDKeDkiIekPzMs...
  7. Querying - FORGET IT! SELECT name FROM users where age

    > 21; SELECT average(age) FROM users; SELECT age, name FROM users ORDER BY age asc;
  8. Operations on Data 100 + 200 = 300 Ax7b… +

    4f51… = rTd3... Plaintexts Ciphertexts
  9. Operations on Data Ax7b… * 4f51… = 67Dv... Multiplication Ax7b…

    / 4f51… = uI7d... Division Ax7b… < 4f51… = hG5c... Comparison
  10. Performance ~ 0.13ms/bit for binary gate ~ 200ms for 32

    bit add NuFHE (CUDA) Averaging 1000 32 bit integers: > 3 minutes!
  11. Paillier Performance Operand (add) Arithmetic Paillier Slow Down 1 32ns

    49us 1513x 1000 33ns 89us 2672x 1000000 33ns 118us 3532x *On my Linux machine (i7 8700k, 3.7GHz), Single core performance Still 2000x faster than NuFHE!
  12. OPE Defines the comparison operator for ciphertexts encrypted under the

    scheme (usually a symmetric key). cmp(ctxt_a, ctxt_b) => { -1, 0, 1} This is different to a PHE scheme for the comparison operator: cmp(ctxt_a, ctxt_b) => ctxt_c
  13. Security Leakage: First block that differs between 2 ciphertexts (e.g.

    block size 8 bytes) A7C3 B4B1 1 E6B1 E6A9 3 Val1 Val2 Block that differs Indistinguishable Pr[Val1 == Val2] = 1/(2^16)
  14. Block Size vs Ciphertext Size Block Size Encrypt Compare Ciphertext

    Size 4 16.50us 0.31us 192 bytes 8 54.87us 0.63us 224 bytes 12 721.37us 2.61us 1612 bytes
  15. Pros and cons Pros Right CTs are Semantically Secure (CPA

    + CCA) Fast encryption ~ 55us (32bit integer) Fast - comparisons < 1us Based on existing primitives (AES/SHA) Resistant to inference attacks Cons Large Ciphertexts (CTR = 224 bytes, 1,000,000 64bit ints ~ 213MB) Weaker than pure AES or FHE (but better than OPE) Difficult to integrate into existing systems
  16. pg_secret 2 types - numeric and string Integers are 32

    bit, orderable (define <, =, >) Strings are arbitrary length, SIPHASH, not orderable (define only =) 2 independent keys required
  17. Limitations • Currently stores both CTL + CTR • ORDER

    BY and GROUP BY will always need both anyway • Not battle tested - Don’t use in production (yet)!
  18. Links + Resources • PG Secret: https://github.com/coderdan/pg_secret (contributions welcome!) •

    NuFHE https://github.com/nucypher/nufhe • Paillier Ruby https://github.com/DaylightingSociety/Paillier • Block ORE Paper https://www.cs.virginia.edu/dwu4/papers/BlockORE.pdf • The state of HE: https://homomorphicencryption.org My Twitter: @danieldraper Thank you!