Please describe your proposed solution
Abstract
KeySphere is a project focused on simplifying self-custody using Yubikeys. The project aims to address the problem of securely managing seed phrases for cryptocurrencies and digital identities.
The current practice of writing seed phrases on paper is highly secure from electronic attack, but leaves users with the burden of providing physical security for their seed phrases. This frequently leaves users vulnerable to loss from fire, flood, theft, natural disaster, war, and a litany of other risks. Today this process is so complex that SatoshiLabs estimates only 2% of crypto users self-custody their own keys. KeySphere substantially eases the physical security burden with a secure multi-layer, multi-key encryption design that leverages Yubikeys as small, portable, and (relatively speaking) low-cost hardware security modules (HSMs).
This multi-layer approach ensures that an attacker finding only one key cannot decrypt the seed phrase. And even if the attacker finds a Yubikey, they are highly unlikely to extract the actual key from the Yubikey’s secure (CC EAL 6+) hardware.
Importantly, an attacker finding only one key does not reduce at all the security level of the encryption scheme.
Key Features and Functionality:
- Yubikey-Based Encryption: The core of KeySphere lies in its use of Yubikeys to encrypt seed phrases. The seed phrase is encrypted with 256-bit keys that are generated and stored within each Yubikey's secure hardware.
- Multiple Encryption Layers: KeySphere utilizes multiple encryption layers, similar to Russian nesting dolls, to further enhance security. The seed phrase is encrypted in layers, with each layer requiring a separate key to unlock. The layers are ordered in such a way that only certain combinations can decrypt the seed phrase. This layered approach significantly increases the difficulty for attackers to steal the seed phrase because they need access to more than one key- i.e. finding one key is insufficient for an attack to succeed (unlike most paper backups.) This is the primary mechanism by which KeySphere reduces the need for users to have perfect physical security.
- Geographically-Distributed Storage: Once encrypted, the seed phrase is replicated and stored across multiple data centers in different geographic locations. This distributed storage model ensures redundancy and protects against data loss due to localized events like fire, flood, natural disasters, and even displacement due to war. Because both the Yubikeys and Recovery Key use keys with a full 256-bits of entropy (as opposed to something like passwords with key stretching which could provide 256-bit keys with substantially less than 256-bits of entropy), these seed phrase backups are as hard for an attacker to brute force as if they decided to brute force any address that is publicly available on a blockchain. This is what enables KeySphere to safely replicate these backups geographically, thus protecting against fire, flood, war, and other threats that occur when seed phrases are stored in a single location.
- Recovery Options: KeySphere offers flexible recovery options based on different combinations of Yubikeys and the Recovery Key. This allows users to choose a combination that suits their needs at time of recovery and provides redundancy in case of loss or compromise of any single key. The default decryption method is to use the Recovery Key and any one Yubikey. If a user loses their Recovery Key, they can recover it using all three Yubikeys. If a user loses both the Recovery Key and one or more Yubikeys, they are unable to recover. However, note that this is substantially more recoverable than losing a single piece of paper. Future developments could improve this further (see next bullet).
- Potential for Centralized Recovery Services: While not part of this Fund 13 proposal, KeySphere's design facilitates the future (and, importantly, optional) inclusion of centralized recovery services. These services could act as a further safety net for users who are unable to recover in the above scenarios. In cases where users still have at least one key (Yubikey or Recovery Key), this can provide an additional layer of encryption ensuring a centralized recovery service only has access to an encrypted copy, even after decrypting their layer. This substantially reduces the risk of using a centralized recovery service, and is a material improvement upon services like Ledger Recover. For full details, please watch this technical overview:
<https://vimeo.com/946890861?share=copy>What I’ve built so far:
- A technical prototype that proves Yubikeys can be used in this way, including:
- A Kotlin Multiplatform codebase that can connect to Yubikeys over NFC and talk to the OpenPGP card application.
- The ability to configure a Yubikey over NFC with a simple tap, including generating Ed25519 and X25519 keys in hardware, which never leave the Yubikey.
- Using the Yubikey's X25519 public key to encrypt data only the Yubikey can decrypt.
- Using the Yubikey's X25519 private key (hardware-bound) to decrypt the data.
- Using libsodium, X25519, and XChaCha20-Poly1305-IETF in this process.
- A Figma prototype (click to view.)
- A work-in-progress app that will eventually (in Fund 13) work like the Figma prototype.
- A work-in-progress API that supports multi-key signature-based authentication using Ed25519.
To de-risk this project, we’ve already completed the most technically risky work. What remains in Fund 13 is straight-forward by comparison.
What I intend to do in Fund 13:
In Fund 13, I'll be finishing this app so it matches the Figma prototype and works end-to-end as a potentially viable product. This will allow me to test with real customers and validate the idea more fully.
High level tasks include:
- Finishing the Mobile App: Complete the mobile app based on the Figma prototype, enabling full end-to-end seed phrase backup and management.
- Creating a Robust File Format Specification: A well-defined file format specification will ensure the secure and reliable storage, and long-term recovery, of encrypted seed phrase backups.
- Developing a Privacy-Preserving Backend API: The API will support multi-key signature-based authentication using Ed25519, and store backups with minimal user data. Our design is inspired by this remarkable blog post by Mullvad: <https://mullvad.net/en/blog/mullvad-vpn-was-subject-to-a-search-warrant-customer-data-not-compromised>.
Where you can find and play with it to verify:
For the latest dev build and instructions on how to test, please see https://www.keysphere.ai/catalyst/app-instructions.
For a deeper dive, please watch this technical overview:
<https://vimeo.com/946890861?share=copy>Addendum: Potential future pairing with Decentralized Recovery (DeRec):
While KeySphere’s Fund 13 work focuses on self-sovereign recovery options, we see the potential benefits of pairing our design with solutions like Decentralized Recovery (DeRec). DeRec allows users to recover their keys using a network of trusted helpers, each holding a share of the seed phrase. In most cases, KeySphere users would be able to use KeySphere to recover without assistance from trusted helpers. In extreme cases where both the user’s KeySphere Recovery Key and one or more Yubikeys is lost, users could fall back to recovery with DeRec.
It's worth noting the times in which we're in: advances in AI voice and video are beginning to make identity verification over voice and video calls untrustworthy (ex: 1, 2, 3, 4). This will continue rapidly in the coming days, weeks, months, and years. This makes recovery with DeRec more difficult than it would be otherwise- instead of a quick call to ask helpers for help, it may require an in-person visit for sufficient security. With DeRec, this could mean visiting 5 or more people, which could be time consuming depending where they live. Having a self-service recovery option with KeySphere as a first line of defense may avoid the need for this in the vast majority of cases.
KeySphere users may also be able to use DeRec as part of a layered approach (like above) to ensure that helpers cannot recover their seed phrase, even in the slim chance that a majority of these helpers collude together with their shares of the seed phrase. This would improve self-sovereignty over users who only use DeRec. Users who use both together would have formidable protection in an extreme number of scenarios, making self-custody much safer than it is today.