Double-bloom filter certificate management method based on smart contract

Managing certificates on the blockchain through smart contracts and double-count Bloom filters solves the centralization problem and low query efficiency of the traditional PKI system, achieves decentralization and efficient verification of certificate management, and alleviates the problem of blockchain Chain storage pressure protects user privacy.

CN118784257AInactive Publication Date: 2024-10-15EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310373792.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional PKI system has centralization problems. The certificate management process is not transparent to users, and blockchain-based solutions may retain central nodes and have low query efficiency.

Method used

Use smart contracts and double-count bloom filters to build a fully decentralized certificate management method, manage the certificate life cycle on the blockchain through smart contracts, use double-count bloom filters for efficient certificate status verification, and combine with interstellar files The system performs on-chain and off-chain storage.

Benefits of technology

It achieves complete decentralization of certificate management, prevents malicious users from doing evil, improves the efficiency of certificate status verification, relieves blockchain storage pressure, and protects user privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784257A_ABST
    Figure CN118784257A_ABST
Patent Text Reader

Abstract

The invention provides a double-bloom filter certificate management method based on a smart contract, and the method relates to the technical field of block chains, and combines the smart contract with a bloom filter, uses the smart contract as a CA, and is deployed on the block chain. By using the method, the problem of centralization of traditional PKI certificate management and the problem of semi-centralization of certificate management in a PKI scheme in which a block chain is introduced can be solved, and a certificate state verification module composed of a double-counting Bloom filter is arranged in the block chain, so that the verification efficiency of the certificate state can be effectively improved; according to the method and the device, the certificate state information can be accurately acquired from the block chain, the problem of low retrieval efficiency of a block chain-based PKI scheme is solved, complete decentralization of the certificate management process and efficient retrieval of the certificate state can be realized, and the security requirement of preventing malicious users from discovering can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and mainly to smart contracts, blockchain technology, counting Bloom filters, public key infrastructure (PKI) and digital certificate management methods. Background Art

[0002] In the PKI system, the Certificate Authority (CA) is responsible for managing the life cycle of certificates, including the issuance, revocation, and verification of digital certificates. Since CA has complete trust and absolute authority in the certificate management process, the issuance, verification, and revocation of certificates in certificate management are not transparent to users. Once the CA fails, the entire certificate life cycle will be affected. In order to solve the centralization problem of certificate management in the traditional PKI system, some scholars have proposed using a log server to record the operation records of the certificate, but the security of this solution depends on the log server and there is also a centralization problem.

[0003] Blockchain can be understood as a distributed database. The data in the chain is stored in multiple nodes of the blockchain network in a distributed manner. Therefore, failure of a single node will not lead to the loss of blockchain data.

[0004] In order to solve the centralization problem of traditional PKI, many scholars have proposed solutions combining blockchain technology. However, some of these blockchain-based solutions still retain central nodes and are not completely decentralized.

[0005] Smart contracts are programs that are automatically executed when the triggering conditions are met. Smart contracts deployed on the blockchain are participants in the blockchain system and can complete transactions without a trusted third party, thus providing a decentralized solution for the PKI system.

[0006] The PKI scheme based on blockchain has the problem of low query efficiency, because the blockchain needs to traverse the entire ledger data to retrieve on-chain information. Bloom filter uses a bit vector to represent a set, and multiple hash function mappings to compress the element space. Bloom filter can determine whether an element exists in this set through a hash mapping process, realizing efficient query of set elements. Counting Bloom filter is an improved solution of Bloom filter, which uses counters instead of bits. When adding or deleting elements, the value of the hash value mapping position of the element needs to be increased or decreased by 1. This allows counting Bloom filter to realize the element insertion and search functions that standard Bloom filter can realize, and also can realize element deletion operations.

[0007] In summary, this paper uses technologies such as smart contracts and counting Bloom filters to design a completely decentralized certificate management method, and this method can efficiently retrieve certificate status information. Summary of the invention

[0008] The main purpose of this invention is to propose a double Bloom filter certificate management method based on smart contracts to solve the centralization problem of existing PKI certificate management solutions and realize a completely decentralized certificate management process. The proposed solution can prevent malicious users from doing evil and efficiently verify the certificate status.

[0009] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a dual Bloom filter certificate management method based on smart contracts. The method first uses smart contracts and blockchains to jointly construct the CA in the PKI system - the smart contract acts as the CA in the PKI trust system, and the smart contract acting as the CA is deployed on the blockchain, aiming to solve the centralization problem caused by the absolute authority of CA in certificate management in the traditional PKI system, and build a completely decentralized certificate management solution. Secondly, by setting a certificate status verification module composed of a double-counting Bloom filter, the hash values ​​of valid and invalid certificates are hashed into the Bloom filter; in addition, the InterPlanetary File System (IPFS) is introduced to design a storage solution that combines on-chain and off-chain. This setting can cope with the challenges of combining the PKI system and the blockchain - efficiently retrieving certificate-related information such as certificate status on the blockchain and the inability of the blockchain to store a large number of certificates.

[0010] Model entity diagram Figure 1 As shown, the main entities included are as follows:

[0011] 1) Full node: responsible for storing certificate-related information and adding the information to the blockchain, and also responsible for calling the smart contract that acts as the CA.

[0012] 2) Light node: The user is the certificate holder.

[0013] 3) Smart Contract: In this method, the smart contract plays the role of CA, which is responsible for the certificate lifecycle management. In this method, the certificate generation smart contract Cert_CA, the certificate verification smart contract Verify_CA and the certificate revocation smart contract Revoke_CA are set.

[0014] The digital certificate management method of this model includes three aspects: certificate issuance, certificate revocation, and certificate verification:

[0015] The specific process of issuing the certificate is as follows:

[0016] 1) Before joining the blockchain network, the user node first generates its own public-private key pair and public key address locally, and then sends its public key address to the full node.

[0017] 2) The full node calls the certificate generation smart contract Cert_CA, fills in the block height where the certificate hash value is located, the certificate history operation height and other fields in the certificate, and the certificate history operation height is set to empty when the certificate is issued.

[0018] 3) The certificate is sent to the blockchain accounting node. After the blockchain accounting node successfully verifies the certificate, it calculates the hash value of the certificate, puts the certificate hash value into the block body, and inserts the certificate hash value into the valid certificate counting Bloom filter (VCBF) of the certificate status verification module.

[0019] 4) The blockchain accounting node returns the block height where the certificate hash value is located and the certificate to the node that applied for the certificate, and stores the original certificate in the off-chain database Interstellar File System.

[0020] Certificate verification refers to the process in which a user requests a full node to query the certificate status. First, the hash value on the chain needs to be compared with the certificate hash provided by the user to confirm whether the certificate exists in the blockchain ledger, and then the certificate status verification module is used to check whether the certificate is valid. The certificate status verification module is shown in Figure 2 The detailed verification steps are as follows:

[0021] 1) The certificate holder sends the certificate to be verified and the block height where the certificate hash value is located to the full node.

[0022] 2) The full node takes the hash value of the certificate and searches for it on the blockchain according to the block height where the certificate hash value is located. If the hash value is not found on the chain, the verification result is that the certificate does not exist, otherwise continue with the following operation.

[0023] 3) The full node calls the certificate verification smart contract Verify_CA, and searches in the invalid certificate counting Bloom filter ICBF (Invalid Counting Bloom Filter, ICBF) in the certificate status verification module. If it does not exist, the verification result is that the certificate is valid; otherwise, it continues to search in the valid certificate counting Bloom filter VCBF. If it does not exist, the verification result is that the certificate is invalid; if it exists, it continues to query in the backup certificate status list corresponding to the certificate hash value. If the certificate hash value exists in the list, the verification result is that the certificate is invalid, otherwise the verification result is that the certificate is valid.

[0024] 4) The full node sends the result of the certificate status verification to the user.

[0025] Certificate revocation is when the certificate is revoked after the certificate validity period ends, or before the certificate expires and the user leaves the network or the private key is leaked. The revocation process is as follows:

[0026] 1) If the certificate has expired, the full node automatically executes the certificate revocation smart contract Revoke_CA.

[0027] 2) Before the certificate expires, the certificate needs to be revoked. The certificate holder sends a revocation request, the certificate, and the block height where the certificate hash value is located to the full node.

[0028] 3) The full node searches the blockchain at the corresponding height based on the certificate hash value. If the certificate is not found, it means that the certificate is not in the blockchain, and the certificate holder’s revocation request is rejected.

[0029] 4) Search in the status verification module of the block height where the certificate hash value is located. If the search result is invalid, it means that the certificate has expired, and execute step 6).

[0030] 5) The full node calls the certificate revocation smart contract Revoke_CA, deletes the certificate hash value from the valid certificate count Bloom filter VCBF, changes the certificate history operation height to the block height value where the previous certificate hash value is located, updates the block height value where the hash value is located, takes the hash value of the certificate, and then stores the hash value in the invalid certificate count Bloom filter ICBF and the backup certificate status list, and puts the hash value on the chain. Update the corresponding certificate in the off-chain database.

[0031] 6) The block height of the latest certificate hash value is returned to the certificate holder.

[0032] Compared with the prior art, the present invention has the following advantages:

[0033] 1. Compared with the traditional PKI or log-based certificate management method, the certificate management method of the present invention can meet the security requirements of preventing malicious users from using forged certificates, expired certificates or revoked certificates. In addition, the present invention sets the certificate history operation height field and the height of the certificate hash value in the certificate extension field, and stores the certificate hash value and the certificate operation record in the block body. In this way, the operation record of the certificate can be quickly traced back, and the public audit of the operation in the certificate management process can be realized.

[0034] 2. The present invention stores the hash value of the certificate on the blockchain, and will not leak relevant information of the certificate. Due to the unidirectionality of the hash function, attackers cannot deduce the specific content of the certificate based on the hash value of the certificate, which protects the privacy of the user to a certain extent. In addition, compared with the solution of storing the original certificate on the blockchain, the design of storing the hash value of the certificate on the chain and the original certificate in the off-chain database IPFS saves storage space on the chain, solves the problem that the blockchain cannot store a large number of original certificates due to limited capacity, alleviates the storage pressure of the blockchain, and enables the blockchain to store more certificates.

[0035] 3. Compared with the semi-centralized blockchain-based PKI solution, the present invention uses smart contracts as CA. This method only needs to set up the code program to execute the CA function, and the full node will execute it after the conditions are met. The record of the full node executing the smart contract will be published on the blockchain. The entire process of certificate management does not need to rely on a single trusted third party, there is no central node, but it is jointly audited and maintained by all nodes on the chain, so the certificate management process can be completely decentralized and highly transparent.

[0036] 4. The present invention designs a certificate status verification module and places it in the block header of the blockchain. When verifying the certificate status, the module greatly improves the verification efficiency of the certificate by introducing the data structure of the counting Bloom filter, and solves the problem of low search efficiency caused by the blockchain traversal mechanism. In addition, the certificate verification module is composed of two counting Bloom filters, which store valid certificates and invalid certificates respectively. Compared with the verification scheme using a single Bloom filter, this method has a lower false alarm rate. In addition, if the query result of the Bloom filter is ambiguous (it is impossible to determine whether the certificate is valid, and the probability of this happening is relatively low), it can be determined by storing the backup certificate status list of the hash value of the invalid certificate. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 System model diagram

[0038] Figure 2 Blockchain data structure diagram

[0039] Figure 3 Flowchart for certificate verification

[0040] Figure 4 Flowchart for certificate revocation DETAILED DESCRIPTION

[0041] In order to make the purpose, content and advantages of the present invention more clear and specific, so as to facilitate those skilled in the art to understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0042] In order to better understand the following implementation cases, we first explain the block data structure diagram designed in this article. Figure 2 As shown in the figure, the data structure of the block includes a block header and a block body. The block body contains the hash value of the certificate and the certificate operation record. A certificate status verification module is added to the block header. The certificate status verification module consists of two counting Bloom filters. In the figure, it is assumed that there is a certificate hash value set in the certificate status verification module:

[0043] S = {certHash1, certHash2, certHash3, certHash4}, the position indicated by the arrow in the counting Bloom filter indicates the position of each element mapping bit vector, the size of the counting Bloom filter is m bits, and the number of hash functions is assumed to be 3 (the number of hash functions can be adjusted according to the actual application scenario). VCBF is a counting Bloom filter used to store valid certificates, and ICBF is a counting Bloom filter used to store invalid certificates.

[0044] The specific steps to implement the case are as follows:

[0045] Step 1: Model initialization. Write smart contract code that acts as a CA: certificate generation smart contract Cert_CA, certificate verification smart contract Verify_CA, and certificate revocation smart contract Revoke_CA, and deploy them on the chain.

[0046] Step 2: Certificate issuance:

[0047] Step 2.1: Before joining the blockchain network, the certificate holder first generates his / her own public-private key pair and public key address locally. Since the present invention sets a reward and punishment mechanism, users (certificate holders) need to pay a deposit when entering the blockchain network. If the user does something malicious, he / she will be punished and will not be able to get the deposit back. This operation can prevent malicious users from continuously sending certificate application requests to the full node, which will cause other normal users to be unable to apply for and generate certificates normally.

[0048] Step 2.2: The user sends his public key address to the full node. The full node calls the certificate to generate the smart contract Cert_CA and fills in the information in the certificate. The certificate history operation height is set to empty.

[0049] Step 2.3: The full node sends the certificate to the blockchain accounting node. After successfully verifying the certificate, the blockchain accounting node generates a certificate hash value, puts the certificate hash value into the block body, and inserts the certificate hash value into the valid certificate count Bloom filter VCBF of the certificate status verification module.

[0050] Step 2.4: The blockchain accounting node returns the block height where the certificate hash value is located and the certificate to the node that applied for the certificate, and stores the original certificate in the off-chain database IPFS.

[0051] Step 3: Certificate verification refers to the process in which the user requests the full node to query the certificate status, such as Figure 3 As shown, the following are the specific steps:

[0052] Step 3.1. The user sends the certificate to be verified and the block height of the certificate hash value to the full node;

[0053] Step 3.2: The full node takes the hash value of the certificate and searches for the hash value on the blockchain according to the block height where the hash value of the certificate is located. If the hash value is not found on the chain, the verification result is that the certificate does not exist, otherwise continue with the following steps;

[0054] Step 3.3, the full node calls the certificate verification smart contract Verify_CA, and searches from the invalid certificate count Bloom filter ICBF in the certificate status verification module. If it does not exist, the certificate is valid, that is, the verification result is that the certificate is valid; otherwise, continue to search in the valid certificate count Bloom filter VCBF. If it does not exist, the verification result is that the certificate is invalid; if it exists, continue to query in the backup certificate status list corresponding to the certificate hash value. If the certificate hash value exists in the list, the certificate is invalid, otherwise the verification result is that the certificate is valid;

[0055] Step 3.4: The full node sends the verification result to the user;

[0056] Step 4: Certificate revocation: After the certificate expires, or before the certificate expires and the user leaves the network or the private key is leaked, the certificate revocation operation needs to be performed. The process is as follows: Figure 4 As shown, the specific steps are as follows:

[0057] Step 4.1: If the certificate has expired, the full node automatically executes the certificate revocation smart contract Revoke_CA;

[0058] Step 4.2: If the certificate revocation operation occurs before the certificate expires, the user sends the revocation request, certificate, and the block height where the certificate hash value is located to the full node;

[0059] Step 4.3: The full node calculates the hash value of the certificate and searches for it at the corresponding height of the blockchain according to the height of the certificate hash value. If it is not found, it means that the certificate is not in the blockchain, and the certificate holder’s revocation request is rejected;

[0060] Step 4.4: The full node searches the status verification module at the block height where the certificate hash value is located. If the search result is invalid, it means that the certificate has expired, and then execute step 4.6;

[0061] Step 4.5, the full node calls the certificate revocation smart contract Revoke_CA, deletes the certificate hash value from the valid certificate count Bloom filter VCBF, changes the certificate history operation height to the block height value where the previous certificate hash value is located, updates the block height value where the hash value is located, takes the hash value of the certificate, and then stores the hash value in the invalid certificate count Bloom filter ICBF and the standby certificate status list, puts the updated certificate hash value on the chain and updates the corresponding certificate in the off-chain database;

[0062] Step 4.6: The full node returns the block height of the latest certificate hash value to the certificate holder.

[0063] The above is a specific implementation method of the present invention. The present invention uses an open and transparent smart contract as a CA, deploys the contract on the blockchain, and realizes a high degree of transparency and complete decentralization of the certificate management process without relying on a third-party organization. On this basis, the present invention sets a certificate status verification module composed of a double-counting Bloom filter to improve the retrieval efficiency of the certificate status information. In addition, the present invention realizes the traceability of certificate operations by changing the certificate extension field, setting the block height where the certificate hash value is located, and the certificate history operation block height, which can achieve the security requirements of preventing malicious users from using forged certificates, expired certificates or revoked certificates. By setting a reward and punishment mechanism, the present invention can prevent malicious users from entering the blockchain network and constantly applying for certificates, resulting in normal users being unable to generate certificates normally. The present invention stores the certificate hash value on the chain by setting an on-chain and off-chain storage method, which alleviates the storage pressure of the blockchain, and at the same time, storing the certificate hash value on the chain can protect the user's privacy to a certain extent. Therefore, the certificate management method proposed in the present invention can achieve efficient certificate status search and complete decentralization of the certificate management process while ensuring security, and has certain innovation and practical application value.

Claims

1. A dual bloom filter certificate management method based on smart contract, Features: This method is implemented as a model structure, which includes the following entities: 1) Full node: responsible for storing certificate-related information and adding information to the blockchain, and also responsible for calling the smart contract that acts as the CA; 2) Light node: the user is the certificate holder; 3) Smart Contract: In this method, the smart contract plays the role of CA, which is responsible for the certificate lifecycle management. In this method, the certificate generation smart contract Cert_CA, the certificate verification smart contract Verify_CA and the certificate revocation smart contract Revoke_CA are set.

2. According to the smart contract-based double bloom filter certificate management method of claim 1, Features: The digital certificate management method of this model mainly involves three aspects: certificate issuance, certificate verification, and certificate revocation: Certificate issuance: The user first generates his own public-private key pair and public key address locally, and then sends the public key address to the full node; the full node calls the certificate generation smart contract Cert_CA to generate a certificate; after the blockchain accounting node successfully verifies the certificate, it takes the hash value of the certificate and inserts the hash value into the certificate status verification module; the blockchain accounting node then returns the block height where the certificate hash value is located and the certificate to the user node that applied for the certificate, and stores the original certificate in the off-chain database IPFS; Certificate verification; The user sends the certificate to be verified and the block height where the certificate hash value is located to the full node. The full node calculates the hash value of the certificate and searches on the chain. If the certificate hash value is not found, the verification result is that the certificate does not exist; otherwise, the full node calls the certificate verification smart contract Verify_CA to verify it in the status verification module, and finally sends the verification result to the user; Certificate revocation; After the certificate validity period ends, or before the certificate expires and the user leaves the network or the private key is leaked, the certificate revocation operation needs to be performed; first confirm whether the certificate hash value exists on the chain, if not, reject the certificate revocation application; Otherwise, continue to search for the certificate status from the status verification module. If the certificate has been revoked, return the latest certificate hash value to the certificate holder; otherwise, the full node calls the certificate revocation smart contract Revoke_CA, changes the certificate status to invalid in the certificate status verification module, and inserts the certificate hash value into the backup certificate status list; finally, return the latest certificate hash value to the user.

3. The double bloom filter certificate management method based on smart contract according to claim 1, Features: Step 1. Initialize the model; write the smart contract code that acts as the CA function: the certificate generation smart contract Cert_CA, the certificate verification smart contract Verify_CA, and the certificate revocation smart contract Revoke_CA, and deploy them on the chain; Step 2: Certificate issuance: Step 2.1: Before joining the blockchain network, the certificate holder first generates his / her own public-private key pair and public key address locally. Since the present invention sets a reward and punishment mechanism, users need to pay a deposit when entering the blockchain network. If the user does something malicious, he / she will be punished and cannot get the deposit back. This operation can prevent malicious users from continuously sending certificate application requests to the full node, which will cause other normal users to be unable to apply for and generate certificates normally. Step 2.2: The user sends his public key address to the full node. The full node calls the certificate to generate the smart contract Cert_CA and fills in the information in the certificate. The certificate history operation height is set to empty. Step 2.3: The full node sends the certificate to the blockchain accounting node. After successfully verifying the certificate, the blockchain accounting node calculates the hash value of the certificate, puts the certificate hash value into the block body, and inserts the certificate hash value into the valid certificate count Bloom filter VCBF of the certificate status verification module. Step 2.4: The blockchain accounting node returns the block height of the certificate hash value and the certificate to the node that applied for the certificate, and stores the original certificate in the off-chain database IPFS; Step 3: Certificate verification is the process in which the user requests the full node to query the certificate status; Step 3.

1. The user sends the certificate to be verified and the block height of the certificate hash value to the full node; Step 3.2: The full node takes the hash value of the certificate and searches for it on the blockchain according to the block height where the hash value of the certificate is located. If the hash value is not found on the chain, the verification result is that the certificate does not exist, otherwise continue with the following steps; Step 3.3, the full node calls the certificate verification smart contract Verify_CA, and searches from the invalid certificate count Bloom filter ICBF in the certificate status verification module. If it does not exist, the certificate is valid, that is, the verification result is that the certificate is valid; otherwise, continue to search in the valid certificate count Bloom filter VCBF. If it does not exist, the verification result is that the certificate is invalid; if it exists, continue to query in the backup certificate status list corresponding to the certificate hash value. If the certificate hash value exists in the list, the verification result is that the certificate is invalid, otherwise the verification result is that the certificate is valid; Step 3.4: The full node sends the verification result to the user; Step 4: Certificate revocation; After the certificate validity period ends, or before the certificate expires and the user leaves the network or the private key is leaked, the certificate revocation operation needs to be performed; Step 4.1: If the certificate has expired, the full node automatically executes the certificate revocation smart contract Revoke_CA; Step 4.2: If the certificate revocation operation occurs before the certificate expires, the user sends the revocation request, the certificate, and the block height where the certificate hash value is located to the full node; Step 4.3: The full node calculates the hash value of the certificate and searches for the certificate at the corresponding height in the blockchain according to the height of the certificate hash value. If it is not found, it means that the certificate is not in the blockchain, and the user's revocation request is rejected; Step 4.4: The full node searches the status verification module at the block height where the certificate hash value is located. If the search result is invalid, it means that the certificate has expired, and then execute step 4.6; Step 4.5, the full node calls the certificate revocation smart contract Revoke_CA, deletes the certificate hash value from the valid certificate count Bloom filter VCBF, changes the certificate history operation height to the block height value where the previous certificate hash value is located, updates the block height value where the hash value is located, takes the hash value of the certificate, and then stores the hash value in the invalid certificate count Bloom filter ICBF and the standby certificate status list, puts the updated certificate hash value on the chain and updates the corresponding certificate in the off-chain database; Step 4.6: The full node returns the block height of the latest certificate hash value to the user.

Citation Information

Cited By

  • Certificate state query and update method based on three-layer filter

    CN120567582A