Anonymous authorization and k-time anonymous authentication method and device of constant time complexity, equipment and medium
By introducing constant time complexity anonymous authorization and k-anonymous authentication methods in k-anonymous authentication scheme, users can flexibly choose the number of anonymous authentication times, solving the problem that users cannot choose k-values by themselves in existing solutions, and improving the flexibility and practicality of privacy protection.
Patent Information
- Application Number
- CN202411838295.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing k-time anonymous authentication scheme, users cannot choose the number of anonymous authentication by themselves, resulting in reduced flexibility and practicality of privacy protection.
It provides an anonymous authorization and k-time anonymous authentication method with constant time complexity, allowing users to flexibly select the number of anonymous authentication during the identity authentication process, and realize anonymous authorization and k-time anonymous authentication by generating anonymous authorization random numbers and anonymous authentication credentials, calculating password functions and zero-knowledge proofs.
It improves user flexible access rights, provides anonymous authentication statistics, improves the flexibility and practicality of privacy protection, and ensures the anonymity, non-forgery and traceability of malicious users.
Smart Images

Figure CN119720150A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a method, device, equipment and medium for anonymous authorization and k-time anonymous authentication with constant time complexity. Background Art
[0002] Authentication mechanism is a key tool to ensure system security and protect user privacy. It verifies the identity of users or devices to ensure that only authorized personnel can access sensitive information and resources. This mechanism can effectively prevent unauthorized access, reduce the risk of fraud and abuse, and provide users with audit and tracking functions to enhance the transparency of the system. In addition, many industries are regulated by laws and regulations, requiring the implementation of strong authentication measures to avoid legal risks. Therefore, authentication mechanism plays an indispensable role in modern information systems, not only ensuring data security, but also enhancing users' trust in the system. However, users' access history may reveal their status privacy and lifestyle patterns. This means that after the user is authenticated, every login, query or operation may be recorded. These records include not only the time, frequency and type of access, but also the content that the user is concerned about, the update of sensitive data and the network activities involved.
[0003] The k-time anonymous authentication scheme is an important privacy protection technology, which allows users to remain anonymous during k-time authentication visits to protect the user's true privacy; if a malicious user exceeds the limited number of visits allowed, his true identity will be traced. The anonymity of honest users and the traceability of malicious users make the k-time anonymous authentication scheme widely used in financial transactions, social networks, and electronic voting. However, the k-time anonymous authentication scheme also has some disadvantages. One of the most notable problems is that users cannot choose the k value by themselves: the setting of the k value is usually determined by the system. This means that in most cases, users may not be able to adjust the expected number of authentications according to their own needs, resulting in reduced flexibility and practicality of privacy protection.
[0004] As can be seen from the above, how to allow users to flexibly choose the number of anonymous authentications during the identity authentication process, improve users' flexible access rights, provide anonymous authentication statistics, and improve the flexibility and practicality of privacy protection are issues to be solved in this field. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for anonymous authorization and k-time anonymous authentication with constant time complexity, which can allow users to flexibly choose the number of anonymous authentications during the identity authentication process, improve the user's flexible access rights, and service providers can perform anonymous authentication statistics to improve service quality, and improve the flexibility and practicality of privacy protection. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a method for anonymous authorization and k-time anonymous authentication with constant time complexity, which is applied to the user side, including:
[0007] Obtaining a request sent by a user and determining the type of the request;
[0008] If the type of the request is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated using the anonymous authorization random number, a first variable and a second variable for assisting in proving the anonymous identity and assisting in anonymous authentication are respectively calculated based on the cryptographic function, a zero-knowledge proof for anonymous authorization is generated using the first variable and the second variable, and the zero-knowledge proof for anonymous authorization is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains an index voucher sent by the verifier indicating that the verification is passed, so as to complete the anonymous authorization with the verifier;
[0009] If the type of the request is k-times anonymous authentication, an anonymous authentication random number is generated, an anonymous authentication credential is calculated using the anonymous authorization random number, a zero-knowledge proof for anonymous authentication is generated based on the anonymous authentication credential, and the zero-knowledge proof for anonymous authentication is sent to the verifier so that the verifier calculates and verifies the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
[0010] Optionally, generating an anonymous authorization random number, calculating a cryptographic function using the anonymous authorization random number, and calculating a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication based on the cryptographic function, respectively, include:
[0011] Generate an anonymous authorized random number from a preset integer group, and calculate a cryptographic function using the anonymous authorized random number;
[0012] Calculate a first variable to assist in proving the anonymous identity based on the anonymous authorization random number, the cryptographic function, the generator of the bilinear group, and the signature certificate generated during the user registration phase;
[0013] A second variable for auxiliary anonymous authentication is calculated based on the anonymous authorization random number, a generator of a bilinear group, a user private key, and a random secret key obtained during a user registration phase.
[0014] Optionally, the generating a zero-knowledge proof for anonymous authorization using the first variable and the second variable includes:
[0015] Randomly generate a random number for anonymous authorization from a preset integer group, and use the random number to calculate each verification item;
[0016] Calculating each of the verification items, the first variable, and the second variable to obtain a hash value;
[0017] Calculate corresponding auxiliary variables based on the hash value and the verification items;
[0018] The hash value and the auxiliary variables are used to generate a zero-knowledge proof for anonymous authorization.
[0019] Optionally, generating a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential includes:
[0020] Randomly generate random numbers for k anonymous authentications from a preset integer group, and use the random numbers to calculate each verification item;
[0021] A zero-knowledge proof for k anonymous authentications is generated based on each of the verification items, the anonymous authentication credential, and the index credential sent by the verifier indicating that the verification is successful.
[0022] In a second aspect, the present application discloses an anonymous authorization and k-time anonymous authentication method with constant time complexity, which is applied to a verification party, including:
[0023] If the type of request sent by the user is anonymous authorization, the zero-knowledge proof for anonymous authorization sent by the user is obtained, and the zero-knowledge proof for anonymous authorization is calculated and verified. If the verification is successful, an index voucher indicating that the verification is successful is generated and returned to the user, and the anonymous authorization information is recorded to complete the anonymous authorization with the user;
[0024] If the type of request sent by the user is k-times anonymous authentication, the zero-knowledge proof for anonymous authentication sent by the user is obtained, and malicious user detection is performed on the zero-knowledge proof for anonymous authentication. If a malicious user is detected, the real identity of the malicious user is calculated and output. If an honest user is detected, the zero-knowledge proof for anonymous authentication is calculated and verified. If the verification is successful, the corresponding anonymous authorization information is updated to complete the k-times anonymous authentication with the user.
[0025] Optionally, the calculating and verifying the zero-knowledge proof for anonymous authorization, and if the verification is successful, generating and returning an index voucher indicating the successful verification to the user, includes:
[0026] Performing verification item calculation on the zero-knowledge proof for anonymous authorization to obtain each verification item;
[0027] Each of the verification items is input into an anonymous authorization equation, and it is determined whether the anonymous authorization equation is established. If the anonymous authorization equation is established, it indicates that the verification is successful, and an index certificate indicating that the verification is successful is generated and returned to the user.
[0028] Optionally, after performing malicious user detection on the zero-knowledge proof used for anonymous authentication, the method further includes:
[0029] If the user is detected as a malicious user, the malicious user signature certificate is calculated on the zero-knowledge proof used for anonymous authentication to obtain the malicious user signature certificate;
[0030] The malicious user identity identification number corresponding to the malicious user signature credential is screened out from all user identity information, and the current k-times anonymous authentication process is terminated.
[0031] In a third aspect, the present application discloses an anonymous authorization and k-time anonymous authentication device with constant time complexity, which is applied to the user side, including:
[0032] A request acquisition module, used to acquire the request sent by the user and determine the type of the request;
[0033] An anonymous authorization module, for generating an anonymous authorization random number when the type of the request is anonymous authorization, calculating a cryptographic function using the anonymous authorization random number, respectively calculating a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication based on the cryptographic function, generating a zero-knowledge proof for anonymous authorization using the first variable and the second variable, and sending the zero-knowledge proof for anonymous authorization to a verifier so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains an index voucher sent by the verifier indicating that the verification is passed, and completes the anonymous authorization with the verifier;
[0034] An anonymous authentication module is used to generate an anonymous authentication random number if the type of the request is k-times anonymous authentication, calculate the anonymous authentication credential using the anonymous authorization random number, generate a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential, and send the zero-knowledge proof for anonymous authentication to the verifier so that the verifier can calculate and verify the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
[0035] In a fourth aspect, the present application discloses an electronic device, including:
[0036] Memory, used to store computer programs;
[0037] The processor is used to execute the computer program to implement the aforementioned constant time complexity anonymous authorization and k-times anonymous authentication method.
[0038] In a fifth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned constant time complexity anonymous authorization and k-times anonymous authentication method are implemented.
[0039] It can be seen that the present application provides an anonymous authorization and k-time anonymous authentication method with constant time complexity, comprising obtaining a request sent by a user and determining the type of the request; if the type of the request is anonymous authorization, generating an anonymous authorization random number, using the anonymous authorization random number to calculate a cryptographic function, based on the cryptographic function, respectively calculating a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication, using the first variable and the second variable to generate a zero-knowledge proof for anonymous authorization, and sending the zero-knowledge proof for anonymous authorization to a verifier so that the verifier can verify the zero-knowledge proof for anonymous authorization. The zero-knowledge proof is calculated and verified, and the index credential sent by the verifier indicating that the verification is successful is obtained to complete the anonymous authorization between the verifier and the verifier; if the type of the request is k-times anonymous authentication, an anonymous authentication random number is generated, and the anonymous authentication credential is calculated using the anonymous authorization random number, and a zero-knowledge proof for anonymous authentication is generated based on the anonymous authentication credential, and the zero-knowledge proof for anonymous authentication is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier. The present application is applied to the user side, and includes two key links: anonymous authorization and k-times anonymous authentication. If it is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated, and then the first variable and the second variable used to assist in proving the anonymous identity and assisting the anonymous authentication are calculated, so as to generate a zero-knowledge proof for anonymous authorization, and send the zero-knowledge proof to the verifier for calculation and verification, and complete the anonymous authorization between the verifier and the verifier; if it is k-times anonymous authentication, an anonymous authentication credential is calculated to generate a zero-knowledge proof for anonymous authentication, and the zero-knowledge proof for anonymous authentication is sent to the verifier for calculation and verification, so that the verifier can calculate and verify, and complete the k-times anonymous authentication based on constant time complexity between the verifier and the verifier. The k-times anonymous authentication proposed in the present application can protect the user's privacy while protecting the user's identity from being exposed, and can ensure the anonymity, unforgeability and traceability of the authentication to malicious users. The effect is particularly prominent in scenarios with limited computing resources or delay sensitivity. Both anonymous authorization and k-times anonymous authentication allow users to flexibly choose the number of anonymous authentications during the identity authentication process, enhance the user's flexible access rights, and improve the flexibility and practicality of privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a method for anonymous authorization and k-times anonymous authentication with constant time complexity disclosed in this application;
[0042] Figure 2 A constant time complexity anonymous authorization flow chart for executing k anonymous authentication protocols disclosed in this application;
[0043] Figure 3 A constant time complexity anonymous authentication flow chart of a k-times anonymous authentication scheme disclosed in the present application;
[0044] Figure 4 A flow chart of a method for anonymous authorization and k-times anonymous authentication with constant time complexity disclosed in this application;
[0045] Figure 5 This is a schematic diagram of the structure of an anonymous authorization and k-time anonymous authentication device with constant time complexity disclosed in this application;
[0046] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0048] Authentication mechanism is a key tool to ensure system security and protect user privacy. It verifies the identity of users or devices to ensure that only authorized personnel can access sensitive information and resources. This mechanism can effectively prevent unauthorized access, reduce the risk of fraud and abuse, and provide users with audit and tracking functions to enhance the transparency of the system. In addition, many industries are regulated by laws and regulations, requiring the implementation of strong authentication measures to avoid legal risks. Therefore, authentication mechanism plays an indispensable role in modern information systems, not only ensuring data security, but also enhancing users' trust in the system. However, users' access history may reveal their state privacy and lifestyle patterns. This means that after the user is authenticated, every login, query or operation may be recorded. These records include not only the time, frequency and type of access, but also the content that the user is concerned about, the update of sensitive data and the network activities involved. The k-time anonymous authentication scheme is an important privacy protection technology that allows users to remain anonymous in k authentication visits to protect the user's real privacy; if a malicious user exceeds the limited number of visits allowed, his real identity will be tracked. The anonymity of honest users and the traceability of malicious users make the k-time anonymous authentication scheme widely used in financial transactions, social networks, and electronic voting. However, the k-time anonymous authentication scheme also has some disadvantages. One of the most notable problems is that users cannot choose the k value by themselves: the setting of the k value is usually determined by the system. This means that in most cases, users may not be able to adjust the desired number of authentications according to their own needs, resulting in reduced flexibility and practicality of privacy protection. As can be seen from the above, how to allow users to flexibly choose the number of anonymous authentications during the identity authentication process, enhance users' flexible access rights, and improve the flexibility and practicality of privacy protection are issues to be solved in this field.
[0049] See also Figure 1 As shown, the embodiment of the present invention discloses an anonymous authorization and k-time anonymous authentication method with constant time complexity, which is applied to the user side and may specifically include:
[0050] Step S11: Obtain the request sent by the user and determine the type of the request.
[0051] Step S12: If the type of the request is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated using the anonymous authorization random number, and a first variable and a second variable for assisting in proving the anonymous identity and assisting in anonymous authentication are respectively calculated based on the cryptographic function, and a zero-knowledge proof for anonymous authorization is generated using the first variable and the second variable, and the zero-knowledge proof for anonymous authorization is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains the index credential sent by the verifier indicating that the verification is passed, so as to complete the anonymous authorization with the verifier.
[0052] In this embodiment, if the type of the request is anonymous authorization, an anonymous authorization random number is generated from a preset integer group, and a cryptographic function is calculated using the anonymous authorization random number; a first variable for auxiliary proof of anonymous identity is calculated based on the anonymous authorization random number, the cryptographic function, the generator of the bilinear group, and the signature credential generated in the user registration stage; a second variable for auxiliary anonymous authentication is calculated based on the anonymous authorization random number, the generator of the bilinear group, the user private key, and the random secret key obtained in the user registration stage, and then a random number for anonymous authorization is randomly generated from a preset integer group, and each verification item is calculated using the random number; each verification item, the first variable, and the second variable are calculated to obtain a hash value; corresponding auxiliary variables are calculated based on the hash value and each verification item; a zero-knowledge proof for anonymous authorization is generated using the hash value and each auxiliary variable, and the zero-knowledge proof for anonymous authorization is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains the index credential sent by the verifier indicating that the verification is passed, and completes the anonymous authorization between the verifier and the verifier.
[0053] In this application: is described by a bilinear group, where Group Hequn The generator of is a large prime number, Is a prime number The cyclic group of is the points on the elliptic curve. Is a prime number The cyclic group of is a symmetric bilinear map ; and The cryptographic functions derived from the cryptographic hash function are and ; The public and private key pair for the group administrator. is the public key of the verifier; The user's private key; and They are the signature certificate and random key obtained from the group administrator during the user registration phase, and the calculation method is: . Reason When executing the anonymous authorization with constant time complexity of the k-time anonymous authentication protocol, the user will perform the following steps respectively. The specific anonymous authorization process with constant time complexity of the k-time anonymous authentication protocol is as follows: Figure 2 As shown:
[0054] Step 1: From the group Randomly generate 3 random numbers , and calculate ;
[0055] Step 2: Calculate variables to assist in proving anonymity ;
[0056] Step 3: Calculate variables to assist anonymous authentication ;
[0057] Step 4: Generate signature-based zero-knowledge proof:
[0058]
[0059] Among them, the method of generating zero-knowledge proof is as follows:
[0060] (a) From the group Randomly generate 5 random numbers ;
[0061] (b) Calculate the following verification items: ;
[0062] (c) Calculation ;
[0063] (d) For all ,calculate ;
[0064] (e) Let the zero-knowledge proof be ;
[0065] Step 5: The user will Sent to the verifier.
[0066] Step S13: If the type of the request is k-times anonymous authentication, an anonymous authentication random number is generated, an anonymous authentication credential is calculated using the anonymous authorization random number, a zero-knowledge proof for anonymous authentication is generated based on the anonymous authentication credential, and the zero-knowledge proof for anonymous authentication is sent to the verifier, so that the verifier can calculate and verify the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
[0067] In this embodiment, the process of generating a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential is as follows: randomly generate a random number for k anonymous authentications from a preset integer group, and use the random number to calculate each verification item; based on each verification item, the anonymous authentication credential, and an index credential sent by the verifier indicating that the verification is passed, generate a zero-knowledge proof for k anonymous authentications.
[0068] In this application, the group administrator uses the user's random key when the user registers calculate And bind the registered user identity (Identity, unique identity code), then the group administrator will disclose the identity binding information , this information is only used to track malicious users. When performing the constant time complexity anonymous authentication of the k-time anonymous authentication scheme, for the user's t-th access (1≤t≤k), the user performs the following steps. The specific constant time complexity anonymous authentication process of the k-time anonymous authentication scheme is as follows Figure 3 As shown:
[0069] Step 1: From the group Randomly generate 2 random numbers , and calculate the anonymous authentication credentials , the anonymous authentication credential is actually a variant of the Gentry signature scheme;
[0070] Step 2: Generate the following signature-based zero-knowledge proof:
[0071]
[0072] It is calculated as follows:
[0073] (a) From the group Randomly generate 3 random numbers ;
[0074] (b) Calculate the following verification items: ;
[0075] (c) Calculation ;
[0076] (d) For all ,calculate ;
[0077] (e) Let the zero-knowledge proof be ;
[0078] Step 3: The user will Sent to the verifier.
[0079] In this embodiment, a request sent by a user is obtained, and the type of the request is determined; if the type of the request is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated using the anonymous authorization random number, a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication are respectively calculated based on the cryptographic function, a zero-knowledge proof for anonymous authorization is generated using the first variable and the second variable, and the zero-knowledge proof for anonymous authorization is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, and obtains an index credential sent by the verifier indicating that the verification is successful, so as to complete the anonymous authorization with the verifier; if the type of the request is k-times anonymous authentication, an anonymous authentication random number is generated, an anonymous authentication credential is calculated using the anonymous authorization random number, a zero-knowledge proof for anonymous authentication is generated based on the anonymous authentication credential, and the zero-knowledge proof for anonymous authentication is sent to the verifier, so that the verifier calculates and verifies the zero-knowledge proof for anonymous authentication, and if the verification is successful, the k-times anonymous authentication based on constant time complexity with the verifier is completed. The present application is applied to the user side, and includes two key links: anonymous authorization and k-times anonymous authentication. If it is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated, and then the first variable and the second variable used to assist in proving the anonymous identity and assisting the anonymous authentication are calculated, so as to generate a zero-knowledge proof for anonymous authorization, and send the zero-knowledge proof to the verifier for calculation and verification, and complete the anonymous authorization between the verifier and the verifier; if it is k-times anonymous authentication, an anonymous authentication credential is calculated to generate a zero-knowledge proof for anonymous authentication, and the zero-knowledge proof for anonymous authentication is sent to the verifier for calculation and verification, so that the verifier can calculate and verify, and complete the k-times anonymous authentication based on constant time complexity between the verifier and the verifier. The k-times anonymous authentication proposed in the present application can protect the user's privacy while protecting the user's identity from being exposed, and can ensure the anonymity, unforgeability and traceability of the authentication to malicious users. The effect is particularly prominent in scenarios with limited computing resources or delay sensitivity. Both anonymous authorization and k-times anonymous authentication allow users to flexibly choose the number of anonymous authentications during the identity authentication process, enhance the user's flexible access rights, and improve the flexibility and practicality of privacy protection.
[0080] See also Figure 4 As shown, the embodiment of the present invention discloses an anonymous authorization and k-time anonymous authentication method with constant time complexity, which is applied to the verification party and may specifically include:
[0081] Step S21: If the type of request sent by the user is anonymous authorization, obtain the zero-knowledge proof for anonymous authorization sent by the user, calculate and verify the zero-knowledge proof for anonymous authorization, and if the verification is successful, generate and return an index certificate indicating that the verification is successful to the user, and record the anonymous authorization information to complete the anonymous authorization with the user.
[0082] In this embodiment, if the type of request sent by the user is anonymous authorization, the zero-knowledge proof for anonymous authorization sent by the user is obtained, and the verification items of the zero-knowledge proof for anonymous authorization are calculated to obtain each verification item; each verification item is input into the anonymous authorization equation, and it is determined whether the anonymous authorization equation is established. If the anonymous authorization equation is established, it indicates that the verification is passed, and an index certificate indicating that the verification is passed is generated and returned to the user, and the anonymous authorization information is recorded to complete the anonymous authorization with the user.
[0083] In this embodiment, if the type of request sent by the user is anonymous authorization, that is, the verifier receives After that, the verifier performs the following calculation steps. The specific anonymous authorization process of executing the anonymous authentication protocol k times with constant time complexity is as follows: Figure 2 As shown:
[0084] Step 1: Calculate the following verification items:
[0085]
[0086] Step 2: Check whether the following equation holds:
[0087] ;
[0088] If so, the anonymous authorization is accepted; otherwise, it is not accepted.
[0089] Step 3: If the anonymous user's authorization is accepted, the authenticator returns an index credential to the anonymous user. , save the following information: , where k represents that the authenticator has authorized the anonymous user to perform up to k anonymous access authentications. Indicates the number of times the anonymous user has authenticated and accessed the site and is initialized to 0.
[0090] Step S22: If the type of request sent by the user is k-times anonymous authentication, the zero-knowledge proof for anonymous authentication sent by the user is obtained, and malicious user detection is performed on the zero-knowledge proof for anonymous authentication: if a malicious user is detected, the real identity of the malicious user is calculated and output; if an honest user is detected, the zero-knowledge proof for anonymous authentication is calculated and verified, and if the verification is successful, the corresponding anonymous authorization information is updated to complete k-times anonymous authentication with the user.
[0091] In this embodiment, after the malicious user detection is performed on the zero-knowledge proof used for anonymous authentication, it also includes: if a malicious user is detected, the malicious user signature credential is calculated on the zero-knowledge proof used for anonymous authentication to obtain the malicious user signature credential; and the malicious user identity identification number ID corresponding to the malicious user signature credential is screened out from all user credentials and bound identity information, and the current k anonymous authentication process is terminated.
[0092] In this embodiment, if the type of request sent by the user is k-time anonymous authentication, that is, the verifier receives After that, the verifier performs the following calculation steps. The specific anonymous authentication process of executing the anonymous authentication scheme k times with constant time complexity is as follows: Figure 3 As shown:
[0093] Step 1: Based on the index credentials , retrieve from the saved information ;
[0094] Step 2: Order , a new round of anonymous authentication is performed on behalf of the anonymous user;
[0095] like , which means that a malicious user is trying to authenticate, in order to track their identity ,calculate
[0096] , found from the group administrator's public identity binding information , which makes If the equation holds, the malicious user's identity is returned. and end the agreement;
[0097] Step 3: Calculate the verification item:
[0098] ;
[0099] Step 4: Check whether the following equation holds:
[0100] ;
[0101] If it is established, the anonymous authentication is accepted, otherwise it is not accepted;
[0102] Step 5: If the anonymous authentication is accepted, update the anonymous authentication copy data: .
[0103] The innovation of this application lies in that all protocol modules of the k-time anonymous authentication scheme proposed in this application have only constant time complexity, and the effect is particularly outstanding in scenarios with limited computing resources or delay sensitivity; the k-time anonymous authentication protocol protects user privacy while protecting user identity from exposure, and all anonymous authentication copies are linkable. This is for many application platforms such as cloud services, which can perform user preference statistics on the premise of anonymous user authentication in order to improve service quality; it can ensure the anonymity and unforgeability of authentication and the traceability of malicious users.
[0104] See also Figure 5 As shown, the embodiment of the present invention discloses an anonymous authorization and k-time anonymous authentication device with constant time complexity, which is applied to the user side and may specifically include:
[0105] The request acquisition module 11 is used to acquire the request sent by the user and determine the type of the request;
[0106] An anonymous authorization module 12, for generating an anonymous authorization random number when the type of the request is anonymous authorization, using the anonymous authorization random number to calculate a cryptographic function, respectively calculating a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication based on the cryptographic function, using the first variable and the second variable to generate a zero-knowledge proof for anonymous authorization, and sending the zero-knowledge proof for anonymous authorization to a verifier so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains an index voucher sent by the verifier indicating that the verification is passed, and completes the anonymous authorization with the verifier;
[0107] The anonymous authentication module 13 is used to generate an anonymous authentication random number if the type of the request is k-times anonymous authentication, calculate the anonymous authentication credential using the anonymous authorization random number, generate a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential, and send the zero-knowledge proof for anonymous authentication to the verifier so that the verifier can calculate and verify the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
[0108] In some specific embodiments, the anonymous authorization module 12 may specifically include:
[0109] A cryptographic function calculation module, used to generate an anonymous authorized random number from a preset integer group, and calculate a cryptographic function using the anonymous authorized random number;
[0110] A first variable calculation module, used to calculate a first variable for assisting in proving the anonymous identity based on the anonymous authorization random number, the cryptographic function, the generator of the bilinear group, and the signature voucher generated during the user registration phase;
[0111] The second variable calculation module is used to calculate a second variable for assisting anonymous authentication based on the anonymous authorization random number, the generator of the bilinear group, the user private key, and the random key obtained during the user registration phase.
[0112] In some specific embodiments, the anonymous authorization module 12 may specifically include:
[0113] A first verification item calculation module, used to randomly generate a random number for anonymous authorization from a preset integer group, and calculate each verification item using the random number;
[0114] A hash value calculation module, used to calculate each of the verification items, the first variable, and the second variable to obtain a hash value;
[0115] Each auxiliary variable calculation module is used to calculate corresponding auxiliary variables based on the hash value and each verification item;
[0116] The first zero-knowledge proof generating module is used to generate a zero-knowledge proof for anonymous authorization using the hash value and each of the auxiliary variables.
[0117] In some specific embodiments, the anonymous authentication module 13 may specifically include:
[0118] A second verification item calculation module, used to randomly generate random numbers for k anonymous authentications from a preset integer group, and use the random numbers to calculate each verification item;
[0119] The second zero-knowledge proof generation module is used to generate a zero-knowledge proof for k anonymous authentications based on each of the verification items, the anonymous authentication credential, and the index credential sent by the verifier indicating that the verification is successful.
[0120] Figure 6A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the anonymous authorization and k-time anonymous authentication method with constant time complexity performed by the electronic device disclosed in any of the aforementioned embodiments.
[0121] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0122] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0123] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including computer programs that can be used to complete the anonymous authorization and k-times anonymous authentication methods with constant time complexity performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can also further include computer programs that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the anonymous authorization and k-times anonymous authentication device with constant time complexity, the data 223 can also include data collected by its own input and output interface 25, etc.
[0124] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0125] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the anonymous authorization and k-time anonymous authentication method with constant time complexity disclosed in any of the aforementioned embodiments are implemented.
[0126] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0127] The above is a detailed introduction to the anonymous authorization and k-time anonymous authentication method, device, equipment and storage medium with constant time complexity provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for anonymous authorization and k-time anonymous authentication with constant time complexity, characterized in that: Applied to the user side, including: Obtaining a request sent by a user and determining the type of the request; If the type of the request is anonymous authorization, an anonymous authorization random number is generated, a cryptographic function is calculated using the anonymous authorization random number, a first variable and a second variable for assisting in proving the anonymous identity and assisting in anonymous authentication are respectively calculated based on the cryptographic function, a zero-knowledge proof for anonymous authorization is generated using the first variable and the second variable, and the zero-knowledge proof for anonymous authorization is sent to the verification party, so that the verification party calculates and verifies the zero-knowledge proof for anonymous authorization, obtains an index voucher sent by the verification party indicating that the verification is passed, so as to complete the anonymous authorization with the verification party; If the type of the request is k-times anonymous authentication, an anonymous authentication random number is generated, an anonymous authentication credential is calculated using the anonymous authorization random number, a zero-knowledge proof for anonymous authentication is generated based on the anonymous authentication credential, and the zero-knowledge proof for anonymous authentication is sent to the verifier so that the verifier calculates and verifies the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
2. The method for anonymous authorization and k-time anonymous authentication with constant time complexity according to claim 1, characterized in that: The generating of the anonymous authorization random number, calculating the cryptographic function using the anonymous authorization random number, and respectively calculating the first variable and the second variable for assisting in proving the anonymous identity and assisting in anonymous authentication based on the cryptographic function include: Generate an anonymous authorized random number from a preset integer group, and calculate a cryptographic function using the anonymous authorized random number; Calculate a first variable for assisting in proving the anonymous identity based on the anonymous authorization random number, the cryptographic function, the generator of the bilinear group, and the signature certificate generated during the user registration phase; A second variable for auxiliary anonymous authentication is calculated based on the anonymous authorization random number, a generator of a bilinear group, a user private key, and a random secret key obtained during a user registration phase.
3. The method for anonymous authorization and k-time anonymous authentication with constant time complexity according to claim 1, characterized in that: The generating of a zero-knowledge proof for anonymous authorization by using the first variable and the second variable includes: Randomly generate a random number for anonymous authorization from a preset integer group, and use the random number to calculate each verification item; Calculating each of the verification items, the first variable, and the second variable to obtain a hash value; Calculate corresponding auxiliary variables based on the hash value and the verification items; The hash value and the auxiliary variables are used to generate a zero-knowledge proof for anonymous authorization.
4. The method for anonymous authorization and k-time anonymous authentication with constant time complexity according to any one of claims 1 to 3, characterized in that: The generating a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential comprises: Randomly generate random numbers for k anonymous authentications from a preset integer group, and use the random numbers to calculate each verification item; A zero-knowledge proof for k anonymous authentications is generated based on each of the verification items, the anonymous authentication credential, and the index credential sent by the verifier indicating that the verification is successful.
5. A method for anonymous authorization and k-time anonymous authentication with constant time complexity, characterized in that: Applicable to the verification party, including: If the type of request sent by the user is anonymous authorization, the zero-knowledge proof for anonymous authorization sent by the user is obtained, and the zero-knowledge proof for anonymous authorization is calculated and verified. If the verification is successful, an index voucher indicating that the verification is successful is generated and returned to the user, and the anonymous authorization information is recorded to complete the anonymous authorization with the user; If the type of request sent by the user is k-times anonymous authentication, the zero-knowledge proof for anonymous authentication sent by the user is obtained, and malicious user detection is performed on the zero-knowledge proof for anonymous authentication. If a malicious user is detected, the real identity of the malicious user is calculated and output. If an honest user is detected, the zero-knowledge proof for anonymous authentication is calculated and verified. If the verification is successful, the corresponding anonymous authorization information is updated to complete the k-times anonymous authentication with the user.
6. The method of anonymous authorization and k-time anonymous authentication with constant time complexity according to claim 5, characterized in that: The calculating and verifying the zero-knowledge proof for anonymous authorization, and if the verification is successful, generating and returning an index voucher indicating the successful verification to the user, includes: Performing verification item calculation on the zero-knowledge proof for anonymous authorization to obtain each verification item; Each of the verification items is input into an anonymous authorization equation, and it is determined whether the anonymous authorization equation is established. If the anonymous authorization equation is established, it indicates that the verification is successful, and an index certificate indicating that the verification is successful is generated and returned to the user.
7. The method of anonymous authorization and k-time anonymous authentication with constant time complexity according to claim 5, characterized in that: After the malicious user detection is performed on the zero-knowledge proof for anonymous authentication, the method further includes: If the user is detected as a malicious user, the malicious user signature certificate is calculated on the zero-knowledge proof used for anonymous authentication to obtain the malicious user signature certificate; The malicious user identity identification number corresponding to the malicious user signature credential is screened out from all user identity information, and the current k-times anonymous authentication process is terminated.
8. An anonymous authorization and k-time anonymous authentication device with constant time complexity, characterized in that: Applied to the user side, including: A request acquisition module, used to acquire the request sent by the user and determine the type of the request; An anonymous authorization module, for generating an anonymous authorization random number when the type of the request is anonymous authorization, using the anonymous authorization random number to calculate a cryptographic function, respectively calculating a first variable and a second variable for assisting in proving an anonymous identity and assisting in anonymous authentication based on the cryptographic function, using the first variable and the second variable to generate a zero-knowledge proof for anonymous authorization, and sending the zero-knowledge proof for anonymous authorization to a verifier so that the verifier calculates and verifies the zero-knowledge proof for anonymous authorization, obtains an index voucher sent by the verifier indicating that the verification is passed, and completes the anonymous authorization with the verifier; An anonymous authentication module is used to generate an anonymous authentication random number if the type of the request is k-times anonymous authentication, calculate the anonymous authentication credential using the anonymous authorization random number, generate a zero-knowledge proof for anonymous authentication based on the anonymous authentication credential, and send the zero-knowledge proof for anonymous authentication to the verifier so that the verifier can calculate and verify the zero-knowledge proof for anonymous authentication. If the verification is successful, the k-times anonymous authentication based on constant time complexity is completed between the verifier and the verifier.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the anonymous authorization and k-times anonymous authentication method with constant time complexity as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the anonymous authorization and k-time anonymous authentication method with constant time complexity as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
User information authentication method, device, equipment, medium and program product
CN121037058A