← Blog

Introducing Passwordless Backups

by Tobias Müller · on

Introducing Passwordless Backups
TL;DR Forgetting a password shouldn't mean losing your account, your friends, and your memories. We designed a passwordless recovery protocol that uses your trusted friends and an optional second factor to recover your encrypted identity, while keeping the backed-up content encrypted on the server.

The Problem

Using twonly can create memories, chat histories and contacts you want to keep when you replace or lose a phone. Recovering access requires a backup method that you have set up in advance.

In twonly, backup content is encrypted on your device before it is uploaded. A password-protected backup relies on a password you choose. Forgetting that password can prevent recovery. An alternative is to set up passwordless recovery with trusted contacts. The recovery options you enable determine who can help restore access.

To solve this, we spent the last few months designing and implementing a new protocol that lets you recover your account without remembering any password, while still fully protecting your privacy and personal memories. If you're interested in the cryptographic details, check out my technical blog post about it.

Setting It Up

Setting up passwordless backup takes about a minute. You select your trusted friends, choose an optional second factor, and you're done.

Picking Your Trusted Friends

The first step is selecting the friends you trust to help you recover your account. These must be verified contacts, friends whose identity you've confirmed via QR code, as described in our mutual friends blog post. This is important because your secret key gets split and distributed to these friends, so you need to be sure they are who they say they are and not someone impersonating them or a compromised server performing a man-in-the-middle attack.

You need to select at least a few friends, and you can choose how many of them are required during recovery. For example, if you pick six friends and set the threshold to two, any two of them can help you get your account back. The extra friends are there as a safety net in case someone loses their phone or becomes unreachable.

Passwordless Recovery setup screen

The setup screen with friends and second factor

Selecting trusted friends

Only verified contacts can be selected

Overview of active and inactive friends

See who can help and who hasn't received their share yet

Choosing a Second Factor

For extra security, you can enable a second factor: either your email address or a PIN. This adds another layer of protection so that even if enough of your friends would collude, they still can't recover your account on their own. If you don't enable a second factor, the required number of trusted friends is automatically increased to at least four to compensate.

When you use email as a recovery factor, your email address is sent to the server during recovery to deliver a one-time recovery token.

Recovering Your Account

So you got a new phone, installed twonly, and realize you forgot your backup password. Here is where passwordless recovery comes in.

You start the recovery process and the app generates a QR code and a shareable link. You then have to ask your friends to either scan the QR code or send them your link via Signal or another secure messenger app.

When your friends open the link or scan the code, the app shows them a list of contacts they can help. They select your name and confirm. To prevent phishing attacks, their app shows a confirmation dialog with a 10-second timer and a red warning. It asks them to make sure this request really came from you. This is important because if an attacker tricks them into submitting their share, they get one step closer to stealing your account.

Starting the recovery process

Share the QR code or link with your trusted friends

Helping a friend recover

Your friends select you from the list

Phishing prevention dialog

A warning with a 10s timer to prevent phishing

Once enough friends have submitted their shares, the app reconstructs your secret. If you enabled a second factor, you'll also need to verify your email or PIN. With email, the server sends a recovery token to your inbox that you enter in the app. With a PIN, the server verifies it directly.

Entering email for recovery

Enter your email to receive the recovery token

Entering the recovery token

Enter the token you received via email

After that, your identity is restored. Combined with the encrypted cloud backup, you get back your contacts, messages, and eventually your images, without ever having remembered a password.

How It Works Under the Hood

For the technically curious, here is a brief overview of the protocol.

The protocol uses Shamir's Secret Sharing to split your secret key into multiple shares, which are distributed to your trusted friends via end-to-end encrypted messages. No single friend holds enough information to recover your key on their own.

When a second factor is enabled, the shares are additionally encrypted using a key held by the server. The server stores this key in a protected form that it cannot decrypt on its own. It needs your email or PIN to unlock it. The server never learns your email or PIN during setup, only during recovery.

During recovery, the submitted shares are encrypted with a symmetric key which is embedded in the QR code or link you share with your friends during the recovery. The server then only forwards the encrypted data but can never read it.

For the full cryptographic protocol check out my technical blog post.

Let's go!