CN114978565B - Zero knowledge position proving method and system based on block chain - Google Patents

Zero knowledge position proving method and system based on block chain Download PDF

Info

Publication number
CN114978565B
CN114978565B CN202110498700.8A CN202110498700A CN114978565B CN 114978565 B CN114978565 B CN 114978565B CN 202110498700 A CN202110498700 A CN 202110498700A CN 114978565 B CN114978565 B CN 114978565B
Authority
CN
China
Prior art keywords
parameter
witness
prover
positioning information
elliptic curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110498700.8A
Other languages
Chinese (zh)
Other versions
CN114978565A (en
Inventor
邱阳
吴卫民
刘林和
邓建明
温海欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Internet Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Internet Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Internet Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110498700.8A priority Critical patent/CN114978565B/en
Publication of CN114978565A publication Critical patent/CN114978565A/en
Application granted granted Critical
Publication of CN114978565B publication Critical patent/CN114978565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0492Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload by using a location-limited connection, e.g. near-field communication or limited proximity of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs

Abstract

The application discloses a zero-knowledge position proving method and system based on block chains, wherein the method comprises the following steps: searching witness in a preset range under the condition that a prover needs to prove the position of the prover, and sending a request for maintaining communication to the witness; in the event that a reply is received from at least one target witness, sending a location attestation request to at least one of the target witnesses; in the case of receiving positioning information of at least one of the target witness, a zero-knowledge proof request is sent to a verifier based on the positioning information, the zero-knowledge proof request including a first coordinate point and a first parameter. By utilizing the characteristics of decentralization, non-tampering, traceability and the like of the blockchain and combining a zero knowledge proof protocol, the problems of decentralization position proof can be avoided, the confidentiality of position data is ensured, whether the proved data is tampered or not can be confirmed, historical position data is prevented from being repudiated, and non-repudiation is realized.

Description

Zero knowledge position proving method and system based on block chain
Technical Field
The application relates to the field of network security, in particular to a zero-knowledge position proving method and system based on block chains.
Background
With rapid development of navigation positioning technology, positioning modes are also expanded continuously, such as satellite positioning, wireless communication technology (wifi) positioning, positioning of base station position information, and the like. However, since civil satellite positioning signals are not cryptographically verified, geographical location virtual software floods and wireless positioning threats are frequent, so that geographical locations become deceptive and modifiable.
Disclosure of Invention
The embodiment of the application provides a zero-knowledge position proving method and system based on a blockchain, which are used for solving the problems that position data fraud and wireless positioning threat frequently occur easily in the prior art.
In order to solve the technical problems, the application is realized as follows:
in a first aspect, there is provided a blockchain-based zero-knowledge location proving method, the method comprising:
searching witness in a preset range under the condition that a prover needs to prove the position of the prover, and sending a request for maintaining communication to the witness;
sending a location proof request to at least one target witness when a reply of the at least one target witness is received, wherein the target witness is a witness agreeing to keep a communication request in the witness within the preset range, and the location proof request comprises a timestamp and an identity of the prover;
and under the condition that the positioning information of at least one target witness is received, sending a zero knowledge proof request to a verifier based on the positioning information, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to the positioning information.
In a second aspect, there is provided a blockchain-based zero knowledge location proving system, the system comprising:
the first sending module is used for searching witness in a preset range under the condition that the prover needs to prove the position of the prover, and sending a communication maintaining request to the witness;
the second sending module is used for sending a position proving request to at least one target witness when receiving a reply of the at least one target witness, wherein the target witness is a witness agreeing to keep a communication request in the witness within the preset range, and the position proving request comprises a time stamp and an identity mark of the prover;
and the third sending module is used for sending a zero knowledge proof request to a verifier based on the positioning information under the condition that the positioning information of at least one target witness is received, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to the positioning information.
In a third aspect, a blockchain-based zero-knowledge location verification method is provided, the method comprising:
receiving a zero knowledge proof request sent by a prover, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter;
calculating the first parameter and the base point coordinates of the elliptic curve according to scalar multiplication operation of the elliptic curve, and determining a second coordinate point;
judging whether the second coordinate point is consistent with the first coordinate point or not;
and determining that the positioning information of the prover is credible under the condition that the second coordinate point is consistent with the first coordinate point.
In a fourth aspect, there is provided a blockchain-based zero knowledge location proving system, the system comprising:
the receiving module is used for receiving a zero knowledge proof request sent by a prover, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter;
the calculation module is used for calculating the first parameter and the base point coordinates of the elliptic curve according to scalar multiplication operation of the elliptic curve and determining a second coordinate point;
the judging module is used for judging whether the second coordinate point is consistent with the first coordinate point or not;
and the determining module is used for determining that the positioning information of the prover is credible under the condition that the second coordinate point is consistent with the first coordinate point.
In a fifth aspect, there is provided a terminal device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method according to the first and third aspects.
In a sixth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the methods according to the first and third aspects.
In the embodiment of the application, firstly, under the condition that a prover needs to prove the position of the prover, searching a witness in a preset range, and sending a communication maintaining request to the witness; then sending a location attestation request to at least one target witness in the event that a reply is received from the at least one target witness; finally, in the case of receiving the positioning information of the at least one target witness, a zero-knowledge proof request is sent to the verifier based on the positioning information, the zero-knowledge proof request comprising the first coordinate point and the first parameter. According to the embodiment of the application, the characteristics of decentralization, non-falsification, traceability and the like of the blockchain are utilized, and the zero knowledge proof protocol is combined, so that the problem of decentralization position proof can be avoided, confidentiality of position data is ensured, whether the proved data are falsified or not can be confirmed, historical position data are prevented from being repudiated, and non-repudiation is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a system block diagram provided by an embodiment of the present application;
FIG. 2 is a flow chart of a blockchain-based zero knowledge location verification method provided by an embodiment of the present application;
FIG. 3 is a flow chart of a zero knowledge position verification method based on blockchain provided in an embodiment of the present application
FIG. 4 is a schematic diagram of a blockchain-based zero knowledge location verification system provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a blockchain-based zero knowledge location verification system provided by embodiments of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a zero-knowledge position proving method and system based on a blockchain, wherein the system is shown in fig. 1, a prover (namely a user) interacts with a verifier (namely a blockchain network) through a position proving request, and the user firstly initiates the position proving request for acquiring own positioning information with a witness according to a global positioning system (Global Positioning System, GPS), a Beidou satellite, bluetooth, a base station or a wireless communication technology (wifi) and the like. The witness is a user participating in the location certification, i.e. other trusted users who can certify the location of the witness.
As shown in fig. 2, a flowchart of a zero-knowledge position proving method based on blockchain is provided in an embodiment of the present application. As shown in fig. 2, the blockchain-based zero-knowledge position proving method is applied to a prover terminal side, and the blockchain-based zero-knowledge position proving method may include: contents shown in steps S101 to S103.
In step S101, in the case where the prover needs to prove the position of itself, the witness within the preset range is searched for, and a request to hold communication is sent to the witness.
Where the prover is a user that needs location attestation and the witness is another trusted user that can attest to the location of the prover.
Specifically, if the prover and the witness are simultaneously under the same local area network, communication can be performed through wifi or P2P modes and the like; otherwise, the message is forwarded by the server or the Bluetooth P2P communication is carried out. Under the same local area network scene, when a prover needs to prove the position of the prover, firstly, searching all witness persons under the same local area network with the prover; if the information is not in the same local area network, other witness needs to be notified in a mode of forwarding the information through a server so as to achieve the purpose of searching. The prover searches for the witness and then sends a keep-alive request to keep in communication with the witness.
In step S102, in the event that a reply is received from at least one target witness, a location attestation request is sent to the at least one target witness.
The target witness is one of witness in preset range, which agrees to hold the communication request, and the position proving request comprises a time stamp and the identity of the prover.
That is, the target witness may be any of the witnesses who agree to hold the communication request among the witnesses within the preset range. The method can select a certain number of target witnesses by means of random selection, can select a certain number of target witnesses by means of the region, and can select a certain number of target witnesses by means of other methods. The number of the target witnessed persons may be any value, may be one, two, three or more, is not particularly limited in the embodiment of the present application, and may be determined according to actual situations.
In step S103, in the case of receiving the positioning information of at least one target witness, a zero-knowledge proof request is sent to the verifier based on the positioning information.
The zero knowledge proof request comprises a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to positioning information.
That is, zero knowledge proof refers to that the verifier can still verify to determine if the information sent by the prover is correct without the prover sending or delivering any useful information to the verifier.
In the embodiment of the application, firstly, under the condition that a prover needs to prove the position of the prover, searching a witness in a preset range, and sending a communication maintaining request to the witness; then sending a location attestation request to at least one target witness in the event that a reply is received from the at least one target witness; finally, in the case of receiving the positioning information of the at least one target witness, a zero-knowledge proof request is sent to the verifier based on the positioning information, the zero-knowledge proof request comprising the first coordinate point and the first parameter. According to the embodiment of the application, the characteristics of decentralization, non-falsification, traceability and the like of the blockchain are utilized, and the zero knowledge proof protocol is combined, so that the problem of decentralization position proof can be avoided, confidentiality of position data is ensured, whether the proved data are falsified or not can be confirmed, historical position data are prevented from being repudiated, and non-repudiation is realized.
In one possible embodiment of the present application, in the event that location information of at least one target witness is received, sending a zero knowledge proof request to the prover based on the location information may include the following steps.
Generating an elliptic curve according to the positioning information of the target witness; determining the base point coordinates of an elliptic curve; determining a first parameter according to the elliptic curve and the base point coordinates, wherein the first parameter is a parameter for digital signature; according to the first parameter, calculating a digital signature value of the positioning information after combining the prover and the target witness; constructing a temporary variable according to the digital signature value and the first parameter; and determining a first coordinate point according to the temporary variable.
In view of the fact that in practical applications, the location proving service provider may use historical location data of the user, and private self-service is used for other purposes without the knowledge of the user, the embodiment of the application adopts the zero-knowledge proving method, so that a verifier can not provide any useful location information for the proving service provider when performing location authentication, and the situation that the location proving service provider uses the historical location data of the prover for other purposes without the knowledge of the prover can be avoided.
Optionally, generating an elliptic curve according to the positioning information of the target witness may include: determining a first coordinate of the target witness according to the positioning information of the target witness; an elliptic curve is generated from the first coordinates and the prover second coordinates.
In this embodiment of the present application, the prover terminal may determine the second coordinate of the prover according to the positioning information of the prover, determine the first coordinate of the target witness according to the positioning information of the target witness, and then generate the elliptic curve according to the first coordinate and the second coordinate.
Further, the base point coordinates may be determined from the elliptic curve.
Optionally, determining the first parameter according to the elliptic curve and the base point coordinates may comprise the following steps.
Setting a random number; according to the random number and the base point coordinates, calculating the abscissa of a first point on the elliptic curve; obtaining a target random number, wherein the target random number is a random number under the condition that an abscissa is taken as a dividend, the order of an elliptic curve is taken as a divisor, and the remainder is a non-zero integer, and the remainder is an intermediate parameter for digital signature; a random number is determined as a first parameter.
That is, a random number is first randomly generated, and then the following operation is circularly performed until it is determined that an intermediate parameter for digital signature, that is, the value of the remainder is not zero, and the random number when the remainder is a non-zero number is determined as the first parameter.
Specifically, a random number k0 is randomly generated, and then the abscissa x1 of the first point of the elliptic curve is calculated according to the following expression from the random number k 0.
(x1,y1)=[k0]G
Wherein (x 1, y 1) is the coordinates of the first point; g is the base point coordinate of the elliptic curve, and can be (x 0, y 0), [ k0] G represents multiplication of k0 and G, and the obtained product can be expressed as (k 0x0, k0y 0), wherein the value of k0x0 is the value of the abscissa x1 to be solved; the first point may be any random effective point on the elliptic curve.
And then calculating intermediate parameters for digital signature according to the following formula.
r=x1 mod n
Wherein r is an intermediate parameter for digital signature; mod is a remainder function; n is the order of the elliptic curve.
And judging whether r=0 is satisfied, if so, looping the steps, and if not, determining the random number at the moment as a first parameter k for digital signature.
Optionally, calculating the digital signature value of the positioning information after the prover and the target witness are combined according to the first parameter may include the following steps.
Determining a hash value of the combined positioning information according to the positioning information of the prover and the positioning information of the target witness; calculating the result of the combined positioning information according to the intermediate parameter, the private key, the first parameter, the hash value and the order of the elliptic curve; and when the result of the combined positioning information is a nonzero number, determining the result of the nonzero number of positioning information as a digital signature value of the combined positioning information.
That is, a digital signature value of the positioning information of the prover combined with the target witness may be calculated based on the first parameter k.
Specifically, a hash value of the positioning information after the prover and the target witness are merged is calculated according to the following formula.
e=h(A,B)
Wherein A is the positioning information of the prover; b is the positioning information of the target witness; h (A, B) is the hash value of the combined positioning information.
The hash value may be determined by longitude and latitude, or may be determined by other manners, which are not specifically limited in the embodiment of the present application, and are based on practical application.
Then, the result s' of the combined positioning information is calculated according to the following formula:
s’=r*d+k*e mod n
s' is the result of the combined positioning information; d is a private key used by the prover for digital signature; e is the hash value of the combined positioning information; k emod n represents the remainder of the division of k by n.
When the result s 'is at the site 0, the result s' is determined as the digital signature value s.
It should be noted that s' with a result other than 0 is selected as the digital signature value s, so as to avoid that the constructed temporary variable is too simple; secondly, s' with the result of not 0 is selected as the digital signature value to make the digital signature result safer, and if the value with the position information result of 0 is directly determined as the digital signature value, an attacker can easily acquire the position information.
Optionally, constructing the temporary variable according to the digital signature value and the first parameter may include: the temporary variables are constructed according to the following formula.
l=(r+s) -1 *(k-s)mod n
Wherein l is a temporary variable; r is an intermediate parameter for digital signature; k is a first parameter; s is a digital signature value of the positioning information after the prover and the target witness are combined; mod is a remainder function; n is the order of the elliptic curve.
Optionally, determining the first coordinate point according to the temporary variable may include: and taking the product of the abscissa and the ordinate of the temporary variable and the base point coordinate as the coordinate value of the first coordinate point.
Specifically, the coordinate value of the first coordinate point may be determined according to the following equation.
(x,y)=[l]G
Wherein (x, y) is the coordinate value of the first coordinate point.
Through the steps, the positioning information of the prover can be hidden, so that when a zero knowledge proof request is sent to a verification node in the blockchain based on the first coordinate point and the first parameter, the position sensitive data of the prover is hidden because the first coordinate point is the hidden coordinate point. The situation that the position information leakage is shaped by using the historical position data of the prover as other purposes without the knowledge of the user by the position proving service provider can be avoided.
Further, a zero knowledge proof request is sent to a verification node in the blockchain, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter k.
As shown in fig. 3, a flowchart of a zero-knowledge position proving method based on blockchain is provided in an embodiment of the present application. As shown in fig. 3, the blockchain-based zero-knowledge location verification method is applied to a verifier side, and may include: the contents shown in steps S201 to S204.
In step S201, a zero-knowledge proof request sent by a prover is received, the zero-knowledge proof request including a first coordinate point and a first parameter.
In step S202, the first parameter and the coordinates of the base point of the elliptic curve are calculated according to the elliptic curve scalar multiplication operation, and the second coordinate point is determined.
In step S203, it is determined whether the second coordinate point coincides with the first coordinate point.
In step S204, in the case where the second coordinate point coincides with the first coordinate point, it is determined that the positioning information of the prover is authentic.
In the embodiment of the application, under the condition that a zero knowledge proof request sent by a prover is received, calculating a first parameter and a base point coordinate of an elliptic curve according to scalar multiplication operation of the elliptic curve, determining a second coordinate point, then judging whether the second coordinate point is consistent with the first coordinate point, if so, determining that positioning information of the prover is reliable. The first coordinate point may be verified by elliptic curve scalar multiplication to prove that the prover's positioning information is authentic, and the prover's positioning information may be verified without revealing the prover's positioning information's data.
In one possible embodiment of the present application, the second coordinate point is determined by calculating the first parameter and the base point coordinates of the elliptic curve according to an elliptic curve scalar multiplication operation, and may specifically include.
Initializing and assigning coordinates of preset points according to the infinity points and the elliptic curve base point coordinates G;
specifically, an elliptic curve is determined based on the coordinates of the base point of the elliptic curve, three coordinate points are randomly selected from the elliptic curve to serve as preset points, the coordinates of the preset points are marked as Q0, Q1 and Q2 respectively, and then the coordinates of the base point of the elliptic curve can be assigned in an initialized mode, for example, the coordinates of the base point of the elliptic curve can be assigned as the coordinates of the infinity point, and the coordinates of the base point of the elliptic curve can be assigned as the coordinates of the base point of the elliptic curve.
Circularly executing the point adding operation for n-1 times on the coordinates of the preset points after the initialization assignment to obtain the final coordinates of the preset points; wherein n represents the order of the elliptic curve;
and carrying out the operations of point and point times for n-1 times according to the preset coordinate points Q0, Q1 and Q2 for initialization assignment and the elliptic curve base point coordinate G, and obtaining the final coordinate of the preset point.
Q ki =Q ki +Q 2
Q 2 =2Q 2
Where ki denotes a value at the i-th bit of the first parameter k in binary form from left to right; the value range of i is [1, n-1]. For example, if the first parameter is 10 and the first parameter is converted into binary form 1010, k1 represents the value in the first digit from left to right, so k1 is 1, and similarly, k2 is 0, k3 is 1, and k4 is 0.
For example, let the order 5 of elliptic curve be 10, then, the specific method for obtaining the final coordinates of the preset point by performing the operations of adding and multiplying the point for n-1 times on the coordinates of the preset point for initialization assignment is as follows:
firstly, determining the cycle times of point addition and point multiplication as 4 times according to the order of an elliptic curve; in addition, the binary representation of the first parameter is 1010;
when i=1, ki=1, then Q1 (1) =q1 (0) +q2 (0), Q2 (1) =2q2 (0), i.e., the value of q1+q2 is assigned to Q1, and the value of 2Q2 is assigned to Q2;
when i=2, ki=0, Q0 (2) =q0 (1) +q2 (1), Q2 (2) =2q2 (1);
when i=3, ki=1, Q1 (3) =q1 (2) +q2 (2), Q2 (3) =2q2 (2);
when i=4, ki=0, Q0 (4) =q0 (3) +q2 (3), Q2 (4) =2q2 (3);
as described above, Q0, Q2 calculated when i=4 and Q1 calculated when i=3 are final coordinates of the preset point. The final coordinates of the preset point Q1 of Q1 calculated when i=3 are used, and since no assignment calculation is performed on Q1 when i=4, Q1 calculated last time (i.e., when i=3) is the final coordinates of the preset point Q1.
And performing point adding operation on the final coordinates of the preset points to obtain second coordinate points.
And performing point adding operation on the final coordinates of the preset point according to the following formula to obtain a second coordinate point Q.
Q=Q0+Q1+G
For example, the final coordinates Q0 (4) and Q1 (3) of the preset points Q0 and Q1 calculated when i=4 are calculated according to Q 2 =2Q 2 Q=q0 (4) +q1 (3) +g can be calculated, and the obtained Q is determined as the second coordinate point.
In one possible embodiment of the present application, the blockchain-based zero-knowledge location verification method may further include: and storing the positioning information of the authenticated trusted prover into a blockchain network.
That is, the prover becomes a trusted user after verification, and can be used as a witness of other subsequent provers to perform location certification for other users.
Fig. 4 is a schematic diagram of a zero-knowledge position verification system based on a blockchain according to an embodiment of the present application. As shown in fig. 4, the blockchain-based zero-knowledge position certification system is applied to a prover terminal side, and may include: a first transmitting module 401, a second transmitting module 402, and a third transmitting module 403.
Specifically, the first sending module 401 is configured to search for witness in a preset range and send a request for communication maintenance to the witness, where the witness needs to prove its own location; a second sending module 402, configured to send, when receiving a reply from at least one target witness, a location proof request to the at least one target witness, where the target witness is a witness that agrees to hold a communication request among witnesses within a preset range, and the location proof request includes a timestamp and an identity of the prover; third sending module 403, configured to send, when location information of at least one target witness is received, a zero-knowledge proof request to a verifier based on the location information, where the zero-knowledge proof request includes a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to the location information.
In the embodiment of the present application, first, the first sending module 401 searches for a witness in a preset range and sends a request for maintaining communication to the witness, where the witness needs to prove its own location; second sending module 402 then sends a location attestation request to at least one target witness upon receipt of a reply from the at least one target witness; finally, the third sending module 403 sends a zero knowledge proof request to the verifier based on the positioning information, where the zero knowledge proof request includes the first coordinate point and the first parameter, when the positioning information of the at least one target witness is received. According to the embodiment of the application, the characteristics of decentralization, non-falsification, traceability and the like of the blockchain are utilized, and the zero knowledge proof protocol is combined, so that the problem of decentralization position proof can be avoided, confidentiality of position data is ensured, whether the proved data are falsified or not can be confirmed, historical position data are prevented from being repudiated, and non-repudiation is realized.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
generating an elliptic curve according to the positioning information of the target witness; determining the base point coordinates of an elliptic curve; determining a first parameter according to the elliptic curve and the base point coordinates, wherein the first parameter is a parameter for digital signature; according to the first parameter, calculating a digital signature value of the positioning information after combining the prover and the target witness; constructing a temporary variable according to the digital signature value and the first parameter; and determining a first coordinate point according to the temporary variable.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
determining a first coordinate of the target witness according to the positioning information of the target witness; an elliptic curve is generated from the first coordinates and the prover second coordinates.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
setting a random number; according to the random number and the base point coordinates, calculating the abscissa of a first point on the elliptic curve; obtaining a target random number, wherein the target random number is a random number under the condition that an abscissa is taken as a dividend, the order of an elliptic curve is taken as a divisor, and the remainder is a non-zero integer, and the remainder is an intermediate parameter for digital signature; a random number is determined as a first parameter.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
determining a hash value of the combined positioning information according to the positioning information of the prover and the positioning information of the target witness; calculating the result of the combined positioning information according to the intermediate parameter, the private key, the first parameter, the hash value and the order of the elliptic curve; and when the result of the combined positioning information is a nonzero number, determining the result of the nonzero number of positioning information as a digital signature value of the combined positioning information.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
the temporary variables are constructed according to the following formula:
l=(r+s) -1 *(k-s)mod n
wherein l is a temporary variable; r is an intermediate parameter for digital signature; k is a first parameter; s is a digital signature value of the positioning information after the prover and the target witness are combined; mod is a remainder function; n is the order of the elliptic curve.
In one possible embodiment of the present application, the third sending module 403 may be configured to:
and taking the product of the abscissa and the ordinate of the temporary variable and the base point coordinate as the coordinate value of the first coordinate point.
The function of the blockchain-based zero-knowledge position verification system described in the present application has been described in detail in the method embodiments shown in fig. 1-2, so the description of the present embodiment is not exhaustive, and reference is made to the related description in the foregoing embodiments, which is not repeated herein.
Fig. 5 is a schematic diagram of a zero-knowledge position verification system based on a blockchain according to an embodiment of the present application. The blockchain-based zero knowledge location verification system is applied to a verifier side, and the blockchain-based zero knowledge location verification system can include: a receiving module 501, a calculating module 502, a judging module 503 and a determining module 504.
Specifically, the receiving module 501 is configured to receive a zero knowledge proof request sent by a prover, where the zero knowledge proof request includes a first coordinate point and a first parameter; the calculation module 502 is configured to calculate the first parameter and the base point coordinate of the elliptic curve according to scalar multiplication of the elliptic curve, and determine a second coordinate point; a judging module 503, configured to judge whether the second coordinate point is consistent with the first coordinate point; a determining module 504, configured to determine that the positioning information of the prover is trusted when the second coordinate point is consistent with the first coordinate point.
In this embodiment of the present application, when the receiving module 501 receives a zero knowledge proof request sent by a prover, the calculating module 502 calculates a first parameter and a base point coordinate of an elliptic curve according to scalar multiplication of the elliptic curve, determines a second coordinate point, and then the judging module 503 judges whether the second coordinate point is consistent with the first coordinate point, if so, the determining module 504 determines that positioning information of the prover is reliable. The first coordinate point may be verified by elliptic curve scalar multiplication to prove that the prover's positioning information is authentic, and the prover's positioning information may be verified without revealing the prover's positioning information's data.
The function of the blockchain-based zero-knowledge position verification system described in the present application has been described in detail in the method embodiment shown in fig. 3, so the description of this embodiment is not exhaustive, and reference is made to the related description in the foregoing embodiment, which is not repeated here.
Optionally, the embodiment of the present application further provides a terminal device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program when executed by the processor implements each process of the embodiment of the blockchain-based zero-knowledge location proving method, and can achieve the same technical effect, and for avoiding repetition, a description is omitted herein.
Optionally, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements each process of the embodiment of the zero-knowledge location verification method based on blockchain, and the process can achieve the same technical effect, so that repetition is avoided, and details are not repeated herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (9)

1. A blockchain-based zero-knowledge location verification method, comprising:
searching witness in a preset range under the condition that a prover needs to prove the position of the prover, and sending a request for maintaining communication to the witness;
sending a location proof request to at least one target witness when a reply of the at least one target witness is received, wherein the target witness is a witness agreeing to keep a communication request in the witness within the preset range, and the location proof request comprises a timestamp and an identity of the prover;
transmitting a zero-knowledge proof request to a verifier based on the positioning information under the condition that the positioning information of at least one target witness is received, wherein the zero-knowledge proof request comprises a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to the positioning information; the verifier is a blockchain network;
wherein said sending a zero knowledge proof request to a prover based on said location information if said location information of at least one of said target witness is received comprises:
generating an elliptic curve according to the positioning information of the target witness;
determining the base point coordinates of the elliptic curve;
determining a first parameter according to the elliptic curve and the base point coordinates, wherein the first parameter is a parameter for digital signature;
calculating a digital signature value of the positioning information after the prover and the target witness are combined according to the first parameter;
constructing a temporary variable according to the digital signature value and the first parameter;
and determining a first coordinate point according to the temporary variable.
2. The method of claim 1, wherein the generating an elliptic curve from the location information of the target witness comprises:
determining a first coordinate of the target witness according to the positioning information of the target witness;
and generating an elliptic curve according to the first coordinates and the second coordinates of the prover.
3. The method of claim 1, wherein said determining a first parameter from said elliptic curve and said base point coordinates comprises:
setting a random number;
calculating the abscissa of a first point on the elliptic curve according to the random number and the base point coordinate;
obtaining a target random number, wherein the target random number is a random number under the condition that the abscissa is taken as a dividend, the order of the elliptic curve is a divisor, and the remainder is a non-zero integer, and the remainder is an intermediate parameter for digital signature;
the target random number is determined as a first parameter.
4. A method as in claim 3, wherein said calculating a digital signature value of the location information of the prover combined with the target witness based on the first parameter comprises:
determining a hash value of the combined positioning information according to the positioning information of the prover and the positioning information of the target witness;
calculating the result of the combined positioning information according to the intermediate parameter, the private key, the first parameter, the hash value and the order of the elliptic curve;
and determining the result of the non-zero positioning information as the digital signature value of the combined positioning information when the result of the combined positioning information is the non-zero number.
5. The method of claim 4, wherein constructing a temporary variable from the digital signature value and the first parameter comprises:
the temporary variables are constructed according to the following formula:
l=(r+s) -1 *(k-s)mod n
wherein, the liquid crystal display device comprises a liquid crystal display device,lis a temporary variable; r is an intermediate parameter for digital signature; k is a first parameter; s is a digital signature value of the positioning information after the prover and the target witness are combined; mod is a remainder function; n is the order of the elliptic curve.
6. The method of claim 1, wherein determining the first coordinate point based on the temporary variable comprises:
and taking the product of the abscissa and the ordinate of the temporary variable and the base point coordinate as the coordinate value of the first coordinate point.
7. A blockchain-based zero-knowledge location verification system, comprising:
the first sending module is used for searching witness in a preset range under the condition that the prover needs to prove the position of the prover, and sending a communication maintaining request to the witness;
the second sending module is used for sending a position proving request to at least one target witness when receiving a reply of the at least one target witness, wherein the target witness is a witness agreeing to keep a communication request in the witness within the preset range, and the position proving request comprises a time stamp and an identity mark of the prover;
the third sending module is used for sending a zero knowledge proof request to a verifier based on the positioning information under the condition that the positioning information of at least one target witness is received, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter, and the first coordinate point and the first parameter are generated according to the positioning information; the verifier is a blockchain network;
wherein, the third sending module is configured to: generating an elliptic curve according to the positioning information of the target witness; determining the base point coordinates of the elliptic curve; determining a first parameter according to the elliptic curve and the base point coordinates, wherein the first parameter is a parameter for digital signature; calculating a digital signature value of the positioning information after the prover and the target witness are combined according to the first parameter; constructing a temporary variable according to the digital signature value and the first parameter; and determining a first coordinate point according to the temporary variable.
8. A zero knowledge location verification method based on a blockchain, wherein the method is applied to a verifier, the verifier being a blockchain network, comprising:
receiving a zero knowledge proof request sent by a prover, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter;
calculating the first parameter and the base point coordinates of the elliptic curve according to scalar multiplication operation of the elliptic curve, and determining a second coordinate point;
judging whether the second coordinate point is consistent with the first coordinate point or not;
determining that the positioning information of the prover is credible under the condition that the second coordinate point is consistent with the first coordinate point;
wherein the first parameter is that the prover generates an elliptic curve according to the positioning information of the target witness; determining the base point coordinates of the elliptic curve; the first parameter is determined according to the elliptic curve and the base point coordinates, and the first parameter is a parameter for digital signature; the first coordinate point is a digital signature value of positioning information after the prover and the target witness are combined according to the first parameter by the prover; constructing a temporary variable according to the digital signature value and the first parameter; and determining according to the temporary variable.
9. A blockchain-based zero-knowledge location verification system, the system being applied to a verifier side, the verifier being a blockchain network, comprising:
the receiving module is used for receiving a zero knowledge proof request sent by a prover, wherein the zero knowledge proof request comprises a first coordinate point and a first parameter;
the calculation module is used for calculating the first parameter and the base point coordinates of the elliptic curve according to scalar multiplication operation of the elliptic curve and determining a second coordinate point;
the judging module is used for judging whether the second coordinate point is consistent with the first coordinate point or not;
the determining module is used for determining that the positioning information of the prover is credible under the condition that the second coordinate point is consistent with the first coordinate point;
wherein the first parameter is that the prover generates an elliptic curve according to the positioning information of the target witness; determining the base point coordinates of the elliptic curve; the first parameter is determined according to the elliptic curve and the base point coordinates, and the first parameter is a parameter for digital signature; the first coordinate point is a digital signature value of positioning information after the prover and the target witness are combined according to the first parameter by the prover; constructing a temporary variable according to the digital signature value and the first parameter; and determining according to the temporary variable.
CN202110498700.8A 2021-05-08 2021-05-08 Zero knowledge position proving method and system based on block chain Active CN114978565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110498700.8A CN114978565B (en) 2021-05-08 2021-05-08 Zero knowledge position proving method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110498700.8A CN114978565B (en) 2021-05-08 2021-05-08 Zero knowledge position proving method and system based on block chain

Publications (2)

Publication Number Publication Date
CN114978565A CN114978565A (en) 2022-08-30
CN114978565B true CN114978565B (en) 2023-07-21

Family

ID=82973429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110498700.8A Active CN114978565B (en) 2021-05-08 2021-05-08 Zero knowledge position proving method and system based on block chain

Country Status (1)

Country Link
CN (1) CN114978565B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10171249B2 (en) * 2015-11-17 2019-01-01 International Business Machines Corporation Privacy friendly location based services
US10484350B2 (en) * 2017-04-26 2019-11-19 At&T Intellectual Property I, L.P. Privacy-preserving location corroborations
US11356262B2 (en) * 2018-07-03 2022-06-07 Royal Bank Of Canada System and method for anonymous location verification
CN109309681B (en) * 2018-10-22 2020-08-28 北京理工大学 Privacy protection path sharing method and system
CN110620772B (en) * 2019-09-20 2021-06-25 西安电子科技大学 Block chain-based spatial crowdsourcing multi-level position privacy protection method

Also Published As

Publication number Publication date
CN114978565A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
Vasudev et al. A lightweight mutual authentication protocol for V2V communication in internet of vehicles
CN110678770B (en) Positioning information verification
KR102106092B1 (en) Generating and publishing validated location information
TWI463849B (en) Method and apparatus for securing location information and access control using the location information
CN110505046B (en) Multi-data provider encrypted data cross-platform zero-knowledge verification method, device and medium
EP3127309B1 (en) Transmission of beacon message
CN109688107B (en) Cloud data safety positioning method based on integrity audit and communication time delay
JP2010519788A5 (en)
Victor et al. Geofences on the blockchain: Enabling decentralized location-based services
Han et al. Anonymous-authentication scheme based on fog computing for VANET
Jiang et al. Privacy preserved wireless sensor location protocols based on mobile edge computing
US9787667B2 (en) Attested sensor data reporting
Baruah et al. A security and privacy preserved intelligent vehicle navigation system
CN110808953A (en) Cloud data verifiable backup method with position perception
CN114978565B (en) Zero knowledge position proving method and system based on block chain
CN108920973B (en) Method and apparatus for querying information in location-based service
US20220029827A1 (en) Computer-Implemented System and Method for Determining or Verifying Location
US20220303769A1 (en) Enabling cellular network access via device identifier composition engine (dice)
Paliwal et al. Dynamic private Modulus based password conditional privacy preserving authentication and key-agreement protocol for VANET
CN107273444B (en) Query verification method based on service provider credit under data outsourcing scene
CN104504346A (en) Remote data integrity probability detection method and system
EP4093061A1 (en) Private location verification and enhancement
JP2019201398A (en) Device and method for certifying reliability of public key, and program therefor
EP4290801A2 (en) Distributed private location verification and enhancement
CN113972984B (en) ElGamal ciphertext equivalent judgment method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant