SlideShare a Scribd company logo
Building a Bitcoin Hardware
Wallet with Golang and a
Raspberry Pi Zero
Nic Raboy | @nraboy
Tracy Developer Meetup Organizer
Disclaimer
I am not an expert in cryptocurrency and encryption.
Agenda
1. A Background on the Various Bitcoin Wallets
2. What is the Raspberry Pi Zero
3. Open Ledger Micro Demo
4. Interacting with Bitcoin with the Go Programming Language
5. Understanding the Risks and Limitations
A Background on the Various
Bitcoin Wallets
Exchange Wallets
● Coinbase, Binance, Kraken, etc.
● Conveniently managed by a third party.
● As secure as the exchange.
○ Mt.Gox, Bitfinex, Coincheck, etc.
● The exchange is in control of any and all currency.
Software Wallets
● Exodus, Electrum, Bitcoin Core, etc.
● You control your cryptocurrency data.
● Risk of a malicious remote attack is decreased.
● As secure as your computer.
● Risk of malware attacks.
● Risk of hard disk failure.
Paper Wallets
● QR Codes, Plaintext, Barcodes, etc.
● Cyberattacks are eliminated.
● Risk of elemental damage such as fire.
● Risk of theft from burglary.
Hardware Wallets
● Ledger Nano S, Trezor, etc.
● Encrypted and disconnected from the internet.
● Accessible from a single host machine at any
given time.
What is the Raspberry Pi Zero
Raspberry Pi and Raspberry Pi Zero
Raspberry Pi 3 - $35.00
● 1.4 GHz Quad-Core CPU
● 1 GB RAM
● WiFi and BLE
● HDMI
● 4x USB
● Gigabit Ethernet
Raspberry Pi Zero - $5.00
● 1 GHz Single-Core CPU
● 512 MB RAM
● Mini HDMI
● Micro USB On-the-Go (OTG)
Linux Distributions
Open Ledger Micro Demo
Interacting with Bitcoin with the
Go Programming Language
The Go Programming Language
● Create dependency free application binaries.
● Cross-compile to nearly any CPU architecture and operating system.
● Great for networking and concurrency.
● In-demand programming language.
● Mild learning curve.
Project Dependencies
● github.com/GeertJohan/go.rice
● github.com/gorilla/mux
● github.com/btcsuite/btcutil
● github.com/btcsuite/btcd
Exposed API Functions
High Level Plan
● Must create an encrypted database file.
● Must be able to decrypt a database file.
● Must be able to add coin data to a database file.
● Must be able to generate signed transactions.
Data Structures
Define Network Information
Generate Private Keys and Public Addresses
Import Private Keys
Encrypt and Decrypt Binary Data
Encrypt and Decrypt Files
Import Coin Into Wallet
Get Addresses without Private Keys
Transactions
Create Source Transaction
Create Redeeming Transaction
Create Wallet API Endpoint
Create Coin API Endpoint
Import Coin API Endpoint
Get Addresses API Endpoint
Create Transaction API Endpoint
Understanding the Risks and
Limitations
Risks and Limitations
1. Wallet password can be brute forced from host machine
2. Passwords can be compromised from malware on host machine
3. Hard disk corruption or failure on the Raspberry Pi Zero
Possible Solutions
1. Set retry timeout or wipe Raspberry Pi Zero after X failed attempts
2. Hardware buttons
3. Airgap with QR codes and cameras
4. Backups
What’s Next?
Tutorial and Code
In-Depth Tutorial:
https://www.thepolyglotdeveloper.com/2018/03/create-bitcoin-hardware-wallet-
golang-raspberry-pi-zero/
Source Code:
https://github.com/nraboy/open-ledger-micro
More Help
Twitter:
https://www.twitter.com/nraboy
Blog:
https://www.thepolyglotdeveloper.com
YouTube:
https://www.youtube.com/user/nicraboy/videos

More Related Content

PPT
Cryptogaphy
PDF
[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners
PPTX
Cryptography in networks
ODP
Maidsafe presentation
ODP
SAFE Network Presentation Bitcoin Meetup
PDF
Intro to NFTs
PPT
The Deep and Dark Web - Spooky Halloween Information Security Lecture -- Info...
PPTX
Cryptogaphy
[Workshop] Getting Started with Cryptos, NFTs & Web 3.0 for Absolute Beginners
Cryptography in networks
Maidsafe presentation
SAFE Network Presentation Bitcoin Meetup
Intro to NFTs
The Deep and Dark Web - Spooky Halloween Information Security Lecture -- Info...

Similar to Building a Bitcoin Hardware Wallet with Golang and a Raspberry Pi Zero (20)

PPTX
Seun - Breaking into Protocol Engineering (1).pptx
PDF
The Most In-Demand Programming Languages for Blockchain Projects.pdf
PDF
Building Digital Transaction Systems in the new Banking World
ODP
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
PDF
Web3 Security: The Blockchain is Your SIEM
PPTX
Total privacy of transactions, Mimblewimble and Grin
PDF
Security Vulnerabilities: How to Defend Against Them
PDF
Gobot Meets IoT : Using the Go Programming Language to Control The “Things” A...
PDF
10 Best Programming Languages for Blockchain in 2023.pdf
PDF
Fluent destry saul
PPTX
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
PPTX
Block chain
PDF
20221110 MetaCoin
PDF
Introduction to Exploitation
PDF
Blockchain and smart contracts, what they are and why you should really care ...
 
PPTX
Best practices to build secure smart contracts
PPTX
Bitcoin
PDF
Programming Decentralized Application
PDF
Real Time Realitites
PPTX
TSC Summit #4 - Howto get browser persitence and remote execution (JS)
Seun - Breaking into Protocol Engineering (1).pptx
The Most In-Demand Programming Languages for Blockchain Projects.pdf
Building Digital Transaction Systems in the new Banking World
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Web3 Security: The Blockchain is Your SIEM
Total privacy of transactions, Mimblewimble and Grin
Security Vulnerabilities: How to Defend Against Them
Gobot Meets IoT : Using the Go Programming Language to Control The “Things” A...
10 Best Programming Languages for Blockchain in 2023.pdf
Fluent destry saul
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Block chain
20221110 MetaCoin
Introduction to Exploitation
Blockchain and smart contracts, what they are and why you should really care ...
 
Best practices to build secure smart contracts
Bitcoin
Programming Decentralized Application
Real Time Realitites
TSC Summit #4 - Howto get browser persitence and remote execution (JS)
Ad

More from Nic Raboy (11)

PPTX
Getting Started with MongoDB using Node.js
PPTX
Marketing and Workflow Automation
PPTX
Create a Chatbot with AWS Lex, Lambda, and HERE
PPTX
Developing Amazon Alexa Skills with the Go Programming Language
PPTX
Static Site Generation with Hugo and Markdown
PPTX
Powering an API with GraphQL, Golang, and NoSQL
PPTX
Developing Applications with Go and NoSQL
PPTX
Native to Hybrid and Back Again
PPTX
Developing for Offline First Mobile Experiences
PPTX
Quick and Easy Development with Node.js and Couchbase Server
PPTX
Cross Platform Storage & Sync with Couchbase and Ionic Framework
Getting Started with MongoDB using Node.js
Marketing and Workflow Automation
Create a Chatbot with AWS Lex, Lambda, and HERE
Developing Amazon Alexa Skills with the Go Programming Language
Static Site Generation with Hugo and Markdown
Powering an API with GraphQL, Golang, and NoSQL
Developing Applications with Go and NoSQL
Native to Hybrid and Back Again
Developing for Offline First Mobile Experiences
Quick and Easy Development with Node.js and Couchbase Server
Cross Platform Storage & Sync with Couchbase and Ionic Framework
Ad

Recently uploaded (20)

PPTX
ai tools demonstartion for schools and inter college
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
history of c programming in notes for students .pptx
PPTX
L1 - Introduction to python Backend.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Nekopoi APK 2025 free lastest update
PPTX
Essential Infomation Tech presentation.pptx
PDF
AI in Product Development-omnex systems
PDF
Softaken Excel to vCard Converter Software.pdf
ai tools demonstartion for schools and inter college
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Understanding Forklifts - TECH EHS Solution
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
history of c programming in notes for students .pptx
L1 - Introduction to python Backend.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
How Creative Agencies Leverage Project Management Software.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
Essential Infomation Tech presentation.pptx
AI in Product Development-omnex systems
Softaken Excel to vCard Converter Software.pdf

Building a Bitcoin Hardware Wallet with Golang and a Raspberry Pi Zero