Services/Sync/WEP/112: Difference between revisions
| Line 18: | Line 18: | ||
Configuring Sync can be as easy as just requesting an email address with other credentials randomly generated. Setting up another client would require remembering that email address and a temporary secret. | Configuring Sync can be as easy as just requesting an email address with other credentials randomly generated. Setting up another client would require remembering that email address and a temporary secret. | ||
The premise is that we have a secure low-bandwidth channel (the user's memory) and an insecure high-bandwidth (temporary server storage). | The premise is that we have a secure low-bandwidth channel (the user's memory) and an insecure high-bandwidth (temporary server storage). The temporary storage is basically a key-value hashtable API provided by the server to keep a "key" and "value" for a short time period, e.g., 1 day. | ||
== Account Creation == | == Account Creation == | ||
Revision as of 23:58, 26 May 2010
WEP 112 - Email-only Account Creation
- Champions: Edward Lee <edilee@mozilla.com>
- Status: Draft
- Type: ?
- Created: May 20 2010
- Reference Implementation: None
- WEP Index
Introduction and Rationale
Account creation currently requires picking a username, password, secret phrase and providing an email address. Asking and validating these pieces of information lengthens the account creation process and confuses the users especially when asking for a secret phrase. This can result in the user giving up.
Setting up another client requires the the user to remember the username, password, and secret phrase. Users tend to forget these 3 pieces of information especially the secret phrase as it's not frequently used. Users also confuse the password and secret phrase.
Configuring Sync can be as easy as just requesting an email address with other credentials randomly generated. Setting up another client would require remembering that email address and a temporary secret.
The premise is that we have a secure low-bandwidth channel (the user's memory) and an insecure high-bandwidth (temporary server storage). The temporary storage is basically a key-value hashtable API provided by the server to keep a "key" and "value" for a short time period, e.g., 1 day.
Account Creation
All that is required for account creation is an email address. A random username and password pair (used to communicate with the server) are generated. The account can now be registered on the server with the username, password, and email address.
A random passphrase (used to encrypt the private key) is also generated. Data can now be encrypted and synced as usual.
1-Roundtrip Additional Client Setup
Starting at the new client, Sync setup would display a 2-digit secret that needs to be remembered temporarily. After returning to an active client, the user enters the secret to setup the new client. The user then needs to return to the new client and confirm the setup to then be able to access and decrypt data.
Prepare setup from new client
When the user wants to add a client to an existing Sync account, the email address is requested, and a 2-digit secret is shown that needs to be remembered.
The client generates a temporary public/private keypair, and the public key is stored on the server as the "value" with the hash of the email address as the "key".
sha1(email): public key
A random digit is generated to be the first digit of the 2-digit secret. This number is used to calculate the second digit of the 2-digit secret.
The second digit is calculated using HMAC(public key, 1st digit) and result condensed into a single digit.
These two values are shown to the user as single 2-digit number.
Confirm setup from active client
After returning to an active client, the user is prompted for the 2-digit secret to activate the new client.
The client requests the public key stored as the "value" of the "key" being the hash of the email address.
sha1(email): public key
The client verifies that the public key has not been modified by doing the same HMAC(public key, 1st digit) computation and confirms that the result is the second digit.
Once verified, the client generates an encrypted version of the account credentials (username, password, and passphrase) by encrypting the data with the public key.
These encrypted credentials are stored on the server as the "value" with the hash of the email address concatenated with the string "result" as the "key".
sha1(email, "result"): pub_encrypt(username, password, passphrase)
Setup new client
After returning to the new client, the user continues account creation and gets the credentials to access and decrypt data.
The client requests for the hash of email and "result" "key" to get the the encrypted credentials "value".
sha1(email, "result"): encrypted credentials
With the encrypted credentials, the client decrypts it with its local private key and then gets access to the username, password, and passphrase.
1-Way Additional Client Setup
Starting at an active client, the user requests to setup a new client and is shown a token that needs to be remembered temporarily. After going to the new client, the user enters the token to then be able to access and decrypt data.
Prepare setup from active client
When the user wants to add another client, s/he indicates so in a configured client and is presented with a random 8-digit PIN (that can be edited). This PIN is used to encrypt the necessary Sync authentication pieces (username, password, passphrase) that is temporarily stored on the server.
A "key" is generated by hashing the email address and PIN. E.g., sha1(email, PIN).
A "value" is generated by encrypting a structure that contains the username, password, and passphrase. E.g., encrypt([username, password, passphrase, email, PIN], PIN). (Including the email and PIN is to verify that the server is responding with the expected data.)
A server is needed to register this "key" and "value" pair. The server should only keep this pair for 1 day. So there is only a window of 1 day to set up another client.
Setup new client
Setting up another client requires the email address and PIN. With those two pieces of information, the "key" can be regenerated to ask the server for the corresponding "value". The PIN is then used to decrypt "value" which then results in the username, password, and passphrase.
Supporting "backup" users
With a randomly generated username, password, and passphrase, users would not be able to access their account from another client without first preparing the temporary PIN. Users who lose their one-and-only Sync client would then lose the ability to access their Sync data.
An extra client functionality could be used to "export" the username, password, and passphrase in plain text (these values are long random hex strings). The user would need to save this separately from the computer.
On setting up a new Sync client, an option could be provided to "Restore from backup" and request the email address and exported username/password/pasphrase value. This is then enough information to regain access to the account as well as be able to authorize additional clients.