A novel smart contract based blockchain with sidechain for electronic voting

ABSTRACT


INTRODUCTION
The fundamental need for a long-lasting democracy and effective government is trustworthy elections.Elections have always been characterized by challenges, mistakes, and institutional manipulations, which diminishes their legitimacy.Most conventional electronic voting systems are designed with centralized architectures, making them vulnerable to cyberattacks such as distributed denial of service attacks (DDoS) [1].Paper ballots used in the past have a history of fraud and failure; they may be miscounted or misplaced in the mail.The traditional voting process includes expenses for personnel, the distribution of ballots, and security precautions.Every election, worldwide [2], often sees a huge cash injection.However, new digital technologies are required.Blockchain technology creates a decentralized ledger with a consistent perception of reality.A mutual, tamper-proof record and peer-to-peer networking technology called blockchain has been employed in digital currencies like Bitcoin and Ethereum.In this case, user anonymity is safeguarded by public or private key identities.Security and privacy are provided by a number of blockchain-based models  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol.14, No. 1, February 2024: 617-630 618 [3], [4].The main obstacles to deploying blockchain technology are connected to speed and scalability, even if this technology offers confidentiality, privacy, accountability, and durability [5].
A private-chain is a sidechain that stores hashes in its own blocks on the public chain (Ethereum).We can build a sharding system on top of this side-chain since it offers a distributed randomness source.This is performed by launching the validator contract on the public Ethereum blockchain [6].Research on blockchain technology has recently been increasingly focused on decentralization, which is a key component of blockchains and smart contracts (SCs), applications using blockchain technology as their primary technology.Contemporary academics are taking a closer look at the design of electronic voting (evoting) systems due to their decentralization characteristics.As a result, they realized SCs and blockchains could be used to enhance the application's data quality and reduce expenses while keeping the software open and transparent at the same time [7].By utilizing this feature for electronic voting, all voting-related data is processed as a transaction and kept in a block, preventing malicious network users from readily tampering with the data [8].If the vote counting procedure was open, it would be possible to be independently verified, and fair, election-related issues may be avoided.As a result, the issues of the prevailing framework include voting process security, authentication, and data protection [9].Although the current system gives voters anonymity, it is not thought to be transparent.When it comes to election outcomes, people are supposed to believe what the government says.Voter fraud, ballot stuffing, and booth capture are just a few of the various scams that occur throughout elections.This entire situation makes voting extremely difficult [10].Effective rules need to be put in place, together with consideration for all the previously listed needs and the handling of them with persistence.Consequently, the following smart contracts are offered to address these issues.a.In this work, voter contract, candidate contract, and voting contract are presented.b.To store the public and private key, crypto server node is used.c.This work makes use of vote coins to prevent fraudulent activities.Voter status is represented by the vote coin.d.Besides, sidechain technique is used along with the blockchain.A sidechain is a network that performs some operations outside of its mainchain, and then returns the results to its mainchain for use.This type of network extends the capabilities of a mainchain.By storing the encrypted vote on the sidechain, and decrypting the result on the mainchain, we can lower the cost of the voting process.e.To avoid authorization of unauthorized users or voting officer, robust access control mechanism is presented.Only authorized users are granted access to the votes via this authorization model, making creating access control policies easier.This model also supports the role, task, and trust computing paradigm.

RELATED WORK
Hassan et al. [11] proposed an electronic voting system based on blockchains, which uses smart contracts to ensure a secure and practical election while protecting voter privacy.In order to improve the way political election decisions were made, the article demonstrated contextual research using a blockchain-based application to assess the potential of distributed ledger technology.Blockchain can also be used as an electronic voting system despite a number of legal and technological obstacles.As a result of this study, researchers developed an electronic voting method that increased voter participation, provided privacy protection, security, and transparency for users, while retaining liquid democracy for democratic elections.However, a blockchain-based system's capacity to scale had been impacted by electronic voting.Scalability problems were made worse by a blockchain network's expanding node count.
Chaisawat and Vorakulpipat [12] proposed data security for integrated e-voting using blockchain and message queue, in an effort to protect voter privacy, and present the process as open and efficient as possible by utilizing certain blockchain and message queue characteristics.The study extended the prior research and suggested an integrated model of electronic voting involving the use of a communications protocol.As a method of ensuring dependent data delivery, the message queue was deemed to be a viable solution since it could be used for transaction buffering, error handling, as well as for blockchain's event message listener.The outcome demonstrated the system's ability to function successfully in a production setting, and the implementation of a message queue handling technique to address blockchain problems in unexpected ways.
Tso et al. [13] proposed a decentralized electronic voting and bidding system based on a blockchain and smart contract to provide everyone who used the application with an opportunity to participate in the opening phase, which met all security requirements for electronic applications.Additionally, the authors employed cryptographic methods including homomorphic and oblivious transfer encryptions to strengthen privacy protection.They used an integration of blockchain technology and privacy-protecting encryption to

619
enable everyone to take part in the beginning phases.In addition to increasing anonymity of participants, data transmission privacy, and data reliability and verifiability, the technique enabled voting and bidder participation in the preliminary round.When compared to other electronic voting and bidding systems, the suggested approach had been safer and more effective.Nevertheless, the structure was distinct for various secret sharing techniques.Therefore, the research required us to evaluate several covert sharing mechanisms in order to identify the best option.AboSamra et al. [14] developed a cryptographic electronic voting system to reduce the complexity of the system and ensure a comparable level of security and vote anonymity with Mixnet-based e-voting systems, eliminating the need for anonymous channels.A combination of cryptographic methods was used to make the SAC e-voting system safe, offering higher levels of security, privacy, and anonymity.Implementation and simulation phases of the scheme were used to verify the practicality, scalability, efficiency, and lightness of the SAC e-voting method.These stages are used to determine protocol run time, message size, the number of voters waiting in a queue for a vote, the average waiting time per voter, network latency, central processing unit (CPU) and link utilization, and link throughput.This study was not concerned with formal verification of e-voting procedures.Taş and Tanrıöver [15] had presented a double-layer encryption model to avoid any possible manipulations of the election the final result.The suggested system's voting and counting stages were validated using simulation results, which demonstrated that they functioned appropriately.In this research, voting ballots were transferred among system nodes after being encrypted using homomorphic encryption.The only transactions that were guaranteed to be documented as subsequently mined into blocks were legitimate voter ballots.The authors came to the conclusion that the system ensured voter anonymity, does not require a central authority, and maintains the recorded votes in a distributed structure.However, the system could be enhanced to increase the time dimension's security.
While e-voting provides convenience, it does raise questions about the security of the network and privacy of communications.Communication and networking experts are concerned with e-voting security.In order to enhance e-voting security, Yi [16] proposed the use of blockchains in peer-to-peer (P2P) networks for e-voting.Voting records were synchronized using distributed ledger technology (DLT) to prevent vote manipulation.An elliptic curve cryptography based (ECC) user credential model was used to offer authentication and non-repudiation.Last but not least, they developed a withdrawal model that enabled voters to change their votes prior to a predetermined deadline.A blockchain-based system for e-voting on a P2P network combined with the aforementioned designs provided the conditions for e-voting.Using Linux platforms, a blockchain-based multiple candidates voting system was developed to prove and validate the idea.Based on the results of the installation, it was demonstrated that the system was workable and secure.While blockchain technology is safe, it was vulnerable to quantum attacks because it used ECC public key encryption.
Hu et al. [17] have presented a novel blockchain-based voting scheme for internet of everything (IoE) systems that emphasizes traits such as equity, eligibility, decentralization, compatibility, anonymity, resistance to coercion, and verifiability.The authors integrated the blind signature methodology and cryptography commitment.Additionally, they automate the internet of energy's voting system using smart contracts.The voting method could prove simple to integrate into the IoE system using smart contracts.They included a comparison study using cutting-edge blockchain-based electronic voting, as well.The findings of the research demonstrated that IoEPAV, a practical anonymous voting scheme for IoE, was very effective, decentralized, verified, and anonymous.In order to increase efficiency, the approach contained the restriction that parallel processing could not be used during the voting process.
Shahzad and Crowcroft [18] had presented electronic voting using adjusted blockchain technology and this study offered a system that protected the data's security by employing efficient hashing algorithms.A blockchain-based approach was employed in this study to evaluate the effectiveness of hashing algorithms, the formation and sealing of blocks, the accumulation of data, and the declaration of results.In the study, the authors made a statement that it understood the blockchain's security and data management concerned and offered a better representation of the electronic voting process.But it requires a lot of work to improve the availability of internet connection to avoid the latency in communication.The proposed smart contract and robust access control are made to safeguard the electoral data in an immutable and economical fashion.This is done by reviewing the existing literature in an effort to guarantee the highest level of security in electronic voting and to address blockchain's performance issues.

PROPOSED METHOD
To enhance the security against fraudulent activities, smart contract based blockchain with sidechain is introduced in this work.Namely, in this approach, the commission that conducts elections is in charge of initiating and concluding the election through communication using smart contracts.Smart contracts describe the roles played in election agreements as well as the many elements and transactions that take place throughout the establishment and execution of the agreement.Currently, three smart contracts are active on the blockchain that is being proposed with sidechain-based e-voting.Voting contracts, candidate contracts, and voter contracts are among the smart contracts.Through these three contracts, voting, voter registration, and voter authentication are all carried out between the voter and the blockchain.a. Voter contract: To ensure the anonymity of voters, the voter contract stores the hash value of their information during the registration process.This hash value is used to verify the identity of voters during the voting process.b.Candidate contract: The candidate contract contains information about the candidates in the chain.c.Voting contract: A vote coin is used to cast votes after the voter authentication process is completed, a candidate is selected from the list provided by the candidate contract, and the election is conducted.d.Vote coin: A vote coin represents the voter's status as a voter.The voter does not cast his ballot if the vote coin's balance is 1.If the vote coin's balance is 0, the voter has already cast their ballot.e. Blockchain with sidechain: The cast vote is encrypted by using a public key generated by the election commission and stored in a crypto server.An encrypted ballot is received by the voting contract, which is then placed as a block in the chain.A sidechain network is presented in order to enhance the security of the storage on the blockchain network.The purpose of sidechains is to augment the capabilities of blockchains by performing some activities outside of them and returning the results to the mainchain.Therefore, the encrypted vote can be stored on the sidechain and the result decrypted on the mainchain, thereby reducing the cost.f.Data access control: According to this approach, there will be n voting blocks for every n votes.Once the election has ended, the election commission begins the counting process.To avoid authorization of unauthorized users or voting officer, robust access control mechanism is presented.It is easier to implement access control policies with this authorization model so that only authorized users can access the votes for counting.As well as supporting the role, task, and trust computing paradigms, this model also supports the role-based model.During the counting process, every accessed vote is decrypted using the private key from the crypto server.
The entire decrypted vote is transferred to the voting contract.Once the voter has sent their vote coin to the public key of the preferred candidate, it is counted without disclosing the identity of the voter.Candidate contracts handle the procedure of counting votes by providing information on the candidate's account and publishing the results.

METHOD
This section explains study in order, including how it was designed and how it was done (through algorithms, pseudocode, or other means).The architecture of the suggested system, which is made up of many modules, shows how research was planned.Each module has been shown in different steps with the help of the appropriate algorithms.In this part, it also discussed an effective access control method with the appropriate equations.

Architecture of the proposed e-voting system
A schematic illustration of the overall architecture of the proposed e-voting system is presented in Figure 1.The proposed e-voting system has 4 stages that are registration stage, voting setup stage, voting stage and result stage.These stages are explained as follows.

Registration stage
This stage encompasses two distinct registration units, namely voter registration and candidate registration.The registration stage serves as the initial step in the implementation of the proposed electronic voting system.Individuals who meet the eligibility criteria, specifically being over the age of 18, have the opportunity to register their personal information and obtain their certificate from the Certification Authority Agent in advance of the scheduled election date.a. Voter registration: The term "voter" refers to all individuals who are registered to vote in their local election district and have the right to vote.As part of its duties, the election commission provides and maintains a current list of registered voters.The result is that every eligible voter must visit their local voter registration office in order to be verified as a legitimate voter.During the identity verification stage, it is necessary to keep track of who has voted as an initial step in the process as shown in algorithm 1.Furthermore, it serves as a control measure in order to prevent unregistered persons from voting in the election.
b. Candidate registration: The registration process for candidates is similar to that for voters because a candidate is also a voter.A candidate must complete the voter registration process by providing their party symbol, seat number, and area in order to complete the candidate registration process as mentioned in algorithm 2. Candidate contract completes registration by adding a candidate's information to the BlockChain.4. Based on the input credentials hash value is generated as hv=Hash (credentials). 5.Then, a onetime password (OTP) will be sent to the mobile of voters.6.If both sent and entered OTP match, Vtrpub and Vtrpvt will be generated using key generation algorithm.7. Vtrpvt will be sent to the mobile number of the voter.8.After receiving the acknowledgement from the voter, hv and Vtrpubwill be included to the blockchain.9.After the completion of above process, the voter receives message like registration completed successfully.

Voting setup stage
Traditional or electronic, every voting system requires a setup in which the system is configured to manage the current election.At this point, the number and location of polling stations are determined, and ballots are created and tailored to the number and type of candidates.The configuration of voting is the second phase of this system.This phase consists of the start election and the active election.a. Start election: The election commission starts the election.The election commission connects to blockchain by employing a vital set of public and private keys as illustrated in algorithm 3. The registration contract is then sent to a transaction containing n vote coins, along with the election's start and end times.Once you have generated the keypair, which consists of a public key and a private key, you can send it to the crypto server, where it will be used for the encryption and decryption of votes.

Voting stage
The voting process consists of two distinct components, namely voter authentication and vote casting.The voting procedures refer to the established protocol for the act of casting votes during the proceedings of the Steering Committee.There is a requirement for voters, supervisory authorities, and candidates to possess certified, transparent, and verifiable information pertaining to all stages of the voting process.a. Voter authentication: Voter contracts manage the authentication process.Signing into their wallets with the private key is the final step in the authentication process as illustrated in algorithm 5. Once the voter has provided their authentication credentials, they must submit them.According to this scenario, the voter contract receives the credentials and creates a hash value from them, which is then compared to other hash values on the blockchain.Both hash values must be equivalent in order for the voter to cast a ballot.
2. Generate hv based on credentials.
3. If hv matches with the hv in the list of voter registration, authentication will be succeeding.Else it will be failed.
b. Vote casting: It is possible to vote using this system by submitting a transaction, which includes a transaction index, a timestamp, a choice by the candidate, and a transaction hash.Following the completion of the authentication procedure, the voter can cast a ballot.Following the authentication procedure, the voter is presented with a ballot that lists candidates and displays a party symbol.There will be a list of candidates available for voters to choose from and they will be able to vote using a vote coin.Following this, the voter will receive his or her voter identification card.By using the public key of the election commissioner, the cast vote is stored on the sidechain of the blockchain as illustrated in algorithm 6.

Algorithm 6. Vote casting
Input: Vtrpvt Output: vote ID (IDvote) 1.Once the authentication process is complete, the voter receives a ballot containing a list of candidates and the symbol of the party.2. The voter can select from a list of candidates and cast his or her vote using a video camera.3. Voter will then receive their IDvote.
Main and side chain: Because of the classic blockchain single-chain paradigm's tendency to bundle and store transactions into blocks on the chain, the primary blockchain chain's performance, including transaction throughput and confirmation times, has been adversely affected by the increase in transactions.Further, due to the open and transparent nature of the blockchain, the main chain cannot maintain private data on a large scale, whereas the side chain can be considered a separate chain or system [19], [20].According to Figure 1, this study takes into account one main chain and one side chain.Public access is provided to the information stored in the main chain blocks.As part of this study, the main chain blocks are used to store information concerning the votes cast for each candidate.

Result stage
This step comprises voting and the publication of results units.The official process of selecting a person for public office or approving or rejecting a political idea through voting is known as an election.The voting process was completed by entering the ballot.a. Vote counting: During the counting process, the election commission enters the private key into the system.Before transferring the voting coin to the candidates' public keys, the voting contract will decrypt each encrypted ballot.After the coin is given, the vote is counted based on the candidate's contract, which is shown in algorithm 7.According to the number of coins in a candidate's wallet, his vote total is ultimately determined by the number of votes he receives.

Algorithm 7. Vote counting
Input:,    , U, R, T Output: Candidate account (Cac) 1. Send request for accessing casted vote 2. If the user or voting officer from election commission is valid, the request will be sent for trust calculation 3.If the trust is less than threshold value, access denied.4. Else robust control access scheme analyses the following assignments such as role, task and permission assignments.5. Based on the trust, access is granted 6.After accessing the   , it will be decrypted using    , i.e.,  =  (  ,    ) 7. The voting contract delivers a vc transaction to each selected candidate's public key.8.As a result of reviewing b.Access control: To access the encrypted cast vote from the side chain, robust access control mechanism is used.It is possible for some access control models to grant hazardous rights as they are unaware of how permissions are transferred from one user to another [21].Our system provides a robust access control mechanism where a user's tasks, roles, and trust values are used to determine permissions.According to the proposed access control system, tasks are assigned to users based on their roles, and permissions are assigned to tasks in order to perform the tasks assigned.Therefore, the proposed approach uses intermediary tasks and computes trust value rather than granting rights to roles.
The following list of components used in the suggested model is described: − Users (U): Users are considered subjects of access control if they actively interact with the access control system,  ∈ ∀ ∈ {1, 2, … , }, here m is the total number of users or voting officers in the suggested system.− Roles (R): Roles are job functions that a subject (user) assumes in an organization, and which outline the duties and powers assigned to the user.  ∈ ∀ ∈ {1, 2, … , }, here n is the total number of roles in the suggested system.For instance,  = {, ℎ}.− Tasks (T): An individual task represents a fundamental unit of work or action carried out by a role in the proposed system.  ∈ ∀ ∈ {1, 2, … , }, here  denotes the total number of tasks.For instance,  = {}.− Trust (Tr): Subjects are permitted access to data based on their trust value.(  )∈ ℜ, ∀  ∈ , here ℜ denotes the real number.The trust is calculated as (1), Here, ∅ 1 , ∅ 2 , ∅ 3 , ∅ 4 and ∅ 5 denote the weighting coefficients within [0, 1].  denotes a user takes into account the overall duration of time (OD) that user has been logged into the system,   denotes the user's level of trust in the system based on their previous interactions with it,   indicates the trust value of the user based on the media access control (MAC) address of the device the user tries to use to interface with the Here, q denotes the number of interactions, l denotes the number of access grants and denies,   denotes the initial trust value (threshold trust) which is considered as 0.5,  + + denotes gradually rising user trust levels and  − + denotes gradually lowering of the level of user trust.a. Permissions (V): Permission is the right of access to perform any task. ∈ ∀ ∈ {1, 2, … , }, here r denotes the whole number of permissions.For instance,  = {, ,   }.b.Assignments: In the suggested scheme, various assignments listed below are utilized; c.User-role assignment (AUR): Users are assigned roles based on their duties, power, and qualifications within an organization, and roles are created for distinct tasks within the organization.Users and roles in AUR can be assigned to one another in a many-to-many connection; that is, a user may be given one or more roles, and vice versa.It is represented as . d. Role-task assignment (ART): It is the purpose of this assignment to generate tasks for various job functions inside an organization, and roles will be assigned tasks in accordance with their job functions.A role can be assigned to several tasks and vice versa in ART.Roles and tasks have a many-to-many relationship.It is represented as . e. Permission-task assignment (APT): In this part, tasks are given permissions to carry out the tasks that have been given to them.APT is a many-to-many plot of commissions with permission to perform tasks.
It is represented as 2 shows the strong access control technique for side chain voting.The system verifies user credentials after receiving an access request, as illustrated in the figure .If the user's credentials are verified, the access request goes to the trust evaluation module; otherwise, the user is blocked.i) estimates trust value.If the whole trust value is lower than the threshold trust value, access to the system and related data is refused; if it is higher, access is given.After logging in, tasks, roles, and users are assigned permissions.Delegated roles allow users to do a range of jobs, and each position has its own rights based on its tasks.Thus, roles only have permissions while executing tasks.Finally, the user receives the data.Main chain voting contract decrypts data using private key.
Publish result: After casting a ballot, every vote becomes a block, adding to the chain.After the vote is entered, it will immediately be counted since there is no chance of tampering or manipulation.The result is subsequently displayed in the result panel, as shown in algorithm 8.

RESULTS AND DISCUSSION
In this section, we present a simulation of a blockchain-based electronic voting system and discuss its performance.The interaction of stakeholders and election officers is examined through a series of simulations.A performance evaluation of the immutable electronic voting system is performed by simulating the retrieval and processing of events.Evaluation of the voting system is achieved by analyzing the number of modification requests, percentage of read shares, handling the security risks associated with replay attacks, and smart contract operations by concurrently computing the system.The voting system integrates and connects entity configurations and connections to achieve this objective.
Through the application of Ethereum's proof of stake consensus algorithm, we test whether the framework is feasible by specifying nodes connecting to individual components.The simulation is conducted using a computer with an Intel i7 processor and 16 GB of RAM and an Ubuntu 16.04.1 LTS operating system and simulation environment is summarized in Table 1.
A simulation is run on the Ethereum Ropsten network, which is a peer-to-peer blockchain network in which over 10,000 nodes interact with one another in real time.By increasing the number of nodes to analyze transaction confirmation times, it is not possible to increase the transaction cost.In the experiment, the hash rate was 210690.12G/s, the difficulty was 3491.86 TH, and the block time was 13.2 s.Further, we developed a set of operations with solidity that was modeled as smart contract functions in the Ethereum network using a Remix IDE.Besides, the performance of the proposed e-voting system is compared with that of e-voting (blockchain with side chain) with discretionary access control (DAC) [22] and e-voting (blockchain with side chain) with no access control.In

Analysis of the access control
Immutability is one of the defining characteristics of blockchain [23], and it is an important consideration when deciding to use blockchain technology for electronic voting or other mission-critical applications [24].Observations have shown that some of the data must be readable for data stakeholders in the voting system; hence the election authority will be sharing such data.Figure 3 shows the degree of immutability of such readable data for the increasing number of nodes in the network.As illustrated in the figure, degree of immutability of the proposed e-voting system is increased to 4.8% and 9.3% than that of e-voting with DAC and e-voting w/o access control respectively.By making incorrect changes to the view of the data, a malicious user may attempt to corrupt the view and attempt to commit those corrupted changes as updated authenticated views.An efficient access control mitigates such possibility from an election authority accepting or rejecting a change.

Analysis of the system security to replay attacks
In order to perform replay attacks on the voting system, old change request messages with digital signatures attached may be used.It is possible to maintain track of the current change in a data view by using timestamp synchronization on computation nodes [25].A message with a timestamp that is less than the latest timestamp for the data will be ignored.Figure 4 shows the system security against replay attacks for the various number of nodes in the network.It can be analyzed from the figure that with the modest variations, the system is efficient to handle all reply to attacks for increasing number of nodes.Compared to e-voting with DAC and e-voting w/o access control, system security of the proposed e-voting system is increased to 1.2% and 20.2% respectively.

Analysis of average transaction processing time and average transaction cost
A smart contract is one of the most well-known characteristics of blockchain technology.The deterministic nature of this technology makes it possible to guarantee a high level data integrity without any involvement from humans [26]- [28].Figures 5 and 6 represent the average transaction processing cost and time for different smart contract operations.Voting contracts need to be carefully written with all the security concerns and the data must be put in blockchain.For block creation fee, mining rewards everything adds up here, hence it is processing cost is higher than voter and candidate contract.Namely, the processing cost of the proposed e-voting system is reduced to 3% and 6% than that of e-voting with DAC and e-voting w/o access control respectively.In the proposed e-voting system, voting contract takes much more time due to blockchain and security when compared to voter contract and candidate contract.However, compared to e-voting with DAC and e-voting w/o access control, processing time of the proposed e-voting system is reduced to 39% and 54% respectively.

Scalability
The currently available Blockchain platforms struggle with a number of scalability challenges, making it difficult to accept a wide variety of applications without sacrificing efficiency.So in this paper scalability has been taken into consideration while writing smart contracts [29], [30].Figures 7 and 8 illustrate the scalability of the proposed blockchain-based architecture for the electronic voting system in terms of throughput and response time for the network's increased voter participation.Figure 7 shows how an increase in the number of voters might result in a 5% increase in response time.As shown in the table, there are 12 transactions per second on average.However, a rapid increase in the voting rate may result in a decrease in the average transaction rate per second.As a result, the throughput rate has decreased by up to 8% shown in Figure 8.The proposed blockchain-based framework for immutable electronic voting is scalable and effective for dynamic voting situations because there is little impact on the system's response time and throughput.

CONCLUSION
To enhance the security against the fraudulent activities in E-voting system, a novel smart contract based blockchain with sidechain and robust access control are presented in this approach.The proposed blockchain with sidechain includes three smart contracts that are voter, candidate and voting contracts.The casted vote on each candidate is encrypted and stored as block in sidechain.Besides, using vote coin, fraudulent voting is prevented.To access the encrypted vote from the blockchain, robust access control mechanism is used.This mechanism performs based on role, task, and trust computing paradigm.Once the access is granted, the election officer will access the decrypted vote from the mainchain of the blockchain.
From the simulations we observed that with novel smart contracts and robust access control the proposed blockchain mechanism ensures efficient security for the voted data in terms of immutability in comparison with the existing work.Simulation results depicted that proposed scheme reduces processing time and cost of smart contracts.The performance of blockchain transaction rate is better than the existing work due to the inclusion of sidechain technique.The proposed e-voting system obtains the scalability of 5%.Besides, system security is improved to 94% against replay attacks.

Figure 1 .
Figure 1.The overall architecture of the proposed e-voting system

Algorithm 3 .
Start electionInput: Vote coin (vc), election starting time (Tstart), election ending time (Tend) 1. Join election commission to blockchain using public and private keys.2. To register a contract with vc, Tstart and Tend, send a transaction.3. Transfer public and private keys to to crypto server.b.Active election: As part of the voter contract, a transaction containing one vote coin, as well as the start and end times of the election is transmitted to the public key of each voter as illustrated in algorithm 4.All transactions are recorded in the blockchain.Due to this system, it is not possible to conceal the transactions involved in sending vote coins to voters or their voting status.Algorithm 4. Active election Input: vc, Tstart, Tend, Vtrpub Output: vc 1. Voter contract creates vc=1 2. Send transaction to Vtrpub with vc=1, Tstart and Tend 3.Each and every transaction is uploaded to BlockChain.


ISSN: 2088-8708 Int J Elec & Comp Eng, Vol.14, No. 1, February 2024: 617-630 624 system,   denotes the number of access grants and   denotes the number of access denies.These factors are defined as follows,

Algorithm 8 .Figure 2 .
Figure 2. The flowchart of the robust access control scheme

Figure 3 .
Figure 3. Access control of data

Figure 6 .Figure 7 .
Figure 6.Average transaction processing time for 100 nodes Variation in throughput for 1,000 nodes Variation in throughput for 10,000 nodes Int J Elec & Comp Eng ISSN: 2088-8708  A novel smart contract based blockchain with sidechain for … (Rakshitha Channarayapatna Mullegowda) 629

Table 2 ,
the entire state of the simulations is summarized based on the blockchain network simulations.

Table 1 .
Simulation environment summary

Table 2 .
State of simulation network