Block chain-based identity authentication privacy protection mechanism research system and method
By adopting blockchain technology in identity authentication, a decentralized identity authentication system is built, and the problems of single point failure, privacy leakage and inquiry efficiency in traditional identity authentication are solved, and efficient and secure identity authentication and privacy protection are achieved. .
Patent Information
- Application Number
- CN202411447253.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-18
AI Technical Summary
The traditional identity authentication mechanism has single point of failure, data tampering and privacy leakage caused by centralized structure, and user authentication is complex and query efficiency is low, making it difficult to achieve fine-grained access control and user tracking.
The blockchain-based identity authentication privacy protection mechanism is adopted, and decentralized identity authentication and privacy protection is achieved through digital identity management modules, identity agencies, user authentication modules, application service modules, blockchain and interstellar file systems.
It solves the problems of single point of failure, data tampering and privacy leakage, improves the speed and efficiency of identity verification, realizes fine-grained access control and user tracking, and enhances data privacy protection capabilities.
Smart Images

Figure CN119475413A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic information technology, and in particular to a system and method for studying an identity authentication privacy protection mechanism based on blockchain. Background Art
[0002] Identity authentication technology is the first door of the security system and the cornerstone of network security. With the development of Internet applications and infrastructure, a large part of people's lives will interact with services on the Internet. The demand for identity authentication management is growing and is also a current research hotspot. However, the centralized structure of the traditional public key infrastructure (PKI) can no longer guarantee the security of the growing user identity information data, and there is a problem of privacy leakage of user identity information.
[0003] The existing identity authentication privacy protection mechanism currently has security and privacy issues in terms of personal information protection, and is prone to malicious attacks that may cause privacy leaks. The traditional identity authentication mechanism uses a centralized method to store user identity information for query and verification, which is prone to data tampering and single-point failure security issues. It is extremely vulnerable to attacks or system crashes, resulting in data tampering or loss. In the identity authentication process, how to protect user privacy and achieve fine-grained access control while verifying user identity is an urgent problem to be solved. At the same time, there are malicious users who leak keys and cause malicious attacks on the system, resulting in user identity information leakage. It is necessary to track users and revoke malicious user access rights in a timely manner. The user authentication in the traditional identity authentication mechanism is complex, and querying user information requires traversing the blockchain. When the number of users is large, it will lead to inefficiency and increase system overhead. It is easy to encounter storage bottlenecks and poor scalability. Summary of the invention
[0004] In order to make up for the above shortcomings, the present invention provides a research system and method for identity authentication and privacy protection mechanism based on blockchain, aiming to improve the problems of centralization and single point failure, complex access control and user tracking and authentication, and low query efficiency.
[0005] In the first aspect, the present invention provides the following technical solutions: a blockchain-based identity authentication privacy protection mechanism research system, comprising: a digital identity management module, an identity agency, a user authentication module, an application service module, a blockchain and an interplanetary file system;
[0006] The digital identity management module is responsible for deploying smart contracts on the blockchain, defining and publishing public parameters such as the system attribute set N, and providing services when users access;
[0007] The identity agency is responsible for obtaining encrypted data on the blockchain through the D ID registered by the user;
[0008] The user authentication module is used for identity information providers who have authentication requests for application services;
[0009] The application service module is used for a collection of various application service providers;
[0010] The blockchain is used to store data related to identity authentication and privacy protection;
[0011] The InterPlanetary File System is used to store encrypted identity proof materials for users and then return address information to the users.
[0012] The digital identity management module includes a smart contract deployment and management unit, a public parameter definition and publication unit, a user qualification review and DID registration unit, and an authorization token and credential management unit. The smart contract deployment and management unit is responsible for deploying smart contracts on the blockchain and maintaining system contract call information. The public parameter definition and publication unit is used to define and publish public parameters such as system attribute sets. The user qualification review and DID registration unit is used to conduct user qualification review and register DID, maintain user D ID and blockchain account information, and the authorization token and credential management unit is used to manage authorization tokens and credentials issued by application services.
[0013] The identity agency includes an encrypted data acquisition and processing unit and an authorization token issuance unit. The encrypted data acquisition and processing unit is used to obtain encrypted data on the blockchain through the user D ID and perform decryption and verification operations. The authorization token issuance unit is used to issue an authorization token to the user.
[0014] The user authentication module includes an account registration and public key generation unit, a proof material encryption storage and policy formulation unit and an information upload unit. The account registration and public key generation unit is used to autonomously register an account and generate a public key, and use the public key hash value as the authentication D ID. The proof material encryption storage and policy formulation unit is used to use attribute-based encryption technology to store proof materials and formulate access policies. The information upload unit is used to upload relevant information to the blockchain.
[0015] The application service module includes a service providing unit and a blockchain account joining unit. The service providing unit is used for a collection of various application service providers, and the blockchain account joining unit is used to join the interplanetary file system through a blockchain account.
[0016] The blockchain includes a data storage and maintenance unit, which is used to be jointly maintained by various entities, store relevant data and ensure that it cannot be changed, and maintain a D ID management table and a blockchain account address table.
[0017] The interplanetary file system includes an address return unit, which is used to identify the return address information of the certification material in IPFS to the user.
[0018] In a second aspect, the present invention provides the following technical solution, a method for studying an identity authentication privacy protection mechanism based on blockchain, the method comprising the following steps:
[0019] Step 1, system initialization phase:
[0020] In this stage, blockchain accounts are allocated to application service providers and identity agencies participating in the system, and the blockchain account address list and DID management list are maintained on the blockchain for mapping. After completing the system initialization, the blockchain account addresses of all application service providers and identity agencies are recorded in the account address list, which will be continuously updated as users join. The digital identity management module generates an empty malicious list Mu l, selects a probabilistic encryption scheme and a symmetric key X for the scheme, and selects an elliptic curve E defined on a finite field Fρ, on which a base point G is selected. The curve needs to satisfy the following formula:
[0021] y 2 =x 3 +ax+b(modρ),4a 3 +27b 2 ≠0
[0022] Where ρ is a prime number greater than 3, a, b∈F ρ , the digital identity management module generates a cyclic group G on E, discloses a generator t (a primitive root under the module ρ, used for the subsequent zero-knowledge proof), and selects a random number w to obtain:
[0023] P w =w·G
[0024] If each attribute in the system attribute set I is numbered in sequence, then for all i∈I, k are randomly selected i ∈Z p and k i ∈Z p Respectively represent the positive and negative values, and use k i Indicates k i and k i ', through point operation with G we get:
[0025] K i =k i ·G|i∈I
[0026] Select two collision-resistant hash functions: H1:G→{0,1}*, H2:Z p →Z p , get the system public key and publish it:
[0027] SP = {ρ, G, P w , K i |i∈I,H1,H2}
[0028] Save the system master key:
[0029] MK={w,k i ,|i∈I};
[0030] Step 2: DID registration stage:
[0031] Due to the nature of identity agencies and application service providers, they have inherent trust in the registration stage. Simply submitting their blockchain account addresses to the DID registration smart contract will allow identity agencies and application service providers to register and generate their own decentralized identifiers and store their corresponding DDOs in the DID management list on the blockchain;
[0032] The jth user DID registration process is as follows: The platform generates a random number d j As the private key, get the public key PK j =d j G, sends the public key to the user, and the user generates a random number r j , and get R j =r j G and S j =r j ·PK j , the user will R j Sent to the platform, the platform calculates and obtains the shared key S with user j j :
[0033] S j =r j ·PK j =r j ·(d j ·G)=d j ·(r j ·G)=d j ·R j;
[0034] The user applies for a blockchain account through a contract, and the blockchain returns the user's account private key U j , and ADD the account address j Saved in the blockchain account address list, the user obtains the blockchain account address ADD through the SHA256 algorithm j =H(U j ), and use the shared key S j Encryption generates Enc j
[0035] (S j ,ADD j) Sent to the platform, the platform uses the shared key S j Decrypted to get ADD j And verify whether it exists in the blockchain account address table. If it exists, the platform calls the registered user DID contract, takes the hash of the public key PKj through the SHA256 algorithm to obtain the user's identity UDID, and stores the corresponding DDO in the DID management list. The formula is as follows:
[0036] UDID = H(R) = H(r·G);
[0037] Step 3, data encryption stage:
[0038] The platform encrypts the user DID through a probabilistic encryption scheme to obtain g = EncX (UDID). For each attribute i in the system attribute set I, if i belongs to the user attribute set S, the user takes a positive value k i Otherwise, it takes a negative value k i ', thus calculating the three parameters of the user attribute private key U1=(∑k i |i∈I)-g, U2=w+tH2(g), U3=H2(g), get the user's attribute private key SK and send it to the user through the shared key:
[0039] SK=(U1,U2,U3)=((∑k i |i∈I)-g, w+gH2(g), H2(g));
[0040] At the same time, the user generates a symmetric key k for the AES algorithm and uses k to encrypt the plaintext F of the identity information to obtain the data ciphertext E k (F), the user ciphers the data E k (F) Store the address information hash value hashL returned by IPFS on IPFS, and store hashL on the blockchain account address corresponding to the user's UDID through a smart contract. The user defines the access policy according to the data security requirements and converts it into an OBDD access structure. Only when the user attribute set S satisfies the OBDD access structure can the data decryption operation be performed. The number of valid paths in the OBDD access structure is V, which can be used by R n Indicates, where n∈[0,V-1], the user selects a random number s and calculates C m =sG,C j =s(∑k i G|i∈R n ),n∈[0,V-1], and finally get the data ciphertext: CT k = {OBDD, Ck , C m , C n |n∈[0,V-1]} The user ciphertexts the data CT k Upload and store the off-chain storage address hashL to the blockchain through a smart contract;
[0041] Step 4, data decryption phase:
[0042] The identity agency first confirms whether the user's UDID is in the malicious user list Mu l. If so, the algorithm is terminated. Otherwise, the encrypted data E on the chain is obtained according to the user's blockchain account address corresponding to the UD ID. k (hashL) and data ciphertext CT k , when the attribute set of the identity agency satisfies a path R in the user-defined OBDD access structure j , which can be combined with the user attribute key SK and the data ciphertext CT k Calculate sp w , the formula is as follows:
[0043] sP w =swG=U1U3C m +U2C m -U3C n
[0044] Then, through the value of Ck in the data ciphertext, calculate the following formula to get k:
[0045] k=C k ⊕H1(sP w )
[0046] After the identity agency obtains the symmetric key k, it obtains the data ciphertext E on IPFS through hashL k (F), decrypt E using the symmetric key k k (F) obtaining data plaintext F, i.e., the user's identity certification information for verification;
[0047] Step 5: User tracking stage:
[0048] First, perform integrity check on the malicious user's attribute private key SK to confirm whether SK is valid. The formula is:
[0049] H2((U2-w) / U3)=H2(g)=U3
[0050] If the calculation results are not the same, it proves that the malicious user's private key information verification has failed, and the algorithm is exited. If the results are the same, the decryption phase can be entered to obtain the malicious user's UDID for tracking, and the user's UDID is put into the malicious user list Mu l, and the user is denied access to the platform for authentication and authorization. The formula for decrypting the UDID is:
[0051] UD ID=DecX((U2-w) / U3)=DecX(g);
[0052] Step 6: Issuing tokens and credentials:
[0053] The identity agency verifies the user's identity documents and issues authorization tokens with different access rights based on the user's attributes. The formula is as follows:
[0054] Token user ={ADID,UDID,AR,T,TS,Sig}.
[0055] In the third aspect, the invention provides the following technical solution: a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned electrochemical and biochar-based low-carbon and zero-emission wastewater treatment method when executing the computer program.
[0056] In a fourth aspect, the present invention provides the following technical solution: a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned electrochemical and biochar-based low-carbon and zero-emission wastewater treatment method is implemented.
[0057] The present invention has the following beneficial effects:
[0058] 1. In the present invention, access control and privacy protection of user identity information data are realized in the identity authentication process by using blockchain, distributed digital identity, CP-ABE and smart contract technology. Because both blockchain and IPFS have distributed characteristics, when some nodes fail, it will not affect the entire solution, thereby solving the single point failure problem.
[0059] 2. In the present invention, a decentralized identity (DID) is introduced and a verifiable index structure based on blockchain is designed. First, the scheme can improve the speed and efficiency of identity authentication and reduce the redundancy and time delay associated with identity authentication. Secondly, it can effectively protect user privacy and prevent the leakage and abuse of identity information. Most importantly, users only need one-click self-authorization to submit application credentials, making user authentication more concise and efficient, and solving the balance problem between security and efficiency in the identity authentication system.
[0060] 3. In the present invention, identity information is encrypted and decrypted and stored on the chain through traceable attribute-based encryption technology and zero-knowledge proof. Only verifiers who meet the access policy can decrypt and verify the user's identity information. At the same time, the tracking of malicious user DID is realized, making the present invention more effective in protecting data privacy and more capable of resisting attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a system model diagram of the blockchain-based identity authentication and privacy protection mechanism research system proposed by the present invention;
[0062] Figure 2 A Merkle tree diagram of the blockchain-based identity authentication privacy protection mechanism research system proposed by the present invention;
[0063] Figure 3 This is a graph showing the time taken to upload encrypted information for the first registration proposed by the present invention and the time taken to apply for application service credentials after passing the authentication and only requiring verification of the authorization token. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Embodiment 1
[0066] Reference Figure 1 ,In the first embodiment of the present invention, the present invention provides a research system for identity authentication and privacy protection mechanism based on blockchain, including: a digital identity management module, an identity agency, a user authentication module, an application service module, a blockchain and an interplanetary file system;
[0067] The digital identity management module is responsible for deploying smart contracts on the blockchain, defining and publishing public parameters such as the system attribute set N, and providing services when users access it;
[0068] The identity agency is responsible for obtaining encrypted data on the blockchain through the DID registered by the user;
[0069] The user authentication module is used by the identity information provider to make authentication requests to the application service;
[0070] The application service module is used for the collection of various application service providers;
[0071] Blockchain is used to store data related to identity authentication and privacy protection;
[0072] The InterPlanetary File System is used to store encrypted identity materials for users and then return address information to the users.
[0073] The digital identity management module includes a smart contract deployment and management unit, a public parameter definition and publication unit, a user qualification review and DID registration unit, and an authorization token and credential management unit. The smart contract deployment and management unit is responsible for deploying smart contracts on the blockchain and maintaining system contract call information. The public parameter definition and publication unit is used to define and publish public parameters such as system property sets. The user qualification review and DID registration unit is used to conduct user qualification review and register DID, maintain user DID and blockchain account information, and the authorization token and credential management unit is used to manage authorization tokens and credentials issued by application services.
[0074] The identity agency includes an encrypted data acquisition and processing unit and an authorization token issuance unit. The encrypted data acquisition and processing unit is used to obtain encrypted data on the blockchain through the user's D ID, and perform decryption and verification operations. The authorization token issuance unit is used to issue authorization tokens to users.
[0075] The user authentication module includes an account registration and public key generation unit, a proof material encryption storage and policy formulation unit, and an information upload unit. The account registration and public key generation unit is used to autonomously register an account and generate a public key, and use the public key hash value as the authentication DID. The proof material encryption storage and policy formulation unit is used to use attribute-based encryption technology to store proof materials and formulate access policies. The information upload unit is used to upload relevant information to the blockchain.
[0076] The application service module includes a service providing unit and a blockchain account joining unit. The service providing unit is used for the collection of various application service providers, and the blockchain account joining unit is used to join the interplanetary file system through a blockchain account.
[0077] The blockchain includes a data storage and maintenance unit, which is used to be jointly maintained by various entities to store relevant data and ensure that it cannot be changed, and maintain the D ID management table and blockchain account address table.
[0078] The InterPlanetary File System includes an address return unit, which is used to identify the return address information of the proof material in IPFS to the user.
[0079] Embodiment 2:
[0080] Reference Figure 1 In a second embodiment of the present invention, a method for studying an identity authentication privacy protection mechanism based on blockchain is provided, and the method comprises the following steps:
[0081] Step 1, system initialization phase:
[0082] In this stage, blockchain accounts are allocated to application service providers and identity agencies participating in the system, and the blockchain account address list and DID management list are maintained on the blockchain for mapping. After completing the system initialization, the blockchain account addresses of all application service providers and identity agencies are recorded in the account address list, which will be continuously updated as users join. The digital identity management module generates an empty malicious list Mul, selects a probabilistic encryption scheme and a symmetric key X for the scheme, and selects an elliptic curve E defined on a finite field Fρ, on which a base point G is selected. The curve needs to satisfy the following formula:
[0083] y 2 =x 3 +ax+b(modρ),4a 3 +27b 2 ≠0
[0084] Where ρ is a prime number greater than 3, a, b∈F ρ , the digital identity management module generates a cyclic group G on E, discloses a generator t (a primitive root under the module ρ, used for the subsequent zero-knowledge proof), and selects a random number w to obtain:
[0085] P w =w·G
[0086] If each attribute in the system attribute set I is numbered in sequence, then for all i∈I, k are randomly selected i ∈Z p and k i ∈Z p Respectively represent the positive and negative values, and use k i Indicates k i and k i ', through point operation with G we get:
[0087] K i =k i ·G|i∈I
[0088] Select two collision-resistant hash functions: H1:G→{0,1}*, H2:Z p →Z p , get the system public key and publish it:
[0089] SP = {ρ, G, P w , K i |i∈I,H1,H2}
[0090] Save the system master key:
[0091] MK={w,k i ,|i∈I};
[0092] Step 2: DID registration stage:
[0093] Due to the nature of identity agencies and application service providers, they have inherent trust in the registration stage. Simply submitting their blockchain account addresses to the DID registration smart contract will allow identity agencies and application service providers to register and generate their own decentralized identifiers and store their corresponding DDOs in the DID management list on the blockchain;
[0094] The jth user DID registration process is as follows: The platform generates a random number d j As the private key, get the public key PK j =d j G, sends the public key to the user, and the user generates a random number r j , and get R j =r j G and S j =r j ·PK j , the user will R j Sent to the platform, the platform calculates and obtains the shared key S with user j j :
[0095] S j =r j ·PK j =r j ·(d j ·G)=d j ·(r j ·G)=d j ·R j;
[0096] The user applies for a blockchain account through a contract, and the blockchain returns the user's account private key U j , and ADD the account address j Saved in the blockchain account address list, the user obtains the blockchain account address ADD through the SHA256 algorithm j =H(U j ), and use the shared key S j Encryption generates Enc j
[0097] (S j ,ADD j) Sent to the platform, the platform uses the shared key S j Decrypted to get ADD jAnd verify whether it exists in the blockchain account address table. If it exists, the platform calls the registered user DID contract, takes the hash of the public key PKj through the SHA256 algorithm to obtain the user's identity UDID, and stores the corresponding DDO in the DID management list. The formula is as follows:
[0098] UDID = H(R) = H(r·G);
[0099] Step 3, data encryption stage:
[0100] The platform encrypts the user DID through a probabilistic encryption scheme to obtain g = EncX (UDID). For each attribute i in the system attribute set I, if i belongs to the user attribute set S, the user takes a positive value k i Otherwise, it takes a negative value k i ', thus calculating the three parameters of the user attribute private key U1=(∑k i |i∈I)-g, U2=w+tH2(g), U3=H2(g), get the user's attribute private key SK and send it to the user through the shared key:
[0101] SK=(U1,U2,U3)=((∑k i |i∈I)-g, w+gH2(g), H2(g));
[0102] At the same time, the user generates a symmetric key k for the AES algorithm and uses k to encrypt the plaintext F of the identity information to obtain the data ciphertext E k (F), the user ciphers the data E k (F) Store the address information hash value hashL returned by IPFS on IPFS, and store hashL on the blockchain account address corresponding to the user's UDID through a smart contract. The user defines the access policy according to the data security requirements and converts it into an OBDD access structure. Only when the user attribute set S satisfies the OBDD access structure can the data decryption operation be performed. The number of valid paths in the OBDD access structure is V, which can be used by R n Indicates, where n∈[0,V-1], the user selects a random number s and calculates C m =sG,C j =s(∑k i G|i∈R n ),n∈[0,V-1], and finally get the data ciphertext: CT k = {OBDD, C k , C m , C n |n∈[0,V-1]} The user ciphertexts the data CT kUpload and store the off-chain storage address hashL to the blockchain through a smart contract;
[0103] Step 4, data decryption phase:
[0104] The identity agency first confirms whether the user's UDID is in the malicious user list Mul. If so, the algorithm is terminated. Otherwise, the encrypted data E on the chain is obtained according to the user's blockchain account address corresponding to the UDID. k (hashL) and data ciphertext CT k , when the attribute set of the identity agency satisfies a path R in the user-defined OBDD access structure j , which can be combined with the user attribute key SK and the data ciphertext CT k Calculate sp w , the formula is as follows:
[0105] sP w =swG=U1U3C m +U2C m -U3C n
[0106] Then, through the value of Ck in the data ciphertext, calculate the following formula to get k:
[0107]
[0108] After the identity agency obtains the symmetric key k, it obtains the data ciphertext E on IPFS through hashL k (F), decrypt E using the symmetric key k k (F) obtaining data plaintext F, i.e., the user's identity certification information for verification;
[0109] Step 5: User tracking stage:
[0110] First, perform integrity check on the malicious user's attribute private key SK to confirm whether SK is valid. The formula is:
[0111] H2((U2-w) / U3)=H2(g)=U3
[0112] If the calculation results are not the same, it proves that the malicious user's private key information verification has failed, and the algorithm is exited. If the results are the same, the decryption phase can be entered to obtain the malicious user's UDID for tracking, and the user's UDID is put into the malicious user list Mul, and the user is denied access to the platform for authentication and authorization. The formula for decrypting the UDID is:
[0113] UDID=DecX((U2-w) / U3)=DecX(g);
[0114] Step 6: Issuing tokens and credentials:
[0115] The identity agency verifies the user's identity documents and issues authorization tokens with different access rights based on the user's attributes. The formula is as follows:
[0116] Token user ={ADID,UDID,AR,T,TS,Sig}.
[0117] ADID: Decentralized Identifier for Identity Agencies.
[0118] UDID: A decentralized identifier for an authorized user.
[0119] AR: Access rights for different application services. The value is the SDID of the application.
[0120] TT: Token validity period.
[0121] TS: Timestamp when the token was generated.
[0122] Sig: Signature of the identity agency
[0123] Embodiment 3
[0124] The third embodiment of the present invention is based on the same inventive concept. The present invention proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method for studying the identity authentication privacy protection mechanism based on blockchain in the above-mentioned embodiment.
[0125] Embodiment 4
[0126] The fourth embodiment of the present invention is based on the same inventive concept. The present invention proposes a terminal, which includes: a processor and a memory; the processor and the memory communicate with each other; the memory is used to store instructions; the processor is used to execute the instructions in the memory, and execute the research method of the identity authentication privacy protection mechanism based on blockchain in the above embodiment.
[0127] Embodiment 5
[0128] Some special applications require users to have a special attribute value to access. At the same time, in order to protect the privacy of this attribute, users can choose zero-knowledge proof to prove to the identity agency that they have this condition and apply for access rights. The specific operation is as follows:
[0129] The user has attribute A that matches an application i , take the hash and get a=H(A i ), generate a random number α, and the user calculates C = t αmodρ, C is sent to the identity agency, the identity agency selects a challenge value e and sends it to the user, the user calculates z = α + e · H (A i )mod(ρ-1), and then send z to the identity agency. After receiving z, the identity agency calculates t z modρ and C·(t a )emodρIf the corresponding value is true, then it is believed that the user has the attribute value required to access a special application, and the SD ID of the special application is added to the user's token AR for the user, so that the user has the authority to access the application.
[0130] Users only need to authorize online with one click through the authorization token to submit the application certificate. The application service provider verifies the token through the digital identity management module. If the parameter information contained in the token is verified, the blockchain certificate for obtaining the application service will be issued to the user. When the token or certificate expires, the user only needs to reapply to obtain a reissue from the certified agency. If the identity proof material changes, it is necessary to re-authenticate with the identity agency to obtain the authorization token.
[0131] Embodiment 6
[0132] In order to optimize the system's query time and system overhead and improve verification efficiency, we also designed a blockchain-based verifiable index structure for the system, introduced Boolean query and range query methods, and were able to verify the query results.
[0133] Building a verifiable Boolean query index
[0134] The identity agency obtains encrypted data from the blockchain through the user's DID and decrypts the identity information according to the access policy. In order to optimize the efficiency of Boolean queries, we build a Boolean query index related to each user's DID on the blockchain. The specific steps are as follows:
[0135] 1. Attribute set representation: For each user, define its attribute set S, and convert these attributes into a fixed-length bit string Hi through the hash function H (SHA256):
[0136] H i =H(A i )
[0137] Among them, A i Represents the i-th attribute in the user attribute set S.
[0138] 2. Build a Merkle tree: Figure 2 As shown, all user attributes are hashed to H1, H2, ..., H nAs a leaf node, the root hash Hroot is obtained by recursively calculating the hash values of nodes at each level of the tree. A node N has two child nodes on the left and right, N and L and N R , then the hash value H(N) of the parent node is:
[0139] H(N)=H(H(N L )||H(N R ))
[0140] 3. Boolean query: For Boolean query, for example, to query whether a user has a certain set of attributes S′, we can find the corresponding attribute hash value H j The path in the Merkle tree is used to verify whether the user meets the query conditions;
[0141] 4. Query Verification: When performing a Boolean query, the identity agency can quickly verify whether a user's attribute set meets the predetermined Boolean query condition by verifying the hash value in the Merkle tree path. The Boolean condition we query is whether the user has a certain attribute A. j , through the Merkle tree verification path P(A j ), we can verify that property A j Does it exist in the Merkle tree?
[0142] V bool =VerifyMerklePath(H root ,A j ,P(A j ))
[0143] VerifyMerklePath is a method used to verify the Merkle tree path. If the verification is successful, it returns True, otherwise it returns False.
[0144] Build a verifiable range query index:
[0145] In some cases, the identity agency may need to perform range queries on the user's identity data, so a blockchain-based range query index is built. The specific steps are as follows:
[0146] 1. Attribute value representation: We want to perform a range query on an attribute value, the range of which is [v min , v max ], we map the attribute value to a numerical interval [H(v min ), H1(v max )];
[0147] 2. Segmented storage: store the interval [H(v min), H1(v max )] is divided into several fixed-length intervals, each of which stores the corresponding user identity data. The intervals are divided into I1, I2, ..., I m , we store the user's attribute value hash in the corresponding interval, then build a Merkle tree in each interval and generate the root hash value H root (I i );
[0148] 3. Range query: When it is necessary to query whether a certain attribute value is within a certain range, the identity agency can directly search for data in the corresponding interval, which avoids the overhead of traversing the entire blockchain data;
[0149] 4. Query verification: The range to be queried is [v min , v max ] corresponds to the hash interval [H(v min ), H1(v max )], by verifying the Merkle tree path P(I k ), can verify the integrity of the query results, first find the interval I k The hash value H in v , and extract its path P(H v) Until the interval root node Hroot(I k ), by verifying whether the path can generate the interval root hash value Hroot(I k ) to verify whether the attribute value is within the query range:
[0150] V range =VerifyMerklePath(Hroot(I k ),H v ,P(H v )).
[0151] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0152] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. The research system of identity authentication and privacy protection mechanism based on blockchain is characterized by: include: Digital identity management module, identity agency, user authentication module, application service module, blockchain and interplanetary file system; The digital identity management module is responsible for deploying smart contracts on the blockchain, defining and publishing public parameters such as the system attribute set N, and providing services when users access; The identity agency is responsible for obtaining encrypted data on the blockchain through the DID registered by the user; The user authentication module is used for identity information providers who have authentication requests for application services; The application service module is used for a collection of various application service providers; The blockchain is used to store data related to identity authentication and privacy protection; The InterPlanetary File System is used to store encrypted identity proof materials for users and then return address information to the users.
2. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The digital identity management module includes a smart contract deployment and management unit, a public parameter definition and publication unit, a user qualification review and DID registration unit, and an authorization token and credential management unit. The smart contract deployment and management unit is responsible for deploying smart contracts on the blockchain and maintaining system contract call information. The public parameter definition and publication unit is used to define and publish public parameters such as system property sets. The user qualification review and DID registration unit is used to conduct user qualification review and register DID, maintain user DID and blockchain account information, and the authorization token and credential management unit is used to manage authorization tokens and credentials issued by application services.
3. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The identity agency includes an encrypted data acquisition and processing unit and an authorization token issuance unit. The encrypted data acquisition and processing unit is used to obtain encrypted data on the blockchain through the user DID and perform decryption and verification operations. The authorization token issuance unit is used to issue an authorization token to the user.
4. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The user authentication module includes an account registration and public key generation unit, a proof material encryption storage and policy formulation unit and an information upload unit. The account registration and public key generation unit is used to autonomously register an account and generate a public key, and use the public key hash value as the authentication DID. The proof material encryption storage and policy formulation unit is used to use attribute-based encryption technology to store proof materials and formulate access policies. The information upload unit is used to upload relevant information to the blockchain.
5. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The application service module includes a service providing unit and a blockchain account joining unit. The service providing unit is used for a collection of various application service providers, and the blockchain account joining unit is used to join the interplanetary file system through a blockchain account.
6. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The blockchain includes a data storage and maintenance unit, which is used to be jointly maintained by various entities, store relevant data and ensure that it cannot be changed, and maintain a DID management table and a blockchain account address table.
7. The blockchain-based identity authentication privacy protection mechanism research system according to claim 1 is characterized in that: The interplanetary file system includes an address return unit, which is used to identify the return address information of the certification material in IPFS to the user.
8. A research method for identity authentication privacy protection mechanism based on blockchain, characterized in that: The blockchain-based identity authentication privacy protection mechanism research system according to any one of claims 1 to 7 comprises the following steps: Step 1, system initialization phase: In this stage, blockchain accounts are allocated to application service providers and identity agencies participating in the system, and the blockchain account address list and DID management list are maintained on the blockchain for mapping. After completing the system initialization, the blockchain account addresses of all application service providers and identity agencies are recorded in the account address list, which will be continuously updated as users join. The digital identity management module generates an empty malicious list Mul, selects a probabilistic encryption scheme and a symmetric key X for the scheme, and selects an elliptic curve E defined on a finite field Fρ, on which a base point G is selected. The curve needs to satisfy the following formula: y 2 =x 3 +ax+b(modρ),4a 3 +27b 2 ≠0 Where ρ is a prime number greater than 3, a, b∈F ρ , the digital identity management module generates a cyclic group G on E, discloses a generator t (a primitive root under the module ρ, used for the subsequent zero-knowledge proof), and selects a random number w to obtain: P w =w·G If each attribute in the system attribute set I is numbered in sequence, then for all i∈I, k are randomly selected i ∈Z p and k i ∈Z p Respectively represent the positive and negative values, and use k i Indicates k i and k i ', through point operation with G we get: K i =k i ·G|i∈I Select two collision-resistant hash functions: H1:G→{0,1}*, H2:Z p →Z p , get the system public key and publish it: SP={ρ, G, P w ,K i |i∈I, H1, H2} Save the system master key: MK={w,k i ,|i∈I}; Step 2: DID registration stage: Due to the nature of identity agencies and application service providers, they have inherent trust in the registration stage. Simply submitting their blockchain account addresses to the DID registration smart contract will allow identity agencies and application service providers to register and generate their own decentralized identifiers and store their corresponding DDOs in the DID management list on the blockchain; The jth user DID registration process is as follows: The platform generates a random number d j As the private key, get the public key PK j =d j G, sends the public key to the user, and the user generates a random number r j , and get R j =r j G and S j =r j ·PK j , the user will R j Sent to the platform, the platform calculates and obtains the shared key S with user j j : S j =r j ·PK j =r j ·(d j ·G)=d j ·(r j ·G)=d j ·R j; The user applies for a blockchain account through a contract, and the blockchain returns the user's account private key U j , and ADD the account address j Saved in the blockchain account address list, the user obtains the blockchain account address ADD through the SHA256 algorithm j =H(U j ), and use the shared key S j Encryption generates Enc j (S j ,ADD j) Sent to the platform, the platform uses the shared key S j Decrypted to get ADD j And verify whether it exists in the blockchain account address table. If it exists, the platform calls the registered user DID contract, takes the hash of the public key PKj through the SHA256 algorithm to obtain the user's identity UDID, and stores the corresponding DDO in the DID management list. The formula is as follows: UDID = H(R) = H(r·G); Step 3, data encryption stage: The platform encrypts the user DID through a probabilistic encryption scheme to obtain g = EncX (UDID). For each attribute i in the system attribute set I, if i belongs to the user attribute set S, the user takes a positive value k i Otherwise, it takes a negative value k i ', thus calculating the three parameters of the user attribute private key U1=(∑k i |i∈I)-g, U2=w+tH2(g), U3=H2(g), get the user's attribute private key SK and send it to the user through the shared key: SK=(U1,U2,U3)=((∑k i |i∈I)-g,w+gH2(g),H2(g)); At the same time, the user generates a symmetric key k for the AES algorithm and uses k to encrypt the plaintext F of the identity information to obtain the data ciphertext E k (F), the user ciphers the data E k (F) Store the address information hash value hashL returned by IPFS on IPFS, and store hashL on the blockchain account address corresponding to the user's UDID through a smart contract. The user defines the access policy according to the data security requirements and converts it into an OBDD access structure. Only when the user attribute set S satisfies the OBDD access structure can the data decryption operation be performed. The number of valid paths in the OBDD access structure is V, which can be used by R n Indicates that n∈[0,V-1], the user selects a random number s and calculates C respectively. k =H1(sPw)⊕k,C m =sG,C j =s(∑k i G|i∈R n ),n∈[0,V-1], and finally get the data ciphertext: CT k = {OBDD, C k , C m , C n |n∈[0,V-1]} The user ciphertexts the data CT k Upload and store it to the blockchain together with the off-chain storage address hashL through a smart contract; Step 4, data decryption phase: The identity agency first confirms whether the user's UDID is in the malicious user list Mul. If so, the algorithm is terminated. Otherwise, the encrypted data E on the chain is obtained according to the user's blockchain account address corresponding to the UDID. k (hashL) and data ciphertext CT k , when the attribute set of the identity agency satisfies a path R in the user-defined OBDD access structure j , which can be combined with the user attribute key SK and the data ciphertext CT k Calculate sp w , the formula is as follows: sP w =swG=U1U3C m +U2C m -U3C n Then, through the value of Ck in the data ciphertext, calculate k using the following formula: k=C k ⊕H1(sP w ) After the identity agency obtains the symmetric key k, it obtains the data ciphertext E on IPFS through hashL k (F), decrypt E using the symmetric key k k (F) obtaining data plaintext F, i.e., the user's identity certification information for verification; Step 5: User tracking stage: First, perform integrity check on the malicious user's attribute private key SK to confirm whether SK is valid. The formula is: H2((U2-w) / U3)=H2(g)=U3 If the calculation results are not the same, it proves that the malicious user's private key information verification has failed, and the algorithm is exited. If the results are the same, the decryption phase can be entered to obtain the malicious user's UDID for tracking, and the user's UDID is put into the malicious user list Mul, and the user is denied access to the platform for authentication and authorization. The formula for decrypting the UDID is: UDID=DecX((U2-w) / U3)=DecX(g); Step 6: Issuing tokens and credentials: The identity agency verifies the user's identity documents and issues authorization tokens with different access rights based on the user's attributes. The formula is as follows: Token user ={ADID,UDID,AR,T,TS,Sig}。 9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for studying the identity authentication privacy protection mechanism based on blockchain as described in any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the method for studying a blockchain-based identity authentication and privacy protection mechanism as described in any one of claims 1 to 7.
Citation Information
Cited By
Unmanned aerial vehicle data security management and control system based on block chain
CN120528648A
Information storage method and device, storage medium and electronic equipment
CN121256765A
Information storage method, device, storage medium and electronic equipment
CN121256765B
System, method, and computer program product for identity control in a blockchain network
WO2026193128A1