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

End-to-end data turnover

End-to-end data turnover

Buring zero-knowledge applications. A few words about the history of method, where we derive the inspiration from, a cutting line between fancy theoretical stuff and practically unbroken approaches, and a few words about the zero-knowledge backend encryption and rights management methodology we present.

Eugene Pilyankevich

November 26, 2016
Tweet

More Decks by Eugene Pilyankevich

Other Decks in Technology

Transcript

  1. Traditional model: Fort Knox IDS Sensors Echelonized defences . .

    Well monitored and compartmented infrastructure . Access controls Strong authentication . . . IR teams with snipers and helicopter pads Independent, remote controlled audit logging . VAULT: 22 tons of steel-strong asset at rest protection . Traditional model: Fort Knox
  2. Traditional model: Fort Knox • strong perimeter, firewalls • MFA

    & well-managed PKI • logging, monitoring and intrusion detection • data-in-motion, data-at-rest encrypted • strong ops & IR teams
  3. Meanwhile, in reality $ masscan -p27017 0.0.0.0/0 > mongodbs.txt
 $

    grep -oP '(?<=Host: )\S*’ > targets.txt $ test_mongo_auth.py < targets.txt 32059 targets without authentication found! Learn more about this peculiar case: https://blog.shodan.io/its-the-data-stupid/
  4. What do we want? 1. Use strongest access control. 2.

    Minimize trust; control trust. 3. Infinitely small attack surface.
  5. 1. End-to-end encryption. 2. Granular keys, bound to data owners.

    3. Attack surface is client only. Zero-knowledge software
  6. Existing ZKS ideas Communication Processing Storage Connect people, servers, processes

    Control data exposure when processing it Store data securely
  7. Communication E-mail: All client, exchange keys, encrypt & sign. 


    PGP, S/MIME, GnuPG. Messaging: Client crypto, infra matches keys.
 OTR, iMessage, Signal. Voice: Client crypto, socket relaying. ZRTP, Facetime, Signal.
  8. Zoom into “Some servers” Listener Temporary storage Session state cache

    Key directory Outgoing message Incoming message Internal messaging bus Protected infrastructure
  9. Realistic version Listener Temporary storage Session state cache Key directory

    Outgoing message Incoming message Internal messaging bus Key leak MiTM MiTM Session Hijack Message leak Flow change
  10. ZKS Communications 1. Many end-to-end designs, it’s natural. 2. Forward

    secrecy as granular keys. 3. Attack surface is small: only currently decrypted objects.
  11. Userland memory Kernel memory YOUR (POTENTIALLY COMPROMISED) SERVER Your process

    memory decryptor.decoded_key_block_buffer [PUBLIC_KEY_LENGTH:] ! ! ! Processes
  12. Processes The less you decrypt the less you leak. Operating

    without decrypting. You don’t always need to use sensitive data.
  13. Processes The less you decrypt the less you leak: -

    granular encryption - new keys per each grain - keys bound to function or user
  14. Processes You don’t always have to decrypt data to search

    it or compare strings. (But it’s a bit risky)
  15. Processes You don’t always need to use sensitive data: -

    indirect references - foresight & planning - conditional secrecy
  16. Processes Hardware protection: - Secure enclave, Intel SGX, TrustZone -

    Run encrypted programs - Verify them, protect memory
  17. ZKS Processes 1. Don’t decrypt or no end-to-end. 2. Limit

    decryption scope manually. 3. Attack surface is unpredictible.
  18. Storage Encrypt on client, store on server. Problems with manipulating

    encrypted data. Problems with data exchange.
  19. Storage problems In-browser crypto is weak. Client-side encryption limits server

    features. No serious sharing / RM / RPC / requests.
  20. ZKS Storage 1. End-to-end encryption works, at cost 
 of

    easy sharing and management. 2. Key granularity and ownership are OK. 3. Attack surface is client only.
  21. Def document Cust_ID Cust_FullName ActiveCard_1 ActiveCard_2 Email … … …

    … … ac264602 DWQMqLTcZxv6Tk89o6r4ew== iQynR0/au2L6A6gNhHH+vA== Null [email protected] 9d8974ba WEes8zIJlJpu+Pw2jimnXQ== hKeWqv0wLzSYpUVs9e+i2w== 2TsNrq7MnomMXs7teIcTIg== [email protected] c2548064 C7dmy5j2KwxRNOFHSMo0iw== Ja01Mgzcs5BnrxauCKqgyw== Null [email protected] 6216f8a7 ozII0wUZpU+ez7peNmAA8A== 2lSFu1MMfZHnwC2k1VfsIQ== Null [email protected] … … … … …
  22. Def document Cust_ID Cust_FullName ActiveCard_1 ActiveCard_2 Email … … …

    … … ac264602 DWQMqLTcZxv6Tk89o6r4ew== iQynR0/au2L6A6gNhHH+vA== Null sarah. 9d8974ba WEes8zIJlJpu+Pw2jimnXQ== hKeWqv0wLzSYpUVs9e+i2w== 2TsNrq7MnomMXs7teIcTIg== mental c2548064 C7dmy5j2KwxRNOFHSMo0iw== Ja01Mgzcs5BnrxauCKqgyw== Null voidnu 6216f8a7 ozII0wUZpU+ez7peNmAA8A== 2lSFu1MMfZHnwC2k1VfsIQ== Null eugene … … … … … R1 ID R2 R3 R4
  23. Def encrypted document ENC_DOC [ID, (ER1, K1), (ER2, K2), …

    (ERn, Kn)] (ERn, Kn): Encrypt Rn with secrey key Kn
  24. Crypto CRUD: Write USER1 grants USER2 write access to Rn:

    
 
 PKWRAP(UTn, prU1, pubU2)
 
 Update tag: UTn ~ MAC(Rn)
  25. Crypto CRUD additional Read/write rights applied to parent node X

    allows to: - grant CREATE rights underneath it: add ERn with 
 parent node X. - grant DELETE rights underneath it: update target 
 record with null ERn.
  26. CRUD, old friend CREATE READ UPDATE Add children to parent

    N DELETE Access to symmetric key Kn Can compute pre-stored MAC Update parent N without X
  27. WAT

  28. What did we want? 1. Use unbreakable access control. 2.

    Minimize and control trust. 3. Infinitely small attack surface.
  29. Guarantees (1/2) 1. Each record is protected by unique key.

    2. Each record may have own access control policy. 3. Storage never processes data in clear text.
  30. Guarantees (2/2) 4. Data access keys are separated from the

    data. 5. All sensitive information appear in clear text only in 
 user's/application's context. 6. Compromising a single entity from the system creates only very limited damage.
  31. 1. End-to-end encryption. 2. Bind keys to data owners. 3.

    Attack surface is client only. Zero-knowledge software
  32. 1. Plaintext only on client. 2. Access via personal key.

    3. Attack surface is client only. Zero-knowledge Hermes
  33. Give up ownership Ownership leaks data!
 1. Generate Keystore and

    tags 2. Give your ‘non-owner’ key rights 3. Burn owner key.
  34. Non-volatility Cust_ID Cust_FullName ActiveCard_1 ActiveCard_2 Email … … … …

    … ac264602 DWQMqLTcZxv6Tk89o6r4ew== iQynR0/au2L6A6gNhHH+vA== Null sarah. 9d8974ba WEes8zIJlJpu+Pw2jimnXQ== hKeWqv0wLzSYpUVs9e+i2w== 2TsNrq7MnomMXs7teIcTIg== mental c2548064 C7dmy5j2KwxRNOFHSMo0iw== Ja01Mgzcs5BnrxauCKqgyw== Null voidnu 6216f8a7 ozII0wUZpU+ez7peNmAA8A== 2lSFu1MMfZHnwC2k1VfsIQ== Null eugene … … … … … R1 ID R2 DELETE R4
  35. Additional security • Use ZKP + ID indirection to protect


    sensitive IDs between different Hermes DBs • Use Secure Session to protect transport
  36. Memory compartmentation HERMES CORE Crypter HSM fork() + OS IPC

    or encrypted channel if separate Hermes structures PK>SK>Data
  37. APP HERMES CORE HERMES API HERMES STORAGE 
 COMPONENTS STORAGE

    Crypter KeyStore CredentialStore / PKI RecordStore
  38. Client ideas Client != person; client = role.
 
 We

    have ‘db indexer’ role key, for example.
  39. No need to talk about algorithms when you have Themis

    * * www.github.com/cossacklabs/themis
  40. The Internet era of fun and games is over, Bruce

    Schneier said. Things that look like future have to become your new norm.