# BGPcoin: Blockchain-Based Internet Number Resource Authority and BGP Security Solution
## Appendix A  
### Data Structure in the Smart Contracts of BGPcoin  
The smart contract defines all operations that the participating entities can perform on the assets, as well as the precondition and the result of those operations. An entity refers to any participant in the system, i.e., IANA, xIPs and ISPs. BGPcoin has two types of assets: _Internet Address resource_ and _AS numbers resource_. Every asset has its fields to represent its assignment and authorized status, shown in Data Structures of BGPcoin Assets, which as the origin attestation supports IP announcement validation in BGP updating. ``` structIPBData{ unit32 IPIndex; unitsp prefixlen; Statestate; addressRIR; addressRIR; addressowner; addresslease; bool[3]contents } structASData{ unitASIndex; addressRIR; addressowner; unitstine; unitvalideroid; unit24[]adj3 EN; } structIPBFlng{ unit8 prefirlmlimit; booldeleted; } structASNFlng{ uint248 AN; booldeleted; } structIPmap{ min99(unit32->IPBData)TPB; mapping(unit32->IPBFlng)keys; unitsize;struct ASmap[  mapping (unit24 >> IPBRData) ASData;  ASNFlag[] keys;  unit size;  }  struct RMADAData{  unit24 IPS;  unit8 prefixlen;  unit time;  unit validperiod;  }  mapping (unit24 >> RMADA[]) public ROA;  IPmap public BOFcoin_IPchain;  ASmap public BOFcoin_ASchain;

## References

* (1) [PERSON] The New Threat: Targeted Internet Traffic Misdirection. Blog. 2013. Available online: [[https://dyn.com/blog/mitm-internet-hijacking/](https://dyn.com/blog/mitm-internet-hijacking/)]([https://dyn.com/blog/mitm-internet-hijacking/](https://dyn.com/blog/mitm-internet-hijacking/)) (accessed on 15 August 2018). * (2) [PERSON] Pakistan Hijacks Youtube Blog. 2008. Available online: [[https://dyn.com/blog/pakistan-hijacks-youtube-1/](https://dyn.com/blog/pakistan-hijacks-youtube-1/)]([https://dyn.com/blog/pakistan-hijacks-youtube-1/](https://dyn.com/blog/pakistan-hijacks-youtube-1/)) (accessed on 15 August 2018). * (3) [PERSON] Hijack Event Today By Indosat Blog. 2014. Available online: [[https://bgpmon.net/hijack-by-as4761-indosat-a-quick-report/](https://bgpmon.net/hijack-by-as4761-indosat-a-quick-report/)]([https://bgpmon.net/hijack-by-as4761-indosat-a-quick-report/](https://bgpmon.net/hijack-by-as4761-indosat-a-quick-report/)) (accessed on 15 August 2018). * (4) [PERSON]; [PERSON]; [PERSON] A forensic case study on as hijacking: The attacker's perspective. _ACM SIGCOMM Comput. Commun. Rev._**2013**, _43_, 5-12. [CrossRef]
* (5) [PERSON]; [PERSON]; [PERSON] _Mind Your Blocks: On the Stealthiness Of Malicious BGP Hijacks_; NDSS: San Diego, CA, USA, 2015. Available online: [[https://pdfs.semanticscholar.org/496e/09594a920a0027](https://pdfs.semanticscholar.org/496e/09594a920a0027) fd6a65481c091d61692304.pdf]([https://pdfs.semanticscholar.org/496e/09594a920a0027](https://pdfs.semanticscholar.org/496e/09594a920a0027) fd6a65481c091d61692304.pdf) (accessed on 15 August 2018). * (6) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] ARTEMIS: Neutralizing BGP hijacking within a minute. _arXiv_**2018**, arXiv:1801.01085. * (7) [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] Accountable internet protocol (AIP). _ACM SIGCOMM Comput. Commun. Rev._**2008**, _38_, 339-350. [CrossRef]
* (8) [PERSON]; [PERSON] Building Accountability into the Future Internet. In Proceedings of the 2008 4 th Workshop on Secure Network Protocols, Orlando, FL, USA, 19 October 2008; pp. 45-51. * (9) [PERSON]; [PERSON]; [PERSON] Bootstrapping Accountability in the Internet We Have. In Proceedings of the NSDI '11: 8 th USENIX Symposium on Networked Systems Design and Implementation, Boston, MA, USA, 30 March-1 April 2011; pp. 155-168. * (10) [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Bootstrapping real-world deployment of future internet architectures. _arXiv_**2015**, arXiv:1508.02240. * (11) [PERSON] Why is it taking so long to secure internet routing? _Commun. ACM_**2014**, _57_, 56-63. [CrossRef]
* (12) [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] _Are We There Yet?