Application method of access control system based on blockchain

By using blockchain technology and public-private key asymmetric encryption in the access control system, the identity leakage and attack risks brought by the centralized cloud management platform are solved, decentralized access management and information security are achieved, and the access information is ensured. Security and integrity.

CN115909576BActive Publication Date: 2024-08-27SHANGHAI MOLIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211305087.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2024-08-27
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

In the existing access control system, the centralized cloud management platform has the risk of user identity leakage and attack, and the management is prone to loopholes, resulting in data being maliciously deleted or tampered with.

Method used

Adopting a blockchain-based access control system, the first access control application of the rich execution environment and the second access control application of the trusted execution environment are deployed in the access control device to perform identity authentication and authority confirmation, and use public and private key asymmetric encryption technology to Pass information is uploaded to the blockchain for certificate storage to ensure decentralized management and information security.

Benefits of technology

It effectively reduces the risk of user identity leakage and attack, prevents communication information from being maliciously deleted and tampered with, and ensures the legality, integrity and certainty of access information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909576B
    Figure CN115909576B
Patent Text Reader

Abstract

The embodiments of the present invention relate to the technical field of security systems, and in particular to an application method of a blockchain-based access control system, wherein a first access control application in a rich execution environment in an access control device collects identity information to be identified by a user, and a second access control application in a trusted execution environment performs identity authentication and authority confirmation, thereby ensuring the security of relevant information of the access control device during the identity authentication and authority confirmation process; based on public-private key asymmetric encryption technology, access information is uploaded to the blockchain for evidence storage to prevent the access information from being maliciously deleted and tampered with; when storing the activation information of the access control device, the correspondence between the ID of the access control device and the sending address of the access control device is added, and when the communication information is uploaded to the chain for evidence storage, the correspondence between the ID of the access control device that sends the access information and the sending address is verified, thereby ensuring that the access information is not only verified to meet the legality and integrity, but also the certainty of the access control device that uploaded the access information can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of security systems, and in particular to an application method of a blockchain-based access control system. Background Art

[0002] With the continuous progress of society, the requirements for production and living order are getting higher and higher, and the security requirements and authority management of production materials are becoming more and more perfect. Many industrial parks, enterprises, confidential units, intelligent communities and other places will install access control systems to manage the passage of personnel and vehicles. These access control systems are often composed of access control devices and centralized cloud management platforms. The access control devices collect the identity information of personnel or vehicles in real time, and then upload it to the cloud management platform for identity information authority confirmation. The cloud management platform then issues instructions to the access control devices on whether to release.

[0003] However, this method of authorization decision-making by a centralized cloud management platform will bring several problems: 1. Uploading identity information to the cloud management platform may lead to the risk of leaking user identity privacy and being subject to injection attacks; 2. Centralized cloud management platforms are prone to management loopholes, such as malicious deletion or tampering of data by administrators. Summary of the invention

[0004] The purpose of the embodiment of the present invention is to provide an application method of a blockchain-based access control system, which can effectively reduce the risk of user identity leakage and attack, complete the access management of the access control system, and decentralizedly manage access control access information to prevent communication information from being maliciously deleted and tampered with.

[0005] In order to solve the above technical problems, the embodiment of the present invention provides an application method of a blockchain-based access control system, wherein the blockchain-based access control system comprises: an access control device, an access control management platform and a blockchain, wherein the access control device is deployed with a first access control application in a rich execution environment and a second access control application in a trusted execution environment, wherein the access control device stores a device private key; wherein the access control management platform stores a device public key and an access control device ID corresponding to the device private key of each access control device, wherein the application method comprises at least: an identity authentication and authority confirmation process; wherein the identity authentication and authority confirmation process comprises:

[0006] The first access control application responds to the initiation instruction of the identity authentication and authority confirmation process input by the user, and collects the identity information to be identified of the user;

[0007] The second access control application matches the identity information to be identified with the registered identity information pre-stored in the local trusted execution environment to determine whether the user is a registered user;

[0008] When it is determined that the user is a registered user, the second access control application queries whether the user has the access authority to the current access control device in the registration authority information of the registered user pre-stored in the local trusted execution environment; the registration authority information of the registered user is entered into the trusted execution environment of the access control device by the access control management platform based on the pre-stored device public key and access control device ID;

[0009] When it is determined that the user has access rights to the current access control device, the first access control application opens the access control device for the user to pass through;

[0010] The second access control application generates the access information for this time, generates a first signature using the locally stored device private key, and uploads the access information, the first signature, or further includes a certificate carrying the device public key of the access control device to the smart contract of the blockchain, wherein the access information includes at least: the access control device ID, the user ID, and the access date and time;

[0011] The smart contract queries the blockchain to see whether there is a corresponding relationship between the access control device ID in the access information uploaded this time and the sending address used for uploading the access information this time; if so, the verification mechanism of the blockchain parses the device public key from the first signature, or when the uploaded information this time also includes a certificate carrying the device public key of the access control device, parses the device public key from the certificate, and uses the device public key and the first signature to verify the access information uploaded this time; when the verification is successful, the access information is stored in the blockchain; the corresponding relationship is the corresponding relationship between the access control device ID in the activation information stored on the blockchain by the verification mechanism and the sending address used for uploading the activation information when the access control device is successfully activated and the activation information is uploaded to the blockchain.

[0012] Compared with the prior art, the embodiments of the present invention deploy a first access control application in a rich execution environment and a second access control application in a trusted execution environment in an access control device, use the first access control application to collect the user's identity information to be identified, and use the second access control application to perform identity authentication and authority confirmation, thereby ensuring the security of relevant information in the access control device during the identity authentication and authority confirmation process, avoiding user identity leakage and attacks; after executing a access control pass process, the access information is uploaded to the blockchain for evidence storage based on public-private key asymmetric encryption technology, so as to ensure decentralized management of access control pass information and prevent communication information from being Malicious deletion and tampering; in addition, to prevent other devices from impersonating the current access control device to upload access information, the smart contract will add the corresponding relationship between the access control device ID and the sending address used to upload the activation information (the sending address of the access control device) when storing the activation information of the access control device. In this way, when other legitimate information of the access control device is subsequently stored on the chain, the communication information can only be stored on the chain when the corresponding relationship between the access control device ID and the sending address used to send the uploaded information has been stored in the blockchain, thereby ensuring that the access information is not only verified to meet the legality and integrity, but also the certainty of the access control device that uploaded the access information can be ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0014] Figure 1 is a schematic diagram of the structure of a blockchain-based access control system according to an embodiment of the present invention;

[0015] Figure 2 is a specific flow chart of the identity authentication and authority confirmation process according to an embodiment of the present invention;

[0016] Figure 3 is a specific flow chart of the access control device activation process according to an embodiment of the present invention;

[0017] Figure 4 is a specific flow chart of the process of entering identity and authority information according to an embodiment of the present invention;

[0018] Figure 5 It is a specific flow chart of the access control record query process according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the following will be described in detail with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the various embodiments of the present invention, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0020] One embodiment of the present invention relates to an application method of a blockchain-based access control system, such as Figure 1 As shown, the access control system based on blockchain includes: access control device 1, access control management platform 2 and blockchain 3. Access control device 1 is the end-side device of the entire access control system, on which a first access control application in a rich execution environment and a second access control application in a trusted execution environment are deployed. The first access control application acts as a sensor on the one hand, such as collecting various information, and on the other hand, it acts as a network channel to interact with the outside world for the second access control application to send and receive data. It mainly includes: application modules with functions such as information collection, access control switch, information display, near-field sensing, wireless network, etc.; the second access control application mainly performs various logical processing and storage operations, mainly including: application modules with functions such as cryptography, trusted time, secure storage, data processing, and chain (blockchain) data integration. The access control device stores a device private key; the access control management platform stores a device public key and access control device ID corresponding to the device private key of each access control device; the blockchain is deployed with smart contracts and verification mechanisms for data verification and data chaining. The application method of the blockchain-based access control system provided in this embodiment at least includes identity authentication and authority confirmation processes, such as Figure 2 As shown, the identity authentication and authority confirmation process includes the following steps.

[0021] Step 101: The first access control application responds to the identity authentication and authority confirmation process initiation instruction input by the user and collects the user's identity information to be identified.

[0022] Specifically, when the user wants to pass through the access control device, he approaches the access control device and initiates a command to the access control device to start the identity authentication and permission confirmation process. The method of initiating the command can be but is not limited to voice, button, screen touch and other methods. After receiving the command, the first access control application starts to collect the user's identity information to be identified, that is, collects the identity characteristics displayed by the user. In this embodiment, the user's identity characteristics can support: radio frequency door card, fingerprint, face, user and password, license plate number, etc., thereby forming identity information, namely radio frequency information, fingerprint image, face image, user name and password, license plate number, etc. In actual operation, the type of user identity information collected also depends on the hardware capabilities of the access control device and the design of the access control system function.

[0023] Step 102: The second access control application matches the identity information to be identified with the registered identity information pre-stored in the local trusted execution environment to determine whether the user is a registered user.

[0024] Specifically, after the first access control application sends the collected identity information to be identified to the second access control application, the second access control application authenticates the user who wants to pass through the access control device based on the identification of the identity information to be identified. The main operation is that the second access control application matches and searches the obtained identity information to be identified in the registered identity information pre-stored in the local trusted execution environment. If the identity information is retrieved, it indicates that the current user is a registered user; if the identity information cannot be retrieved, it indicates that the current user is an unregistered user. In the case where the current user is an unregistered user, the access control device will directly end the subsequent process and automatically return to the stage of collecting the user's identity information to be identified. If no identity information to be identified is collected after a predetermined period of time, the information collection function will be turned off and wait for the next initiation instruction.

[0025] Step 103: When it is determined that the user is a registered user, the second access control application queries the registration authority information of the registered user pre-stored in the local trusted execution environment to see whether the user has access rights to the current access control device; the registration authority information of the registered user is entered into the trusted execution environment of the access control device by the access control management platform based on the pre-stored device public key and access control device ID.

[0026] Specifically, the second access control application will continue to query the registration permission information corresponding to the user in the registration permission information of the registered user pre-stored in the local trusted execution environment for the user identified as a registered user, and judge the current permission status of the user based on the queried registration permission information, including whether the permission status allows passage, whether the permission status is within the validity period, etc. Among them, the registration permission information of the registered user is entered into the trusted execution environment of the access control device by the access control management platform based on the pre-stored device public key and access control device ID of the access control device. The process of entering identity and permission information will be described in detail later, so I will not repeat it here.

[0027] Step 104: When it is determined that the user has access rights to the current access control device, the first access control application opens the access control device for the user to pass through.

[0028] Specifically, when the second access control application determines that the current user has access rights to the current access control device by querying the registration authority information of the registered user, it can instruct the access switch application in the first access control application to open the access control device for the user to pass, for example, by controlling a door lock or gate to allow the user to pass.

[0029] Step 105: The second access control application generates the access information for this time, and generates the first signature using the locally stored device private key, and uploads the access information, the first signature, or further includes a certificate of the device public key carrying the access control device to the smart contract of the blockchain. The access information includes at least: access control device ID, user ID, and access date and time.

[0030] Specifically, after the access control device completes a user pass, the second access control application will generate the access information corresponding to this user pass, as shown in Table 1, and the access information at least includes: access control device ID, user ID and access date and time. The second access control application generates a signature for this access information using the device private key of the current access control device pre-stored locally, and the signature is recorded as the first signature; the second access control application uploads the access information (original text), the first signature, or further includes a certificate carrying the device public key of the current access control device to the smart contract of the blockchain for evidence storage. Among them, the certificate carrying the device public key can be a third-party certificate authority (CA) that first issues a certificate carrying the node public key and node information of the processing node to each processing node on the blockchain, and then the processing node issues a certificate carrying the device public key and device information of the access control device to each access control device in the access control system. From the certificate carrying the device public key of the access control device, the device public key of the access control device can be restored.

[0031] Table 1 Traffic information

[0032]

[0033] Step 106: The smart contract queries the blockchain to see whether there is a corresponding relationship between the access control device ID in the access information uploaded this time and the sending address used for the access information uploaded this time; if so, the verification mechanism of the blockchain parses the device public key from the first signature, or when the uploaded information this time also includes a certificate carrying the device public key of the access control device, the device public key is parsed from the certificate, and the access information uploaded this time is verified using the device public key and the first signature; when the verification is successful, the access information is stored in the blockchain; the corresponding relationship is the corresponding relationship between the access control device ID in the activation information stored on the blockchain by the verification mechanism and the sending address used for uploading the activation information when the access control device is successfully activated and the activation information is uploaded to the blockchain.

[0034] Specifically, after receiving the access information uploaded this time, the smart contract on the blockchain does not directly forward it to the verification mechanism to verify the legitimacy and integrity of the access information using public and private keys, but first determines whether the access information is the access information generated and uploaded by the access control device corresponding to the access control device ID in the access information. The judgment method is to first query the blockchain to see whether the corresponding relationship between the access control device ID in the access information uploaded this time and the sending address used for the uploaded access information is stored.

[0035] The sending address used by an access control device to send information is fixed. After the access control device is activated, this solution will store the corresponding relationship between the access control device ID of the access control device and the sending address used by the access control device to send information on the blockchain. In this way, when receiving the information uploaded by the access control device, the certainty of the source of the information can be ensured based on the corresponding relationship between the access control device ID and the sending address that has been stored. The activation process of the access control device will be described in detail in the subsequent embodiments, so it will not be repeated here.

[0036] In this embodiment, after receiving the uploaded access information, the smart contract will first query the blockchain whether the corresponding relationship between the access control device ID in the uploaded access information and the sending address used for the uploaded access information is stored; if so, it indicates that the source of the uploaded access information is true and accurate, and the uploaded information can be forwarded to the verification mechanism of the blockchain to perform verification of the access information; if not, it indicates that the uploaded access information may be forged by other devices, and the verification operation of the access information can be directly terminated, ending the process of uploading the information to the chain.

[0037] When verifying the access information, the verification mechanism can first parse the device public key from the first signature (the device public key acquisition process is applicable to the information verification of the blockchain in the Ethereum environment), or when the uploaded information also includes a certificate carrying the device public key of the access control device, parse the device public key from the certificate (the device public key acquisition process is applicable to the information verification of the blockchain in the certificate environment). In practical applications, the information interaction with the blockchain can use the device public key obtained by one of the two device public key acquisition methods to realize information verification, which is not limited in this embodiment. After obtaining the device public key of the access control device, the device public key and the first signature can be used to verify the legitimacy and integrity of the access information uploaded this time, that is, the first signature is decrypted using the device public key to obtain summary information; at the same time, the access information is generated using a preset hash algorithm; the two summary information are compared, and if they are the same, the verification is successful, otherwise the verification fails. When the verification is successful, the verification mechanism stores the access information in the blockchain for evidence.

[0038] Compared with the related art, this embodiment deploys a first access control application in a rich execution environment and a second access control application in a trusted execution environment in the access control device, uses the first access control application to collect the user's identity information to be identified, and uses the second access control application to perform identity authentication and authority confirmation, thereby ensuring the security of relevant information in the access control device during the identity authentication and authority confirmation process, avoiding user identity leakage and attacks; after executing a access control pass process, the access information is uploaded to the blockchain for evidence storage based on public-private key asymmetric encryption technology, so as to ensure decentralized management of access control pass information and prevent communication information from being maliciously deleted. In addition, to prevent other devices from pretending to be the current access control device to upload access information, the smart contract will add the corresponding relationship between the access control device ID and the sending address used to upload the activation information (the sending address of the access control device) when storing the activation information of the access control device. In this way, when other legitimate information of the access control device is subsequently stored on the chain, the communication information can only be stored on the chain when the corresponding relationship between the access control device ID and the sending address used to send the uploaded information has been stored in the blockchain, thereby ensuring that the access information is not only verified to meet the legality and integrity, but also the certainty of the access control device that uploaded the access information can be ensured.

[0039] Another embodiment of the present invention relates to an application method of a blockchain-based access control system. The application method of the blockchain-based access control system includes the aforementioned Figure 2 In addition to the identity authentication and permission confirmation process shown in Figure 1, it also includes the access control device activation process. Figure 3 As shown, the access control device activation process includes the following steps.

[0040] Step 201: The first access control application in the access control device responds to the initialization instruction input by the administrator, activates the local access control service function and the communication function with the access control management platform, or further receives a certificate carrying the device public key of the access control device sent by the access control management platform.

[0041] Specifically, after the access control manager installs the access control device at the designated location, powers on the access control device and starts it, he will input an initialization command to the first access control application in the access control device. The first access control application responds to the initialization command to activate the local access control business function and the communication function with the access control management platform. Among them, the local access control business function can be the information collection, access control switch, information display, near-field sensing and other business functions of the first access control application; the communication function is the communication interaction between the first access control application and the access control management platform. For example, the first access control application attempts to report the access control device information to the access control management platform, including device ID, activation time, etc.

[0042] In addition, when the blockchain in this embodiment is a blockchain under a certificate environment, the access control management platform will also issue a certificate carrying the device public key of the access control device to the access control device. Among them, the certificate carrying the device public key can be a third-party certificate authority (CA) that first issues a certificate carrying the node public key and node information of the processing node to each processing node on the blockchain, and then the processing node issues a certificate carrying the device public key and device information of the access control device to each access control device in the access control system. From the certificate carrying the device public key of the access control device, the device public key of the access control device can be restored. In order to ensure the security of the issued data and the efficiency of data processing, the access control management platform can generate a one-time session key (such as AES, SM4, DES, etc.), encrypt the issued data with the session key, and encrypt the session key with the device public key. After the data is issued in this way, the first access control application of the access control device transmits the received data to the second access control application, and the second access control application can first use the device private key to decrypt the session key, and then use the session key to decrypt the issued data original to obtain the certificate.

[0043] Step 202: The second access control application generates activation information after the first access control application is successfully activated, and generates a second signature for the activation information using the locally stored device private key, and uploads the activation information and the second signature, or further includes a certificate carrying the device public key of the access control device, to the smart contract of the blockchain to forward it to the verification mechanism of the blockchain through the smart contract. The activation information includes at least: access control device ID, activation time, last power-on time and status information of the access control device.

[0044] Specifically, after the first access control application is successfully activated, the second access control application generates activation information for this activation process, as shown in Table 2, and the activation information at least includes: access control device ID, activation time, last power-on time, and access control device status information. The second access control application generates a signature for the activation information generated during this activation process using the device private key of the current access control device pre-stored locally, and the signature is recorded as the second signature; the second access control application uploads the activation information (original text), the second signature, or further includes a certificate carrying the device public key of the access control device to the smart contract of the blockchain, and the smart contract further forwards the received information to the verification mechanism for evidence storage.

[0045] Table 2 Activation information

[0046]

[0047] Step 203: The verification mechanism parses the device public key from the second signature, or when the uploaded information also includes a certificate carrying the device public key of the access control device, the verification mechanism parses the device public key from the certificate, and uses the device public key and the second signature to verify the activation information; when the verification is successful, the activation information and the corresponding relationship between the access control device ID in the activation information and the sending address used to upload the activation information are stored in the blockchain.

[0048] Specifically, after receiving the activation information uploaded this time, the verification mechanism on the blockchain performs the legitimacy and integrity verification of the activation information. When verifying the access information, the device public key can be parsed from the second signature (the device public key acquisition process is applicable to the information verification of the blockchain in the Ethereum environment), or when the uploaded information also includes a certificate carrying the device public key of the access control device, the device public key can be parsed from the certificate (the device public key acquisition process is applicable to the information verification of the blockchain in the certificate environment). In practical applications, the information interaction with the blockchain can be realized by using the device public key obtained by one of the two device public key acquisition methods to realize information verification, which is not limited in this embodiment. After obtaining the device public key of the access control device, the device public key and the second signature can be used to verify the legitimacy and integrity of the activation information uploaded this time, that is, the second signature is decrypted using the device public key to obtain the summary information; at the same time, the preset hash algorithm is used to generate the summary information for the access information; the two summary information are compared, and if they are the same, the verification is successful, otherwise the verification fails. When the verification is successful, the verification mechanism stores the activation information in the blockchain for evidence.

[0049] In addition, the sending address used by an access control device to send information is fixed, so the verification mechanism will store the corresponding relationship between the access control device ID of the access control device and the sending address used by the access control device to send information on the blockchain after the access control device uploads the activation information. In this way, when the smart contract receives the information uploaded by the access control device, it can first ensure the certainty of the source of the information by querying the corresponding relationship between the access control device ID and the sending address that has been stored.

[0050] Specifically, the verification mechanism extracts the access control device ID and the sending address used by the access control device when uploading the activation information from the activation information uploaded this time, and binds the two to form a corresponding relationship. While storing the activation information on the blockchain, the verification mechanism also stores the bound access control device ID and sending address on the blockchain for subsequent verification of the certainty of the source of information when uploading information with the access control device ID.

[0051] Compared with the related art, this embodiment uploads the activation information to the blockchain for storage during the access control device activation process to ensure that the activation information will not be tampered with; at the same time, the access control device ID and the sending address are also stored on the blockchain for subsequent verification of the certainty of the source of information when uploading information with the access control device ID.

[0052] Another embodiment of the present invention relates to an application method of a blockchain-based access control system. The application method of the blockchain-based access control system includes the aforementioned Figure 2 , Figure 3 In addition to the identity authentication and authority confirmation process and the access control device activation process shown in FIG, it also includes the identity and authority information entry process. Figure 4 As shown, the process of entering the identity and authority information includes the following steps.

[0053] Step 301: The access control management platform receives the identity information and authority information entered by the administrator, the identity information and authority information at least include: user ID, the list of authorized access control devices corresponding to the user ID, authority configuration, validity start date and time, validity end date and time, and operator ID.

[0054] Specifically, after the access control device is successfully activated, the access control management platform will receive the identity information and permission information entered by the administrator, and then input this information into the access control device through the access control management platform. As shown in Table 3, the identity information and permission information at least include: user ID, the list of authorized access control devices corresponding to the user ID, permission configuration, validity start date and time, validity end date and time, and operator ID.

[0055] Table 3 Identity information and authority information

[0056]

[0057] Step 302: The access control management platform encrypts the identity information and the permission information based on the device public key of the access control device, and sends the encrypted identity information and the permission information to the second access control application in the access control device.

[0058] Specifically, the access control management platform can use the device public key of the current access control device to encrypt the identity information and permission information, for example, using a preset hash algorithm to calculate the hash value of the identity information and permission information as summary information, and then use the device public key of the current access control device to encrypt the summary information. The access control management platform sends the encrypted identity information and permission information to the first access control application in the access control device, and then transmits the encrypted information to the second access control application through the first access control application.

[0059] Step 303: The second access control application decrypts the received encrypted identity information and permission information based on the device private key of the access control device, and saves or updates the access control device ID of the current access control device and the decrypted identity information and permission information as the registered permission information of the registered user to the local trusted execution environment.

[0060] Specifically, after receiving the encrypted identity information and permission information, the second access control application uses the device private key of the current access control device to decrypt the encrypted information to obtain the identity information and permission information; then, the access control device ID of the current access control device and the decrypted identity information and permission information are used as the registration permission information of the registered user, and saved or updated in the local trusted execution environment, thereby completing the entry of the registration permission information (covering identity information and permission information) into the local.

[0061] In addition, in order to ensure the security of the sent data and the efficiency of data processing, in the improved step 302, the access control management platform can generate a one-time session key (such as AES, SM4, DES, etc.), encrypt the sent data with the session key, and encrypt the session key with the device public key. After the data is sent, in the improved step 303, the first access control application of the access control device transmits the received data to the second access control application. The second access control application can first use the device private key to decrypt the session key, and then use the session key to decrypt the sent data original text to obtain identity information and permission information.

[0062] Step 304: After the second access control application successfully enters the registration authority information, a third signature is generated for the registration authority information using the locally stored device private key, and the registration authority information and the third signature, or further a certificate carrying the device public key of the access control device, is uploaded to the smart contract of the blockchain.

[0063] Specifically, after the second access control application successfully enters the registration authority information into the first access control application, it generates a signature for the registration authority information using the device private key of the current access control device stored locally, and the signature is recorded as the third signature; the second access control application uploads the registration authority information (original text), the third signature, or further includes a certificate carrying the device public key of the access control device to the smart contract of the blockchain, so as to forward it to the verification mechanism through the smart contract for evidence storage.

[0064] Step 305: The smart contract queries the blockchain to see whether there is a correspondence between the access control device ID in the registration authority information uploaded this time and the sending address used for the registration authority information uploaded this time; if so, the blockchain verification mechanism parses the device public key from the third signature, or when the uploaded information also includes a certificate carrying the device public key of the access control device, the device public key is parsed from the certificate, and the registration authority information uploaded this time is verified using the device public key and the third signature; when the verification is successful, the registration authority information is stored in the blockchain.

[0065] Specifically, after receiving the registration authority information uploaded this time, the smart contract on the blockchain does not directly forward it to the verification mechanism to use the public and private keys to verify the legitimacy and integrity of the registration authority information, but first determines whether the registration authority information is the registration authority information generated and uploaded by the access control device corresponding to the access control device ID in the registration authority information. The judgment method is to first query the blockchain to see whether the corresponding relationship between the access control device ID in the registration authority information uploaded this time and the sending address used for the registration authority information uploaded this time is stored.

[0066] The sending address used by an access control device to send information is fixed. After the access control device is activated, this solution will store the corresponding relationship between the access control device ID of the access control device and the sending address used by the access control device to send information on the blockchain. In this way, when the smart contract receives the information uploaded by the access control device, it can ensure the certainty of the source of the information based on the corresponding relationship between the access control device ID and the sending address that has been stored. The activation process of the access control device will be described in detail in the above embodiment, so it will not be repeated here.

[0067] In this embodiment, after receiving the registration authority information uploaded this time, the smart contract will first query the blockchain whether the corresponding relationship between the access control device ID in the registration authority information uploaded this time and the sending address used for the registration authority information uploaded this time is stored; if so, it indicates that the source of the registration authority information uploaded this time is true and accurate, and the uploaded information can be forwarded to the verification mechanism of the blockchain to perform verification of the registration authority information; if not, it indicates that the registration authority information uploaded this time may be forged by other devices, and the verification operation of the registration authority information can be directly terminated, ending the information chain process.

[0068] When verifying the registration authority information, the verification mechanism can first parse the device public key from the third signature (the device public key acquisition process is applicable to the information verification of the blockchain in the Ethereum environment), or when the uploaded information also includes a certificate carrying the device public key of the access control device, parse the device public key from the certificate (the device public key acquisition process is applicable to the information verification of the blockchain in the certificate environment). In practical applications, the information interaction with the blockchain can be verified by using the device public key obtained by one of the two device public key acquisition methods, which is not limited in this embodiment. After obtaining the device public key of the access control device, the device public key and the third signature can be used to verify the legitimacy and integrity of the registration authority information uploaded this time, that is, the third signature is decrypted using the device public key to obtain summary information; at the same time, the registration authority information is generated using a preset hash algorithm; the two summary information are compared, and if they are the same, the verification is successful, otherwise the verification fails. When the verification is successful, the verification mechanism stores the registration authority information in the blockchain for evidence.

[0069] Compared with the related art, this embodiment, after entering the registration authority information including identity information and authority information into the access control device, uploads the registration authority information to the blockchain for evidence based on the public-private key asymmetric encryption technology to ensure decentralized management of the access control registration authority information and prevents the registration authority information from being maliciously deleted and tampered with; in addition, in order to prevent other devices from impersonating the current access control device to upload the registration authority information, the verification mechanism will add the correspondence between the stored access control device ID and the sending address used for uploading the activation information (the sending address of the access control device) when storing the activation information of the access control device. In this way, when other legitimate information of the access control device is subsequently stored on the chain, the registration authority information can be stored on the chain only if the correspondence between the access control device ID and the sending address used for sending the uploaded information has been stored in the blockchain, thereby ensuring that the registration authority information is not only verified to meet the legitimacy and integrity, but also can ensure the certainty of the access control device that uploads the pass information.

[0070] Another embodiment of the present invention relates to an application method of a blockchain-based access control system. The application method of the blockchain-based access control system includes the aforementioned Figure 2 , Figure 3 , Figure 4 Based on any of the method processes shown, a door access record query process is also included. Figure 5 As shown, the access control record query process includes the following steps.

[0071] Step 401: The access control management platform receives input query parameters.

[0072] Specifically, the administrator can query the relevant information stored on the blockchain by inputting query parameters into the access control management platform. The query parameters may be, but are not limited to, access control device ID, user ID, operator ID, validity period, etc.

[0073] Step 402: The access control management platform sends a query request carrying query parameters to the smart contract of the blockchain.

[0074] Step 403: Based on the query request, the smart contract queries the blockchain for evidence information that matches the query parameters and feeds it back to the access control management platform.

[0075] Compared with the related art, the information stored on the blockchain in this embodiment is authentic and valid and cannot be tampered with, so the accuracy of the information obtained by query is guaranteed. In addition, since the access control management platform will only retain the stored information when querying data, and the information can be retrieved immediately after querying, the problem of low data security that may occur when the access control management platform stores relevant information of access control management is avoided.

[0076] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0077] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. An application method of a blockchain-based access control system, characterized in that: The access control system based on blockchain includes: an access control device, an access control management platform and a blockchain, wherein the access control device is deployed with a first access control application in a rich execution environment and a second access control application in a trusted execution environment, and the access control device stores a device private key; the access control management platform stores a device public key and an access control device ID corresponding to the device private key of each access control device, and the application method includes at least: an access control device activation process, an identity authentication process and an authority confirmation process; The access control device activation process includes: The first access control application in the access control device responds to the initialization instruction input by the administrator to activate the local access control service function and the communication function with the access control management platform; The second access control application in the access control device generates activation information after the first access control application is successfully activated, generates a second signature for the activation information using a locally stored device private key, and uploads the activation information and the second signature to the smart contract of the blockchain so as to be forwarded to the verification mechanism of the blockchain through the smart contract, wherein the activation information includes at least: the access control device ID, the activation time, the last power-on time, and the status information of the access control device; The verification mechanism parses the device public key from the second signature, and uses the device public key and the second signature to verify the activation information; when the verification is successful, the activation information and the corresponding relationship between the access control device ID in the activation information and the sending address used to upload the activation information are stored in the blockchain; The identity authentication and authority confirmation process includes: The first access control application responds to the initiation instruction of the identity authentication and authority confirmation process input by the user, and collects the identity information to be identified of the user; The second access control application matches the identity information to be identified with the registered identity information pre-stored in the local trusted execution environment to determine whether the user is a registered user; When it is determined that the user is a registered user, the second access control application queries the registration authority information of the registered user pre-stored in the local trusted execution environment to see whether the user has the access authority to the current access control device; the registration authority information of the registered user is entered into the trusted execution environment of each access control device by the access control management platform based on the pre-stored device public key and access control device ID; When it is determined that the user has access rights to the current access control device, the first access control application opens the current access control device for the user to pass through; The second access control application generates the access information for this time, generates a first signature using the locally stored device private key, and uploads the access information and the first signature to the smart contract of the blockchain, wherein the access information at least includes: the access control device ID, the user ID, and the access date and time; The smart contract queries the blockchain to see whether there is a correspondence between the access control device ID in the access information uploaded this time and the sending address used for uploading the access information this time; if so, the verification mechanism of the blockchain parses the device public key from the first signature, and uses the device public key and the first signature to verify the access information uploaded this time; when the verification is successful, the access information is stored in the blockchain; the correspondence is the correspondence between the access control device ID in the activation information stored on the blockchain by the verification mechanism and the sending address used for uploading the activation information when the access control device is successfully activated and the activation information is uploaded to the blockchain.

2. The application method according to claim 1, characterized in that: The application method also includes: an identity and authority information entry process; the identity and authority information entry process includes: The access control management platform receives identity information and authority information entered by the administrator, wherein the identity information and authority information at least include: a user ID, and a list of authorized access control devices corresponding to the user ID, authority configuration, validity start date and time, validity end date and time, and an operator ID; The access control management platform encrypts the identity information and permission information based on the device public key of the access control device, and sends the encrypted identity information and permission information to the second access control application in the access control device; The second access control application decrypts the received encrypted identity information and permission information based on the device private key of the access control device, and saves or updates the access control device ID of the current access control device and the decrypted identity information and permission information as the registered permission information of the registered user to the local trusted execution environment; After the second access control application successfully enters the registration authority information, a third signature is generated for the current registration authority information using the locally stored device private key, and the current registration authority information and the third signature are uploaded to the smart contract of the blockchain; The smart contract queries the blockchain to see whether the corresponding relationship between the access control device ID in the registration authority information uploaded this time and the sending address used for the registration authority information uploaded this time is stored; if so, the verification mechanism of the blockchain parses the device public key from the third signature, and uses the device public key and the third signature to verify the registration authority information uploaded this time; when the verification is successful, the registration authority information is stored in the blockchain.

3. The application method according to claim 1 or 2, characterized in that: The application method also includes: a door access record query process; the door access record query process includes: The access control management platform receives the input query parameters; The access control management platform sends the query request carrying the query parameters to the smart contract of the blockchain; According to the query request, the smart contract queries the blockchain for evidence information matching the query parameters and feeds it back to the access control management platform.