An analysis of the applicability of blockchain to secure IP addresses allocation, delegation and bindings draft-paillisse-sidrops-blockchain-01 OPSEC - IETF 101 - London March 2018 Jordi Paillissé , Albert Cabellos, Vina Ermagan, Alberto Rodríguez, Fabio Maino jordip@ac.upc.edu 1 http://openoverlayrouter.org
A short Blockchain tutorial 2
Blockchain - Introduction • Blockchain: – Decentralized, secure and trustless database – Token tracking system (who has what) • Add blocks of data one after another • Protected by two mechanisms: – Chain of signatures – Consensus algorithm • First appeared: Bitcoin, to exchange money • Other applications are possible 3
Blockchain - Transactions Transaction Sender’s Public Key Sender’s signature Data 4
Blockchain - Transactions Transactions are broadcasted 1 Transaction to all the nodes Sender’s Public Key Sender’s signature P2P network Data 5
Blockchain - Transactions Transactions are broadcasted 1 Transaction to all the nodes Sender’s Public Key Sender’s signature P2P network Data A node collects transactions 2 into a block Block Previous Hash Transactions 1 ··· N 6
Blockchain - Transactions Transactions are broadcasted 1 Transaction to all the nodes Sender’s Public Key Sender’s signature P2P network Data A node collects transactions 2 into a block 3 Compute consensus algorithm Block New Block Previous Hash Previous Hash Transactions 1’ ··· N’ Transactions 1 ··· N 7
Blockchain - Transactions Transactions are broadcasted 1 Transaction to all the nodes Sender’s Public Key Sender’s signature P2P network Data A node collects transactions 2 into a block 3 Compute consensus algorithm 4 Broadcast new block to the network Block New Block Previous Hash Previous Hash Transactions 1’ ··· N’ Transactions 1 ··· N 8
Blockchain - Transactions Transactions are broadcasted 1 Transaction to all the nodes Sender’s Public Key Sender’s signature P2P network Data A node collects transactions 2 into a block 3 Compute consensus algorithm 4 Broadcast new block to the network Block New Block The other nodes verify the 5 consensus algorithm and accept the block Previous Hash Previous Hash Transactions 1’ ··· N’ Transactions 1 ··· N 9
Summary of features vs. traditional PKI systems Advantages Drawbacks • Decentralized • No crypto guarantees • No CAs • Large storage • Simplified management • Costly bootstrapping • Simple rekeying • Limited prior trust • Auditable • Censorship-resistant 10
Blockchain for IP addresses 11
Data in the blockcahin We want to store: Prefix: 10/8 Prefix: 10/8 Prefix: 10/8 new AS#: 12345 Holder: P1+ holder Holder: P+ new Prefix: 10/8 holder Holder: P2+ IP address block IP address block + + Prefix: 10/8 AS number Holder Holder: P3+ Chain of allocations and delegations 12
IP addresses vs. coins • IP addresses = coins • Similar properties: – Unique – Transferrable – Divisible • Exchange blocks of IP addresses just like coins 13
Example 14
Allocation From: IANA To: IANA I have all prefixes 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 15
Allocation Allocation From: IANA To: IANA From: IANA I have all prefixes To: APNIC Prefix 1/8 for APNIC 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 16
Allocation Allocation Delegation From: IANA To: IANA From: IANA I have all prefixes To: APNIC From: APNIC Prefix 1/8 for APNIC To: ISP A ISP A has 1.2/16 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 17
Allocation Allocation Delegation From: IANA Binding To: IANA From: IANA I have all prefixes To: APNIC From: APNIC From: ISP A Prefix 1/8 for APNIC To: ISP A To: ISP A ISP A has 1.2/16 Bind 1.2/16 to AS # 12345 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 18
Allocation Allocation Delegation From: IANA Binding To: IANA From: IANA I have all prefixes To: APNIC From: APNIC From: ISP A Prefix 1/8 for APNIC To: ISP A To: ISP A ISP A has 1.2/16 Bind 1.2/16 to AS # 12345 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 From: ISP A Who has 1.2/16? To: ISP A Bind 1.2/16 to AS # 12345 AS# 12345 19
Allocation Allocation I can go back to check if this prefix Delegation From: IANA was originally owned by IANA Binding To: IANA From: IANA I have all prefixes To: APNIC From: APNIC From: ISP A Prefix 1/8 for APNIC To: ISP A To: ISP A ISP A has 1.2/16 Bind 1.2/16 to AS # 12345 4 5 6 blockchain 0 1 2 3 7 ... n n+1 n+2 From: ISP A Who has 1.2/16? To: ISP A Bind 1.2/16 to AS # 12345 AS# 12345 20
Operational Considerations 21
Revocation Traditional Bitcoin PKIs Decentralized Centralized control control • Lost keys • Compromised keys • Improper use 22
Revocation Traditional Bitcoin PKIs Decentralized Centralized control control Middle ground: • Timeout transfer to previous owner • Multi-signature more than one key • Revocation tx. by a third party 23
Rekeying • Delegating the block of addresses to itself using a new key pair. • Simpler than traditional rekeying schemes • Can be performed independently (each holder can do it without affecting other holders) From: keyA Other transactions… To: keyB Prefix 1/8 24
Rekeying • Delegating the block of addresses to itself using a new key pair. • Simpler than traditional rekeying schemes • Can be performed independently (each holder can do it without affecting other holders) From: keyA From: keyB Other transactions… To: keyB To: keyC Prefix 1/8 Prefix 1/8 Controlled by the same entity 25
Privacy • Lawful interception • RIR policies • Business relationships Public Private Blockchain Internal RIR (IP prefix1, pubkey1) policies (IP prefix2, pubkey2) … 26
Privacy • Lawful interception • RIR policies • Business relationships Update Public Private (prefix, key) pair Blockchain Internal RIR (IP prefix1, pubkey1) policies (IP prefix2, pubkey2) … 27
Prototype 28
Prototype • Python http://sharetv.com/shows/monty • Features: _pythons_flying_circus_uk – Simple Proof of Stake – Block time 60s – 2 MB blocks – IPv4 and IPv6 • Open-sourced: https://github.com/OpenOverlayRouter/blo ckchain-mapping-system 29
Experiment Genesis block Master 0/0 0::/0 1-Allocate all /10 8 nodes 30
Experiment Genesis block Master 0/0 0::/0 1-Allocate all /10 8 nodes 2-Allocate all /16 3-Allocate ~130k prefixes* *Extracted from RIR statistics exchange files, eg. 31 ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-extended-latest
Processed ~160k transactions 32
3-Allocate ~130k prefixes 2-Allocate all /16 1-Allocate all /10 Processed ~160k transactions 33
34
35
Thanks for listening! 36
Scalability Approx. 600 GB in 2034 (IP blocks + AS bindings) • One AS <> prefix binding for each block of /24 IPv4 address space • Growth similar to BGP churn* • Each transaction approx. 400 bytes • Only IP Prefixes: worst case + BGP table growth*: approx. 40 GB in 20 years • With PoS, storage can be reduced 37 *Source: http://www.potaroo.net/ispcol/2017-01/bgp2016.html
Storage • Several mechanisms can help reducing storage, eg: – Prune old transactions – Download only headers (Bitcoin SPV*) – Discard old blocks • These techniques depend on the consensus algorithm 38 *Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Sec. 8
Transaction examples 39
First transaction • Users trust the Public Key of the Root, that initially claims all address space by writing the genesis block • Root can delegate all address space to itself and use a different keypair New Transaction Root@2 “I own all the Hash(P+ root)= Root@1 address space” 40
Prefix allocation and delegation • Root allocates blocks of addresses to other entities (identified by Hash(Public Key)) by adding transactions New Transaction Root@3 (rest of space) 0.0/16 Deleg1@ Root@2 “allocate” 25.5.5/8 Deleg2@ • Holders can further delegate address blocks to other entities New Transaction Deleg1@2 (rest of space) 0.0.1/24 Deleg3@ Deleg1@ “delegate” 0.0.2/24 Deleg4@ 41
Writing AS bindings • Just like delegating a prefix, but instead of the new holder, we write the binding New Transaction 0.0.1/24 from AS# 12345 Deleg3@ “binding” 42
External server authentication • Some information may not be suitable for the blockchain, or changes so fast it is already outdated when added into a block • A public key from an external server can also be included in the delegations • Since blockchain provides authentication and integrity for this key, parties can use it to authenticate responses from the external server 43
FAQ • Does it grow indefinitely? – Yes • Do all nodes have the same information? – Yes • When answering a query, do you have to search the entire blockchain? – No, you can create a separate data structure only with the current data • If I lose my private key, do I lose my prefixes also? – Yes, watch out! 44
Recommend
More recommend