Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (2024)

Tech

This post was first published onMedium.

We use the secure enclaves of iOS and Android devices to store Bitcoin private keys. The keys never leave the enclaves, providing same security as hardware wallets. This essentially turnsbillionsof smartphones into secure Bitcoin hardware wallets. Users can authorize Bitcoin transactions using FaceID and TouchID.

Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (2)

Secure Enclave

The Secure Enclaveis a special chip in Android, iPhone, iPad andMacsto secure your biometrical data like FaceID and TouchID. The key feature of the Secure Enclave is that a private key generated on itcannotleave the chip, providing maximum security as in hardware wallets such as Ledger and Trezor.

Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (3)
Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (4)

Private key in it can be used to sign messages securely. Messages are sent into the Secure Enclave, signed, and then the signature is returned. The private key during signing reside in the chip and is not stored in memory and thus is inaccessible from software. Permission to sign a transaction can be granted using a biometric authentication such as FaceID and TouchID.

Elliptic curvesecp256r1

The Secure Enclave supports a single elliptic curve,secp256r1, also known asprime256 and P-256. It is different from the elliptic curvesecp256k1that’s used for the popular blockchains such as Bitcoin and Ethereum.

Both elliptic curves are of the formy² = x³ + ax + b.

Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (5)

In the secp256k1 curve, we have

a = 0
b = 7

and in the secp256r1 case we have

a = FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFC
b = 5AC635D8 AA3A93E7 B3EBBD55 769886BC 651D06B0 CC53B0F6 3BCE3C3E 27D2604B

Due to the lack of native support of secp256r1, all cryptocurrency wallet apps today are using software signing, instead of hardware signing. Software signing is susceptible to side-channel attacks that leak information about the private key.

Implementing secp256r1 on Bitcoin

Thanks to the expressiveness and scalability of Bitcoin smart contracts, we can implement secp256r1 efficiently, specifically ECDSA signature verification, at contract level. The signature is generated by the Secure Enclave, enjoying maximal security. We then verify the hardware signature in a smart contract. Note this does not require any breaking changes at the base layer, even though it uses a different curve.

We modifiedthe ECDSA verification implementationreleased before, switching from curve secp256k1 to secp256r1. It basically implements the standard ECDSA verification algorithm.

secp256r1

Backup

To be as secure as possible, the Secure Enclave disallow export keys, making it impossible to backup keys (different from hardware wallets with mnemonic words). If a smartphone is lost and damaged, the private key and the funds it controls are lost.

One solution is to create a 1 of 2 (or N) multisig wallet. One key can be generated offline and safely stored as in a cold wallet. The second key is generated inside the Secure Enclave. In case of phone loss or damage, the user can safely use their offline backup key to move the funds out of the wallet.

Pleasecontact usif you are interested in building the first ever hardware-signing Bitcoin wallet. Some other types of hardware security modules (HSM), which hardware wallets belong to, likeSmart Cardalso support elliptic curves, so they also act as Bitcoin wallets as well.

Watch: Small Payments, Big Fun: Micropayments for Casual Games

Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (6)

New to blockchain? Check out CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.

Turn every smartphone into a Bitcoin hardware wallet using Secure Enclaves (2024)

FAQs

Can I use my phone as a hardware wallet? ›

While it is possible to store cryptocurrency on a mobile phone, it's important to note that using a mobile phone as a hardware wallet is generally considered less secure than using a dedicated hardware wallet.

How do I create a Bitcoin wallet? ›

How to set up a crypto wallet
  1. Pick a wallet app and download it on a desktop or mobile device; many software wallets have both options.
  2. Create an account. ...
  3. Write down your recovery or “seed” phrase. ...
  4. Add crypto to your wallet.
Mar 8, 2024

What is the best ledger for Bitcoin wallet? ›

The Ledger Nano X is a hardware wallet perfect for managing your Bitcoin. It's highly versatile, offering support for most major cryptocurrencies including Solana, Tezos, and Cosmos. Within the Bitcoin ecosystem, Ledger devices also support several Bitcoin layer 2 networks, such as Lightning and Stacks.

What is the difference between mobile and hardware wallet? ›

Enhanced Security: Unlike software wallets that reside on your computer or phone, hardware wallets store your private keys offline in a secure chip. This offline storage makes them much less susceptible to hacking, malware, and other online threats.

Can a hardware wallet be backed up? ›

Most hardware wallets can even work with multiple blockchains simultaneously. This allows a user to manage many different types of coins from many different exchanges on a single device. All of the data stored in a hardware wallet can be easily backed up with a single recovery phrase or PIN code.

What is the easiest Bitcoin wallet to create? ›

The most popular and easy-to-set-up crypto wallet is a hosted wallet. When you buy crypto using an app like Coinbase, your crypto is automatically held in a hosted wallet. It's called hosted because a third party keeps your crypto for you, similar to how a bank keeps your money in a checking or savings account.

Which app can I use to create my Bitcoin wallet? ›

Download and install Trust Wallet. Add Bitcoin (BTC) to your wallet. Access wallet features like buy, sell, swap and more.

How much does it cost to make a Bitcoin wallet? ›

The average cost to develop a crypto wallet app on the blockchain is around $15,000 for a simple crypto wallet and around $200,000 for one with extra/complex features.

What is the strongest Bitcoin wallet? ›

Compare the Best Bitcoin Wallets
CompanyType of WalletCompatible Hardware
Trezor Model T Best for a SecurityColdYes
Ledger Nano X Best OverallColdYes
Electrum Best for Advanced Bitcoin UsersHotYes
Exodus Best for BeginnersHotYes
1 more row

What is a sparrow wallet? ›

Sparrow is a Bitcoin wallet for those who value financial self sovereignty. Sparrow's emphasis is on security, privacy and usability.

Which type of Bitcoin wallet is most secure? ›

You need private keys to access your digital assets and ensure they are safe from hacks and phishing attacks. Hot wallets (software wallets) and cold wallets (hardware wallets) are the two types of secure bitcoin wallets.

What does a hardware wallet look like? ›

Understanding Hardware Wallets

A hardware wallet is a physical device, often resembling a USB drive, designed to store cryptocurrencies offline securely.

What are the disadvantages of hardware wallets? ›

The only disadvantage of hardware wallets is that they can be pretty expensive. Ledger Nano S, Trezor Model One, and SafePal S1 are some of the best examples. Expect surprises with Crypto!

Do you need a computer to use a hardware wallet? ›

Yes, a computer or a smartphone is typically required to interact with a hardware wallet. These devices are needed to manage transactions, such as sending or receiving cryptocurrencies.

Can I use my phone as a wallet? ›

You can access a mobile wallet through several smartphone apps. Many companies, like Apple and Android, offer versions of a mobile wallet. Most credit card issuers offer their own versions, too, making it easy to connect your cards and accounts.

Can I use my phone instead of RFID card? ›

Yes, you can use your phone as RFID tag. For Android or Windows phones you enable NFC. In case of an Apple you need to enable Bluetooth. Traditionally a RFID tag is a smart card, badge, ticket or drop.

How do I make my own hardware wallet? ›

Steps Required to Create a Hardware Wallet
  1. Step 1: Select the hardware you want to use. The first step is to research and compare different wallets to determine which one best fits your needs. ...
  2. Step 2: Purchase the hardware and install required software. ...
  3. Step 3: Transfer your cryptocurrency.

Top Articles
How To Cancel Service - TrendSpider
When Did the FOMC Begin Targeting the Federal Funds Rate? What the Verbatim Transcripts Tell Us- Working Papers
Skyward Sinton
Bj 사슴이 분수
Elleypoint
Using GPT for translation: How to get the best outcomes
Farepay Login
Craigslist Mpls Mn Apartments
Mikayla Campino Video Twitter: Unveiling the Viral Sensation and Its Impact on Social Media
Blue Beetle Showtimes Near Regal Swamp Fox
California Department of Public Health
‘Accused: Guilty Or Innocent?’: A&E Delivering Up-Close Look At Lives Of Those Accused Of Brutal Crimes
Pvschools Infinite Campus
Teenleaks Discord
Rachel Griffin Bikini
Yard Goats Score
Kirksey's Mortuary - Birmingham - Alabama - Funeral Homes | Tribute Archive
Best Transmission Service Margate
Parc Soleil Drowning
UMvC3 OTT: Welcome to 2013!
Mini Handy 2024: Die besten Mini Smartphones | Purdroid.de
Bill Remini Obituary
Bento - A link in bio, but rich and beautiful.
Beaufort 72 Hour
Great ATV Riding Tips for Beginners
Nearest Ups Ground Drop Off
Astro Seek Asteroid Chart
Lincoln Financial Field, section 110, row 4, home of Philadelphia Eagles, Temple Owls, page 1
J&R Cycle Villa Park
Royals op zondag - "Een advertentie voor Center Parcs" of wat moeten we denken van de laatste video van prinses Kate?
Frank 26 Forum
Pensacola Cars Craigslist
Merkantilismus – Staatslexikon
MSD Animal Health Hub: Nobivac® Rabies Q & A
Wrigley Rooftops Promo Code
Vocabulary Workshop Level B Unit 13 Choosing The Right Word
Actor and beloved baritone James Earl Jones dies at 93
The Wait Odotus 2021 Watch Online Free
21 Alive Weather Team
Bustednewspaper.com Rockbridge County Va
Craigslist Woodward
How the Color Pink Influences Mood and Emotions: A Psychological Perspective
Crigslist Tucson
Motorcycles for Sale on Craigslist: The Ultimate Guide - First Republic Craigslist
Turok: Dinosaur Hunter
Unbiased Thrive Cat Food Review In 2024 - Cats.com
Gameplay Clarkston
Palmyra Authentic Mediterranean Cuisine مطعم أبو سمرة
Elizabethtown Mesothelioma Legal Question
How to Choose Where to Study Abroad
Www.card-Data.com/Comerica Prepaid Balance
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6138

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.