An ECDSA Approach to Access Control in Knowledge Management Systems Using Blockchain

: Access control has become problematic in several organizations because of the difﬁculty in establishing security and preventing malicious users from mimicking roles. Moreover, there is no ﬂexibility among users in the participation in their roles, and even controlling them. Several role-based access control (RBAC) mechanisms have been proposed to alleviate these problems, but the security has not been fully realized. In this work, however, we present an RBAC model based on blockchain technology to enhance user authentication before knowledge is accessed and utilized in a knowledge management system (KMS). Our blockchain-based system model and the smart contract ensure that transparency and knowledge resource immutability are achieved. We also present smart contract algorithms and discussions about the model. As an essential part of RBAC model applied to KMS environment, trust is ensured in the network. Evaluation results show that our system is efﬁcient.


Introduction
The value of knowledge has risen in today's modern world due to the changes and pace of life that has created a fierce, competitive market. Business strategies have shifted from being product-based to knowledge-based due to the attention being placed on the use of knowledge by corporations. With knowledge being an intellectual property, its management should be very effective. Knowledge management (KM), often related to organizations, is a conscious effort in the provision of knowledge at the right time and place, in the right form, and finally to the right person. This helps people to capture, share and utilize knowledge so as to improve the organization's performance.
Knowledge actually represents an important resource for remaining competitive in business environments. Whether tacit or explicit knowledge [1], the success of knowledge transfer or sharing (i.e., knowledge-sharing effectiveness) is contingent on the knowledge source's capacity to identify and contribute possessed knowledge and the knowledge recipient's predisposition to adopt and re-create knowledge. Quite similar to financial value, it is an intellectual property that needs to be securely stored and shared among parties [2], and, above all, track its provenance, ownership and management. Defined by Quintas et al. [3], knowledge management efforts aim to manage knowledge, by making use of existing and acquired knowledge to meet the needs of and develop opportunities, both now and in the future.
Due to the influx of knowledge, knowledge management systems (KMSs) have been developed by organizations to share and re-use knowledge, and these systems are to ensure that institutional information about several functionalities are available for all to use. From a simple system with work proposes a blockchain approach to realizing access control in KMSs, to grant authorization to knowledge users in the network. Thus, our ECDSA-RBAC feature extends RBAC permission constraints to include stronger authentication in granting permissions to users to access knowledge resources for secured KMS environment. Due to the decentralized and tamper-proof nature of the blockchain, the key ideas this paper puts across are: 1. ensuring an effective user authentication and verification method for knowledge workers in an organization, and therefore providing an efficient access control to knowledge resources; 2. issuing roles and knowledge management to users, and access revocation to defaulting parties in the network; and 3. designing an architecture that seeks to achieve security requirements such as adding, updating, sharing and providing information or knowledge in the organization by making use of the blockchain technology.
The rest of this paper is organized as follows. Section 2 presents the works related to this study while Section 3 considers the background of this study. Section 4 formulates the problem and introduces the system model and its implementation. Section 5 gives the discussions while Section 6 presents the conclusions of the paper.

Related Works
Several works have introduced RBAC models for information security and protection. In [6], the authors were the first to present the RBAC model and they proposed the idea of roles connected with privileges, instead of the users. An RBAC model that had four different categories was also proposed by Sandhu et al. [18]. With these fundamentals, many studies have proposed extended versions of the RBAC model. Notably, Xia et al. [19] presented an RBAC model that simplified the complexity of the role hierarchy structure by using namespace. Ma et al. [20] also established a structural model that consisted of three different aspects, and had the thought of a layered management. A novel RBAC model for decentralized and distributed systems was proposed by the authors of [21], and it could be applied to dynamic assignments. We recognize these developmental extensions of RBAC, which seamlessly ensure that there is adequate information access control and management.
KMS is a task-centric information system that enables users to create, store and use knowledge to increase task performance [22,23]. It enables users to improve their knowledge-sharing capabilities for knowledge value creation through knowledge internalization [24]. Although there are varied reasons for deploying KMSs in organizations, one primary objective of all such KMSs' deployment is the ability to facilitating knowledge transfer and sharing for improved knowledge innovation across functional units [12]. Knowledge assets are available and accessible by all individuals and functional units in the organization. For instance, subject-matter experts create knowledge as "best practices" for problem solutions stored in a knowledge base and become an intellectual asset for the organization. Users can then access such knowledge objects of best practices for their specific functions. It is, however, essential to ensure that only verified and authorized users are permitted to access them. It is therefore imperative for knowledge assets to be secured, managed and used by authorized users only for their intended purposes.
For these reasons, the adoption of the RBAC model in KMS is paramount to the control and utilization of knowledge assets throughout the organization. As evidenced in [5,[25][26][27][28], RBAC adoption in KMS is critical not only in the context of secured knowledge sharing but also the protection of knowledge assets. Thus, RBAC has featured in many KM initiatives as far as protection and security of knowledge assets are concerned.
To provide a secured framework for organizations to share their information or knowledge, there should be some considerations in the design of systems such as KMS with trusted user authentication and authorization. Without these security measures, the RBAC will be insecure, which will result in an unreliable access control. Digital signatures [29] have been proposed to ensure some level of security in access control but the costs involved in their implementation do not make them ideal candidates for wide adoption. Maintaining a public key infrastructure (PKI) also poses a problem [30,31]. Although PKI-based systems are well recognized, they are vulnerable to some security problems, aside their complexity and costs. With a certificate authority (CA) acting as a third party responsible for distribution and management of certificates, there is always the tendency for a single point of failure in such systems. A typical scenario is taken from DigiNotar in [32].
To mitigate the problems associated with PKI systems, decentralized systems have been studied. The authors of [33,34] presented multi-authority attribute-based encryption and signatures, respectively. While there is a requirement of a trusted setup of some parameters in [33,34], it was not in support of this setup. However, their implementation and interoperability always posed problems if several users were involved. By this notion, this work implements the blockchain technology to solve some of these issues. Due to its decentralized and tamper-proof nature, we are able to verify the creators of the model, proof of provenance, and there is a trust environment created to enhance transparency. The content of the models will be stored in timestamped blocks, and therefore the major components of a secured network platform-confidentiality, integrity and availability-will be achieved. In providing efficient access control and preventing malicious activities in the network, ECDSA is utilized to improve the security.

Background
In this section, we provide some background information to the technologies used in this work.

Blockchain
Blockchain first emerged as a paper written by Satoshi Nakamoto [35] in 2008, and its first implementation was in Bitcoin. Bitcoin was the first trust-less, public blockchain, and a peer-to-peer electronic cash system. The blockchain network's transactions is timestamped to continue a chain of hashed blocks that form a record that cannot be tampered with. A sequence of events illustrates the chain. To generate the longest chain, an attacker has to own at least 50% of the network. Due to the need of a huge number of computers to modify the blockchain, it is virtually impossible for the blocks to be corrupted [36,37]. To reach consensus in the network, a majority of the participants should be honest. Nodes can simply leave the network and rejoin at any time, and also accept the longest proof of work (PoW), which is a puzzle that needs to be solved by a miner (node that maintains the block).
The blockchain is a database that is distributed and consists of records that are linked sequentially, and also has the hash of the preceding block. The records are maintained for dispute sake and therefore the blockchain can achieve secure distribution between entities without the requirement of trust among the parties.
Blockchain data are immutable due to the use of cryptographic hashes, with these hashes stored as transactions in the form of a Merkle tree structure [38]. It is used to summarize the transactions in the blockchain in order to reduce transactional costs. It also offers an efficient way of verifying whether a transaction is in a block. Integrity is kept of the ledger due to the linked hash system of the block. Within each block, the data or information is linked together.

The Smart Contract
A smart contract is a programmable script that executes actions based on already laid down rules stipulated in the network. This code enables the mutual agreement of contractual terms, and ensures that there is no alteration in every recording in the network. Thus, trust is guaranteed and costly duplication is eliminated.
In our knowledge management system, the smart contracts ensure an efficient and effective exchange or transfer of knowledge. They are responsible for adding efficiency to systems by reorienting processes, and this removes humans. The introduction of smart contracts provides an additional layer of security and reduces financial costs, inefficiencies and wastage. In addition, the smart contracts monitor and manage the utilization of knowledge, and apply penalties accordingly.

System Model and Implementation
In this section, we first state the problem, and then dwell on the model and implementation of our system. Considering a knowledge-sharing platform, the authenticity of roles and privileges should be of utmost importance to any organization. There is the need to verify whether a particular user is the rightful owner of a particular role corresponding to a specific knowledge resource. Without a proper verification process, the system will not be a secured one and the access control mechanism will be unreliable as well. For instance, passports and ID cards are usually used as verification methods; however, in digital worlds, these cannot be utilized. In this work, we introduce an efficient verification and access control method that is based on Elliptic Curve Cryptography (ECC), as it is the mechanism most blockchain systems thrive on. Our access control system should provide an effective management of the knowledge repository, key issuance and revocation, and verification. The blockchain will also provide transparency and knowledge resource immutability.
Our system, as shown in Figure 1, comprises of the following major components: a user layer, knowledge processing and management units, a blockchain and a cloud server. The various components are explained below.

User layer:
The user layer comprises of the two major entities associated with the knowledge, the knowledge owner and the knowledge user. The knowledge owner uploads its knowledge onto the cloud repository and determines which user has access to which knowledge, and what privileges the user should enjoy. The knowledge user, on the other hand, requests for use of the knowledge, and, upon a successful verification, the request is granted. 2. Knowledge Processing Unit: This unit consists of a key issuer, a verification unit, and a role assignment unit. The issuer is responsible for generating cryptographic keys, linked to the identities of the users, and are used for transactions on the network. Some typical transactions include knowledge requests, knowledge usage, etc. The verification unit, on the other hand, verifies all users on the network. Once the keys have been generated and given out to the users by the issuer, all users need to go through an authentication process before gaining access to the knowledge. With the help of the verification unit, an efficient access control is assured. The role assignment unit provides the rules of engagement of the system. It specifies what the roles of each entity are and the privileges each user gets to enjoy. 3. Knowledge management center: This unit is the heartbeat of the system. It consists of a network processing node and a smart contract unit. The processing nodes are responsible for processing all requests on the network and managing all other processes on the blockchain. It works in tandem with the smart contract, which is responsible for generating policies on the knowledge. When requests are made, the processing nodes receive the requests from the knowledge processing center and act on them. After processing, it binds a contract to the result and the final output is given to the user. 4. Blockchain: This is a growing list of all the knowledge records (knowledge blocks) that are cryptographically linked. In each block, there is a hash of the previous block, a timestamp, and a transaction. Once the processing nodes have completed their tasks, and with them collectively adhering to a protocol for internode communication and validation, the transactions are appended onto a block. Once recorded, the knowledge item cannot be altered without alteration of all the subsequent blocks, which requires all the nodes to reach a consensus. For the creation of a block, the knowledge owner has to log his knowledge into the system and this becomes a block (not verified yet), with each block having a hash value. This hash is a string of characters that is cryptographically constructed. Therefore, the blocks are reliable and each owner can trust the knowledge of its later use. Confirmation of the block is made by all the nodes in the network. All the knowledge in the network is a transaction that is stored between at least two entities involved in the process. All previous transactions related to this knowledge will be available to a user who needs knowledge. With the use of the blockchain, the knowledge will be retained and its ownership maintained and tracked in a secure environment. Figure 2 depicts the knowledge block creation process.  1. A user contacts the issuer for network membership registration. The parameters needed for registration will be given by the issuer, but, as in many networks, the basic parameters include a unique ID and keying parameters. 2. The issuer generates a user membership key by fetching parameters from its key distribution center and sends the details to the verification unit. 3. The keying parameters are given to the user. 4. The user generates a private key to be used for all transactions by using the ECDSA protocol, which is given in detail in the sections that follow. 5. The verifier and the user establish mutual authentication for key and/or user validity check. Details are obtained from the database. Upon a successful verification process, the user can now access knowledge items and perform actions on the knowledge items.
The ECDSA protocol is used for authentication purposes because of its robust mathematical structure and high security compared to other schemes, and the assurance of digital data unforgeability and non-repudiation. Both discrete logarithms (DL) and ECC provide adequate security levels, but, in relation to parameters, ECC utilizes smaller parameters than DL [39]. Significant benefits of using smaller parameters include faster computations, guarantee of certificates and smaller key sizes. For a public key cryptography, every user or device participating in the communication generally employs a pair of keys (private key and public key) attached with a set of operations to perform the cryptographic operations. Unlike the public key, which is known by all users or devices participating in the communication, the private key is only known by the user in question. Mostly, a section of public key algorithms may demand a set of constants such as 'Domain parameters' that are already defined and known by all participating devices during communication. In terms of any form of shared secret, there is no such need between communicating parties by the public key cryptography as may be required normally by its counterpart-the private key cryptography. However, the private key cryptography is faster than the public key cryptography. ECDSA, first proposed by Vanstone [39], is an elliptic curve analog to Digital Signature Algorithm (DSA) [40]. It stems from the ECC scheme that was invented by Koblitz [41] and Miller [42]. It is based on points on an elliptic curve over a finite field. The mathematical basis for the security of elliptic curve cryptosystems is the computational intractability of the elliptic curve discrete logarithm problem (ECDLP).
The fourth process in the user registration and authentication is detailed as follows. There are some key factors to consider if the ECDSA protocol has to be successfully achieved. The steps involved are the setup phase, domain parameter generation and validation, key pair generation and public key validation, and signature generation and verification.

Setup Phase
To setup an ECDSA protocol, the domain parameters are made up of a field size q and an odd prime p. Then, there is a field representation R, which is used to represent the elements of the field H q . Then, two elements from the field, α and β, are chosen and they define the equation of the elliptic curve E over the field. That is, y 2 = x 3 + αx + β if p > 3, or y 2 + xy = x 3 + αx 2 + β, if p = 2. x ξ and y ξ are two points on H q that define a finite point ξ = x ξ , y ξ . The finite point is of the prime order E H q . δ is also the order of the point ξ, with δ either greater than 2 160 or 4 √ q, to ensure maximum security. A cofactor σ = #E H q /δ is also set.

Domain Parameter Generation and Validation
For the generation of the domain parameters, first, α and β are randomly selected from H q . In the case where q = p, the curve is represented as y 2 = x 3 + αx + β, and also as y 2 + xy = x 3 + αx 2 + β if q = 2 m . Next, we compute ∆ = #E H q . Then, we verify that ∆ is divisible by δ. If the verification is unsuccessful, we return to the very first step (where the random parameters are selected). Furthermore, we check that µ = q φ − 1 is not divisible by δ, for each φ, 1 ≤ φ ≤ 20. If not, we still go back to step 1. Next, we verify that δ = q. Finally, we select an arbitrary point ψ ∈ E H q , and set ξ = ∆δ −1 ψ. The process is repeated until ξ = 0.
To validate the parameters, we input the domain parameters DP = (q, R, α, β, ξ, δ, σ), and the expected output is to either accept or reject the validity of DP. The following are the steps involved.
If any of the verification steps fail, DP is invalid. Otherwise, DP is valid.

Key Pair Generation and Public Key Validation
The key pair is associated with a peculiar set of Elliptic Curve (EC) parameters. While the public key is a random multiple of the base point on the curve, the private key is the integer used to generate that multiple. To generate a key pair, an entity's key pair is associated with the domain parameters, DP, and the user must have the assurance that the domain parameters are valid. Because the public key is generated by the issuer and later sent to the verification unit, the entity should prove its identity to the verification unit.
To generate the keys, the already-registered user does the following: the user selects a random integer t, which is in the interval [1, δ − 1]. Then, the user computes κ = tξ. The user's public key is κ, and t is the private key.
To prevent any malice on the network, the following is computed to ensure κ is valid. The objective is to accept or reject κ, after κ = (x κ , y κ ) and the domain parameters DP are input. If any of the checks fail, κ is invalid. Otherwise, it is a valid parameter.

Signature Generation and Verification
In order for the user to prove its identity, represented by a unique value say γ, to the verification unit, the following are the steps involved.

Signature Generation
(a) A random integer υ is selected, and it must lie in the interval 1 ≤ υ ≤ δ − 1. The signature of the user's identity, γ is (λ, s)

Signature Verification
For a successful verification process, the verifier obtains a copy of the user's domain parameters DP, and the associated public key κ. The verifier then has to validate these parameters, by doing the following.
(f) If X = ∅, reject the signature. Otherwise, convert x 1 of X to an integerx 1 and compute =x 1 mod δ. (g) Accept the signature iff = λ.

Smart Contract Design
When a user, after a successful authentication process, makes a request to access a specific knowledge item, the processing node checks from its servers what role(s) the user has on the knowledge. Once the role has been stated, it delivers the knowledge to the user. A smart contract code is issued and bound to the knowledge. This is done to provide effective and quality checks on the knowledge. The various smart contract codes are given in the algorithms below. Algorithm 1 is executed by the knowledge owner to add users to the network and issue the roles, correspondingly. It adds a timestamp to denote when the contract was executed. The blockchain is consequently updated. To remove a user from the network, the owner again calls upon the smart contract and revokes their roles. The public key of the user is taken into account and after a successful execution of the contract, the user is removed. The blockchain is again updated. Algorithm 2 depicts the removeUser contract. Next, to request for the knowledge, the smart contract is appended to the request a user makes. It first checks if the requesting party is a legitimate user of the knowledge as specified by the role and privileges the user gets to enjoy on the knowledge by the owner. Algorithm 3 illustrates this contract. Algorithm 4 also shows the provision of access to the user, once s/he has been verified and has made a request. RecoverSigner is the verification system in Ethereum using ECC.

Evaluation and Discussion
In this section, we analyze the system and its various features that can enhance the effective sharing of knowledge and role assignment. The incorporation of blockchain technology offers a host of useful features that are not common in traditional systems.

Evaluation
We show the test results of our smart contract system in this section. The costs of all transactions were measured on the Ethereum blockchain [43], which was used as the blockchain platform. The functions that were tested include addUser(), removeUser(), serviceRequest(), and accessProvision().
The tests were run using Ropsten test environment and Remix IDE alongside MetaMask, which provides access to the Ethereum platform and a host of network nodes. Solidity is the language in which our smart contract was written. An Intel Core i7 6700HQ CPU desktop with a processor speed of 2.6 GHz (8 CPUs) and a 16 GB RAM was used to perform the experiments, with a gas rate of $0.03/transfer.
The gas costs of operations (in Gwei) ertr calculated since each function on the blockchain is fixed. The efficiency of our system esd analyzed by comparing the results obtained with the ones obtained in [7], regarding the common parameters. Table 1 illustrates the cost of executing the various functions. There are relatively low costs for all functions, with an average cost of $0.0808. The costs are as a result of the prototypes deployed on our blockchain system, and, by using optimization methods, the costs can be reduced. However, these costs are significantly lower compared to setting up and maintaining a private knowledge. serviceRequest and accessProvision are not functions in [7], and hence there are no values for them in Table 1. Table 1. Cost of different functions of the smart contract based on Gas (both Gwei and USD ($)) rates. It was realized that, throughout the various operations, our system maintained a cost below $1.00. The lesser is the gas cost, the less expensive is the transaction. Comparing the results obtained for the functions shared between our system and the one in [7], we realized our system performs better. Figure 4 gives a pictorial description of the results. In Figure 5, we demonstrate the scalability of our blockchain system. For as low as 53 ms, our blockchain system can process 20 requests made by knowledge users, and 140 requests can be processed within 508 ms. From the test results, it was observed that there is a steady increase in transaction processing. This increase can be attributed to the fact that the transaction path and information or knowledge package flow path are separated (i.e., it reduces the delay of transaction processing). By implication, while transactions are broadcast amongst all nodes in the network, the knowledge packets are transmitted directly towards its destination along optimal paths as specified by a routing protocol such as Open Shortest Path First (OSPF) [44]. Moreover, the threshold was set to 140 transactions per second to ensure that the rate of transaction processing remains at a desirable level, which helps to maintain the scalability of our framework.

Discussion
1. Security and Privacy: Security and privacy requirements are significantly important, particularly authentication and integrity, to prevent several attacks in a knowledge management system's environment. ECDSA signature is a security mechanism that alleviates attacks such as modification, spoofing, denial of service and cyber attacks. The use of the algorithm ensures that only legitimate knowledge users are authorized in the network, and the knowledge items are accessible by these users. It ensures that the identities of the users are from a trusted source, and an unknown one is ignored. With the addition of blockchain, the integrity of the knowledge is also assured. The technology ensures that the transmitted knowledge package has not been tampered with. ECDSA signatures provide mutual authentication so as to protect the knowledge repository. It is capable of preventing man-in-the-middle (MITM) attacks, eavesdropping, impersonation, replay and duplication. Furthermore, the utilization of small keys in the ECDSA algorithm provides high performance and appropriate computation costs. Knowledge owners can check the validity of roles according to the timestamp of when the role was issued to the user. 2. Access Control: The processing nodes in the blockchain allow for an efficient access control as they infer from the verifier the public keys of the legitimate users. Before any transaction can be completed, the node in charge of processing that request will have to confirm from the verifier if the user has its public key in the verifier's knowledge base. The node can revoke access to a malicious entity, as it must ensure that the blockchain contains only valid knowledge transactions (transactions from legitimate knowledge users). However, malicious nodes can process transactions by granting access to knowledge users without verification. However, then, the smart contract center also performs verification checks, and, if unsuccessful, the transaction is dropped. The smart contract also permits roles and other information or knowledge package to legitimate knowledge users in the network efficiently and effectively. Users can also be revoked when the removeUser function is invoked. This function is very important in cases where a user with malicious intention has been found. 3. Transparency: The system achieves transparency as all functions are executed by the smart contract and are logged on the blockchain. A secret action cannot be performed without the awareness of the other entities. In addition, entities will not be able to deny any action committed because every action is linked to their private keys.

Conclusions
In this work, an effective and efficient user authentication and authorization protocol for knowledge management systems (KMS) based on elliptic curve cryptography is proposed. In conjunction with the RBAC model, the ECDSA algorithm in the explicitly described system model provides a secure mechanism for accessing knowledge by verifying users before the knowledge is shared, transferred or stored in the knowledge repository. Blockchain is utilized in the work to provide transparency and knowledge immutability, and, with the smart contract added to the KMS, we are able to achieve a secured utilization of roles in an organization. Test results also indicate that our system performs significantly better than the results in [7]. As a future work, we will dwell on the formal security analysis and use some optimization techniques, such as Proof of Search, Proof of Stake, and other consensus protocols, to create more efficient functions.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: