max-mapper / screencat

:cat2: webrtc screensharing electron app for mac os (Alpha)
http://maxogden.github.io/screencat
BSD 2-Clause "Simplified" License
3.01k stars 383 forks source link

optional password #21

Open max-mapper opened 9 years ago

max-mapper commented 9 years ago

I wanna add a password feature to invites. Currently anyone with your invite code can control your computer.

when you create an invite it should ask if you wanna password protect it

if you choose yes, you have to enter a password.

we then use the password to AES encrypt the SDP before it gets uploaded to the lobby

If you don't specify a password you should a clear warning like 'Anyone with this room name will be able to join and see your screen'

espadrine commented 8 years ago

I feel like a passwordless design would work nicely here.

Instead of generating a room with a random name, here is the process:

  1. Generate securely random 256-bit secret stored on disk upon first installation
  2. When sharing your screen, “Who do you want to give your computer access? [email input]”
  3. Input email address, click “Send”
  4. Generate a JWT containing the email address, secured with the installation secret, have the website send a secure email with a link to the website and the JWT as a query parameter
  5. The website sends the JWT to the host during signaling, and the host verifies the JWT
  6. The guest and the host start communicating directly (unless the JWT's signature was invalid)

If the host gets a JWT that it verified, it knows that it generated it, so that it could only come from the email account whose address is in the JWT.

This design would be safer than user-generated passwords, the two most sensitive points being: