• The Analyst

Democracy and Blockchain


The citizenship records are made out of fundamental distinctive proof subtleties of its residents that empower the state to distinguish them unmistakably. The citizen's identity will be established and authorized by identity issuing authority whose working is controlled by the particular nation's legislature. These documents or identities help individuals identify themselves and avail of the rights and benefits provided to them by the government or the land's constitution. Issuance of multiple identity documents for various purposes makes the data redundant, and updating the data across all departments takes a considerable amount of time and resources. The problem with the improper recording of data can lead to a particular individual having to face severe problems. Even the forging and counterfeiting in the existing identity model of identification have become accessible as there is no standard procedure for verifying the identity. The amount of data one needs to provide to avail of a particular service or to exercise a right in the form of paper, which is hard to verify if it is damaged. Identity thefts can happen in different forms. Numerous unfortunate victims reported episodes in which their identities and personal information were compromised through various sources.

Blockchain is the collected storage of the data in interconnected blocks, which is secured using cryptographic methods. This technology makes the data immutable, transparent, and the data cannot be erased from the storage, making it safe and trusted. With Blockchain the individual will have the control over with whom he/she is sharing his/her data other than the authorized government representatives. There can be no intrusion or tampering of the data. This makes the inclusion of erroneous data impossible. With Blockchain and smart contracts in play, identity management and verification runs smoothly without human intervention and the errors that come with it.


Background

Every country does record-keeping of identities of citizens of a nation. The citizen's benefit and rights by using these government authorized identity documents like AADHAAR, PAN, Passport, driving license, Voter Id, etc. each of these identities is issued and managed by a government body UIDAI, ECI, etc. But, these traditional ways of identification have their shortcomings. They can be damaged, forged, compromised, and can be changed in some instances. In some cases, they are not enough to establish a person's identity. Across the world, approximately more than one billion people don't have control over their own identity, making them vulnerable for many hardships; these people cannot exercise their vote, open a bank account, or find a job. These people cannot contribute or be part of the thriving economy. Even the people with proper identity don't have complete ownership of their identity as the third parties that have their data are prone to cyber-attacks and intrusion, making them vulnerable as well.

Blockchain can address these problems. Blockchain-based unified identity helps in distributing the control over an individual's data between that individual and the government over what, when, where, and with whom they are sharing the individual's data—protecting the privacy and security of the personal details while sharing only the required details with the government agent or organization. The Blockchain can resolve the issues like forging, inaccessibility, and compromising of identities. Analysis suggests that blockchain technology-based identity also help an individual in many ways where he or she can monetize his personal data by opting to share his/her details with research organizations, private mass surveyors as data is very valuable these days, and it is estimated that 60% of global GDP will be digitized within next two years with which the value for personal data will increase. Blockchain is the way forward for the government to establish an immutable and to curb red tape


Blockchain

Blockchain technology is a recent development of a secure data storage method and record-keeping without a centralized authority. From a data management standpoint, a blockchain is a distributed database that logs a progressing list of transaction records by consolidating them into an ordered chain of blocks.

A blockchain is formed to solve a common business problem that all participants who want to join the network face. All stakeholders have their digital signatures through which identities are established. A transaction is processed and accepted only after consensus is achieved. Once validated, blocks are sent to all the endpoints or participants, who verify and add it to their chain of blocks, thus forming the Blockchain.


Public permissioned Blockchain, a combination of Public and Permissioned type of Blockchain, is a suitable type for our use case of citizen identity. It values immutability and efficiency over anonymity because the authorities should verify every participant of the blockchain network. To protect an individual's data from exposure to others, we would have access control where only the individual and an authorized governing body have control over their data.


Immutability means that the data, once written, should not be changed. In a blockchain, the immutability is achieved by employing hashing, consensus mechanism, and the Blockchain's distributed nature. If an intruder can edit his copy of the block, it will be evident once the block synchronizes with the entire network making the network robust and tamper-evident.


Interoperability of Blockchain

One of the best features of Blockchain-based identity is its interoperability between other networks. The modern-day every private and public organization is moving towards Blockchain by establishing consortiums. The identity network help in sharing and fetching the required details with networks. Like fetching a citizen's medical information from the Hospitals consortium or sharing the PAN details with the bank consortium or to a specific bank making the process fast and secure.


Smart Contracts

A smart contract is a digital version of a contract that runs on blockchain end nodes and it runs when certain conditions are met. The goal of smart contracts is to minimize human intervention.

The smart contract is built on the following steps:

•Understanding the problem of the use case

•Define the properties of the network and its stakeholders in a smart contract.

•Assessing and adding the functionalities of involved parties of the smart contract.

•Investigative the possible events in the contract and conditions that triggered them.

•Evaluation of the smart contract.

As the Blockchain is an append-only decentralized ledger, the smart contracts working through it can include new transactions on to it. The transactions that happen over the Blockchain can easily verifiable. But then, the most resonating quality of smart contracts is that they have totally minimized the requirement of trusted third-parties in this framework. As these contracts are self-executing and self-governing in nature and are free from malicious manipulations, they can be utilized to create trustless frameworks which run over an agreement based democratized convention.


As the Blockchain is an append-only decentralized ledger, the smart contracts working through it can include new transactions on to it. The transactions that happen over the Blockchain can easily verifiable. But then, the most resonating quality of smart contracts is that they have totally minimized the requirement of trusted third-parties in this framework. As these contracts are self-executing and self-governing in nature and are free from malicious manipulations, they can be utilized to create trustless frameworks which run over an agreement based democratized convention.


Blockchain-based Hyperledger technology can be the solution for unified citizen identification, where distributed ledger technology (DLT) will be used. DLT is a system that stores all the information in a decentralized form, making it immutable by any central party (unless authorized). All the data of the network and the changes that have occurred are stored in a ledger, and each participant maintains their copy of the ledger. A transaction is reflected in the network by consensus, and this makes the system secure. Hyperledger Fabric is an open-source framework that can build our use case on permissioned and private blockchains. It is an open-source project based on DLT.

One of the important features of the hyperledger Fabric that makes it feasible for our system is its component of the Channel.

The key features in the Fabric network channel are:

•Channels compartmentalize the data of the network.

•In a Fabric network, the peers can form any number of channels amongst them.

•In a Fabric network, as there can be any number of channels this implies the fact that one peer can be a part of more than just a single channel.

The roles in the proposed system are as follows:

Client: It is an application that acts on behalf of any stakeholder in the network. In our use case, authorized personnel from Government bodies like UIDAI, EIC (Election commission of India), etc., Private organizations like a bank or a medical institute and the citizens are the stakeholders who use the application to access the different functions on the network.

Peers: These are the computing resources that are owned by the members of the organizations in the network. Each member can have one or more peers in the network. In the Citizen Identity network, each government body and organization contribute one or more peer each in the network, and a regulatory body also contributes its peers in the network.

These peers can further have two roles, as follows:

Committer: It takes the blocks that have been advertised by the ordering service and put them on its ledger. Every peer that is part of the network will be a committer for a transaction as long as it belongs to the channel where the transaction was initiated.

Endorser: The endorser's job is to take an incoming transaction from the application, simulate the transaction, and pass it to the ordering service. A particular peer can be an endorser in the network if it has a chain code (smart contract) installed.

Ordering service: An ordering service puts the transactions in the right sequence of their occurrence; converts these transactions into a block, and then disseminates this block in the network


The consensus inside Fabric is a three-step process:

Endorsement: Every time any of the network peers initiates a transaction, that transaction is first endorsed by the peers of the network.

Ordering: Once endorsed, the transaction moves to order. Ordering decides which transactions are put on the block and what sequence the blocks will be put onto the ledger of the different peers.

Validation: After the blocks have been ordered in a particular sequence by the ordering service, before being committed to the ledger by each of the peers, they go through a process of validation.


The components of our Hyperledger Fabric network are the following:

Assets: An Asset in Hyperledger Fabric is an important entity that is stored on the ledger. They are stored in the form of key-value pairs. For example, in the citizen identity problem, the Citizen details are the asset in a key-value pair, and the representation of the same is as follows:

Example of a citizen asset.


NewCitizenObject=
{
"AADHAR Number" : "12345678911"
"Name": "ABC XYZ"
"DOB": "DD/MM/YYYY"
"Father Name": "XYZ ABC"
"Vote": "Not Eligible",
"PAN": "ABC1234P"
"Accounts" :{ "SBI00082":" 12345678901"},
"Phone": 91XXXXXXXX,
"Current State": "Andhra Pradesh",
"pincode": 522309,
"Address": "DEF street, Door No: 1-1-1, KLM Apartment"
};



Transaction: A transaction is responsible for the change in the state of the asset.

Suppose the person reached an eligible age for voting. This change in the value of assets is referred to as the transaction. The version of the asset "Citizen" will now be updated to version=" 1" and the vote will be changed from "Not Eligible" to "Eligible".

Updated citizen asset after the transaction.


{
"AADHAR" : "12345678911"
"Name": "ABC XYZ"
"DOB": "DD/MM/YYYY"
"Father Name": "XYZ ABC"
"Vote": "Eligible",
"PAN": "ABC1234P"
"Accounts" :{ "SBI00082":" 12345678901"},
"Phone": 91XXXXXXXX,
"Current State": "Andhra Pradesh",
"pincode": 522309,
"Address": "DEF street, Door No: 1-1-1, KLM Apartment".
}

Ledger: The information about an asset or a transaction of the network is stored in the data structures. The ledger is a data structure that stores all the changes in the assets and transactions. It also stores the current value of the assets and the history of the transactions, which lead to the current state of the asset.


Writing the citizen asset object on to the ledger.


Const companyKey = ctx.stub.createCompositeKey ('org.citizen-network.citizennet.citizen', [AADHAR Number])
let citizenBuffer =Buffer.from (JSON.stringify (newCitizenObject));
await ctx.stub.putState(citizenKey,citizenBuffer);

World State: The world state is the data structure that stores the current state of the asset. This helps in retrieving the currents state of the citizen data, but the Hyperledger provides a function to retrieve the historical transactions meaning we can see all the states that an asset has been through.

Getting the current state of the citizen asset.


async viewaadhar (ctx,AADHAR){
const citizenKey=ctx.stub.createCompositeKey ('org.citizen-network.citizennet.citizen',[ AADHAR]);
 
//getting the current state of citizen
 
let citizenBuffer = await ctx.stub.getState(citizenKey).catch(err=>console.log(err));
 
 return JSON.parse(citizenBuffer.toString());
 
}

Getting the historical states of the citizen asset.


async viewHistory (ctx, AADHAR) {
//getting the drug key
const citizenKey = ctx.stub.createCompositeKey ('org.citizen-network.citizennet.citizen',[ AADHAR]);
//getting the history for the key
let iterator = await ctx.stub.getHistoryForKey(citizenKey);
let result = [];
let res = await iterator.next();
while (!res.done) {
if (res.value) {
const obj = JSON.parse(res.value.value.toString('utf8'));
result.push(obj);
 
   }
 
res = await iterator.next();
}
await iterator.close();
return result;
}

Chaincode: Chaincode is the basic logic for performing and validating the transactions on the fabric network; it enables users to perform transactions on the network's ledger to update and work with assets on it. Chaincode is invoked by triggering transactions that result in a change of the state of the ledger. Chaincode for the citizen network can minimize human interaction on all ends.


The chaincode is a collection of smart contracts that works to eliminate the errors that will happen due to human interaction. The above picture shows a simple chaincode where different stakeholders interact with the hyperledger using the chaincode functions. Only UIDAI can make changes to the hyperledger where the citizen can request for changes. The third parties can only get access to an individual's aadhar with his/her approval. The chaincode can also help in automating various government or private organization's tasks.

It can automate many processes like changing the eligibility to vote for citizens.


async updateVoteEligibility(ctx,AADHAR,age)
{
const citizenKey = ctx.stub.createCompositeKey ('org.citizen-network.citizennet.citizen',[ AADHAR]);
//fetching the citizen details
 
let citizenBuffer= await
ctx.stub.getState(citizenKey).catch(err => console.log(err));
const citizen= JSON.parse(citizenBuffer.toString());
 
var status = "Eligible";
 
if(age>=18){
newCitizenObject ={
 
"AADHAR" : "12345678911"
"Name": "ABC XYZ"
"DOB": "DD/MM/YYYY"
"Father Name": "XYZ ABC"
"Vote": status,
"PAN": "ABC1234P"
"Accounts" :{ "SBI00082":" 12345678901"},
"Phone": 91XXXXXXXX,
"Current State": "Andhra Pradesh",
"pincode": 522309,
"Address": "DEF street, Door No: 1-1-1, KLM Apartment"
“VoterID”: xxxxx
};
}
 
let citizenBuffer =Buffer.from (JSON.stringify(newCitizenObject));
await ctx.stub.putState(citizenKey,citizenBuffer);
}

This chaincode, once the user (citizen) raises a request to vote from, is client-side UI, it compares the present date with the DOB of the person and if the difference is greater than equal to 18 then his voter Id gets generated for the constituency of the pin code of his original address making eligible to cast his vote there.



The interoperability of the project makes it a unique model that can make the tedious amount of work go away and has applications ranging from the finance sector to healthcare. Some of those use cases are


  • This unified Blockchain can help the banks verify and validate a citizen's financial history with his/her consent to do so. They can get access to their credit score, and the chaincode automates the process of loan or credit approval based on the scores and their historical transactions.

  • The Model helps automate a secured and fast way of performing KYC by various private organizations with the citizen's approval and without the exchange of a load of documents and paperwork.

  • This interoperability nature of this model also helps fight an epidemic or a pandemic to track the medical and travel history of citizens by the government authorities and contain the outbreaks.

  • The Blockchain can be made to trigger an alert to the authorities when certain behavior is seen in the data of an individual to alert them and track to take action on the person responsible without manually monitoring them all the time

The citizens' unified model makes the private data secure manageable while making the authorities have an eye over malicious activities and trace them quickly.


© 2020 by An Analyst.

Grayscale on Transparent.png