2020-08-05

Security Foundations: How to Secure Your Wallet Recovery Phrase for Cryptocurrency Wallets

12 chapters · 70 markers

Lecture overview: securing your wallet recovery phrase 2

This lecture teaches any cryptocurrency user, whether on Bitcoin, Ethereum, EOS, Tezos, or Cardano, how to secure a wallet recovery phrase and harden their whole digital life from first principles.

Cardano Tech & Research BTCETH

The wallet recovery phrase comes from the 2013 BIP 39 standard, a list of 12 to 24 words that restores any HD format wallet, and Ian Coleman built the widely used web tool for generating and checking these words.

Cardano Tech & Research BIP39seed phrasemnemonic phrase +1
Security mindset and the CIA triad 5

Building a security mindset starts with the concept of an adversary, someone operating inside a system with real capabilities aimed at whatever value is at risk.

Cardano Tech & Research threat model

Every security setup is a balancing act inside the CIA triad of confidentiality, integrity, and availability, since no solution is perfectly secure.

Cardano Tech & Research

Adversaries span a spectrum from opportunistic novices who steal an unattended phone at a cafeteria, to organized crime running ransom and blackmail operations, to state actors like the NSA, the FSB, and MI6 with multi billion dollar budgets.

Cardano Tech & Research

An adversary is never static, it keeps adapting and growing, so your own geography, lifestyle, and how much money is at risk determine what level of attacker you are likely to attract.

Cardano Tech & Research

North Korea is good evidence of a state level actor behind several major Bitcoin heists, showing that adversary sophistication rises with the value at stake.

Crypto Industry & Commentary state sponsored hackingBTC
Infosec mentors: Schneier and Gibson 2

Bruce Schneier is a favorite infosec mentor, with his blog at schneier.com and books like Click Here to Kill Everybody, Data and Goliath, Liars and Outliers, Beyond Fear, and Secrets and Lies.

Steve Gibson's long running Security Now podcast is another go to resource for tracking major hacks and information security news on a weekly cadence.

Community & Media
Building a secure operating environment 8

A secure operating environment has two planks, the system and the person, since novices hack computers but experts hack people, as shown when the 2020 Twitter hack succeeded through social engineering rather than by breaking any code.

Community & Media

A hierarchy of secure computing setups runs from a virtual machine, to dual booting, to a memory only live image, to a hardened Coreboot system, up to the fully air gapped specialty systems used by agencies like the NSA.

Cardano Tech & Research YubiKey documentation

Booting a live image runs entirely in RAM and leaves no trace on disk, a step up in security from simply dual booting into a separate hard drive partition.

Cardano Tech & Research

A 40 dollar Samsung USB 3.1 flash drive booted into a memory only live Linux distribution is the recommended sweet spot for an average user's secure sandbox.

Cardano Tech & Research

Rufus burns a bootable Ubuntu USB drive, and changing the boot order in the computer's BIOS lets you boot straight into that disposable sandbox.

Cardano Tech & Research MDTech Videos

The live Ubuntu sandbox resets to a clean state on every restart, so nothing generated inside it, including cryptographic keys and the recovery phrase, ever persists once you reboot.

Cardano Tech & Research

An Apricorn hardware encrypted flash drive with a PIN keypad and FIPS 140-2 compliance, the same standard used for classified military data, carries files out of the sandbox and wipes itself after 10 wrong PIN attempts.

Cardano Tech & Research

After finishing sensitive work, the plan is to save only the vetted files onto the encrypted drive, exit the sandbox, and carry just those files back into a normal operating system.

Cardano Tech & Research
The secure skeleton key concept 6

Level three is building a secure skeleton key so the user only has to memorize three things, two proper nouns and one PIN code of at least eight digits.

Cardano Tech & Research

The mnemonic number shape pegging method, the same technique people use to memorize pi to 30000 digits, makes an eight digit PIN easy to recall.

Cardano Tech & Research

Reusing one password everywhere was the early internet norm, so a single breached site compromised every account, which is why password managers were invented to generate a unique password per site.

Cardano Tech & Research

Multi factor authentication, borrowed from the military and intelligence world, rests on three factors, something you know, something you have, and something you are.

Cardano Tech & Research MFA

Military biometric access has long used CAC common access cards, alongside specialty hardware like an LG phone that scanned the vasculature in a user's hand as a unique fingerprint.

Cardano Tech & Research

Consumer biometrics like fingerprint readers, Windows Hello, and Apple's face scanner have brought military grade multi factor authentication to ordinary phones and laptops at low cost.

Cardano Tech & Research Face ID
YubiKey and the salted master password 5

The YubiKey is the recommended hardware Swiss Army knife of security, durable, batteryless, and able to generate one time passwords, static passwords, and PGP keys.

Cardano Tech & Research

YubiKeys come in USB-A, USB-C, and Lightning connector versions, and read a quick tap differently from a long touch on their built in electrostatic pad.

Cardano Tech & Research

A quick tap on the YubiKey generates a fresh one time password each time, meant for authentication rather than as the salt for a master password.

Cardano Tech & Research

Configuring the YubiKey's long touch slot to output a fixed salt, then appending a memorable city name, a person's name, and an eight digit PIN, produces a master password that is never fully typed or memorized by its owner.

Cardano Tech & Research salt password

The resulting salted master password is effectively unbreakable by brute force, yet the human side of it is just three simple things anyone can remember for life.

Cardano Tech & Research
Setting up LastPass 7

LastPass is the recommended password manager, free or 3 dollars a month for premium, working across Windows, Mac, Linux, Android, and iOS.

Cardano Tech & Research

The LastPass browser extension and mobile app auto fill saved logins, unlocking with a fingerprint tap so daily use barely changes once the vault is set up.

Cardano Tech & Research

A LastPass vault can store passwords, notes, addresses, and card details, secured further with app based multi factor authentication like Microsoft or Google Authenticator alongside the YubiKey.

Cardano Tech & Research

LastPass also offers printable backup codes and device fingerprinting, so a stolen password alone cannot be used to log in from an unrecognized device.

Cardano Tech & Research trusted devices

Because most sites tie account recovery to an email address, the email account is the second skeleton key and needs the same hardened password and multi factor authentication as the password manager.

Cardano Tech & Research

Rotating every account to a long randomly generated password inside the secure sandbox typically takes an hour or two, safe from any key logger or malware while it happens.

Cardano Tech & Research

Secure storage splits into offline, the Apricorn hardware drive, and high availability online options, the LastPass vault and, surprisingly, plain email, both made safe once encryption is layered on top.

Cardano Tech & Research
PGP and public key cryptography basics 5

Ubuntu ships with GPG, the open source implementation of the PGP public key cryptography standard that underlies internet security.

Cardano Tech & Research opensource

Public key cryptography, also called asymmetric cryptography, traces back to Rivest, Shamir, and Adleman's RSA and to Diffie and Hellman's key exchange, and is what puts the padlock icon in every browser.

Cardano Tech & Research Diffie-Hellman

A PGP key pair works like a lockable envelope, the public half lets anyone lock a message, but only the matching private half, kept shielded behind a password, can ever unlock it.

Cardano Tech & Research

The PGP standard dates to 1991, with its latest specification from 2007 credited to Jon Callas and Phil Zimmermann, and Hal Finney, the first person to receive a Bitcoin transaction from Satoshi Nakamoto, was also one of its original authors before he died of ALS.

Crypto Industry & Commentary PGP CorporationBTC

Kleopatra is the PGP management software for Windows and Mac available from gpg4win.org, while Mailvelope is the cross platform browser extension for encrypting and decrypting email and files.

Cardano Tech & Research
Generating hot and cold PGP keys 10

Two separate PGP key pairs get generated for this setup, a hot key that lives in the browser and a cold key that lives only on the YubiKey hardware.

Cardano Tech & Research

Generating a PGP key in Kleopatra with RSA 4096 and no expiration date is the recommended setting for a key meant purely for encryption rather than rotating communication.

Cardano Tech & Research

The 60 character passphrase that shields a new PGP key gets generated with LastPass and saved straight into the vault, so it never has to be memorized.

Cardano Tech & Research

A test PDF built in LibreOffice and encrypted with the hot PGP key becomes an unreadable dot GPG file that only the matching private key can open.

Cardano Tech & Research

Public PGP keys can be published to key servers like the MIT key server, so anyone in the world can encrypt a message to you while only you can decrypt it.

Cardano Tech & Research

Preparing a YubiKey for PGP requires the command line tool gpg card edit to set new PIN, unblock, and reset codes before Kleopatra can generate keys on the hardware itself.

Cardano Tech & Research

A YubiKey behaves like a smart card, three wrong PIN attempts lock it, and it ships with the well known factory admin PIN 12345678 that should always be changed.

Cardano Tech & Research

Kleopatra's manage smart cards tool generates the cold PGP key pair directly on the YubiKey hardware, a process that takes 5 to 10 minutes for a full 4096 bit key.

Cardano Tech & Research

Encrypting a test file for the cold key and then decrypting it proves the YubiKey itself has to be plugged in and unlocked with its PIN before the file will open.

Cardano Tech & Research

Because the cold key's private half never leaves the YubiKey hardware, an attacker has to physically steal and unlock the device itself, not just copy a file, to ever decrypt with it.

Cardano Tech & Research
Hardware wallets and encrypting the recovery phrase 7

For everyday cryptocurrency use, a Ledger, about 120 dollars, or a Trezor, about 160 dollars, hardware wallet is the recommended way to generate and hold a 24 word recovery phrase, and Cardano supports both.

Cardano Tech & Research

The 24 word recovery phrase should be handwritten twice straight from the hardware wallet's screen, then the two copies compared to make sure every word matches before typing them into the secure sandbox.

Cardano Tech & Research

The recovery phrase file gets double encrypted, first with the cold YubiKey PGP key, then with the hot browser PGP key, so an attacker needs both a physical hardware key and a separately shielded software key to ever open it.

Cardano Tech & Research

Unlocking the Apricorn drive's PIN keypad and copying the double encrypted file onto it is the only way to carry the recovery phrase out of the secure sandbox.

Cardano Tech & Research

After double encrypting the recovery phrase, the plan is to leave the secure sandbox, carry the file out on the encrypted drive, and test decrypting it back in an ordinary Windows environment.

Cardano Tech & Research

A full YubiKey, encrypted flash drive, and Ledger security kit costs a little over 200 dollars total for an end to end wallet recovery phrase protection setup.

Cardano Tech & Research

In the live walkthrough the encrypted flash drive shows up as a Corsair Voyager GTX rather than the earlier recommended Apricorn model, since either type of PIN pad encrypted drive works the same way.

Cardano Tech & Research
Backing up and restoring the encrypted keys 7

Exporting the hot and cold PGP secret keys, plus the cold key's public key, onto the encrypted drive creates a portable backup in case the YubiKey itself is ever lost.

Cardano Tech & Research

Disconnecting the encrypted flash drive and the YubiKey from the sandbox makes both devices reappear normally in Windows, carrying the double encrypted recovery phrase file out with them.

Cardano Tech & Research

Back in Windows, importing the exported hot and cold keys into Kleopatra, then running gpg card edit again to refresh the YubiKey, restores full access to the double encrypted file outside the sandbox.

Cardano Tech & Research

Decrypting the double wrapped file happens in reverse order, the hot key's passphrase peels off the outer layer first, then the cold key's hardware PIN opens the inner one.

Cardano Tech & Research

The double encrypted recovery phrase file is safe enough to email to yourself, since an attacker who compromises the inbox still needs both PGP keys and their passphrases to read it.

Cardano Tech & Research

Because LastPass notes cannot hold arbitrary files directly, zipping the encrypted recovery phrase with a tool like PZip lets it be uploaded as a note attachment for a second online backup.

Cardano Tech & Research

For long term physical storage, the advice is to consult a professional safe cracker or locksmith about which safe fits your budget, so the security mindset, sandboxed operating system, salted skeleton key, and double PGP encrypted backups all come together as one complete solution.

Cardano Tech & Research
Further resources and closing 6

Ross Anderson's Security Engineering, called the bible of information security and of the CISSP certification, is getting a third edition in December.

Community & Media

Introduction to Modern Cryptography by Jonathan Katz and Yehuda Lindell, a contemporary of IOG's chief scientist, is recommended as the bible of cryptography theory.

Community & Media Input OutputIOHKIO

A free Coursera cybersecurity specialization covering usable security, software security, cryptography, and hardware security, with a full capstone project, takes about a year to complete.

Community & Media

Beyond Ubuntu, security minded users can explore Qubes OS, used by many infosec professionals, hardened FreeBSD, or a free 14 week Linux course taught by Linus Torvalds.

Community & Media

The YubiKey Manager command line tool, YKMan, can generate the static salt password with a no enter flag so it does not auto submit before the rest of the password gets typed.

Cardano Tech & Research

This lecture is framed as the first step in an endless security journey, alongside mentors like Bruce Schneier and Steve Gibson, meant to help any Bitcoin or Cardano user take control of their privacy, money, and freedom.

Vision & Philosophy BTC