SlideShare a Scribd company logo
1 of 23
P2SH and Multi-Sig
Ending the Cold Storage Ice Age
Benedict Chan, BitGo
@bencxr benchan@bitgo.com
Agenda
● Pay to Script Hash
● Emerging multi-sig concepts and scenarios
● Implement a multi-sig wallet in 5 minutes
Pay to Script Hash (P2SH)
● Bitcoin address can require successful
execution of a script corresponding to a
hash
○ Past: “Claim if signed by xyz private key”
○ Now: “Claim only if xyz conditions were satisfied”
● 7.88% of BTC held in P2SH addresses
P2SH - Hash-Locked Contract
● Example: A and B want to trade BTC for DOGE
● A thinks of any x and hashes it to H(x)
● On Bitcoin chain:
○ A creates transaction TX0 to a P2SH script to
■ Pay BTC to B if x of H(x) is known and signed by B or
■ Pay BTC to A if signed by A and B
○ A creates refund transaction TX1 (with TX0 as input) valid at a
future date (3 days later) for B to sign
● On Dogecoin chain:
○ B does similar (refund not shown), sends to P2SH script “Pay
2,000,000 doge to A if x of H(x) is known and signed by A”
● When A claims DOGE by revealing x, B can claim BTC
P2SH - Multi-Signature Address
● Spend an input if only M of N signatures were
provided
○ Commonly 2 of 3 (up to 15)
○ M of N must be defined at address creation
time
● Signers cannot change outputs
Cold Storage on Multiple Machines
● Create and use keys on separate
online/offline devices
● Hacker must compromise multiple machines
● Redundancy
● Examples: Bitcoind (createmultisigaddress,
createrawtransaction), Armory Lock Boxes
Multi-Sig Hardware Wallets
● Additional signer
● Private key never leaves device
● Low malware risk
Joint Wallet with Multiple Parties
● Family expense wallet
● Group savings (birthday gift, holiday funds)
● All signers have equal importance
Multi-Sig Escrow
● 2-of-3: Buyer, Seller and Escrow
● Buyer sends purchase funds, seller (may) send collateral
● If buyer receives item in good order, create payment
transaction with seller.
● Otherwise escrow agent can mediate
● Escrow agent can never steal funds with only 1 key
Micro Payment Channel
● Customer creates TX0 for 1 BTC to shared 2-of-2 address
● Provider sends Nlocktime refund transaction for full amount
● Publish TX0
● Replace off-chain transactions
○ 0.99 to customer, 0.01 to provider
○ 0.98 to customer, 0.02 to provider
○ …
○ 0.55 to customer, 0.45 to provider
● Broadcast only last transaction to close channel
Instant Confirmations
● “Clearing house” creates a 2-of-2 address for the customer
to pre-fund
● Payments out of address guaranteed “instant
confirmations”
● Clearing house would never double-sign the same input
BitPay Impulse
Smart Co-Signer Service
● 2 keys held by customer, 1 key by
service
● User creates and half-signs transaction,
then sends to co-signer
● Co-signer executes security and logic
● Per-day limits / Per-transaction limits
● Destination bitcoin address whitelists
● Time of day restrictions
● Human approvals - User/password/2FA
● Red button (kill switch)
● Blacklisting, IP lockdown, ...
● External webhooks
BitGo Co-Signer Logic
Enterprise Treasury
● Multiple users on a wallet
○ Require 2FA and User Auth
● Accountant creates transactions up to a limited amount per
day
● CEO, CFO able to approve large withdrawals
● Can add/remove privileges of users at any time
● Example customers: SecondMarket, ChangeTip, BitFury..
ATM Provider
● Shared wallet with multiple machines
● One access token per machine
● IP lockdown for each token
● Tokens may be individually revoked
● Example customers: Lamassu ATMs
Exchange Hot Wallet Pool
● Exchange maintains single hot wallet for all deposits and
withdrawals
● Outgoing withdrawal amount limited per day
● Callback on each transaction to accounts database
● Examples: Bitstamp, BitSpark, BitQuick, MimeticMarkets, ...
Exchange-owned Segregated Wallet
● One wallet per exchange user
● Per-user-wallet policy granularity
● Withdrawals require user 2FA
● Transactions to house wallet whitelisted
● Every user owns their own private key
● Backup key held by arms-length custodian
● Buy orders can go directly to user wallet
● Sell orders can be confirmed by exchange instantly
● Great for places that allow you to just “buy
bitcoin”
User-owned Wallet Linked With Exchange
Exchange+User Joint Wallet
● User and exchange each own a private key
● Instant confirmation
● Withdrawals depend on
○ Webhook call to exchange to ensure user has
sufficient margin
Co-Signer Oracle Contracts
● HTTP callback enables external logic to be implemented
Shared
Multi-Sig
Wallet
UserA BTC Collateral (1BTC)
UserB BTC Collateral (1BTC)
Winner creates/signs tx
for 2BTC out
BitGo Co-
signer
Webhook oracle
gets BTC price at
contract date to
determine winner
cosign/transmit
Bitcoin
P2P Net
Open Source SDK
1. Create a wallet
2. Get new addresses
3. Fund the wallet
4. Get transactions and balances
5. Send coins
Implementing multi-sig in 5 minutes
Exchange integration demo
● First open-source multi-sig bitcoin exchange
● Uses bitgod (bitcoind adapter for Bitgo)
Thank you
visit: https://www.bitgo.com/platform
twitter: @bencxr
email: benchan@bitgo.com

More Related Content

What's hot

create your own cryptocurrency
create your own cryptocurrencycreate your own cryptocurrency
create your own cryptocurrencyBellaj Badr
 
Blockchain, bitcoin
Blockchain, bitcoinBlockchain, bitcoin
Blockchain, bitcoinSathish VJ
 
Sidechain talk
Sidechain talkSidechain talk
Sidechain talkjojva
 
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Prithwis Mukerjee
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloatboolberry
 
Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)Tsasaa Tsas
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesSébastien Tandel
 
Blockchain, Smart Contracts and DAOs in 10 minutes
Blockchain, Smart Contracts and DAOs in 10 minutesBlockchain, Smart Contracts and DAOs in 10 minutes
Blockchain, Smart Contracts and DAOs in 10 minutesAndreu Rodríguez i Donaire
 
Blockchain Deconstructed - by nexxworks
Blockchain Deconstructed - by nexxworks Blockchain Deconstructed - by nexxworks
Blockchain Deconstructed - by nexxworks nexxworks
 
Understanding Cryptocurrency
Understanding CryptocurrencyUnderstanding Cryptocurrency
Understanding CryptocurrencyKapil Gupta
 
An analysis of attacks on blockchain consensus
An analysis of attacks on blockchain consensusAn analysis of attacks on blockchain consensus
An analysis of attacks on blockchain consensuszubairKhan200705
 
Economías criptográficas
Economías criptográficasEconomías criptográficas
Economías criptográficasnavajanegra
 
Beginners guide for smart contract
Beginners guide for smart contractBeginners guide for smart contract
Beginners guide for smart contractPulsehyip
 
Cryptocurrency for Dummies
Cryptocurrency for DummiesCryptocurrency for Dummies
Cryptocurrency for DummiesMiguel Duarte
 
Bitcoin powerpoint
Bitcoin powerpointBitcoin powerpoint
Bitcoin powerpointdcarro11
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchainseancarmody
 

What's hot (20)

create your own cryptocurrency
create your own cryptocurrencycreate your own cryptocurrency
create your own cryptocurrency
 
Blockchain, bitcoin
Blockchain, bitcoinBlockchain, bitcoin
Blockchain, bitcoin
 
Sidechain talk
Sidechain talkSidechain talk
Sidechain talk
 
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloat
 
Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)Bitcoin (Cryptocurrency)
Bitcoin (Cryptocurrency)
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challenges
 
Blockchain, Smart Contracts and DAOs in 10 minutes
Blockchain, Smart Contracts and DAOs in 10 minutesBlockchain, Smart Contracts and DAOs in 10 minutes
Blockchain, Smart Contracts and DAOs in 10 minutes
 
Blockchain Deconstructed - by nexxworks
Blockchain Deconstructed - by nexxworks Blockchain Deconstructed - by nexxworks
Blockchain Deconstructed - by nexxworks
 
Understanding Cryptocurrency
Understanding CryptocurrencyUnderstanding Cryptocurrency
Understanding Cryptocurrency
 
An analysis of attacks on blockchain consensus
An analysis of attacks on blockchain consensusAn analysis of attacks on blockchain consensus
An analysis of attacks on blockchain consensus
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
Economías criptográficas
Economías criptográficasEconomías criptográficas
Economías criptográficas
 
Altcoins
AltcoinsAltcoins
Altcoins
 
Bitcoin101
Bitcoin101Bitcoin101
Bitcoin101
 
Beginners guide for smart contract
Beginners guide for smart contractBeginners guide for smart contract
Beginners guide for smart contract
 
Introduction to Blockchain Technology
Introduction to Blockchain TechnologyIntroduction to Blockchain Technology
Introduction to Blockchain Technology
 
Cryptocurrency for Dummies
Cryptocurrency for DummiesCryptocurrency for Dummies
Cryptocurrency for Dummies
 
Bitcoin powerpoint
Bitcoin powerpointBitcoin powerpoint
Bitcoin powerpoint
 
Bitcoin, Banking and the Blockchain
Bitcoin, Banking and the BlockchainBitcoin, Banking and the Blockchain
Bitcoin, Banking and the Blockchain
 

Viewers also liked

David Moss - Hartree Centre
David Moss - Hartree CentreDavid Moss - Hartree Centre
David Moss - Hartree CentreIBMInterconnect
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDYMike Belshe
 
SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0Mike Belshe
 
SPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection ThrottleSPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection ThrottleMike Belshe
 
University of Delaware - Improving Web Protocols (early SPDY talk)
University of Delaware - Improving Web Protocols (early SPDY talk)University of Delaware - Improving Web Protocols (early SPDY talk)
University of Delaware - Improving Web Protocols (early SPDY talk)Mike Belshe
 
Multi-Signature Deep Dive
Multi-Signature Deep DiveMulti-Signature Deep Dive
Multi-Signature Deep DiveBenedict Chan
 

Viewers also liked (8)

David Moss - Hartree Centre
David Moss - Hartree CentreDavid Moss - Hartree Centre
David Moss - Hartree Centre
 
SPDY / W3C
SPDY / W3CSPDY / W3C
SPDY / W3C
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDY
 
SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0
 
SPDY @Zynga
SPDY @ZyngaSPDY @Zynga
SPDY @Zynga
 
SPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection ThrottleSPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection Throttle
 
University of Delaware - Improving Web Protocols (early SPDY talk)
University of Delaware - Improving Web Protocols (early SPDY talk)University of Delaware - Improving Web Protocols (early SPDY talk)
University of Delaware - Improving Web Protocols (early SPDY talk)
 
Multi-Signature Deep Dive
Multi-Signature Deep DiveMulti-Signature Deep Dive
Multi-Signature Deep Dive
 

Similar to P2SH and MultiSig: Concepts and Models to End the Cold Storage Ice Age

Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmersWojciech Langiewicz
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101Oded Noam
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBogdan Fiedur
 
Blockchain (and Bitcoin)
Blockchain (and Bitcoin) Blockchain (and Bitcoin)
Blockchain (and Bitcoin) Nitin Jain
 
Bitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyBitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyShiv Sahni
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroTal Shmueli
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinHugo Rodrigues
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinKeenan Olsen
 
Bitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training SessionBitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training SessionLisa Cheng
 
Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)Ryan Casey
 
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201..."How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...Equal Experts
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Wojciech Langiewicz
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain SlidesShannon Wells
 

Similar to P2SH and MultiSig: Concepts and Models to End the Cold Storage Ice Age (20)

Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
Blockchain External.pdf
Blockchain External.pdfBlockchain External.pdf
Blockchain External.pdf
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
 
Bitcoin p2p money
Bitcoin p2p moneyBitcoin p2p money
Bitcoin p2p money
 
Blockchain (and Bitcoin)
Blockchain (and Bitcoin) Blockchain (and Bitcoin)
Blockchain (and Bitcoin)
 
Bitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technologyBitcoins: Application of blockchain technology
Bitcoins: Application of blockchain technology
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Bitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training SessionBitcoin 101 - Certified Bitcoin Professional Training Session
Bitcoin 101 - Certified Bitcoin Professional Training Session
 
Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)
 
Blockchain.pptx
Blockchain.pptxBlockchain.pptx
Blockchain.pptx
 
Blockchain introduction
Blockchain introductionBlockchain introduction
Blockchain introduction
 
Bitcoin Talk at Rainbow
Bitcoin Talk at RainbowBitcoin Talk at Rainbow
Bitcoin Talk at Rainbow
 
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201..."How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...
"How Blockchains and Bitcoins work" by Ricardo Águas @ Pizza Talks Lisbon 201...
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2
 
Intro to Blockchain Slides
Intro to Blockchain SlidesIntro to Blockchain Slides
Intro to Blockchain Slides
 
Bitcoin
BitcoinBitcoin
Bitcoin
 

Recently uploaded

Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 

Recently uploaded (20)

Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 

P2SH and MultiSig: Concepts and Models to End the Cold Storage Ice Age

  • 1. P2SH and Multi-Sig Ending the Cold Storage Ice Age Benedict Chan, BitGo @bencxr benchan@bitgo.com
  • 2. Agenda ● Pay to Script Hash ● Emerging multi-sig concepts and scenarios ● Implement a multi-sig wallet in 5 minutes
  • 3. Pay to Script Hash (P2SH) ● Bitcoin address can require successful execution of a script corresponding to a hash ○ Past: “Claim if signed by xyz private key” ○ Now: “Claim only if xyz conditions were satisfied” ● 7.88% of BTC held in P2SH addresses
  • 4. P2SH - Hash-Locked Contract ● Example: A and B want to trade BTC for DOGE ● A thinks of any x and hashes it to H(x) ● On Bitcoin chain: ○ A creates transaction TX0 to a P2SH script to ■ Pay BTC to B if x of H(x) is known and signed by B or ■ Pay BTC to A if signed by A and B ○ A creates refund transaction TX1 (with TX0 as input) valid at a future date (3 days later) for B to sign ● On Dogecoin chain: ○ B does similar (refund not shown), sends to P2SH script “Pay 2,000,000 doge to A if x of H(x) is known and signed by A” ● When A claims DOGE by revealing x, B can claim BTC
  • 5. P2SH - Multi-Signature Address ● Spend an input if only M of N signatures were provided ○ Commonly 2 of 3 (up to 15) ○ M of N must be defined at address creation time ● Signers cannot change outputs
  • 6. Cold Storage on Multiple Machines ● Create and use keys on separate online/offline devices ● Hacker must compromise multiple machines ● Redundancy ● Examples: Bitcoind (createmultisigaddress, createrawtransaction), Armory Lock Boxes
  • 7. Multi-Sig Hardware Wallets ● Additional signer ● Private key never leaves device ● Low malware risk
  • 8. Joint Wallet with Multiple Parties ● Family expense wallet ● Group savings (birthday gift, holiday funds) ● All signers have equal importance
  • 9. Multi-Sig Escrow ● 2-of-3: Buyer, Seller and Escrow ● Buyer sends purchase funds, seller (may) send collateral ● If buyer receives item in good order, create payment transaction with seller. ● Otherwise escrow agent can mediate ● Escrow agent can never steal funds with only 1 key
  • 10. Micro Payment Channel ● Customer creates TX0 for 1 BTC to shared 2-of-2 address ● Provider sends Nlocktime refund transaction for full amount ● Publish TX0 ● Replace off-chain transactions ○ 0.99 to customer, 0.01 to provider ○ 0.98 to customer, 0.02 to provider ○ … ○ 0.55 to customer, 0.45 to provider ● Broadcast only last transaction to close channel
  • 11. Instant Confirmations ● “Clearing house” creates a 2-of-2 address for the customer to pre-fund ● Payments out of address guaranteed “instant confirmations” ● Clearing house would never double-sign the same input BitPay Impulse
  • 12. Smart Co-Signer Service ● 2 keys held by customer, 1 key by service ● User creates and half-signs transaction, then sends to co-signer ● Co-signer executes security and logic
  • 13. ● Per-day limits / Per-transaction limits ● Destination bitcoin address whitelists ● Time of day restrictions ● Human approvals - User/password/2FA ● Red button (kill switch) ● Blacklisting, IP lockdown, ... ● External webhooks BitGo Co-Signer Logic
  • 14. Enterprise Treasury ● Multiple users on a wallet ○ Require 2FA and User Auth ● Accountant creates transactions up to a limited amount per day ● CEO, CFO able to approve large withdrawals ● Can add/remove privileges of users at any time ● Example customers: SecondMarket, ChangeTip, BitFury..
  • 15. ATM Provider ● Shared wallet with multiple machines ● One access token per machine ● IP lockdown for each token ● Tokens may be individually revoked ● Example customers: Lamassu ATMs
  • 16. Exchange Hot Wallet Pool ● Exchange maintains single hot wallet for all deposits and withdrawals ● Outgoing withdrawal amount limited per day ● Callback on each transaction to accounts database ● Examples: Bitstamp, BitSpark, BitQuick, MimeticMarkets, ...
  • 17. Exchange-owned Segregated Wallet ● One wallet per exchange user ● Per-user-wallet policy granularity ● Withdrawals require user 2FA ● Transactions to house wallet whitelisted
  • 18. ● Every user owns their own private key ● Backup key held by arms-length custodian ● Buy orders can go directly to user wallet ● Sell orders can be confirmed by exchange instantly ● Great for places that allow you to just “buy bitcoin” User-owned Wallet Linked With Exchange
  • 19. Exchange+User Joint Wallet ● User and exchange each own a private key ● Instant confirmation ● Withdrawals depend on ○ Webhook call to exchange to ensure user has sufficient margin
  • 20. Co-Signer Oracle Contracts ● HTTP callback enables external logic to be implemented Shared Multi-Sig Wallet UserA BTC Collateral (1BTC) UserB BTC Collateral (1BTC) Winner creates/signs tx for 2BTC out BitGo Co- signer Webhook oracle gets BTC price at contract date to determine winner cosign/transmit Bitcoin P2P Net
  • 21. Open Source SDK 1. Create a wallet 2. Get new addresses 3. Fund the wallet 4. Get transactions and balances 5. Send coins Implementing multi-sig in 5 minutes
  • 22. Exchange integration demo ● First open-source multi-sig bitcoin exchange ● Uses bitgod (bitcoind adapter for Bitgo)