Introduction

This is a proof of concept for establishing an instant end-to-end encrypted two party chat.

The proof-of-concept code separates each player into individual JavaScript Objects. Communication is simulated via JavaScript function calls passing only string data. The crypto in use is from libsodium compiled to WebAssembly.

User Story

Bob is deaf and would like to communicate with Alice who is hearing-enabled. Bob is unable to find an interpreter.

  1. Bob opens the instant-chat webpage on his mobile phone
  2. The chat app displays a message, an easy to transcribe link, and a QR Code. ("I am deaf; please scan this code or open this page to talk with me.")
  3. Bob shows the phone screen to Alice
  4. Alice scans the QR Code with her mobile phone or enters the short URL into her work computer's browser
  5. An end-to-end encrypted chat session begins on both clients
  6. Bob and Alice can now securely chat with each other for this session
  7. When complete the chat history is lost with the browser session closing along with any cryptographic secrets used during that session

Alternative Solutions

Pen and Paper
This can be inconvenient because handwriting can be hard to read, requires materials at hand, possibly vulnerable to 3rd party ease dropping.
Text messaging / other chat apps
Requires both parties to agree to an app and share contact information. This is not convenient in the midst of needing to communicate quickly and effectively.
Notes.app / Big / Text editor
This has the advantage of being readily available and easy to implement. It does have a minor inconvenience of having to type then show the screen. It is not easy to have an effective long conversation this way.1

A diagram is available to illustrate the communication process and cryptographic implementation.

Proof of Concept

Bob

Enter submits

Alice

Enter submits

Server

Last Seen Ciphertext


      

Sequence Diagram

Sequence Diagram of Crypto

1 If this proves a viable solution it would be my intent to include a free scratch pad feature to the instant-chat app for use in the rare cases when scanning or transcribing a link is not feasible. A scratch pad on the phone is a good fallback when the chat features are not available for any reason.

Intro | Demo | Diagram