An access control method, an access control system, and a computer-readable storage medium
Patent Information
- Application Number
- CN202510650033.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing technology Zhonghuan signature scheme has insufficient identity traceability, and is easily stolen by malicious users using malicious data that cannot be traced. Moreover, the proof of work mechanism of blockchain technology consumes a large amount of computing resources, resulting in excessive computing power overhead.
Groth signature technology is used to generate anonymous credentials for users, combined with the interstellar file system IPFS for distributed storage of key fragments, and the symmetric key ciphertext is reconstructed using the Lagrangian interpolation method, and the access strategy is verified by the blockchain to achieve anonymization protection and traceability of user identity, while reducing the storage pressure and computing power overhead of the blockchain.
It realizes anonymous protection and traceability of user identity, provides flexible access control and fine-grained data access rights, reduces the storage pressure and computing resource consumption of blockchain, and ensures the legality and traceability of data access.
Smart Images

Figure CN120162831B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular, to an access control method, an access control system, and a computer-readable storage medium. Background Art
[0002] With the development of emerging technologies such as cloud computing and the Internet of Things, data sharing has become a key part of the information society. However, the security risks and privacy issues of the centralized data storage mode adopted in traditional data sharing technologies have gradually emerged. In the centralized data storage method, data is centrally stored on a cloud server. Although it reduces the storage pressure of traditional databases to a certain extent, its privacy protection mechanism is still weak. In addition, in the actual application of data sharing, the existence of the data silo phenomenon further restricts the circulation and utilization of data. Therefore, how to balance data sharing and the privacy protection of sensitive data has become the focus of common concern in the academic and industrial circles.
[0003] Currently, relevant technical solutions have adopted the ring signature technology in cryptography and combined it with blockchain technology to solve the above problems. The ring signature technology can verify the authenticity of transaction data without exposing the user's identity, and the blockchain technology provides technical guarantees for data sharing and secure storage through the characteristics of decentralization, anti-tampering, and traceability.
[0004] However, the inventor found during the conception and implementation of this application that although the ring signature scheme provides complete anonymity, it has obvious deficiencies in identity traceability and is prone to being exploited by malicious users to achieve uncontrollable behaviors such as untraceable malicious data theft. And the current blockchain technology has a defect of excessive computing power consumption due to the Proof of Work (POW) mechanism.
[0005] In view of this, this application proposes an access control method, aiming to protect the privacy of sensitive information in data sharing, achieve anonymous protection of identities, support flexible and fine-grained access control, provide the ability to trace data access records, and a mechanism for holding accountable for illegal access behaviors. Summary of the Invention
[0006] The main purpose of this application is to provide an access control method, aiming to solve the problem of how to trace user identities while reducing the computing power overhead of the blockchain.
[0007] To achieve the above object, an access control method provided by this application is applied to an access control system including a data user, a data owner, a blockchain, and an InterPlanetary File System. The method includes the following steps:
[0008] S10. When the data owner receives a fragment access request sent by the data user, the data owner determines whether the Groth signature and the user identity in the fragment access request are legal;
[0009] S20. If it is legal, the data owner calls the key fragment storage location from the blockchain, obtains the key fragment associated with the key fragment storage location from the InterPlanetary File System, and sends the key fragment to the data user;
[0010] S30. The data user uses the Lagrange interpolation method to reconstruct the key fragment into a symmetric key ciphertext, and submits a data decryption request including the symmetric key ciphertext and the user identity to the blockchain;
[0011] S40. When the blockchain verifies that the symmetric key ciphertext meets the preset access policy, the blockchain sends the key plaintext corresponding to the symmetric key ciphertext to the data user.
[0012] Optionally, before the S10, it further includes:
[0013] S50. When receiving a user registration instruction sent by a registration requester, perform registration according to the following steps:
[0014] S51. The registration requester generates a public-private key pair , ;
[0015] S52. The registration requester sends an identity binding request to the authorization center , and the authorization center checks whether the public key exists;
[0016] S53. If it exists, the authorization center sends a random number to the registration requester. The registration requester randomly selects , calculates , , , , obtains , and takes as the signature and returns it to the authorization center;
[0017] S54. The authorization center verifies using the following formula to verify whether it holds:
[0018]
[0019] S55. If it holds, the authorization center randomly selects , calculates , , , , , output the Groth signature and send it to the user:
[0020]
[0021] S56. The registration requester verifies the authenticity of the Groth signature through the following formula :
[0022]
[0023] In the formula, e represents the symbol of the mapping, , , and represent four bilinear pairs, indicating that four pairs of generators , , , are mapped to a multiplicative cyclic group through bilinear mapping, , , and both represent performing multiplication operations between two bilinear pairs, is the generator of the multiplicative cyclic group , is the generator of the multiplicative cyclic group , pk is the public key, is the initialized public key, , represent embedding the attribute value into the Groth signature, that is, completing the attribute value embedding through exponentiation of the generator and the attribute value ;
[0024] S57. After successful verification, the registration requester generates a user qualification certificate and sends it to the authorization center, so that the authorization center takes the registration requester with the user qualification certificate as the data user.
[0025] Before the said S40, the following steps are also included:
[0026] S60. In the data encryption stage, perform AES symmetric encryption on the registration data provided by the registration requester to generate a data ciphertext , and encrypt the encryption key of the said AES symmetric encryption using the attribute-based encryption algorithm to obtain a key ciphertext ;
[0027] S70. The key ciphertext After randomly splitting to generate key fragments, together with the data ciphertext they are stored in the InterPlanetary File System, and the storage location of the key fragment is marked by a hash value to obtain a hash storage address. The hash storage address is stored on the blockchain, so as to call the hash storage address from the blockchain to obtain the storage location of the key fragment during access control, and obtain the key fragment associated with the storage location from the InterPlanetary File System.
[0028] Optionally, step S60 specifically includes:
[0029] S61. Assume that the registration data includes the user identity and user attributes . The authorization center randomly selects , calculates , , , , and makes the user attribute private key . After sorting out, we get:
[0030]
[0031] The authorization center sends the attribute private key SK to the data user
[0032] S62. After the data owner identifies different data plaintexts M with Mid, uses the AES symmetric key to encrypt the data plaintext M to obtain the data ciphertext ;
[0033] S63. The data owner sets the access policy W and encrypts the AES symmetric key based on the access structure to obtain the key ciphertext .
[0034] Optionally, after step S40, it further includes:
[0035] S80. When the data owner publishes a data transaction, the user public key , the timestamp of the current transaction and the hash address of the target data transaction in the InterPlanetary File System are input to create a data transaction , and after verifying the legality of the data transaction , the data transaction is written into the blockchain. ]>
[0036] Optionally, the data transaction includes a data storage transaction and a data access transaction, and the verification of the data transaction includes data storage transaction verification and data access transaction verification;
[0037] Among them, the data storage transaction verification S81 specifically includes:
[0038] S811, every time the data owner distributes a key fragment , a storage transaction will be created and published to the blockchain , where is the current transaction timestamp, is the key fragment and the storage address in IPFS;
[0039] S812, the data owner uses the private key to sign the transaction , and then generates the corresponding anonymous certificate ; ;
[0040] S813, any user on the blockchain is allowed to use the public key and the anonymous certificate to verify the transaction ; if the verification is proven to pass, the current transaction is allowed to be written into the blockchain; otherwise, the transaction is ignored;
[0041] The data access transaction verification S82 specifically includes:
[0042] S821, the data user randomly selects , calculates the corresponding access public key , and securely saves the access private key ;
[0043] S822, the data owner randomly selects , calculates the corresponding commitment value for the ciphertext data , and sets the ElGamal commitment value set ;
[0044] S823, the data owner creates a data access transaction , uses to sign , generates the corresponding anonymous certificate , and then publishes to the blockchain. ;
[0045] Optionally, after S40, it further includes:
[0046] S90, during the data access process of the data user, the blockchain periodically verifies the commitment in the transaction at preset intervals to ensure the legality of the access request.
[0047] Optionally, S90 specifically includes:
[0048] S91, at intervals of the preset period, the data user sends an access request for the ciphertext to the blockchain ; ;
[0049] In the formula, represents an information tag, represents an anonymous certificate, represents a commitment value;
[0050] S92, the blockchain parses the elements in the commitment value in the access request and and , calculates to obtain , and sends to the data owner;
[0051] In the formula, is the access public key;
[0052] S93, after the data owner receives , verifies whether the following formula holds:
[0053]
[0054] If it holds, notify the blockchain to store the hash value storage address of the ciphertext in the InterPlanetary File System and return it to the data user; otherwise, reject the access and the protocol ends; ;
[0055] In the formula, is the private key .
[0056] In addition, to achieve the above object, the present application further provides an access control system, including: a memory, a processor, and an access control program stored on the memory and executable on the processor. When the access control program is executed by the processor, the steps of the access control method described in any one of the above are implemented.
[0057] In addition, to achieve the above object, the present application further provides a computer-readable storage medium, on which an access control program is stored. When the access control program is executed by a processor, the steps of the access control method described in any one of the above are implemented.
[0058] The present application at least has the following beneficial effects:
[0059] 1. Introduce the Groth signature technology to generate anonymous credentials for each user, facilitating subsequent data access verification and providing guarantee for the traceability of user identities;
[0060] 2. Introduce the InterPlanetary File System (IPFS) to reduce the storage pressure of the blockchain and leverage the characteristics of IPFS itself to reduce the computing power overhead, so as to better adapt to large-scale users and high-frequency access scenarios;
[0061] 3. Hide the real identity information of users through blinding operations. In the blinding process, the user identity is mapped to the decryption key through encryption operations, making the user's identity information visible only to the authorization center and anonymous to other participating parties. Combining with the Groth signature technology, while protecting user privacy, it provides guarantee for the traceability of user identity;
[0062] 4. Adopt the ciphertext-policy attribute-based encryption (CP-ABE) technology to generate flexible access policies according to the user attribute set, achieving fine-grained control of data access permissions. Combining with threshold secret sharing, randomly fragment the decryption key and store it distributedly, thereby enhancing the security of data and keys;
[0063] 5. Record all data access and transaction operations through the blockchain, and utilize the immutable feature of the blockchain to achieve complete traceability of access behaviors;
[0064] 6. During the data access process, the blockchain verifies the access requests in the transaction at preset intervals to ensure the legality during the access request process. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic flowchart of the first embodiment of the access control method of this application;
[0066] Figure 2 It is a schematic diagram of the time consumption of secret distribution involved in the embodiment of this application;
[0067] Figure 3 It is a schematic diagram of the time consumption of secret reconstruction involved in the embodiment of this application;
[0068] Figure 4 It is a schematic diagram of the architecture of the hardware operating environment of the access control system involved in the embodiment of this application.
[0069] The realization, functional features and advantages of the purpose of this application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] To better understand the above technical solutions, the exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0071] First Embodiment
[0072] In this embodiment, the execution subject is an access control system, which includes a data user, a data owner, a blockchain, and an InterPlanetary File System.
[0073] A data user (Date User, DU) refers to a user or entity that needs to access and use data; its function is to send an access request to the data owner or the system, requesting to obtain specific data resources or perform specific operations, and after obtaining authorization, use the data according to the specified permissions and methods.
[0074] A data owner (Date Owner, DO) refers to a user or entity that owns data resources and has ownership and control over the data; its function is to be responsible for defining the access control policy of the data, that is, determining which users or entities can access the data, in what way to access, and the access permission level.
[0075] The blockchain records and verifies data in a decentralized manner, consists of a series of blocks, and each block contains transaction information within a certain period of time, and is encrypted and linked through cryptographic techniques.
[0076] The InterPlanetary File System (IPFS) is a peer-to-peer distributed file system that realizes distributed storage, privacy protection, and rapid location of files by splitting files into small pieces and giving users a unique hash value.
[0077] It should be noted that a complete anonymous access control privacy protection scheme includes six parts: system initialization, user registration, attribute encryption, distributed storage, transaction publishing, and access control. In this embodiment, the access control in the data interaction process is taken as the core content for description.
[0078] Referring to Figure 1 , the access control method includes the following steps:
[0079] S10, when receiving a fragment access request sent by a data user to a data owner, the data owner determines whether the Groth signature and the user identity in the fragment access request are legal;
[0080] In this embodiment, when a data user who is a legally registered user sends a fragmented access request, the fragmented access request should include a legal Groth signature and user identity information.
[0081] Exemplarily, let the fragmented access request expression be:
[0082]
[0083] The data owner DO parses and . Use the following formula to verify whether the equation holds:
[0084]
[0085] Where, in the formula, e is the symbolic representation of the mapping, , , and represent four bilinear pairs, indicating that the four pairs of generators , , , are mapped to a multiplicative cyclic group through bilinear mapping, , , and all represent performing multiplication operations between two bilinear pairs, is the generator of the multiplicative cyclic group , is the generator of the multiplicative cyclic group , pk is the public key, is the initialized public key, , represent embedding the attribute value into the Groth signature, that is, completing the embedding of the attribute value through exponentiation of the generator with the attribute value ;
[0086] If it holds, determine that the fragmented access request is legal.
[0087] It should be noted that the Groth signature technology can provide efficient identity anonymization protection and at the same time support the traceability function of the user identity, thus avoiding uncontrollable behaviors such as malicious data theft that cannot be traced after being impersonated by a malicious user as a legal user identity. Therefore, in this embodiment, the Groth signature technology is introduced to generate anonymous credentials for each user, which are used for subsequent data access verification and at the same time provide guarantee for the traceability of the user identity.
[0088] S20. If it is legal, the data owner calls the storage location of the key fragment from the blockchain, obtains the key fragment associated with the storage location of the key fragment from the InterPlanetary File System (IPFS), and sends the key fragment to the data user.
[0089] In this embodiment, if it is determined to be legal, the data owner calls the storage location of the key fragment from the blockchain, obtains the key fragment associated with the storage location of the key fragment from the IPFS, and sends the key fragment to the data user.
[0090] The key fragment and its storage location are stored in the IPFS and the blockchain respectively by the system after the data user completes registration. Specifically, to improve the security and anti - attack ability of the data, the key fragment is randomly segmented through the threshold secret sharing algorithm, and the segmented key fragments are stored in the IPFS. The storage location of each key fragment is marked by calculating the hash value, obtaining the hash storage location containing the hash value and the storage location, and the hash storage location is stored on the blockchain.
[0091] It should be noted that in this embodiment, the purpose of introducing the IPFS is, on the one hand, to reduce the storage pressure of the blockchain, and on the other hand, to shorten the time overhead of signature generation, transaction verification and access control, and better adapt to the scenarios of a large number of users and high - frequency access.
[0092] S30. The data user uses the Lagrange interpolation method to reconstruct the key fragment into a symmetric key ciphertext, and submits a data decryption request containing the symmetric key ciphertext and the user identity to the blockchain.
[0093] S40. When the blockchain verifies that the symmetric key ciphertext meets the preset access policy, the blockchain sends the key plaintext corresponding to the symmetric key ciphertext to the data user.
[0094] In this embodiment, the data user uses the Lagrange interpolation method to reconstruct the key fragment into a symmetric key ciphertext.
[0095] Exemplarily, the symmetric key ciphertext has the following expression:
[0096]
[0097] In the formula, represents the sub - key share, which is calculated through the n - 1 - order polynomial where , t represents the threshold of the secret sharing, and represent two unequal and non - zero random positive integers, and for any All have , Indicates performing a modulo operation on prime numbers .
[0098] Then, the data user submits a data decryption request containing the symmetric key ciphertext and the user identity . Only when the blockchain verifies that the attribute set of the data user satisfies the access policy W can the key plaintext be decrypted , otherwise, the request is ignored and a decryption failure message is output.
[0099] In the technical solution provided in this embodiment, on the one hand, the Groth signature technology is introduced to generate anonymous credentials for each user, facilitating subsequent data access verification and providing guarantee for the traceability of user identity; on the other hand, the InterPlanetary File System IPFS is introduced to reduce the storage pressure of the blockchain, and with the help of the characteristics of the InterPlanetary File System itself, the computing power overhead is reduced, so as to better adapt to the scenarios of large-scale users and high-frequency access.
[0100] Second Embodiment
[0101] Based on the first embodiment, in this embodiment, for the user registration link before access control, the system proceeds according to the following steps:
[0102] S50, when receiving the user registration instruction sent by the registration requester, register according to the following steps:
[0103] S51, the registration requester generates a public-private key pair , ;
[0104] S52, the registration requester sends an identity binding request to the authorization center , and the authorization center checks whether the public key exists;
[0105] S53, if it exists, the authorization center sends a random number to the registration requester, and the registration requester randomly selects , calculates , , , , and obtains , and takes as the signature and returns it to the authorization center;
[0106] S54, the authorization center verifies using the following formula to verify whether holds:
[0107]
[0108] S55. If it holds, the authorization center randomly selects to calculate , , , , , and outputs the Groth signature and sends it to the user:
[0109]
[0110] S56. The registration requester verifies the authenticity of the Groth signature through the following formula :
[0111]
[0112] In the formula, e represents the symbol of the mapping, , , and represent four bilinear pairs, indicating that four pairs of generators , , , are mapped to a multiplicative cyclic group through bilinear mapping, , , and all represent performing multiplication operations between two bilinear pairs, is the generator of the multiplicative cyclic group , is the generator of the multiplicative cyclic group , pk is the public key, is the initialized public key, , represent embedding the attribute value into the Groth signature, that is, completing the embedding of the attribute value through exponentiation of the generator and the attribute value ;
[0113] S57. After successful verification, the registration requester generates the user qualification certificate and sends it to the authorization center, so that the authorization center regards the registration requester with the user qualification certificate as the data user.
[0114] In the technical solution provided in this embodiment, when a user registers in the system, the user first completes identity authentication through a trusted authorization center. While generating a public-private key pair, the authorization center hides the user's real identity information through a blinding operation. During the blinding process, the user's identity is mapped to the decryption key through an encryption operation, making the user's identity information visible only to the authorization center and remaining anonymous to other participating parties. In addition, combined with the Groth signature technology, this design not only protects user privacy but also provides guarantees for the traceability of user identities.
[0115] Third Embodiment
[0116] Based on any of the above embodiments, in this embodiment, in order to improve the security and anti-attack ability of data, during the data encryption phase, after the data owner (DO) preprocesses the data to be shared, a symmetric encryption algorithm (such as AES) is used to encrypt the data to generate ciphertext data. At the same time, CP-ABE (Ciphertext-Policy Attribute-Based Encryption, an attribute-based encryption technology) is used to further encrypt the encryption key and generate key fragments in combination with an access policy. The key fragments are randomly split through a threshold secret sharing algorithm, and the split key fragments are stored in the IPFS network. The storage location of each key fragment is marked by calculating a hash value, and the hash value and the storage location of the data ciphertext are recorded in the blockchain together.
[0117] The specific steps are as follows:
[0118] S60, in the data encryption phase, perform AES symmetric encryption on the registration data provided by the registration requester to generate data ciphertext , and use an attribute-based encryption algorithm to encrypt the encryption key of the AES symmetric encryption to obtain a key ciphertext ;
[0119] S70, after randomly splitting the key ciphertext to generate key fragments, store them together with the data ciphertext in the InterPlanetary File System, and mark the storage location of the key fragments with a hash value to obtain a hash storage address. Store the hash storage address on the blockchain so as to call the hash storage address from the blockchain to obtain the storage location of the key fragments during access control, and obtain the key fragments associated with the storage location from the InterPlanetary File System.
[0120] Further, the step S60 specifically includes:
[0121] S61, assume that the registration data includes the user identity and user attributes , and the authorization center randomly selects , calculate , , , , let the user attribute private key be , and after sorting, we get:
[0122]
[0123] The authorization center sends the attribute private key SK to the data user
[0124] S62. After the data owner identifies different data plaintexts M with Mid, use the AES symmetric key to encrypt the data plaintext M to obtain the data ciphertext ;
[0125] S63. The data owner sets the access policy W and encrypts the AES symmetric key based on the access structure to obtain the key ciphertext .
[0126] In the technical solution provided in this embodiment, the ciphertext-policy attribute-based encryption (CP-ABE) technology is adopted to generate a flexible access policy according to the user attribute set, realizing fine-grained control of data access permissions. Combining threshold secret sharing, the decryption key is randomly fragmented and distributed for storage, thus enhancing the security of data and keys.
[0127] Fourth Embodiment
[0128] Based on any of the above embodiments, in this embodiment, after access control is completed, when the data owner publishes a data transaction, all data access and transaction operations are recorded through the blockchain, and the non-tamperable feature of the blockchain is used to realize the complete traceability of access behaviors.
[0129] Specifically, after the step S40, it further includes:
[0130] S80. When the data owner publishes a data transaction, input the user public key , the timestamp of the current transaction and the hash address of the target data transaction in the InterPlanetary File System to create a data transaction , and after verifying the legality of the data transaction write the data transaction into the blockchain.
[0131] Further and optionally, the data transaction includes a data storage transaction and a data access transaction, and the verification of the data transaction includes data storage transaction verification and data access transaction verification;
[0132] Among them, the data storage transaction verification S81 specifically includes:
[0133] S811, every time the data owner distributes a key fragment , a storage transaction will be created and published to the blockchain , where is the current transaction timestamp, is the key fragment and is the storage address of the key fragment in IPFS;
[0134] S812, the data owner uses the private key to sign the transaction , and then generates a corresponding anonymous certificate ; ;
[0135] S813, any user on the blockchain is allowed to use the public key and the anonymous certificate to verify the transaction ; if the verification proves to be passed, the current transaction is allowed to be written into the blockchain; otherwise, the transaction is ignored;
[0136] The data access transaction verification S82 specifically includes:
[0137] S821, the data user randomly selects , calculates the corresponding access public key , and securely saves the access private key ;
[0138] S822, the data owner randomly selects ]>, calculates the corresponding commitment value for the ciphertext data , and sets the ElGamal commitment value set ;
[0139] S823, the data owner creates a data access transaction , uses to sign , generates a corresponding anonymous certificate , and then publishes to the blockchain. ;
[0140] The fifth embodiment
[0141] Based on any of the above embodiments, in this embodiment, after the access control is completed, during the process of the DU accessing the DO by the data, the blockchain verifies the commitment of the access request in the transaction at preset intervals to ensure the legality during the access request process.
[0142] Specifically, the commitment verification S90 specifically includes:
[0143] S91, at intervals of the preset period, the data user sends an access request for the ciphertext to the blockchain ;
[0144] In the formula, represents the information tag, represents the anonymous certificate, represents the commitment value;
[0145] S92, the blockchain parses the elements in the commitment value in the access request and calculates to obtain and sends to the data owner;
[0146] In the formula, is the access public key
[0147] S93, after the data owner receives , verifies whether the following formula holds:
[0148]
[0149] If it holds, notifies the blockchain to store the hash value storage address of the ciphertext in the InterPlanetary File System and return it to the data user; otherwise, rejects the access and ends the protocol;
[0150] In the formula, is the private key .
[0151] Sixth Embodiment
[0152] Based on any of the above embodiments, this embodiment illustrates the access control system proposed in terms of data processing efficiency:
[0153] In this embodiment, the time consumption of running the single - time initialization, key generation, encryption and decryption, signature, and transaction verification algorithms of the proposed solution is shown in Table 1 below:
[0154] Table 1. Time Overhead of Main Algorithms (ms)
[0155]
[0156] In the key generation phase, since this solution encrypts the AES key fragments based on CP-ABE, in addition to generating the public and private keys required for signature and signature verification, it is also necessary to generate the corresponding user attribute private keys, thus incurring additional computational overhead. However, this solution not only ensures the security of the key fragments but also achieves fine-grained and flexible access control, and it demonstrates relatively prominent performance advantages in aspects such as encryption, decryption, and transaction verification.
[0157] In addition, this application also analyzed the time overhead of DU, DO, and establishing the ElGamal commitment value when verifying a single transaction. The experimental results are shown in Table 2 below:
[0158] Table 2. Time overhead for commitment establishment (ms)
[0159]
[0160] In addition, for the cases of security |p| = 256 bits and |p| = 512 bits, the number of users was gradually increased, the time overhead of secret distribution and secret reconstruction was tested, and the change of the key distributed management time with the number of users under different security bit lengths was compared. The time consumption of secret distribution is as Figure 2 shown, and the time consumption of secret reconstruction is as Figure 3 shown.
[0161] It is easy to know that when the number of users is 50, in the case of |p| = 256 bits, the key distribution management time is about 17 ms; while in the case of |p| = 512 bits, it is about 48 ms, which is about 2.8 times more than the former. It can be seen that when the security bit length is increased, the time overhead of the key distributed management of the proposed solution is acceptable when the number of users is large.
[0162] As an implementation solution, Figure 4 is the architecture schematic diagram of the hardware operating environment of the access control system involved in the solution of this application embodiment.
[0163] As Figure 4As shown in the figure, the access control system may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to implement the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). The user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally also be a storage device independent of the aforementioned processor 1001.
[0164] Those skilled in the art can understand that Figure 1 the access control system architecture shown in the figure does not constitute a limitation on the access control system, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0165] As Figure 4 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and an access control program. Among them, the operating system is a program that manages and controls the hardware and software resources of the access control system, and runs the access control program and other software or programs.
[0166] In Figure 4 the access control system shown in the figure, the user interface 1003 is mainly used to connect to a terminal and perform data communication with the terminal; the network interface 1004 is mainly used to connect to a background server and perform data communication with the background server; the processor 1001 may be used to call the access control program stored in the memory 1005.
[0167] In this embodiment, the access control system includes: a memory 1005, a processor 1001, and an access control program stored on the memory and executable on the processor, where:
[0168] When the processor 1001 calls the access control program stored in the memory 1005, it performs the following operations:
[0169] S10, when receiving a fragmented access request sent by a data user to a data owner, the data owner determines whether the Groth signature and the user identity in the fragmented access request are legal;
[0170] S20. If it is legal, the data owner calls the key fragment storage location from the blockchain, obtains the key fragment associated with the key fragment storage location from the InterPlanetary File System, and sends the key fragment to the data user;
[0171] S30. The data user uses the Lagrange interpolation method to reconstruct the key fragment into a symmetric key ciphertext, and submits a data decryption request including the symmetric key ciphertext and the user identity to the blockchain;
[0172] S40. When the blockchain verifies that the symmetric key ciphertext meets the preset access policy, the blockchain sends the key plaintext corresponding to the symmetric key ciphertext to the data user.
[0173] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0174] S50. When receiving a user registration instruction sent by a registration requester, perform registration according to the following steps:
[0175] S51. The registration requester generates a public-private key pair , ;
[0176] S52. The registration requester sends an identity binding request to the authorization center , and the authorization center checks whether the public key exists;
[0177] S53. If it exists, the authorization center sends a random number to the registration requester , and the registration requester randomly selects , calculates , , , , obtains , and takes as a signature and returns it to the authorization center;
[0178] S54. The authorization center verifies using the following formula to verify whether holds:
[0179]
[0180] S55. If it holds, the authorization center randomly selects , calculates , , , , , outputs the Groth signature and sends it to the user:
[0181]
[0182] S56. The registration requester verifies the Groth signature through the following formula: for authenticity:
[0183]
[0184] In the formula, , , and represent four pairs of bilinear lines. Taking as an example, the generator is bilinearly mapped into a multiplicative cyclic group. , , and all represent multiplying two pairs of bilinear lines. is the generator of the multiplicative cyclic group , is the generator of the multiplicative cyclic group . pk is the public key. is the initialized public key. , represent embedding the attribute value into the Groth signature. e is the symbol representation of the mapping.
[0185] S57. After successful verification, the registration requester generates a user qualification certificate and sends it to the authorization center, so that the authorization center takes the registration requester with the user qualification certificate as the data user.
[0186] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0187] S60. In the data encryption stage, the registration data provided by the registration requester is encrypted symmetrically by AES to generate a data ciphertext , and the encryption key of the AES symmetric encryption is encrypted by using an attribute-based encryption algorithm to obtain a key ciphertext ;
[0188] S70. After randomly splitting the key ciphertext into key fragments, together with the data ciphertext They are stored in the InterPlanetary File System together, and the storage location of the key fragments is marked with a hash value to obtain a hash storage address. The hash storage address is stored on the blockchain, so that the hash storage address can be called from the blockchain to obtain the storage location of the key fragments during access control, and the key fragments associated with the storage location can be obtained from the InterPlanetary File System.
[0189] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0190] S61, assuming the registration data includes the user identity and user attributes , the authorization center randomly selects , calculates , , , , and sets the user attribute private key as , and after sorting out, we get:
[0191]
[0192] The authorization center sends the attribute private key SK to the data user
[0193] S62, after the data owner identifies different data plaintexts M with Mid, uses the AES symmetric key to encrypt the data plaintext M to obtain the data ciphertext ;
[0194] S63, the data owner sets the access policy W and encrypts the AES symmetric key based on the access structure to obtain the key ciphertext .
[0195] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0196] S80, when the data owner publishes a data transaction, inputs the user public key , the timestamp of the current transaction and the hash address of the target data transaction in the InterPlanetary File System , creates a data transaction , and after verifying the legality of the data transaction , writes the data transaction to the blockchain
[0197] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0198] S811, each time the data owner distributes a key fragment , a storage transaction will be created and published to the blockchain ,in, is the current transaction timestamp, Key fragment The storage address in IPFS;
[0199] S812, the data owner uses the private key For transactions Sign , and then generate the corresponding anonymous certificate ;
[0200] S813, allows any user on the blockchain to use a public key and anonymous certificates For transactions Verify; if the verification is successful, the transaction is allowed to be written into the blockchain; otherwise, the transaction is ignored;
[0201] When the processor 1001 calls the access control program stored in the memory 1005, it performs the following operations:
[0202] S821, random selection of data users , calculate the corresponding access public key , safely save access private key ;
[0203] S822, data owner randomly selected , is the ciphertext data Calculate the corresponding commitment value , and set the ElGamal commitment value set ;
[0204] S823, data owner creates data access transaction ,use right sign , generate the corresponding anonymous certificate , and then Publish to the blockchain.
[0205] When the processor 1001 calls the access control program stored in the memory 1005, it performs the following operations:
[0206] S90: During the data user’s data access process, the blockchain performs commitment verification on the access request in the transaction at preset intervals to ensure the legitimacy of the access request.
[0207] When the processor 1001 calls the access control program stored in the memory 1005, the following operations are performed:
[0208] S91, the data user sends an access request for the ciphertext to the blockchain at intervals of the preset period ; ;
[0209] Wherein, represents an information tag, represents an anonymous certificate, represents a commitment value;
[0210] S92, the blockchain parses the elements in the commitment value in the access request and , calculates , and sends to the data owner;
[0211] Wherein, is the access public key;
[0212] S93, after the data owner receives , verifies whether the following formula holds:
[0213]
[0214] If it holds, notifies the blockchain to store the hash value storage address of the ciphertext in the InterPlanetary File System and return it to the data user; otherwise, rejects the access and the protocol ends; ;
[0215] Wherein, is the private key .
[0216] In addition, those of ordinary skill in the art can understand that all or part of the processes in the methods of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the access control system to implement the process steps of the above method embodiments.
[0217] Therefore, the present application also provides a computer-readable storage medium, the computer-readable storage medium stores an access control program, and when the access control program is executed by a processor, it implements each step of the access control method as described in the above embodiments.
[0218] Among them, the computer-readable storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are all computer-readable storage media that can store program codes.
[0219] It should be noted that since the storage medium provided in the embodiments of the present application is the storage medium used to implement the methods in the embodiments of the present application, those skilled in the art can understand the specific structure and variations of the storage medium based on the methods introduced in the embodiments of the present application, so it will not be elaborated here. Any storage medium used in the methods of the embodiments of the present application falls within the scope of protection of the present application.
[0220] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.
[0221] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0222] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0223] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide means for implementing the functions in the processFigure 1 One process or multiple processes and / or blocks Figure 1 Steps of functions specified in one block or multiple blocks.
[0224] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0225] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and variations.
Claims
1. An access control method, characterized in that, An access control system applied to include a data user, a data owner, a blockchain, and an InterPlanetary File System. The method includes the following steps: S10. When receiving a fragment access request sent by the data user to the data owner, the data owner determines whether the Groth signature and the user identity in the fragment access request are legal; S20. If legal, the data owner calls the key fragment storage location from the blockchain, obtains the key fragment associated with the key fragment storage location from the InterPlanetary File System, and sends the key fragment to the data user; S30. The data user uses Lagrange interpolation to reconstruct the key fragment into a symmetric key ciphertext, and submits a data decryption request including the symmetric key ciphertext and the user identity to the blockchain; S40. When the blockchain verifies that the symmetric key ciphertext meets the preset access policy, the blockchain sends the key plaintext corresponding to the symmetric key ciphertext to the data user.
2. The method according to claim 1, wherein Before S10, it further includes: S50. When receiving a user registration instruction sent by a registration requester, perform registration according to the following steps: S51, the registration requester generates a public-private key pair , ; S52, the registration requester sends an identity binding request to the authorization center , and the authorization center checks the public key to see if it exists; S53, if it exists, the authorization center sends a random number to the registration requester , and the registration requester randomly selects , calculates , , , , and obtains , and takes as the signature and returns it to the authorization center; S54, the authorization center verifies using the following formula to verify Whether it holds: ; S55. If it holds, the authorization center randomly selects , calculates , , , , , outputs the Groth signature and sends it to the user: ; S56, the registration requester verifies the authenticity of the Groth signature through the following formula as follows: ; where \(e\) is the symbolic representation of the mapping, , , and represent four pairs of lines, indicating that the generators , , , are bilinearly mapped into a multiplicative cyclic group, , , and both represent performing a multiplication operation between two pairs of lines, is the generator of the multiplicative cyclic group , is the generator of the multiplicative cyclic group , \(pk\) is the public key, is the initialized public key, , represent embedding the attribute value into the Groth signature, that is, completing the embedding of the attribute value through exponentiation of the generator and the attribute value ; After successful verification in S57, the registration requester generates a user qualification certificate and sends it to the authorization center, so that the authorization center can regard the registration requester with the user qualification certificate as the data user.
3. The method according to claim 1 or 2, characterized in that, Before S40, it further includes the following steps: S60, in the data encryption stage, perform AES symmetric encryption on the registration data provided by the registration requester to generate a data ciphertext , and encrypt the encryption key of the AES symmetric encryption using an attribute-based encryption algorithm to obtain a key ciphertext ; S70, the ciphertext of the key After randomly splitting it to generate key fragments, together with the ciphertext of the data They are stored in the InterPlanetary File System, and the storage location of the key fragments is marked by a hash value to obtain a hash storage address. The hash storage address is stored on the blockchain so that the storage location of the key fragments can be obtained by calling the hash storage address from the blockchain during access control, and the key fragments associated with the storage location can be obtained from the InterPlanetary File System.
4. The method according to claim 3, characterized in that, The step S60 specifically includes: S61, assume the registration data includes user identity and user attributes , the authorization center randomly selects , calculates , , , , let the user attribute private key be , and after sorting out, we get: ; The authorization center sends the attribute private key SK to the data user S62, after the data owner identifies different data plaintexts M with Mid, use the AES symmetric key to encrypt the data plaintext M to obtain the data ciphertext ; S63. The data owner sets an access policy W and encrypts the AES symmetric key based on the access structure , obtaining the ciphertext of the key .
5. The method according to claim 1, characterized in that After the step S40, it further includes: S80, when the data owner publishes a data transaction, the user's public key is input , the timestamp of the current transaction and the hash address of the target data transaction in the InterPlanetary File System to create a data transaction , and after verifying the legitimacy of the data transaction , the data transaction is written into the blockchain.
6. The method according to claim 5, wherein The data transaction includes a data storage transaction and a data access transaction. The verification of the data transaction includes data storage transaction verification and data access transaction verification; Among them, the data storage transaction verification S81 specifically includes: S811, every time the data owner distributes a key fragment , a storage transaction will be created and published to the blockchain , where is the current transaction timestamp, is the key fragment and is the storage address in IPFS; S812, the data owner uses the private key to sign the transaction , and then generates the corresponding anonymous certificate ; S813, allowing any user on the blockchain to use the publicly available public key and an anonymous certificate to verify a transaction ; if the proof verification passes, allow this transaction to be written to the blockchain; otherwise, ignore the transaction; The data access transaction verification S82 specifically includes: S821, the data user randomly selects , calculates the corresponding access public key , and securely stores the access private key ; S822, the data owner randomly selects , as the ciphertext data to calculate the corresponding commitment value , and sets the ElGamal commitment value set ; S823, the data owner creates a data access transaction , uses to sign , generates a corresponding anonymous certificate , and then publishes it to the blockchain.
7. The method according to claim 1, wherein After S40, it further includes: S90. During the data access process of the data user, the blockchain periodically verifies the access requests in the transaction at preset intervals to ensure the legality of the access requests.
8. The method according to claim 7, wherein The S90 specifically includes: S91, the data user sends an access request for the ciphertext to the blockchain at intervals of the preset period ; ; In the formula, represents an information label, represents an anonymous certificate, represents a commitment value; S92, the blockchain analyzes the commitment value in the access request of the elements in and , calculates to obtain , and sends to the data owner; In the formula, is the access public key; S93, after the data owner receives , verify whether the following formula holds: ; If it is established, notify the blockchain of the ciphertext Store the hash value storage address in the InterPlanetary File System Return it to the data user; otherwise, deny access and end the protocol; Wherein, is the private key .
9. An access control system, characterized in that, Includes: A memory, a processor, and an access control program stored on the memory and executable on the processor. When the access control program is executed by the processor, it implements the steps of the access control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, An access control program is stored on the computer-readable storage medium. When the access control program is executed by the processor, it implements the steps of the access control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
key information protection method and system based on an OpenID
CN109829333A
Internet of Things ciphertext access control method based on block chain
CN117081803A