Building a Web App that Doesnt Trust the Server Daniel Huigens - - PowerPoint PPT Presentation

building a web app that doesn t trust the server
SMART_READER_LITE
LIVE PREVIEW

Building a Web App that Doesnt Trust the Server Daniel Huigens - - PowerPoint PPT Presentation

Securing ProtonMail: Building a Web App that Doesnt Trust the Server Daniel Huigens What do we want to achieve? Allow you to trust that we cant read your email Without trusting the server 2 How does our web app work? Normal


slide-1
SLIDE 1

Securing ProtonMail:

Building a Web App that Doesn’t Trust the Server

Daniel Huigens

slide-2
SLIDE 2

What do we want to achieve?

2

  • Allow you to trust that we can’t

read your email

  • Without trusting the server
slide-3
SLIDE 3

How does our web app work?

3

Normal web app Our web app Trust source code coming from the server ? Send password to the server Use Secure Remote Password protocol Trust data coming from the server ? Send data to the server unencrypted Send data to the server signed and encrypted using OpenPGP

slide-4
SLIDE 4

4

The JavaScript trust problem (I)

  • HTML, CSS and JavaScript are

sent to the browser each time

  • The browser does what the server

says

  • Server says: send me the password
slide-5
SLIDE 5

5

The JavaScript trust problem (II)

  • Could be hacked or rogue:
  • Employee
  • Hosting
  • Content Delivery Network (if used)
  • National Security Agencies
  • Corporate Network
slide-6
SLIDE 6

6

slide-7
SLIDE 7

7

“the funds were intercepted when the user made a payment ” “how did this happen? ”

slide-8
SLIDE 8

8

Source Code Transparency

  • Hash the code at the source
  • Publish it somewhere
  • Verify that everyone gets the same code
slide-9
SLIDE 9

9

Certificate Transparency

  • Append-only log server
  • Gives you Signed Certificate Timestamp
  • Promises to publish the Certificate in the

Log

slide-10
SLIDE 10

10

Service Workers

  • Sit “between web app and server”
  • Can read and block responses
  • Can even detect updates to the Service Worker itself
slide-11
SLIDE 11

11

All together now

  • Certificate goes in the Log Server
  • Able to verify that there's only one

certificate

  • Hash goes in the certificate
  • ⇒ Everyone sees the same code

Log Server

slide-12
SLIDE 12

How will our web app work?

12

Normal web app Our web app Trust source code coming from the server Verify source code coming from the server Send password to the server Use Secure Remote Password protocol Trust data coming from the server ? Send data to the server unencrypted Send data to the server signed and encrypted using OpenPGP

slide-13
SLIDE 13

Key distribution solutions

13

  • In-person exchange / verification
  • Key Signing parties
  • Web of Trust
slide-14
SLIDE 14

Key Transparency

14

  • Publish all keys
  • Make sure that everyone sees the same keys
  • Everyone checks their own key
  • ⇒ All keys can be trusted
slide-15
SLIDE 15

Merkle tree

15

Root Node Hash(Node 0 + Node 1) Node 0 Hash(0-0 + 0-1) Node 1 Hash(1-0 + 1-1)

256 steps

Node 0-0-…-0 Hash(Empty Node) Node 0-0-…-1 Hash(Fingerprint) Node 1-1-…-0 Hash(Empty Node) Node 1-1-…-1 Hash(Fingerprint) [0-0-…-1, proof] == VerifiableRandomFunction(EmailAddress)

… … …

slide-16
SLIDE 16

How will our web app work?

16

Normal web app Our web app Trust source code coming from the server Verify source code coming from the server Send password to the server Use Secure Remote Password protocol Trust data coming from the server Verify data coming from the server Send data to the server unencrypted Send data to the server signed and encrypted using OpenPGP

slide-17
SLIDE 17

protonmail.com

Thanks! Questions?

Daniel Huigens Cryptography Engineer d.huigens@protonmail.com PGP Key ID: F7D8FA8EC9D526EC

reddit.com/r/ProtonMail news.ycombinator.com/user?id=protonmail

Contact Us!