Design, Analysis and Implementation of Online Competitive Examination Using Heterogeneous Consortium Blockchain

DOI : 10.17577/IJERTV10IS120052

Download Full-Text PDF Cite this Publication

Text Only Version

Design, Analysis and Implementation of Online Competitive Examination Using Heterogeneous Consortium Blockchain

Anmol Singh

Department of Computer Science and Engineering Amity University Jharkhand

Ranchi, India

Abstract This paper provides an alternative design, analysis and implementation of present E-examination system using concepts of consortium blockchain mixed with public blockchain concepts like PoW consensus protocol giving a heterogeneous solution which is more secure in terms of data mutability of the candidates. The experiment performed propose a decentralized application(D-APP) which use SHA- 256 hashing cryptography to encode the blocks. Also, it covers the core concepts of distributed ledger containing student details in a decentralized network of examination centers forming different levels of blockchain and how its distribution throughout the network.

The proposed model diversifies the future of blockchain in the field of education.

Keywords D-APP, Blockchain, SHA-256, PoW


    With emergence of technology boosted by internet led a paradigm shift in work flow of educational institution in India and all around the world. Todays E-examination System offers high scalability with higher reach of candidates and have a boon of AI based proctoring preventing cheating and giving real time analytics of result have been considered a reliable tool for conducting examination country wise and worldwide. It has been seen that E-Learning Management System (E-LMS) has been adopted by various Colleges, Examination Institutions and schools during and prior of Covid-19 outbreak.

    Still many prominent National examination board doesnt consider the present e- examinations system reliable for conducting national level or state level examination. One of the most recent examples could be seen during covid-19 outbreak worldwide where various examinations which was supposed to be conducted offline were postponed even after the situation was under control. It could be the noticed even these examination boards didnt adopt the E-examination system prior to covid-19 outbreak also. These board of examination might not have accepted the present system due to the challenges that could be faced in an E-examination system, which many include malpractice from both the server side (mutability of data, connectivity issues) and client side (open-book exam, difficulty in grading long answers).

    The present centralized client server model RDBMS has been considered robust when it comes to performance and storing and retrieval of data. It takes various measures to manage and secure the data by using encryption,

    authentication, data masking and various access control but still could be prone to data alteration by authorized authority.

    When it comes to data integrity and transparency blockchain has been considered as one of the most emerging technology in this modern era. With its decentralized peer to peer architecture and advanced cryptography techniques data is not only secure but also stored and distributed among all the people of the network forming an immutable ledger. From emergence of cryptocurrencies like bitcoin to supply chain management have drawn the attention of corporations and individuals. The all three types of blockchain (public, private, consortium) are leaving a huge impact on the future of data security and access.

    This paper is based upon a proposed model of E- examination system implemented using heterogeneous consortium blockchain which is partial combination of public, private and consortium blockchain.


    Haber, S. Stornetta [1] describes the complete

    procedure of timestamping of media and text file by creating immutability in files which is independent of the medium also, stamping the date and time during the creation of these digital documents. The concept of blockchain and some of its features and ideas behind

    procedure of timestamping of media and text file by creating immutability in files which is independent of the medium also, stamping the date and time during the creation of these digital documents. The concept of blockchain and some of its features and ideas behind

    hashing are actually present in this paper.

    Penard and Tim [2] explains the working of Secure Hash Algorithm (SHA) family which is now widely used is blockchain technology. They have explained the fault found SHA-0 and how it was broken by the French researchers Chabaud and Joux by testing it with mathematical collision. They have also explained the improvements, drawbacks and complete mathematical explanation of SHA-1 and how SHA-2 family is more secure than the rest.

    In [3] Satoshi Nakamoto brings blockchain technology from theory to practical, where he explained how a network of people can interact with each other and transact as they trust the technology, eliminating the banking intermediatory.

    Xi, Zeyu [4] explains the not only the physical architecture comparison of centralized and decentralized network but also in terms of practical implementations and concluding how decentralized network is more adaptable in

    all situations. These days banking sector and military are also using decentralized architecture as they provide fault tolerance and also least prone to attack or collision.

    In [5] the authors have analyzed PoW consensus protocol in terms of security and performance. Their experiments show how throughput could be increased in terms of transaction per second without affecting the security of the block chain. They have talked about the synchronization od miners in the block chain and network partitioning in case of competing chain. If crypto world if the block generation is faster payments but prone to security variabilities where as if the block size is larger, then the propagation rate is slower. Their quantitative framework consists of a comparative analysis of different security provisions of different proof of work blockchain. their findings suggest a correlation of block reward with security and also how they can scale bitcoin with an effect of 10 time in terms of block generation without affecting the security.

    A detailed overview of consortium blockchain is been discussed in terms of architecture and its components and also its application specific to E-government [6]. Authors discuss the present E-government system which is subject to single point of failure. The proposed E-government system is based on consortium blockchain. This decentralized system consists of preselected nodes that governs the entire system and giving limited access to the other entities.


    Fig. 1. Basic Blockchain design of the proposed system.

    1. Fund raising board: It consist of different examination boards that are willing to be a part of the Examination System using blockchain technology.

    2. Blockchain creator: They could be IT sector company who take the initiative of developing such an ecosystem by raising funds from various examination boards for management of the entire blockchain system and also for conducting online examination and storing data in the form of distributed ledger. They could completely monitor and manage the entire system.

    3. Non-Participating members: They are the students who are giving examination.

    4. Consortium agreement: It is the set of rights and policies under which Fund-raising board and blockchain creator and monitoring board come to an agreement for the access right and monitoring policies

      of the network that are part of th blockchain and immutable ledger. The main purpose of this agreement is to conduct examination by the blockchain creator in agreement with the fund-raising board and to keep the entire system as democratic as possible.

    5. Participant agreement: Consist of the indirect access agreement of the non-participant members i.e., the students who can get access to their marks.

    6. Immutable ledger: Consist of immutable records (marks and student details) distributed among all the nodes in the decentralized network.


      1. 3-Layer Blockchain Model

        Fig. 2. 3-Layer Blockchain Architecture

        The above Fig.2. demonstrate the 3-layers Blockchain formation and propagation summing up to form a single blockchain which gets distributed throughout the network. It can be clearly seen that there are various types of nodes that are part of the same decentralized network connected to its peer nodes. The nodes which are exam centre node, district exam centre node, state centre node is used for self- explanatory naming purpose and is subjected to same architectural prospect.

        This 3- layer Blockchain formation not only adds a smooth propagation of blocks within the network but also adds additional security measures that could be adopted in

        terms of practical prospect. Here a naïve algorithm showing how the 3-layer blockchain formation and propagation adds to the security prospect of the blockchain system at a larger scale.

      2. Working Algorithm for 3-layer Blockchain Model

        Predefined assumptions :

        1. C contains set of all nodes in a network

        2. Si is a set of nodes in a particular state, where i =1,2,3,4 . m

        3. Dj is a set of nodes in a particular district, where j=1,2,3,4 …. n

        4. Si C

        5. Dj Si

        6. Dj C

          Example :

          C= {node1, node2, node3 node4, node5 , node6} S1= {node2, node3, node 4}, where i =1

          S2= {node2, node3, node 8, node 4}, where i =2 D1 = {node4}, where j=1

          D2 = {node4, node8, node3}, where j=2 Case 1:

          For D1 and S1, D1 S1 Pass. S1 C Pass DI C Pass

          Block added Case 2:

          For D1 and S2 D1 S2 Pass. S1 C Fail

          Block not added Case 3:

          For D2 and S2 D2 S2 Pass. S2 C Fail

          Block not added

          Case 4:

          For D1 and S1,

          D1 S1 and n(D1) < 0.5 X n(S1) Pass. S1 C and n(S1) < 0.5 X n(C) Fail

          Block not added

          From above observation,

          Case 1 denotes successful block addition passing all the three layers.

          Case 2 denotes malicious node presence at layer-2, therefore block not added.

          Case 3 denotes malicious node presence at layer-1 and layer-2, prevented by layer-3. Therefore, block not added.

          Case 4 denotes protection of node in blockchain from 51% attack in PoW consensus protocol.

      3. Protocols and Cryptographyic Methods Used.

    1. PoW (Proof of Work)

      Proof of work (PoW) is the consensus protocol in the above proposed model. This protocol is vastly used in public blockchain and is not preferred for consortium blockchain very often as it is considered as wastage of computational resources and required high consumption

      of electricity. It is widely used by leading crypto currencies like bitcoin. The miners have to solve a cryptographic puzzle and find a value called Nonce (number used only once).

      From the above equation is clearly seen that mining difficulty will decrease if current target decrease. Also mining difficulty decreases if we increase the max target value. With reference to the case 4 of the 3-layer blockchain formation and propagation, it is clearly seen that we could reduce chances of 51% attack to minimal if we use the 3-layer architecture of proposed system and PoW consensus. Since funds are being raised by the blockchain management committee for managing and conduction online exams it is puts no point for rewards for the miners who would be an integral part of the blockchain management committee. We can also use different cryptographic hash puzzles for node specific where only the miners who are part of the system could be allowed to mine the block for their node.

    2. SHA-256 cryptographic hash function

    It is the most widely used cryptographic methods to encode a block which takes 256 bits of memory and is 64 character long hexadecimal hash. Each character in the resulting hash takes up four bits (4*4*4*) i.e., 44. The avalanche effect is one of the major reasons for the choice of using it in this project as each student would have a unique attribute that could be easily sufficient enough to withstand collision. Increasing the unique attributes can increase less chances of collision in the block chain.


    This implementation is based upon a basic idea on how one can simulate the proposed system irrespective of a standard blockchain technologies such as Ethereum, IBM Blockchain etc.

    The idea is to build a decentralized network of nodes, which are running on different port of the same computer. For different nodes operating on different port, we can create a standard web applications web application that are running on different ports in the same network.

    Fig. 3. Example of Decentralized Nodes Connectivity

    From Fig.3. each node has been named with SnDmCk naming convention.

    Where n is the state number,

    m is the district number within a state Sn,

    k is the center number within a district Dm of state Sn. Assuming each node is an examination center with same functionality and computing power. The set of nodes within the network is within the control of the fund raising and blockchain management committee being monitored continuously.

    1. Building D-APP

      The decentralized nodes are web applications running on different port having same code and have same functionality serving as the smart contract. The following is an example of how one can create a Decentralized Web Application (D-APP) :


      • An Object-Oriented Programing language.

      • A module for using datetime

      • A module for using SHA256 Cryptographic hash function

      • A web application module

      • A module to send HTTP request

      • A module for URL parsing

      • A json module for data transfer between server and client

        Fig. 3. Source Code

        The above decentralized application from Fig 3. is same for all the nodes in the network. The above code is implemented using Python 3.8. and Flask which is Microframework used to create the required web application. There are different modules used which satisfy the requirement mentioned.

    2. Node connection

      The below table shows the port-to-port connectivity of various nodes in the network. The port numbers can be selected as per the user choice excluding the reserved port numbers. Here A,B,C,DN has been taken for representation purpose only .


      Node on Port

      Connection 1

      Connection 2

      Connection 3

      Connection 4


      (Port : B)

      (Port : C)

      S1D1C2 (Port:B)

      (Port : A)

      (Port : C)

      S1D1C3(Port: C)

      (Port : D)

      (Port : G)

      (Port : A)

      (Port : B)


      (Port : E)

      (Port : F)

      (Port : C)

      (Port : G)


      (Port : D)

      (Port : F)

      S1D2C6(Port: F)

      (Port : D)

      (Por : E)


      (Port : H)

      (Port : K)

      (Port : C)

      (Port : D)


      (Port : I)

      (Port : K)

      (Port : G)


      (Port : J)

      (Port : H)


      (Port : I)

      S3D1C11(Port: K)

      (Port : L)

      (Port : G)

      (Port : H)

      S3D2C12(Port : L)

      (Port : K)

      (Port : M)

      (Port : N)

      S3D2C13(Port : M)

      (Port : L)

      (Port : N)

      S3D2C14(Port : N)

      (Port : L)

      (Port : M)

    3. Network and Transaction

      Fig. 4. Total Nodes in Network

      The nodes json file contain list of nodes in the network, which is under the control of the fundraising committee and blockchain management company can be seen in Fig.4. Here BASE_URL is can be the IPv4 address of the device connected to internet and A,B,C,D,EN are the port numbers. The BASE_URL:PORT gives a unique identification to each node.

      Fig. 5. Transaction Details

      The transactions consist dataset of students who are giving examination on a particular centre. The transactions are 1st stored in the memory pool of the exam centre node and then automated iterative mining and block propagation in different nodes is done as assigned by the management of the blockchain system.

    4. Testing and Automation

      Once all the 14 servers are active and the web application running in these 14 nodes(ports) I have tested the APIs using postman and created various collection(Fig. 6.) represent a particular task assigned .

      The sequence of execution followed is :

      Fig. 6. API Collections in Postman

      • Node connection (establish node connections with its respective peers)

      • S1D1C1 Create Genesis Block (here the genesis block is used for testing purpose of chain propagation in the system.)

      • Adding Transaction in Mempool. (All the nodes add the students details in their memory pool)

      • Check Chain Validity (check control)

      • SNDMCK , Mine Block(any one exam center mines a block and it gets propagated to its peers )

      • Check chain validity (used frequently during mining)

      • Get chain (could display the chain , used for monitoring)

    The result of each collection runner has executed

    Fig. 7. Collection Runner Result .

    successfully (Fig 7.) and a unified immutable ledger could be seen of students participating in blockchain.


Here only one cryptographic puzzle is assigned to all the nodes, but if different nodes have different cryptographic puzzle, it could lead enhancement of security in the layer 3 model of block propagation and chain formation. However, the implementation of this model has not been fully implemented. Also , advance asymmetric cryptography algorithm could be used like RSA for validation of transaction and block propagating in each layer. Other consensus protocol like PoA (proof of authority could also be used in place of PoW. Ecosystem especially made for blockchain such as Ethereum could be used. Furthermore the 3-layer blockchain model could be

decomposed into more layers to make the system more reliable.

Thus, this technology can be reliable for many in coming years in India and around the world. The proposed model could be a source of additional information for people working or researching on this domain. This research project could be an idea for a startup to boost their growth. This project denotes democracy because the authorities have no control on mutating or changing the data. also, they arent part of the blockchain system. their role is to only monitor the security aspects of the blockchain giving an immutable ledger of student participating in an examination forming a complete democratic system.


  1. Haber, S., Stornetta, W.S. How to time-stamp a digital document. J. Cryptology 3, 99111 (1991)

  2. Wouter Penard and Tim van Werkhoven. On the secure hash algorithm family. In Cryptography in Context, pages 1-18. 2008.

  3. Nakamoto, Satoshi. (2009). Bitcoin: A Peer-to-Peer Electronic Cash System. Cryptography Mailing list at

  4. Xi, Zeyu. (2020). The comparison of decentralized and centralized structure of network communication in different application fields. 10.2991/msie-19.2020.10.

  5. Gervais, Arthur & Karame, Ghassan & Wüst, Karl & Glykantzis, Vasileios & Ritzdorf, Hubert & Capkun, Srdjan. (2016). On the Security and Performance of Proof of Work Blockchains. 3-16. 10.1145/2976749.2978341.

  6. Elisa, N & Yang, Longzhi & Li, Honglei & Chao, Fei & Naik, N & Nnko, Noe & Yang, Li & Chao,. (2019). Consortium Blockchain for Security and Privacy-Preserving in E- government Systems.

Leave a Reply