Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This...

34
Primechain Technologies www.primechaintech.com Blockchain 101

Transcript of Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This...

Page 1: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

Primechain Technologies

www.primechaintech.com

Blockchain 101

Page 2: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

1

Blockchain 101

January 2020

Rohas Nagpal

Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Page 3: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

2

TABLE OF CONTENTS

INTRODUCTION..................................................................................................................31.BLOCKCHAINTECHNOLOGY............................................................................................4

1.1QUICKFACTS......................................................................................................................................51.2CRYPTOGRAPHY..................................................................................................................................71.3ASYMMETRICCRYPTOGRAPHY.............................................................................................................101.4RSAALGORITHM..............................................................................................................................121.5HASHFUNCTIONS..............................................................................................................................141.6PROOFOFWORK...............................................................................................................................151.7DIGITALSIGNATURES.........................................................................................................................171.8BLOCKCHAIN....................................................................................................................................201.9BLOCKCHAINFRAMEWORKS................................................................................................................22

1.BigchainDB.................................................................................................................................222.Corda..........................................................................................................................................233.Ethereum....................................................................................................................................234.HyperledgerBurrow...................................................................................................................245.HyperledgerFabric.....................................................................................................................256.HyperledgerSawtooth...............................................................................................................267.Multichain..................................................................................................................................268.Quorum......................................................................................................................................27

2.EVOLUTIONOFMONEY:FROMCOWRYSHELLSTOTHEBLOCKCHAIN...........................284.BLOCKCHAINUSECASES...............................................................................................30

Bankingsector...............................................................................................................................30Capitalmarkets..............................................................................................................................30Defenceandmilitary......................................................................................................................31Government...................................................................................................................................31Healthcareandpharmaceuticals...................................................................................................31Insurance.......................................................................................................................................32Shippingandlogistics.....................................................................................................................32Telecommunications......................................................................................................................32

Page 4: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

3

Introduction There’s a ton of hype around blockchain. I’ve read that blockchains can erase global hunger, make the world corruption-free, end poverty and do a lot more without breaking a sweat. Never before has a “back-end” technology gotten so much print space in public media. But should the common man have heard about blockchain? I think NOT. Let’s start with a simple analogy. Most of you may be users of Facebook, Google, LinkedIn, Uber and WhatsApp. But how many of you know the technologies on which these run? And do you even care? Well, you really shouldn’t. Ever since Edgar Codd proposed the relational model for database management in 1970, our world has been ruled by databases. Almost everything that makes the Internet so powerful and useful depends upon computer databases. But the general population has never heard about in-memory databases, distributed databases, graph databases, parallel databases and their assorted cousins.

Everyone has heard about blockchains and distributed ledger systems. And everyone has an opinion about them. And that’s what the biggest problem is.

The most common question I am asked is “What can blockchain do that other technologies cannot do?” Is it fair to expect a 10-year old technology to outperform all other technologies in the world?

Blockchain is not Rajnikant or Chuck Norris. It cannot compete with all the world’s technologies. And it’s not supposed to.

Blockchains can minimise fraud and maximise efficiency, security & transparency in supply chains, healthcare, global money systems, financial technologies, democratic elections, auction of public assets, energy trading, electronic record authentication, delivery of Government services, IoT and much much more. We just need to skip the hype and give this technology a fair chance.

Page 5: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

4

1. Blockchain technology At its core, blockchain technology tries to ensure provable data immutability by using hash functions and digital signatures. The Information Technology Act of India defined hash functions and digital signatures way back in the year 20001. Blockchains are compared to distributed databases and even to software development frameworks and that’s partially true. But private blockchains are more than “just” shared databases. I totally agree with Gideon Greenspan when he says2, “If trust and robustness aren’t an issue, there’s nothing a blockchain can do that a regular database cannot”. Blockchain technology was announced through the paper titled Bitcoin: A Peer-to-Peer Electronic Cash System by Satoshi Nakamoto in 20083. Interestingly, this paper does not specifically use the word “blockchain”. This paper talks about a “purely peer-to-peer version of electronic cash” where “the network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work”. Richard Gendal Brown puts it well when he says that a “distributed ledger is a system that allows parties who don’t fully trust each other to come to consensus about the existence, nature and evolution of a set of shared facts without having to rely on a fully trusted centralized third party4”.

1 Section 3. Authentication of electronic records. (1) Subject to the provisions of this section any subscriber may authenticate an electronic record by affixing his digital signature. (2) The authentication of the electronic record shall be effected by the use of asymmetric crypto system and hash function which envelop and transform the initial electronic record into another electronic record. Explanation - For the purposes of this sub-section, "hash function" means an algorithm mapping or translation of one sequence of bits into another, generally smaller, set known as "hash result" such that an electronic record yields the same hash result every time the algorithm is executed with the same electronic record as its input making it computationally infeasible- (a) to derive or reconstruct the original electronic record from the hash result produced by the algorithm; (b) that two electronic records can produce the same hash result using the algorithm. (3) Any person by the use of a public key of the subscriber can verify the electronic record. (4) The private key and the public key are unique to the subscriber and constitute a functioning key pair. 2 http://www.multichain.com/blog/2016/03/blockchains-vs-centralized-databases/ 3 https://bitcoin.org/bitcoin.pdf

Page 6: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

5

1.1 Quick facts

1. Blockchain technology was invented by the unknown inventor of the bitcoin crypto-currency5 in 2008. Simply put, the bitcoin crypto-currency runs on the bitcoin blockchain — a public blockchain where anyone can become a miner and details of every single bitcoin transaction are stored on each node.

2. Blockchain is an innovative mix of decades old, tried and tested technologies including Public key cryptography (1970s), Cryptographic hash functions (1970s) and proof-of-work (1990s).

3. Over the last few years, many derivative projects (e.g. ethereum, multichain) and

blockchain-inspired distributed ledger systems (e.g. BigchainDB, Corda, Hyperledger Burrow / Fabric / Sawtooth, Quorum) have been created.

4. Blockchains are provably immutable and enable the rapid transfer and exchange of

crypto-tokens (which can represent assets) without the need for separate clearing, settlement & reconciliation.

5. Blockchain solutions can be permissioned6 (e.g. a Government run land registry) or

permission-less (e.g. Bitcoin, where anyone can become a miner). Blockchain solutions can be private (e.g. a contract management system implemented in a pharmaceutical company), public (e.g. an asset backed cryptocurrency) or hybrid (e.g. a group of banks running a shared KYC platform).

4 https://vimeo.com/193712833 5 Bitcoin is a crypto-currency, which is usually in the news for all the wrong reasons — drugs, tax evasion, organized crime, money laundering and terrorism financing. This is a little unfair since these crimes have been going on for centuries. Conventional currencies, gold and even diamonds are used for drugs, tax evasion, organized crime, money laundering and terrorism financing. Bitcoin runs on a global network of computers that are part of the Bitcoin Blockchain. This Bitcoin Blockchain is permission-less, which means that anyone could spin up a node and start “mining” bitcoin. And yes, it takes a huge amount of electricity and computational power to keep Bitcoin going. 6 Let’s take an example of Multichain, an open source solution for building blockchains. It allows you to set 8 types of permissions: connect — to connect to other nodes and see the blockchain’s contents. send — to send funds, i.e. sign inputs of transactions. receive — to receive funds, i.e. appear in the outputs of transactions. issue — to issue assets, i.e. sign inputs of transactions which create new native assets. create — to create streams, i.e. sign inputs of transactions which create new streams. mine — to mine blocks, i.e. to sign the metadata of coinbase transactions. activate — to change connect, send and receive permissions for other users, i.e. sign transactions which change those permissions. admin — to change all permissions for other users, including issue, mine, activate and admin.

Page 7: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

6

6. Blockchains can handle data authentication & verification very well. This includes

immutable storage (data stored on a blockchain cannot be changed or deleted), digital signatures and encryption. Data in almost any format can be stored in the blockchain.

7. Blockchains can create public-private key pairs and also be used for generating and

verifying digital signatures.

8. Blockchains can handle smart asset lifecycle management very well. This includes issuance, payment, exchange, escrow, and retirement of smart assets. A smart/crypto asset is the tokenized version of a real-world asset e.g. gold, silver, oil, land.

9. Blockchains do not have a single point of control or a single point of failure.

10. For organizations, blockchain technology can minimize fraud; accelerate information

and money flow; greatly improve auditability and streamline processes.

11. The original blockchain, which powers the bitcoin crypto-currency, used proof of work as a consensus mechanism. But today there are multiple distributed ledger systems that offer a host of consensus mechanisms such as Proof of stake, Byzantine fault tolerant, Deposit based consensus, Federated Byzantine Agreement, Proof of Elapsed Time, Derived PBFT, Redundant Byzantine Fault Tolerance, Simplified Byzantine Fault Tolerance, Federated consensus, Round Robin and Delegated Proof of Stake.

12. One method of providing privacy on a blockchain is the separation of concerns, in

which data is sent only to the relevant parties of a transaction. Optionally, the hash of the data is broadcast to all the nodes. This method is used in Corda, Quorum, and Hyperledger Fabric. Another method of providing privacy on a blockchain involves broadcasting of encrypted data across the entire network.

Page 8: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

7

1.2 Cryptography The Sanya’s a naughty young girl who’s been grounded for a week. She wants to sneak out for dessert with her friends but obviously can’t let her dad know about it. She’s not allowed to use her cellphone, so the only way for her to call her friends is using the good old landline in her dad’s room. Since she regularly gets grounded, she and her friends have worked out a simple system for sharing secrets. When she says, “have you read the book I told you about” she actually means “let’s sneak out tonight”. When she says something about “page 10” of the book, she means “pick me up at 10 pm”. Continuing the logic, page 11 would mean 11 pm and so on. So on the phone she asks her friend “Have you read the book I told you about? Page 12 is really funny”, she means, “Let’s sneak out tonight, pick me up at midnight”. What we have just seen is cryptography7 (and a rebellious teenager) in action in the real world. The sentence “Let’s sneak out tonight, pick me up at midnight” is plain text – what Sanya actually wants to convey. The sentence “Have you read the book I told you about? Page 12 is really funny" is the cipher text – something that an adversary (her dad in this case) should not be able to understand. Encryption is the process of converting plain text to cipher text. The reverse process is decryption. This science of encrypting and decrypting messages (cryptography) has been used for thousands of years. It is believed that when Julius Caesar sent messages to his generals, he replaced every A in his messages with a D, every B with an E, and so on through the alphabet. Only someone who knew the “shift by 3” rule could decipher his messages. For example, if we want to encode the word “SECRET” using Caesar’s key value of 3, we offset the alphabet so that the 3rd letter down, (D), begins the alphabet. So starting with ABCDEFGHIJKLMNOPQRSTUVWXYZ and sliding everything up by 3, you get DEFGHIJKLMNOPQRSTUVWXYZABC where D=A, E=B, F=C, and so on.

7 Cryptography is the science of using mathematics to encrypt and decrypt data. Cryptography enables you to store sensitive information or transmit it across insecure networks (like the Internet) so that it cannot be read by anyone except the intended recipient. While cryptography is the science of securing data, cryptanalysis is the science of analyzing and breaking secure communication (breaching security measures).

Page 9: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

8

Using this scheme, the plaintext, “SECRET” encrypts as “VHFUHW”. To allow someone else to read the cipher text, you tell him or her that the key is 3. This method is called symmetric cryptography and involves using the same key for encrypting as well as decrypting a message. The figure below illustrates the process of encryption and decryption. The fundamental objective of cryptography is information security. The following are the objectives of information security that cryptography helps to fulfil:

1. Confidentiality is used to keep the content of information secret from unauthorized persons. This is achieved through symmetric and asymmetric encryption.

2. Data integrity addresses the unauthorized alteration of data. This is addressed by hash functions.

3. Authentication is related to identification. This function applies to both; the entities

and the information itself. This is achieved through digital signature certificates and digital signatures.

4. Non-repudiation prevents someone from denying previous commitments or actions.

This is achieved through digital signature certificates and digital signatures. Sample plain text data to be encrypted I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times. Sample Advanced Encryption Standard (AES) decryption credentials AES Password: o9tgRCETlHLZdNhlKKgdDshgiwvujn84 AES initialization vector: LdjZLovqIkL3

[Image courtesy: An Introduction to Cryptography – PGP Corporation]

Page 10: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

9

AES authentication tag: 210, 255, 136, 213, 61, 82, 117, 102, 222, 62, 93, 134, 245, 113, 100, 82 Encrypted version of the plain text data: 4896275f060be692d50406292602e6cb53a6d30426c11b0658a8dc31ed196ef4841ffa8b9c8d6315f8798387f93157aa35bb5d280bf208d2bc645e2e184f0ea551a372b924b329b391b6ecf75f3fec3a1760ae306de25d3bc36cc30bf93cc9e3988c743c6925f109b6760bca77826bfd7673563b99

Page 11: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

10

1.3 Asymmetric Cryptography Symmetric cryptography involves using the same key for encrypting as well as decrypting a message. This naturally poses a serious problem – what if an adversary gets hold of this key? At some point of time the sender and receiver need to exchange the key. That’s when an adversary could get hold of the key. In modern cryptography, keys are extremely large numbers. The secure-key-exchange problem was solved with the birth of asymmetric key cryptography – in which two different but related keys are used - the public key to encrypt data and the corresponding private key to decrypt the data. If Sanya were to send an encrypted message to Karan, she would encrypt the message using his public key (which is available to the world). Once encrypted, the message can only be decrypted using Karan’s private key (which would only be available to Karan). In public key cryptography, although the public and private keys are mathematically related, it is very difficult to derive the private key by analysing the public key. A sample RSA public key -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkydbbI+68zjRmp0n7Yss NwKbUl1IzBEqgm0Rp/utue8VNPfZaW7YrnwmEO7jO939C0/xAgayE6vR5VT7sItX uMKwvP0DozxWtUGGcoHEZgImzSXJGomZpr2+M6TdW+kbisUUKbjIApQvnGlh93Zv XiRTsvMkxC1Lf8Wkj52V7Xdn7O2p1tGg/j4wv78kT9wJ67xEnBmsGpGUZZYPAMZr j0WrsakvT5vqwtkGum2OI9eRNlB7qgDsuOrxAm3jyx17s+tOi2Sasn1GywHQmU6n YpCSsVv6ywGCMH5xLGAWT3glGCx2mwjAi+/QbpSXIWorlzzlZOR2xI+844dyDxbW MQIDAQAB -----END PUBLIC KEY----- A sample RSA private key -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCTJ1tsj7rzONGa nSftiyw3AptSXUjMESqCbRGn+6257xU099lpbtiufCYQ7uM73f0LT/ECBrITq9Hl VPuwi1e4wrC8/QOjPFa1QYZygcRmAibNJckaiZmmvb4zpN1b6RuKxRQpuMgClC+c aWH3dm9eJFOy8yTELUt/xaSPnZXtd2fs7anW0aD+PjC/vyRP3AnrvEScGawakZRl lg8AxmuPRauxqS9Pm+rC2Qa6bY4j15E2UHuqAOy46vECbePLHXuz606LZJqyfUbL AdCZTqdikJKxW/rLAYIwfnEsYBZPeCUYLHabCMCL79BulJchaiuXPOVk5HbEj7zj h3IPFtYxAgMBAAECggEAY8GujK3zQqcmEPaw9qv+UVyHBxMOIqkQdFKUQZiwcPfP HJVY4cyvP7oR5DDOAuu+e0i6TXFUj1lPdXRjG4+a7Dmvrq6nJKXm8gF1r3KhPbX/ r9sJtd/KNeszYbdGCOTCMxTfUlld3cGvdQ1LyIKVhPCDfTCvn/5EzF2j7WgbF1tm oKuZB69LoVRSQ+rW9egQUWX5OCIC2aPReoRQCpPW3hz+CCuxk387twqlbS4/YFlB fdzC8N80umFvRFB8+YrgLrE/AM+dfFf8XMbwQDO13V4E6S5zVohAAJddxq7Nsv+e 1aZK+3NxlrkrOFij0ApLVtugToIBIMsGKbXuc5g6sQKBgQD9VIXvkX9fvr7wFgQ8 BDqDwavhUfQ3GdsZgzEnLK4SUgB1ApC7xMgwXauN38AL3kZEqQZNnWciQY8bU3i1 EFdFQ7K9n7s8nM/d8N/rbFIndRICJUQh47UAKWNZRaCV/IVMLPVjjHCjaej9aOUP

Page 12: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

11

JsyqbGfFA62rRCXoCHSzVjlFfwKBgQCUtF+PA0kP/V8CkaNV0VdRa702s57tu6Tg Quk8SOH4Ame9TcBrP95bpxUzBKapBj/ncW8lJKDD7zLYTQalWUG+KX/17i6NPgD6 vq+FwoCaGskRQTw3AUbkfHj6u7Cn41EmvxIZ2KWLi8Hl4+W3o6/mnsuucEZDOPwy FTN5FW+cTwKBgG0RTvjt86ENRrenQvtz9p1zbMT9u99dSm+ZhDgRjIBmvbui9x1g g7APJCVZCB4T/Lzi6MvR0O12vF5PedC60FgJ5ZKuirZ17Sjo4/9AC77hMHesA8Fz gCIpr5Rn3dO1fM5nLN9HP9ebaaxw1O3JDqTxN1wjUUpDdO6JdXUg0leRAoGBAI4l FSspos+MDSPxf0ZrQ6Jq8IW3kXYCZoqQq06bBJYEBpIoHoTmmnDV+Ce6jG0JslBU WEATETH6Foo4pt+rwHI8TTsSoKEW4ezOFg4wbKnibMz3pM2XhOKoMSTMAQObAVme T3kxZJ1NzN0pyc6Ow3gZ1u06GY/sivZ82aUm3nd1AoGAIqGOv9GiNYWJIdsdGmhI YS93Qj3Pw6ZSTqGTW4FYM9f4tawEWaGFGBL2CBYEp9nUTUBEAq8HJes0bimeScGn Tawewg84U4oiHuyTbtwIi5PkB+XIKfGaXU3SMaHYHiORRe7BhQwWKHpLdob4JJtm CdNBuN+I1w9yaWG1TeWVjk8= -----END PRIVATE KEY----- Encrypted version of the word “Hello” acN4z1AbYKHbuK5Tixi+AgYwg/3XMqVxU3UJmZrXcRuSXYSPyDLrB7+BQeiazfcFk9WxpnvT8nXHkQ6Hz2rTUF1K1Lv5XM33iQMqdRUa9WzQGJS9IakS5TSw+OpxhCR0KWa1kJ4XIa6QHwCGqUQrUo7WXTV9k/Lb55eLZh9bINy6LAAeYQfQX7LZMVCuC7lmJcUAkDTYuccgZdtAc1BCHl0ODq7rcMSLpr/M0h+tjKE6fuGP9AuB7NznoAy+7yf9toy67DNIWAeQXptTq8ukBJ6AzBTerUbTrbwOWlBWOyVcnsyPkXRtPUNryu5Jvqlw6//w0Fc9FG3dM+lmuzWQ5A==

Page 13: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

12

1.4 RSA algorithm To get a deeper understanding of asymmetric cryptography, lets see how the RSA algorithm (named after its inventors Ron Rivest, Adi Shamir, and Leonard Adleman) works:

1. Generation of a public-private key pair. 2. Encryption of a message (plain text) with the public key generated in step (1) to get

the cipher-text. 3. Decryption of the cipher-text by using the corresponding private key generated in step

(1). Step 1: Generation of a key pair

1. Select two large integer primes p and q.

2. Multiply p and q to get a number n, that means, pq = n.

3. Obtain φ which is the product of (p-1) and (q-1), that means

φ = (p-1)(q-1).

4. Select e such that 1<e<φ and the greatest common divisor of e and φ is 1. That means e and φ are coprime.

5. Compute d such that 1<d<φ and ed ≡ 1 mod φ. This means that the value of d must be such that ed-1 should be completely divisible by φ or (ed-1) / φ should be an integer.

6. The public-key is (e, n) and the corresponding private key is (d, n). Step 2: Encryption process Suppose the message to be encrypted is m. The cipher-text c is obtained by raising the message to the value of e and finding out its modulo n. That means c = me mod n. Step 3: Decryption process Decryption is achieved by raising the cipher-text c obtained in step 2 to the value of d and finding out its modulo n. That means m=cd mod n.

Page 14: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

13

Let’s try the algorithm with really small prime numbers8: 3 and 11. (In reality the primes chosen would be really really large).

1. Choose p = 3 and q = 11

2. Compute n = p * q = 3 * 11 = 33

3. Compute φ = (p - 1) * (q - 1) = 2 * 10 = 20

4. Choose e such that 1 < e < φ and e and φ are coprime. Let e = 7

5. Compute a value for d such that 1<d<φ and ed ≡ 1 mod φ. One solution is d = 3.

6. Public key is (e, n) => (7, 33)

Private key is (d, n) => (3, 33)

7. Suppose the plain text is 2. The cipher text will be c = me mod n. That’s 27 mod 33 = 128 mod 33 = 29

8. The decryption will be

cd mod n = 293 mod 33 = 24389 mod 33 = 2

The security of the RSA cryptosystem is based on the integer factorization problem. Any adversary who wishes to decipher the cipher-text c must do so by using the publicly available information (n, e). One possible method is to first factor n, and then compute φ and d just as was done in the above mentioned steps. The factoring of n is currently computationally infeasible (provided sufficiently large prime numbers are chosen as p and q) and therein lays the strength of the RSA cryptosystem.

8 Source: https://www.cs.utexas.edu/~mitra/honors/soln.html

Page 15: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

14

1.5 Hash functions Before we get into the nuts and bolts of how blockchains work, we need to understand some more concepts including hash functions. A one-way hash function takes an input (e.g. a PDF file, a video, an email, a string etc.) and produces a fixed-length output e.g. 160-bits. The hash function ensures that if the information is changed in any way – even by just one bit – an entirely different output value is produced. The table below shows some sample output values using the SHA-256 hash function. Input Hash sanya 834ac48d8e6d1d7f0b8d21a5b3e81446f5a4caa63765cc23836f61844b67fb83 SANYA 4247bff9d41c0f2da68ef43c5624531da9ca5bc31b39760a67e32265082e1ba8 Sanya 513a15ed036e62c14b41b2608a5bb18aa7af2a3502c90b892f9dddabaf136bc2 It can be seen from the table above that by changing the input from sanya to SANYA, an entirely different hash value is generated. What must be kept in mind is that irrespective of the size of the input, the hash output will always be of the same size. Two things must be borne in mind with regard to one-way hash functions:

1. It is computationally infeasible to find two different input messages that will yield the same hash output.

2. It is computationally infeasible to reconstruct the original message from its hash output.

Try out the hash calculator at: http://www.primechaintech.com/hash.php

Page 16: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

15

1.6 Proof of work Having understood hash functions, let’s have a look at another interesting concept called proof-of-work. This is a way to reduce spam and denial of service attacks by requiring a computer to spend some time and processing power to solve something. One such proof-of-work system that is used in blockchains is hashcash. The basic premise of hashcash is that if the sender of an email can prove that she has spent reasonable time and computational power to solve some puzzle, it can be believed that the sender is not a spammer. The logic is that spamming would be economically infeasible if a spammer had to spend non-trivial time and computational power for every single email being sent. Let’s develop an elementary proof-of-work system, based on hashcash, which can be used to control spam. Let’s presume that [email protected] is sending an email to [email protected]. The sender must include something similar to the following in the header of the email:

[email protected]^[email protected]^26022019^xxxx That’s 4 pieces of information separated by carets (^). The first piece is the sender’s email address, the second is the receiver’s email address and the third is the current date in DDMMYYYY format (26th February, 2019 in this example). The fourth piece is something that needs to be calculated by the sender’s computer. Let’s call it a nonce. The objective is to find an input that would result in a sha256 hash which begins with 4 zeros. So we start the nonce at a value of 0 and then keep incrementing it (0, 1, 2, 3 … ) and calculating the hash. Something like this: Input [email protected]^[email protected]^26022019^0 sha256 hash 59ed8c8ad669144eada44ca9a384a12eb298fc6dad6ea988b0d75e79d6e48b9b Input [email protected]^[email protected]^26022019^1 sha256 hash 6efce42aa2eff156047deec6f3c685493389541e8e329855b1d872e501acee37 Input [email protected]^[email protected]^26022019^2 sha256 hash b1ebeceb4f20430572ed63d49fa879f3b4ac972fe967802419b1127adcec0444 And so on till .. 25948 Input [email protected]^[email protected]^26022019:25948 sha256 hash 0000caf580c7378f09adf2859d9efe0ae9f0a99293ccb31fb68e6de5392f45e3

Page 17: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

16

Calculating this may not take a genuine sender a lot of time and computational power but if a spammer were to make these calculations for millions of emails, it will take a non-trivial amount of time and computational power. At the receiver’s end, the computer will simply take the following line from the header of the email and calculate the hash.

[email protected]^[email protected]^26022019^25948 If the hash begins with a pre-defined number of zeros (4 in this example), the email would not be considered spam. This will take the receiver a trivial amount of time and computational power since it just has to calculate the hash of one input. The date can be used as an additional validation parameter – e.g. if the date is within 24 hours of the time of receipt, the email will be approved for download. Try out the proof-of-work simulator at: http://www.primechaintech.com/pow.php

Page 18: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

17

1.7 Digital signatures A major benefit of public key cryptography is that it provides a method for employing digital signatures. Digital signatures enable the recipient of the information to verify the authenticity of the information’s origin, and also verify that the information is intact. Thus, digital signatures provide authentication and data integrity. A digital signature also provides non-repudiation, which means that it prevents the sender from claiming that he or she did not actually send the information. These features are every bit as fundamental to cryptography as privacy, if not more. A digital signature serves the same purpose as a handwritten signature. However, a handwritten signature is easy to counterfeit. A digital signature is superior to a handwritten signature in that it is nearly impossible to counterfeit, plus it attests to the contents of the information as well as the identity of the signer.

Illustration: Sameer uses computer software to generate two keys, a public key and private key. These keys are nothing but extremely large numbers. Although the keys are mathematically related, it is almost impossible to obtain the private key by using the public key. Sameer will give his public key to the whole world but will keep his private key to himself. Now, Sameer wants to enter into a transaction with Pankaj. He composes an electronic document containing the words

I, Sameer, owe Pankaj the sum of Rs. 500 only.

Using his computer Sameer runs this document through a hash function. The hash function software produces a fixed length of alphabets, numbers and symbols for any document. This is known as the hash result. However, the contents of this fixed length are never the same for two different documents. If even one letter in the document is altered, an entirely different hash result will be generated. When using a particular hash function, the length of the output is always the same, whether the input document is one word or 1 million words.

Page 19: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

18

Moreover, the hash function software will always produce the same hash result for a particular message. It is practically impossible to reconstruct the original message from the hash result. That is why it is known as a one-way hash function.

Sameer now uses his computer to “sign” the hash result of his document. His computer software uses his private key to perform some calculations upon the hash result. This produces a signature, which consists of some digits. This set of digits is attached to the hash result. Sameer now sends the original message and the signed message digest (hash result) to Pankaj. Pankaj has the same hash function software on his computer. He also has Sameer’s public key. When Pankaj receives Sameer’s email, he runs the original document through the hash function software and generates a hash result. He compares this hash result with the one that was sent to him by Sameer. If the two hash results are the same, it means that the message is unaltered. Pankaj also verifies whether Sameer’s private key was actually used to sign the hash result. For this Pankaj’s computer uses Sameer’s public key. Only a message signed by Sameer’s private key can be verified using Sameer’s public key. The public key and private key are basically two very large numbers that are mathematically related to each other. If a particular private key was used to “sign” a message, then only the corresponding public key will be able to verify the “signature”.

The digital signature creation and verification process achieves the following legal requirements:

1. Signer authentication: A person’s digital signature cannot be forged unless his private key is stolen. This means that if a digital signature can be verified by Sanya’s public key, then it must have been created by Sanya’s private key. The digital signature verification process thus authenticates the identity of the signer.

2. Message authentication: A digital signature is based upon the hash value (or message digest) of the actual message. Thus a digital signature is unique for each message and automatically authenticates the message.

3. Affirmative act: The process of digital signature creation requires the signer to use his

private key (usually by entering a password). This overt act alerts the signer that he is initiating a transaction that may have legal consequences.

Page 20: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

19

A sample Elliptic Curve Digital Signature Algorithm (ECDSA) private key VFGxBp56YTFwAkwtLn3rxKh4ah8JYRtKf2Kb3YkKyTqFnD1XdyWXmPX6 A sample ECDSA public key 03b085ad524868aa32ba05109bf0448b188bfd3627fde1c91c127d938c07815879 Sample data I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times. Sample digital signature for the above data H/zH4VWkOv9/Awu7OUEK43Fq1dtBcBxnrzmwOdytpsr0Grw+lPxWgbgh3Dcr4lhwgVOBb7vAoChjUvqxlqnpDAI=

Page 21: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

20

1.8 Blockchain A blockchain is a public ledger containing an ordered and time-stamped record of transactions. In addition to preventing double-spending, the blockchain prevents the modification of previous transaction records. A block of one or more new transactions is collected into the transaction data part of a block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains - the merkle root of a merkle tree. This is illustrated below:

4f68594945ccded4d77a01992db7f4c5 is the merkle root of the 4 transactions (or pieces of data) in the illustration above. This is stored in the block header. Additionally, each block also stores the hash of the header of the previous block. This chains the blocks together and ensures that a transaction cannot be modified without modifying the block that records it and all following blocks. Transactions are also chained together. This is illustrated below:

Page 22: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

21

Blockchains use a proof-of-work technique similar (but more complex) than the one discussed earlier in this article. Since good cryptographic hash algorithms convert arbitrary inputs into “seemingly-random” hashes, it is not feasible to modify the input to make the hash predictable. To prove that she did some extra work to create a block, a miner must create a hash of the block header, which does not exceed a certain value. The term miner must not be compared with a gold or coal miner in the real world. While a gold miner digs into the earth to discover gold, a blockchain miner uses computational power to calculate hashes. To add an entire block to the block chain, a miner must successfully hash a block header to a value below the target threshold. The first-ever block is known as the genesis block. Each subsequent block is addressed by its block height, which represents the number of blocks between it and the genesis block. New blocks are added to the block chain if their hash is at least as challenging as a difficulty value expected by the consensus protocol e.g. according to the bitcoin protocol, it should take 2 weeks for 2016 blocks to be generated. If the time taken is more or less than 2 weeks then the difficulty value is relatively decreased or increased every 2 weeks.

Page 23: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

22

1.9 Blockchain Frameworks The most popular blockchain frameworks (in alphabetical order) are:

1. BigchainDB9 2. Corda10 3. Ethereum11 4. Hyperledger Burrow12 5. Hyperledger Fabric13 6. Hyperledger Sawtooth14 7. Multichain15 8. Quorum16

1. BigchainDB

At its core, BigchainDB combines MongoDB (a distributed database with Tendermint (a blockchain consensus protocol). This makes it “a queryable database with blockchain characteristics such as decentralization, immutability and the ability to treat anything stored in the database as an asset”. Its key features:

1. You can write and run any MongoDB query to search the contents of all stored transactions, assets, metadata and blocks.

2. BigchainDB is Byzantine Fault Tolerant: even if one-third of the nodes are “down”, the rest of the network will still come to a consensus on the next block.

3. Consensus on a new block takes about 1 second.

4. You can use BigchainDB to design your own private network with custom assets, transactions, permissions, and transparency.

5. Permissions can be set at transaction level.

6. BigchainDB can be used for public and private networks. 9 https://www.bigchaindb.com 10 https://www.corda.net 11 https://www.ethereum.org 12 https://www.hyperledger.org/projects/hyperledger-burrow 13 https://www.hyperledger.org/projects/fabric 14 https://hyperledger.org/projects/sawtooth 15 https://www.multichain.com 16 https://www.jpmorgan.com/global/Quorum

Page 24: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

23

2. Corda

At its core, Corda is designed to “enable private transactions with immediate finality” and to “record, manage and synchronize agreements and transfer value”. Corda has been built by the blockchain company R3 with technology and industry partners. Its key features:

1. Since Corda’s communications are point-to-point, only participants of a transaction can see it. This is unlike many blockchain platforms where all participants have a copy of the full ledger. Every node in a Corda network has a unique ledger referred to as a multilateral ledger.

2. Corda extends Bitcoin’s UTXO technology to enable it to work with any complex asset type.

3. The “notary” which provides the “uniqueness service” sees only a set of hashes

representing the transaction and not the transaction details. This eliminates the need for routing transactions to intermediaries. This also ensures that the information remains private to the parties to the transactions while providing assurance over its uniqueness.

4. Corda’s decouples the consensus from the ledger to the transaction. This increases the

potential for scaling because the network does not need to process each transaction and reach consensus on the state of the shared ledger.

5. Multiple consensus algorithms can be utilized within the same Corda network.

6. Parties to a transaction can use key randomization with automatic identity

management to de-anonymize transactions.

7. Corda uses Intel Software Guard Extensions (SGX) technology to allow records to be verified while remaining encrypted to all parties.

3. Ethereum

Ethereum is a decentralized platform that runs smart contracts which are applications designed to “run exactly as programmed without the possibility of downtime, censorship, fraud or third-party interference”. Its key features:

1. The Ethereum Wallet allows users to “hold and secure ether and other crypto-assets built on Ethereum, as well as write, deploy and use smart contracts”.

2. Ethereum can be used to create a tradeable digital token. This can be used as a crypto-currency or a digital representation of an asset such as oil, gold, silver etc. Ethereum

Page 25: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

24

tokens use a standard coin API which enables them to be compatible with any Ethereum wallet, contract, and exchange using the same standard.

3. Ethereum can be used for crowdfunding without the need for a centralized arbitrator

or clearinghouse. The Ethereum smart contract can “hold a contributor’s money until any given date or goal is reached. Depending on the outcome, the funds will either be released to the project owners or safely returned back to the contributors”.

4. Ethereum can be used to create a virtual organization where members vote on issues.

5. There are thousands of Ethereum decentralized apps.

6. A crypto-currency called ether is needed for building, accessing and interacting with

Ethereum apps and smart contracts.

7. GETH and ETH are command line tools for the Ethereum blockchain. 4. Hyperledger Burrow

Hyperledger Burrow, previously known as eris-db, executes Ethereum EVM smart contract code on a permissioned virtual machine. Burrow uses the Tendermint consensus protocol. Its key features:

1. Hyperledger Burrow exposes REST and JSON-RPC endpoints. These enable interaction with the blockchain network and the application state.

2. Hyperledger Burrow uses web sockets to allow subscribing to events.

3. The virtual machine is built to observe the Ethereum operation code specification.

4. Permissions on the virtual machine are enforced through secure native functions.

5. All transactions are validated and applied to the application state (which consists of all accounts, the validator set, and the name registry) in the order that the consensus engine finalizes them.

6. All accounts in Hyperledger Burrow have permissions. The accounts contain smart

contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine.

Page 26: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

25

5. Hyperledger Fabric

Hyperledger Fabric is the first distributed ledger platform that supports smart contracts authored in general-purpose programming languages such as Java, Go and Node.js. Its key features:

1. Hyperledger Fabric has an ordering service (implemented with Apache Kafka / ZooKeeper and BFT-SMaRt) which establishes the total order of all transactions.

2. All Hyperledger Fabric blockchain nodes have an identity provided by a modular membership service provider and take up one of three roles — clients (which submit transaction proposals for execution, enable the execution phase, and, broadcast transactions for ordering), peers, which maintain the blockchain ledger and orderers (that collectively form the ordering service).

3. Endorsing peers execute transaction proposals.

4. Each transaction contains state updates, dependencies (computed during the execution

phase), and the cryptographic signatures of the relevant endorsing peers.

5. Consensus in Fabric is modular because the orderers are unaware of the application state and do not participate in the execution or validation of transactions.

6. Fabric’s membership service provider associates peers with cryptographic identities

and maintains the permissioned nature.

7. Fabric features a peer-to-peer gossip service that disseminates the blocks output by the ordering service to all peers.

8. Smart contracts do not have direct access to the ledger state and run within a

container environment for isolation.

9. Smart contracts can be written in standard programming languages like Java, Go and Node.js.

10. Each Fabric peer maintains the ledger locally in the form of the append-only

blockchain and as a snapshot of the most recent state in a key-value store which can be implemented by LevelDB or Apache CouchDB.

Page 27: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

26

6. Hyperledger Sawtooth

Hyperledger Sawtooth is a blockchain framework that allows developers to create smart contracts in multiple languages including Python, Javascript, Rust, C++, Go, Ethereum Virtual Machine and Java. Its key features:

1. Sawtooth nodes communicate through messages (containing information about transactions, blocks and peers), serialized using Google’s Protocol Buffers, and sent over TCP.

2. Sawtooth nodes use access control lists to control who can connect to the network and sync with the current ledger state, who can send consensus messages and participate in the consensus process and who can submit transactions to the network.

3. Sawtooth also supports the RAFT consensus protocol. Designed for high throughput,

low latency transactions, RAFT is a crash-fault tolerant ‘voting’-style consensus algorithm.

4. Sawtooth supports the Proof of Elapsed Time (PoET) consensus algorithm. As per

official Sawtooth documentation, “At a high-level, PoET stochastically elects individual peers to execute requests at a given target rate. Individual peers sample an exponentially distributed random variable and wait for an amount of time dictated by the sample. The peer with the smallest sample wins the election. Cheating is prevented through the use of a trusted execution environment, identity verification and blacklisting based on asymmetric key cryptography, and an additional set of election policies”.

5. Sawtooth also supports PoET-Simulator, an implementation of PoET that forgoes

Byzantine fault tolerance. 7. Multichain

Multichain is a very simple to deploy blockchain framework that enables smart asset lifecycle management and multiple key-value, time series & identity databases on a blockchain. Its key features:

1. Multichain offers 8 permission options to control who can connect, send and receive transactions, create assets, streams, and blocks.

2. MultiChain data streams enable the blockchain to be used as a general purpose append-only database. The blockchain provides timestamping, notarization and immutability.

Page 28: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

27

3. MultiChain transactions can have multiple inputs & outputs, and each of these can relate to different addresses on the blockchain. A single multichain transaction can perform an asset exchange between multiple parties. This is called delivery-versus-payment and gives a guarantee of atomicity implying that either all the asset transfers took place simultaneously, or none took place at all.

4. Multichain supports multisignature transactions which means that given x addresses,

at least y corresponding private keys must sign a transaction.

5. Multichain supports external key management as well as the feature of signing a transaction outside of a regular node.

6. Multichain supports the issuance, re-issuance, sending & receiving of unlimited

assets. It also supports native currency.

7. MultiChain’s blockchain parameters are global to a blockchain while the runtime parameters affect only the individual nodes in a network.

8. Data streams are multiple key-value, time series or identity databases on a

blockchain. Ideal for data sharing, timestamping and encrypted archiving. 8. Quorum

Quorum is a fork of go-ethereum that supports private transactions and private contracts as well as node/peer permissioning. Its key features:

1. Cakeshop provides tools for managing a local blockchain node, setting up clusters, exploring the state of the chain, and working with contracts. It includes geth, quorum, and constellation Ethereum servers, a Solidity compiler and all dependencies.

2. Quorum supports private transactions and private contracts through public/private state separation and utilizes peer-to-peer encrypted message exchanges (see Constellation and Tessera) for directed transfer of private data to network participants

3. Quorum offers Raft-based Consensus and Istanbul BFT.

4. Quorum supports peer and node permissioning, using smart contracts, to ensure that

only known parties can join the network.

Page 29: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

28

2. Evolution of money: from cowry shells to the blockchain Our ancestors started off with the barter system - something like "I will give you 2 horses in return for 5 shiny new super-sharp axes". Soon they realised that the barter system had too many limitations - everyone didn't want horses, horses horses were neither divisible (not too many people would want 0.35 buffaloes) nor very portable (imagine having to carry a horses on your shoulders while going shopping). So they moved on to more acceptable, divisible, homogeneous and portable forms of money - cowry shells, salt, gold, silver and lots more. The Chinese invention of paper eventually led to the birth of paper currency, which was initially backed by gold or other precious metals. Then the world moved on to fiat money - currency that's declared as legal tender by a government but not backed by a physical commodity17. This brings us to an essential question – what is money? Money's a matter of functions four, a Medium, a Measure, a Standard, a Store. So goes the couplet based on William Stanley Jevons analysis of money in 1875. This meant that for something to be called as money, it must function as a medium of exchange, a measure of value, a standard of deferred payment and a store of value. The birth of computers and the Internet brought in many electronic payment systems including debit cards, stored value cards, giro transfers, credit cards, net-banking, electronic bill payments, electronic cheques, mobile wallets, digital gold currencies, digital wallets, electronic funds transfer at point of sale, mobile banking, SMS banking, online banking, payment cards, real-time gross settlement systems, SWIFT, wire transfers and more. And then came Satoshi Nakamoto’s path breaking whitepaper - Bitcoin: A Peer-to-Peer Electronic Cash System in October 2008. This brought the world its first truly peer-to-peer electronic currency18. Bitcoin earned a lot of notoriety primarily because of its use by

17 Have a look at a 100-rupee note. It caries a promise signed by the Governor of the Reserve Bank of India (RBI) – “I promise to pay the bearer the sum of one hundred rupees”. If you were to take this note to the Governor of the RBI, he would give you coins or one-rupee notes totaling 100 rupees. The RBI gets the power to issue currency notes by the Reserve Bank of India Act, 1934 e.g section 31 states that “No person in India other than the Bank or, as expressly authorized by this Act, the Central Government shall draw, accept, make or issue any bill of exchange, hundi, promissory note or engagement for the payment of money payable to bearer on demand, or borrow, owe or take up any sum or sums of money on the bills, hundis or notes payable to bearer on demand of any such person…” 18 Virtual currency is a digital representation of value that can be digitally traded and functions as (1) a medium of exchange; and/or (2) a unit of account; and/or (3) a store of value, but does not have legal tender status (i.e., when tendered to a creditor, is a valid and legal offer of payment) in any jurisdiction.

Page 30: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

29

members of the now shut-down Silk Road - an illegal online marketplace that facilitated the sale of hundreds of millions of dollars worth of drugs, guns, stolen financial information, counterfeit documents and more. All Silk Road transactions were conducted exclusively in bitcoin. A lot of crypto-currencies19 piggybacked on Bitcoin’s underlying innovation – the blockchain. In fact we now have hundreds of virtual currencies20 being used around the world. And now we have become a world where bankers wake up each morning wondering – “has the meaning of money and banking changed while I slept”. This rapid change in the global money ecosystem has implications for all of us - from Governments looking to clamp down on money laundering, tax evasion and terrorist funding to banks looking to understand the implications of the blockchain technology. From law enforcement looking to clamp down on the Mafia using Bitcoin to businesses looking for faster and cheaper ways to receive and transfer money globally.

It is not issued nor guaranteed by any jurisdiction, and fulfils the above functions only by agreement within the community of users of the virtual currency. Virtual currency is distinguished from fiat currency (a.k.a. “real currency,” “real money,” or “national currency”), which is the coin and paper money of a country that is designated as its legal tender; circulates; and is customarily used and accepted as a medium of exchange in the issuing country. It is distinct from e-money, which is a digital representation of fiat currency used to electronically transfer value denominated in fiat currency. E-money is a digital transfer mechanism for fiat currency—i.e., it electronically transfers value that has legal tender status. [Source: FATF report on Virtual Currencies - Key Definitions and Potential AML/CFT Risks] 19 Cryptocurrency refers to a math-based, decentralised convertible virtual currency that is protected by cryptography. - i.e., it incorporates principles of cryptography to implement a distributed, decentralised, secure information economy. Cryptocurrency relies on public and private keys to transfer value from one person (individual or entity) to another, and must be cryptographically signed each time it is transferred. The safety, integrity and balance of cryptocurrency ledgers is ensured by a network of mutually distrustful parties (in Bitcoin, referred to as miners) who protect the network in exchange for the opportunity to obtain a randomly distributed fee (in Bitcoin, a small number of newly created bitcoins, called the “block reward” and in some cases, also transaction fees paid by users as a incentive for miners to include their transactions in the next block). Hundreds of cryptocurrency specifications have been defined, mostly derived from Bitcoin, which uses a proof- of-work system to validate transactions and maintain the block chain. While Bitcoin provided the first fully implemented cryptocurrency protocol, there is growing interest in developing alternative, potentially more efficient proof methods, such as systems based on proof-of-stake. [Source: FATF report on Virtual Currencies - Key Definitions and Potential AML/CFT Risks] 20 Source: www.mapofcoins.com

Page 31: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

30

4. Blockchain use cases Banking sector

By providing transparent real-time data and increasing the efficiency in settlement of transactions and processing, blockchains are immensely useful for the banking sector. Use cases include:

1. Auction of assets 2. Charge Registry 3. Contract authentication, verification & storage 4. Corporate & Individual KYC and due-diligence 5. Cross-border remittance 6. Data marketplaces 7. Electronic signatures 8. Employee background verification 9. Encrypted communications 10. Encrypted data storage 11. Invoice discounting / Supply chain finance / factoring 12. Issuance of Bank Guarantees & Letters of Credit 13. Loan origination & lifecycle management 14. Loyalty program management 15. Password-less authentication 16. Peer-to-peer lending & Crowd funding 17. Peer-to-peer payments 18. Repository of AML, CBWT & STR records 19. Smart asset lifecycle management 20. Stressed assets (NPA) marketplace 21. Syndicated loans 22. Vendor on-boarding & rating

Capital markets

By providing transparent real-time data and increasing the efficiency in settlement of transactions and processing, blockchains are immensely useful for capital markets. Use cases include:

1. Automating swaps 2. Document authentication, verification & storage 3. Corporate finance book-running 4. Depository receipts 5. Employee background verification 6. Lifecycle management of customized derivatives (with custom margin agreements,

cash flows, swap conditions etc) 7. Pre-trade, trade, post-trade and securities servicing related activities

Page 32: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

31

8. Securities lifecycle management - creation, issuing, trading, escrow, redemption, retirement (for equity & preference shares, debentures, bonds, options, derivatives etc)

9. Smart contract based unbundled securities to enable separate trading and transfer of individual cash flows and encapsulated rights

Defence and military

The military can greatly benefit from the immutable data storage, authentication and verification features of blockchain technology. Use cases include:

1. Assuring the integrity of operating systems, software, data and firmware used in military infrastructure.

2. Employee background verification 3. Establishing the provenance of every hardware and software component 4. Secure messaging systems for resilient communications.

Government

Blockchain technology can maximize integrity and minimize fraud & errors in Government services. Use cases include:

1. Assuring the integrity of operating systems, software, data and firmware used in critical infrastructure

2. Document authentication, verification & storage 3. Employee background verification 4. Immutable storage, authentication and verification of records e.g. Accounting

records, Birth certificates, Business ownership & transaction records, Court & police records, Identity documents, Land records, Mortgage / loan records, Vehicle registries etc

5. Maximising transparency in the voting process in democratic elections 6. Maximising transparency in auctioning of Government assets 7. Registration and payment processes for government grants

Healthcare and pharmaceuticals

Healthcare & Pharmaceutical industry can greatly benefit from the immutable data storage, authentication and verification features of blockchain technology. Use cases include:

1. Counterfeit drugs minimization through transparency in transactions between manufacturers, wholesalers, pharmacists and patients.

2. Document authentication, verification & storage 3. Employee background verification 4. Immutable storage, authentication and verification of electronic health records and

record sharing protocols 5. Patient data access 6. Preventing unauthorised modification of clinical trial data

Page 33: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

32

Insurance

Blockchain technology can reduce time, cost and risk across the entire insurance value chain. Use cases include:

1. Agent details registry 2. Auto insurance repository 3. Blockchain enabled micro insurance 4. Employee background verification 5. National Policy & Claims Records repository 6. Policy & claims records 7. Shared KYC repository 8. Unclaimed Life Insurance repository 9. Verified Health & Policy Records

Shipping and logistics

Blockchain technology's ability to ensure tamper-resistance and realtime data sharing can save the shipping and container logistics industry billions of dollars. It can also reduce the time consumed by archaic processes which require countless emails, phone calls and faxes. Use cases include:

1. Digitising the supply chain process 2. Digitising processes 3. Employee background verification 4. Shipping containers tracking

Telecommunications

Telecommunications companies can leverage blockchain technology to create new business models and revenue streams. Use cases include:

1. Employee background verification 2. Identity management services to clients 3. Loyalty program lifecycle management 4. Micropayment-based business models for purchase of music, mobile games, gift

cards etc 5. Mobile payment systems

Page 34: Blockchain 1011 Blockchain 101 January 2020 Rohas Nagpal Primechain® Technologies Pvt. Ltd. This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 …

Primechain Technologies

Primechain Technologies Pvt. Ltd.

410, Supreme Headquarters,

Mumbai-Bangalore Highway,

Near Audi Showroom,

Baner,

Pune - 411045 (INDIA)

[email protected]

www.primechaintech.com