A method for multi-party authentication and data protection of electronic contracts

Through large prime number encryption and elliptic curve encryption technology, combined with anonymous identity and session key negotiation, the problem of electronic contract signature and data secure distribution between multiple parties is solved, and safe and reliable electronic contract authentication and signature processing are achieved.

CN117499027BActive Publication Date: 2024-10-18SHANGHAI LANGHUI HUIKE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311384815.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2024-10-18
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

On an open network, how to exchange digital signatures of electronic contracts in a lightweight and fair way between multiple mutually distrustful subjects, ensuring that both parties get valid signatures at the end of the agreement, or that neither party gets a signature, and that the electronic contract is During the signing process, multi-party identity authentication and data secure distribution are achieved.

Method used

Use large prime number encryption and elliptic curve encryption technology to generate security parameters, build the protocol master key and parameters, use anonymous identities for identity authentication to prevent information leakage, and ensure the private key through re-randomization of the contract subject firewall and session key negotiation Security and data encryption.

Benefits of technology

It effectively protects the security of electronic contract data, prevents the leakage of private keys and information, improves the internal security of private keys, and achieves reliable electronic contract authentication and signature processing between multiple parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499027B_ABST
    Figure CN117499027B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electronic contract data protection, and discloses an electronic contract multi-party subject authentication and data protection method, the method comprising: an authentication server generates security parameters, determines a protocol master key based on the security parameters and a cyclic addition group and forms protocol parameters; the authentication server generates public and private keys and an anonymous identity based on the submitted user information using the protocol parameters and the protocol master key and returns them to the contract subject; the contract subject firewall re-randomizes the received private key; the contract subject calculates the current session token and timestamp information to generate the current session key, and uses the current session key to encrypt and communicate the electronic contract content. The present invention generates the current session key between multiple subjects based on the current session token and timestamp information, encrypts the electronic contract content using the current session keys of different contract subjects, and realizes the electronic contract authentication processing under multiple encryption and random processing environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic contract data protection, and in particular to an electronic contract multi-party subject authentication and data protection method. Background Art

[0002] With the development of the Internet, more and more services are transferred from offline to online. The drawbacks of traditional paper contract signing being constrained by time and space have become increasingly prominent. The online signing of electronic contracts can effectively solve the drawbacks of traditional paper contracts. As a new form of economic activity, online signing not only needs to meet some traditional information security requirements, but also needs to meet new security features such as fairness and non-abuse. How to exchange digital signatures of electronic contracts between multiple mutually untrusting entities in an open network in a lightweight and fair manner, so that at the end of the agreement, either both parties get the other party's valid signature on the electronic contract, or neither party gets it. The most critical part is the multi-party subject identity authentication and data security distribution during the electronic contract signing process. In response to this problem, the present invention proposes an electronic contract multi-party subject authentication and data protection method to ensure that electronic signing is safe and reliable. Summary of the invention

[0003] In view of this, the present invention provides an electronic contract multi-party subject authentication and data protection method, the purpose of which is to: 1) generate security parameters by using a large prime number encryption method, and adopt an elliptic cyclic encryption method, in combination with the security parameters, construct a protocol master key and protocol parameters, use the constructed protocol master key and protocol parameters to encrypt the contract subject information to be authenticated, generate public and private keys and anonymous identities for each contract subject, and use anonymous identities to perform identity authentication during the electronic contract authentication process to avoid information leakage of the contract subject user, and only the authentication server has the private key information of all contract subjects, avoiding leakage of the private keys of the contract subjects and encryption of the electronic contract content. The contract entity firewall re-randomizes the received private key to resist attacks from within the contract entity, improve the internal security of the private key, and generates the current session key between multiple parties based on the current session token and timestamp information. The electronic contract content is encrypted using the current session keys of different contract entities, and the encrypted result is sent to the corresponding contract entity according to the current session key adopted. The contract entity that receives the encrypted result decrypts the encrypted result using its own private key and gives its own signature, thereby realizing electronic contract authentication processing in a multiple encryption and randomized processing environment.

[0004] To achieve the above-mentioned purpose, the present invention provides an electronic contract multi-party authentication and data protection method, comprising the following steps:

[0005] S1: construct an electronic contract multi-party authentication model, the model including an authentication server, a contract subject and a contract subject firewall;

[0006] S2: The authentication server generates security parameters, selects a cyclic addition group from a non-singular elliptic curve, determines a protocol master key based on the security parameters and the cyclic addition group, and forms protocol parameters;

[0007] S3: The contract subject submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys, and returns them to the contract subject.

[0008] S4: The contract subject firewall re-randomizes the received private key to obtain a re-randomized user private key;

[0009] S5: The contract subject calculates the current session token and timestamp information, performs multi-party contract subject identity authentication based on the re-randomized user private key, negotiates a consistent current session key, and uses the current session key to encrypt the electronic contract content.

[0010] As a further improvement method of the present invention:

[0011] Optionally, constructing an electronic contract multi-party authentication model in step S1 includes:

[0012] Constructing an electronic contract multi-party subject authentication model, wherein the electronic contract multi-party subject authentication model includes an authentication server, multi-party contract subjects and a contract subject firewall;

[0013] The authentication server is used to generate security parameters and form protocol parameters for communication between multiple contract parties based on the security parameters. According to the user information submitted by the contract party, the protocol parameters are used to generate public and private keys and anonymous identities respectively, and the generated results are returned to the corresponding contract party.

[0014] The contract subject is the user subject that needs to perform electronic contract signature authentication. Each contract subject has an independent contract subject firewall, which is used to re-randomize the key message sent by the contract subject. The multi-party contract subjects and the corresponding contract subject firewall set are:

[0015] {(ID n ,F n )|n∈[1,N]}

[0016] in:

[0017] ID n Indicates the user information of the nth contract subject, F n It represents the contract subject firewall corresponding to the nth contract subject, and N represents the number of user subjects to be authenticated in the electronic contract.

[0018] Optionally, in step S2, the authentication server generates security parameters and selects a cyclic addition group, including:

[0019] The authentication server sets the length parameter n, and selects different prime numbers a and b with a length of [n / 3] bits, and generates security parameters based on the selected prime numbers a and b. The generation formula of the security parameters is:

[0020] gcd(β,a 2 b)=1

[0021] in:

[0022] gcd(·) means finding the greatest common divisor;

[0023] β represents the security parameter generated by the authentication server, which satisfies a 2 The greatest common divisor between b is 1;

[0024] The authentication server initializes and generates a prime number p, constructing a finite field G with a length of p. p , where the finite field G p There is a set Z p :

[0025] Z p ={0,1,...,p―1}

[0026] Based on the generated finite field, the elliptic curve E(G p ):

[0027] E(G p )={(x,y)∈(G p ) 2 |y 2 ≡x 3 +ex+g(mod p),4e 3 +27g 2 ≠0(mod p)}

[0028] in:

[0029] mod represents the modulus symbol;

[0030] e, g are the parameters of the elliptic curve;

[0031] ≡ represents the congruence symbol;

[0032] The elliptic curve E(G p ) is a non-singular elliptic curve;

[0033] (x,y) represents the elliptic curve E(G p ) where (x,y)∈(Gp ) 2 Indicates that x ∈ Z p , y ∈ Z p ;

[0034] Determine the parameter q, where q < p, and select q coordinate points in the elliptic curve E(G p ) to form a cyclic additive group Q, and randomly select a coordinate point from the cyclic additive group as the reference coordinate point Q0.

[0035] Optionally, in step S2, determining the protocol master key according to the security parameter and the cyclic additive group and forming protocol parameters includes:

[0036] The authentication server determines the protocol master key according to the security parameter β and the cyclic additive group Q and forms protocol parameters. The construction process of the protocol master key and protocol parameters is as follows:

[0037] S21: The authentication server generates the protocol master key r0:

[0038] r0 = βQ0

[0039] S22: The authentication server constructs a hash security function based on the cyclic additive group Q:

[0040] H0: {0, 1} * ×Q → {0, 1} q

[0041] H1: {0, 1} *2 ×Q × {0, 1} * → {0, 1} q

[0042] H2: {0, 1} *3 ×Q × Q → {0, 1} q

[0043] Where:

[0044] H0, H1, H2 represent the three constructed hash security functions;

[0045] ×Q represents multiplying by any coordinate point in the cyclic additive group Q;

[0046] {0, 1} * represents an arbitrarily long bit string input to the hash security function, → {0, 1} q represents mapping to a bit string of length q;

[0047] S23: The authentication server generates protocol parameters: {Q0, p, q, H0, H1, H2}, and broadcasts the generated protocol parameters to the contract parties in the multi-party authentication model of electronic contracts.

[0048] Optionally, in step S3, the authentication server generates public and private keys and an anonymous identity respectively based on the submitted user information using protocol parameters and a protocol master key and returns them to the contract subject, including:

[0049] The contract subject in the electronic contract multi-party authentication model submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys and returns them to the contract subject. The authentication server generates the public and private keys and anonymous identities for the nth contract subject as follows:

[0050] S31: Receive the user information ID of the nth contract subject in the electronic contract multi-party subject authentication model n , and randomly select R n ∈Z p , calculate r n =R n Q0, r n ,R n Generate the key parameters for the nth contract subject;

[0051] S32: Generate the public and private keys of the nth contract subject using the hash security function:

[0052] pk n =r n

[0053] sk n =R n H1(H0(r0,R n ,ID n ,Q0),r n )

[0054] in:

[0055] pk n Represents the public key of the nth contract subject in the electronic contract multi-party authentication model;

[0056] sk n Represents the private key of the nth contract subject in the electronic contract multi-party authentication model;

[0057] S33: Generate the anonymous identity of the nth contract subject:

[0058] ID′ n =H2(ID n )

[0059] in:

[0060] ID′ n Represents the anonymous identity of the nth contract subject in the electronic contract multi-party authentication model;

[0061] The authentication server sends the public and private key (pk n ,sk n ), the key generation parameters are sent to the nth contract subject, and the anonymous identity ID′ of the nth contract subject is sent to the nth contract subject. n The broadcast is sent to all contract parties in the electronic contract multi-party authentication model.

[0062] Optionally, in step S4, the contract subject firewall re-randomizes the received private key, including:

[0063] The contract subject firewall re-randomizes the received private key, where the contract subject firewall F n For the private key sk n The re-randomization process is:

[0064] From the set Z p Randomly select a random value α n , using the randomization value α n For the private key sk n To perform randomization:

[0065] sk′ n =α n sk n

[0066] in:

[0067] sk′ n Represents the private key sk n The results of randomization.

[0068] Optionally, in step S5, the contract subject calculates the current session token and timestamp information, and performs multi-party contract subject identity authentication based on the re-randomized user private key to negotiate a consistent current session key, including:

[0069] The contract subject calculates the current session token and timestamp information, and performs multi-party contract subject identity authentication based on the re-randomized user private key, and negotiates a consistent current session key. The current session key negotiation process between the nth contract subject and the jth contract subject in the electronic contract multi-party subject authentication model is as follows:

[0070] S51: The nth contract subject randomly selects a temporary parameter k n ∈Z p , calculate the current session token M n :

[0071] M n =k n Q0

[0072] And get the current timestamp information t n , construct the negotiation message with the j-th contract subject:

[0073]

[0074] in:

[0075] Indicates that the nth contract subject is at t n The negotiation message with the j-th contract subject generated by the timestamp;

[0076] j∈[1,N];

[0077] S52: The jth contract subject receives the negotiation message After that, a temporary parameter k is randomly selected j ∈Z p , calculate the current session token M j :

[0078] M j =k j Q0

[0079] And get the current timestamp information t j , construct and obtain the negotiation reply message with the nth contract subject:

[0080]

[0081] in:

[0082] Indicates that the j-th contract subject is at t j The negotiation reply message of the nth contract subject generated by the timestamp;

[0083] sk′ j Represents the j-th contract subject private key sk j The randomization results, R j represents the key generation parameters of the j-th contract subject;

[0084] S53: The jth contract subject verifies the negotiation information and generates the current session key after passing the verification. The verification method is: if |t j ―t n |If it is less than the preset timestamp threshold, the verification is passed;

[0085] The current session key generation formula is:

[0086] Key j (n,t j ,T)=H1(k j M j )sk′j (pk n H0(R n ,ID′ n )+Q0)

[0087] in:

[0088] Key j (n,t j ,T) represents the current session key for the communication between the j-th contract subject and the n-th contract subject, where the valid timestamp range of the current session key is [t j ,t j +T], where T represents the preset validity period of the session key;

[0089] S54: The nth contract subject verifies the negotiation reply information, and generates the current session key after the verification is passed; the generation formula of the current session key is:

[0090] Key n (j,t j ,T)=H1(k n M n )sk′ n (pk j H0(R j ,ID′ j )+Q0)

[0091] in:

[0092] Key n (j,t j ,T) represents the current session key for the nth contract subject to communicate with the jth contract subject;

[0093] If the nth contract subject and the jth contract subject are both legal users, then Key j (n,t j ,T)=key n (j,t j ,T).

[0094] Optionally, the step S5 uses the current session key to encrypt the electronic contract content, including:

[0095] The nth contract subject proposes the content of the electronic contract, and uses the current session key of different contract subjects to encrypt the electronic contract content, and sends the encrypted result to the corresponding contract subject according to the current session key adopted. The contract subject that receives the encrypted result uses its own private key to decrypt the encrypted result, gives its own signature, encrypts it with the current session key, and sends the encrypted result to the nth contract subject. The nth contract subject uses the private key sk nDecryption is performed to complete the multi-party signature authentication of the electronic contract. The electronic contract signature process of the nth contract subject and the jth contract subject is as follows:

[0096] The nth contract subject encrypts the electronic contract content data:

[0097] data * (j)=Key n (j,t j ,T) data pk n mod(pk n ) 2

[0098] in:

[0099] data * (j) is the encryption result that needs to be sent to the j-th contract entity;

[0100] The data * (j) is sent to the jth contract subject, who uses his own private key to * (j) Decryption is performed, wherein the decryption formula is:

[0101]

[0102] The jth contract subject gives its own signature for the decrypted result, encrypts its own signature using the current session key, and sends the encrypted result to the nth contract subject, who then uses the private key sk n Decryption processing is performed to obtain the signature result of the j-th contract subject. In the embodiment of the present invention, the electronic contract content includes the signature of the party proposing the electronic contract content.

[0103] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:

[0104] A memory storing at least one instruction;

[0105] Communication interface, enabling electronic equipment to communicate; and

[0106] The processor executes the instructions stored in the memory to implement the above-mentioned electronic contract multi-party authentication and data protection method.

[0107] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned electronic contract multi-party authentication and data protection method.

[0108] Compared with the prior art, the present invention proposes an electronic contract multi-party authentication and data protection method, which has the following advantages:

[0109] First, this scheme proposes a method for generating key information of multiple parties. The authentication server determines the protocol master key and forms the protocol parameters based on the security parameter β and the cyclic addition group Q. The construction process of the protocol master key and the protocol parameters is as follows: The authentication server generates the protocol master key r0:

[0110] r0=βQ0

[0111] The authentication server constructs a hash security function based on the cyclic addition group Q:

[0112] H0:{0,1} * ×Q→{0,1} q

[0113] H1:{0,1} *2 ×Q×{0,1} * →{0,1} q

[0114] H2:{0,1} *3 ×Q×Q→{0,1} q

[0115] Where: H0, H1, H2 represent the three constructed hash security functions; ×Q represents multiplication by any coordinate point in the cyclic addition group Q; {0,1} * An arbitrary long bit string representing the input to a secure hash function, →{0,1} q Represents mapping to a bit string of length q; the authentication server generates protocol parameters: {Q0, p, q, H0, H1, H2}, and broadcasts the generated protocol parameters to the contract subject in the electronic contract multi-party subject authentication model. The contract subject in the electronic contract multi-party subject authentication model submits user information to the authentication server. The authentication server uses the protocol parameters and the protocol master key to generate public and private keys and an anonymous identity based on the submitted user information and returns them to the contract subject. The authentication server generates the public and private keys and anonymous identity for the nth contract subject as follows: Receive the user information ID of the nth contract subject in the electronic contract multi-party subject authentication model n , and randomly select R n ∈Z p , calculate r n =R n Q0, r n ,R n Generate the key parameters for the nth contract subject; use the hash security function to generate the public and private keys of the nth contract subject:

[0116] pkn =r n

[0117] sk n =R n H1(H0(r0,R n ,ID n ,Q0),r n )

[0118] Where: pk n Represents the public key of the nth contract subject in the electronic contract multi-party authentication model; sk n Represents the private key of the nth contract subject in the electronic contract multi-party authentication model; generates the anonymous identity of the nth contract subject:

[0119] ID′ n =H2(ID n )

[0120] Where: ID′ n Indicates the anonymous identity of the nth contract subject in the electronic contract multi-party subject authentication model; the authentication server sends the public and private key (pk n ,sk n ), the key generation parameters are sent to the nth contract subject, and the anonymous identity ID′ of the nth contract subject is sent to the nth contract subject. n The broadcast is sent to all contract parties in the electronic contract multi-party subject authentication model. This scheme uses large prime number encryption to generate security parameters, and adopts elliptic cyclic encryption to construct the protocol master key and protocol parameters in combination with security parameters. The constructed protocol master key and protocol parameters are used to encrypt the contract subject information to be authenticated, and the public and private keys and anonymous identities of each contract subject are generated. In the process of electronic contract authentication, anonymous identities are used for identity authentication to avoid information leakage of contract subject users, and only the authentication server has the private key information of all contract subjects, avoiding the leakage of the private keys of the contract subjects and the information leakage of the electronic contract content encryption results, effectively ensuring the security of electronic contract data.

[0121] At the same time, this scheme proposes a method for generating session keys between multiple parties in an electronic contract. The contract subject calculates the current session token and timestamp information, and performs identity authentication of multiple contract subjects based on the re-randomized user private key to negotiate a consistent current session key. The current session key negotiation process between the nth contract subject and the jth contract subject in the electronic contract multi-party subject authentication model is as follows: the nth contract subject randomly selects a temporary parameter k n ∈Z p , calculate the current session token M n :

[0122] Mn =k n Q0

[0123] And get the current timestamp information t n , construct the negotiation message with the j-th contract subject:

[0124]

[0125] in: Indicates that the nth contract subject is at t n The negotiation message with the j-th contract subject generated by the timestamp; j∈[1,N]; the j-th contract subject receives the negotiation message After that, a temporary parameter k is randomly selected j ∈Z p , calculate the current session token M j :

[0126] M j =k j Q0

[0127] And get the current timestamp information t j , construct and obtain the negotiation reply message with the nth contract subject:

[0128]

[0129] in: Indicates that the j-th contract subject is at t j The negotiation reply message of the nth contract subject generated by the timestamp; sk′ j Represents the j-th contract subject private key sk j The randomization results, R j represents the key generation parameter of the j-th contract subject; the j-th contract subject verifies the negotiation information and generates the current session key after passing the verification, wherein the verification method is: if |t j ―t n | is less than the preset timestamp threshold, the verification is successful; the current session key generation formula is:

[0130] Key j (n,t j ,T)=H1(k j M j )sk′ j (pk n H0(R n ,ID′ n )+Q0)

[0131] Among them: Key j (n,t j,T) represents the current session key for the communication between the j-th contract subject and the n-th contract subject, where the valid timestamp range of the current session key is [t j ,t j +T], T represents the preset validity period of the session key; the nth contract subject verifies the negotiation reply information, and generates the current session key after the verification is passed; the generation formula of the current session key is:

[0132] Key n (j,t j ,T)=H1(k n M n )sk′ n (pk j H0(R j ,ID′ j )+Q0)

[0133] Among them: Key n (j,t j ,T) represents the current session key for the nth contract subject to communicate with the jth contract subject; if the nth contract subject and the jth contract subject are both legal users, then Key j (n,t j ,T)=Key n (j,t j ,T). The contract subject firewall re-randomizes the received private key to resist attacks from within the contract subject, improve the internal security of the private key, and generates the current session key between multiple parties based on the current session token and timestamp information, encrypts the electronic contract content using the current session keys of different contract subjects, and sends the encryption result to the corresponding contract subject according to the current session key taken. The contract subject that receives the encryption result uses its own private key to decrypt the encryption result and gives its own signature, realizing the electronic contract authentication processing under multiple encryption and random processing environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0134] Figure 1 A flowchart of a multi-party authentication and data protection method for an electronic contract provided by an embodiment of the present invention;

[0135] Figure 2 A schematic diagram of the structure of an electronic device for implementing an electronic contract multi-party authentication and data protection method provided by an embodiment of the present invention.

[0136] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0137] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0138] The embodiment of the present application provides an electronic contract multi-party subject authentication and data protection method. The execution subject of the electronic contract multi-party subject authentication and data protection method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the electronic contract multi-party subject authentication and data protection method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0139] Embodiment 1:

[0140] S1: Construct an electronic contract multi-party authentication model, which includes an authentication server, a contract subject and a contract subject firewall.

[0141] The electronic contract multi-party authentication model is constructed in step S1, including:

[0142] Constructing an electronic contract multi-party subject authentication model, wherein the electronic contract multi-party subject authentication model includes an authentication server, multi-party contract subjects and a contract subject firewall;

[0143] The authentication server is used to generate security parameters and form protocol parameters for communication between multiple contract parties based on the security parameters. According to the user information submitted by the contract parties, the protocol parameters are used to generate public and private keys and anonymous identities respectively, and the generated results are returned to the corresponding contract parties.

[0144] The contract subject is the user subject that needs to perform electronic contract signature authentication. Each contract subject has an independent contract subject firewall, which is used to re-randomize the key message sent by the contract subject. The multi-party contract subjects and the corresponding contract subject firewall set are:

[0145] {(ID n ,F n )|n∈[1,N]}

[0146] in:

[0147] ID n Indicates the user information of the nth contract subject, F n It represents the contract subject firewall corresponding to the nth contract subject, and N represents the number of user subjects to be authenticated in the electronic contract.

[0148] S2: The authentication server generates security parameters, selects a cyclic additive group in a non-singular elliptic curve, and determines the protocol master key based on the security parameters and the cyclic additive group to form protocol parameters.

[0149] In the S2 step, when the authentication server generates security parameters and selects a cyclic additive group, it includes:

[0150] The authentication server sets the length parameter n, filters out distinct prime numbers a and b with a length of [n / 3] bits, and generates security parameters based on the filtered prime numbers a and b. The generation formula for the security parameters is:

[0151] gcd(β, a 2 b) = 1

[0152] Where:

[0153] gcd(·) represents finding the greatest common divisor;

[0154] β represents the security parameter generated by the authentication server, satisfying that the greatest common divisor with a 2 b is 1;

[0155] The authentication server initializes and generates a prime number p, and constructs a finite field G with a length of p p , where the finite field G p has a set Z p :

[0156] Z p = {0, 1,..., p - 1}

[0157] Based on the generated finite field, an elliptic curve E(G p ) is constructed:

[0158]

[0159] Where:

[0160] mod represents the modulo symbol;

[0161] e, g are parameters of the elliptic curve;

[0162] ≡ represents the congruence symbol;

[0163] (x, y) represents the coordinate point in the elliptic curve E(G p ), where (x, y) ∈ (G p ) 2 means x ∈ Z p and y ∈ Z p ;

[0164] Determine the parameter q, where the parameter q < p, in the elliptic curve E(G p) to form a cyclic additive group Q, and randomly select a coordinate point from the cyclic additive group as the reference coordinate point Q0.

[0165] In the step S2, the protocol master key is determined according to the security parameter and the cyclic addition group and the protocol parameters are formed, including:

[0166] The authentication server determines the protocol master key and constructs the protocol parameters based on the security parameter β and the cyclic addition group Q. The construction process of the protocol master key and protocol parameters is as follows:

[0167] S21: The authentication server generates the protocol master key r0:

[0168] r0=βQ0

[0169] S22: The authentication server constructs a hash security function based on the cyclic addition group Q:

[0170] H0:{0,1} * ×Q→{0,1} q

[0171] H1:{0,1} *2 ×Q×{0,1} * →{0,1} q

[0172] H2:{0,1} *3 ×Q×Q→{0,1} q

[0173] in:

[0174] H0, H1, and H2 represent the three constructed hash security functions;

[0175] ×Q means multiplying any coordinate point in the cyclic additive group Q;

[0176] {0,1} * An arbitrary long bit string representing the input to a secure hash function, →{0,1} q It represents the mapping to a bit string of length q;

[0177] S23: The authentication server generates protocol parameters: {Q0, p, q, H0, H1, H2}, and broadcasts the generated protocol parameters to the contract parties in the electronic contract multi-party authentication model.

[0178] S3: The contract subject submits user information to the authentication server. The authentication server generates public and private keys and an anonymous identity based on the submitted user information using protocol parameters and protocol master key and returns them to the contract subject.

[0179] In the step S3, the authentication server generates public and private keys and an anonymous identity respectively based on the submitted user information using the protocol parameters and the protocol master key and returns them to the contract subject, including:

[0180] The contract subject in the electronic contract multi-party authentication model submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys and returns them to the contract subject. The authentication server generates the public and private keys and anonymous identities for the nth contract subject as follows:

[0181] S31: Receive the user information ID of the nth contract subject in the electronic contract multi-party subject authentication model n , and randomly select R n ∈Z p , calculate r n =R n Q0, r n ,R n Generate the key parameters for the nth contract subject;

[0182] S32: Generate the public and private keys of the nth contract subject using the hash security function:

[0183] pk n =r n

[0184] sk n =R n H1(H0(r0,R n ,ID n ,Q0),r n )

[0185] in:

[0186] pk n Represents the public key of the nth contract subject in the electronic contract multi-party authentication model;

[0187] sk n Represents the private key of the nth contract subject in the electronic contract multi-party authentication model;

[0188] S33: Generate the anonymous identity of the nth contract subject:

[0189] ID′ n =H2(ID n )

[0190] in:

[0191] ID′ n Represents the anonymous identity of the nth contract subject in the electronic contract multi-party authentication model;

[0192] The authentication server sends the public and private key (pk n ,sk n ), the key generation parameters are sent to the nth contract subject, and the anonymous identity ID′ of the nth contract subject is sent to the nth contract subject. n The broadcast is sent to all contract parties in the electronic contract multi-party authentication model.

[0193] S4: The contract subject firewall re-randomizes the received private key to obtain a re-randomized user private key.

[0194] In step S4, the contract subject firewall re-randomizes the received private key, including:

[0195] The contract subject firewall re-randomizes the received private key, where the contract subject firewall F n For the private key sk n The re-randomization process is:

[0196] From the set Z p Randomly select a random value α n , using the randomization value α n For the private key sk n To perform randomization:

[0197] sk′ n =α n sk n

[0198] in:

[0199] sk′ n Represents the private key sk n The results of randomization.

[0200] S5: The contract subject calculates the current session token and timestamp information, performs multi-party contract subject identity authentication based on the re-randomized user private key, negotiates a consistent current session key, and uses the current session key to encrypt the electronic contract content.

[0201] In step S5, the contract subject calculates the current session token and timestamp information, and performs multi-party contract subject identity authentication based on the re-randomized user private key, and negotiates a consistent current session key, including:

[0202] The contract subject calculates the current session token and timestamp information, and performs multi-party contract subject identity authentication based on the re-randomized user private key, and negotiates a consistent current session key. The current session key negotiation process between the nth contract subject and the jth contract subject in the electronic contract multi-party subject authentication model is as follows:

[0203] S51: The nth contract subject randomly selects a temporary parameter k n ∈Z p , calculate the current session token M n :

[0204] M n =k n Q0

[0205] And get the current timestamp information t n , construct the negotiation message with the j-th contract subject:

[0206]

[0207] in:

[0208] Indicates that the nth contract subject is at t n The negotiation message with the j-th contract subject generated by the timestamp;

[0209] j∈[1,N];

[0210] S52: The jth contract subject receives the negotiation message After that, a temporary parameter k is randomly selected j ∈Z p , calculate the current session token M j :

[0211] M j =k j Q0

[0212] And get the current timestamp information t j , construct and obtain the negotiation reply message with the nth contract subject:

[0213]

[0214] in:

[0215] Indicates that the j-th contract subject is at t j The negotiation reply message of the nth contract subject generated by the timestamp;

[0216] sk′ j Represents the j-th contract subject private key sk j The randomization results, R j represents the key generation parameters of the j-th contract subject;

[0217] S53: The jth contract subject verifies the negotiation information and generates the current session key after passing the verification. The verification method is: if |t j ―t n|If it is less than the preset timestamp threshold, the verification is passed;

[0218] The current session key generation formula is:

[0219] Key j (n,t j ,T)=H1(k j M j )sk′ j (pk n H0(R n ,ID′ n )+Q0)

[0220] in:

[0221] Key j (n,t j ,T) represents the current session key for the communication between the j-th contract subject and the n-th contract subject, where the valid timestamp range of the current session key is [t j ,t j +T], where T represents the preset validity period of the session key;

[0222] S54: The nth contract subject verifies the negotiation reply information, and generates the current session key after the verification is passed; the generation formula of the current session key is:

[0223] Key n (j,t j ,T)=H1(k n M n )sk′ n (pk j H0(R j ,ID′ j )+Q0)

[0224] in:

[0225] Key n (j,t j ,T) represents the current session key for the nth contract subject to communicate with the jth contract subject;

[0226] If the nth contract subject and the jth contract subject are both legal users, then Key j (n,t j ,T)=Key n (j,t j ,T).

[0227] The step S5 uses the current session key to encrypt the electronic contract content, including:

[0228] The nth contract subject proposes the content of the electronic contract, and uses the current session key of different contract subjects to encrypt the electronic contract content, and sends the encrypted result to the corresponding contract subject according to the current session key adopted. The contract subject that receives the encrypted result uses its own private key to decrypt the encrypted result, gives its own signature, encrypts it with the current session key, and sends the encrypted result to the nth contract subject. The nth contract subject uses the private key sk n Decryption is performed to complete the multi-party signature authentication of the electronic contract. The electronic contract signature process of the nth contract subject and the jth contract subject is as follows:

[0229] The nth contract subject encrypts the electronic contract content data:

[0230] data * (j)=Key n (j,t j ,T) data pk n mod(pk n ) 2

[0231] in:

[0232] data * (j) is the encryption result that needs to be sent to the j-th contract entity;

[0233] The data * (j) is sent to the jth contract subject, who uses his own private key to * (j) Decryption is performed, where the decryption formula is:

[0234]

[0235] The jth contract subject gives its own signature for the decrypted result, encrypts its own signature using the current session key, and sends the encrypted result to the nth contract subject, who then uses the private key sk n Perform decryption processing to obtain the signature result of the j-th contract subject.

[0236] Embodiment 2:

[0237] like Figure 2 1 is a schematic diagram of the structure of an electronic device for implementing an electronic contract multi-party authentication and data protection method provided by an embodiment of the present invention.

[0238] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .

[0239] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may be used not only to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also to temporarily store data that has been output or is to be output.

[0240] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as programs 12 for implementing multi-party authentication and data protection of electronic contracts), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0241] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.

[0242] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0243] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0244] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0245] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0246] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0247] The program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0248] Construct a multi-party authentication model for electronic contracts;

[0249] The authentication server generates security parameters, selects a cyclic addition group from a non-singular elliptic curve, determines a protocol master key based on the security parameters and the cyclic addition group, and forms protocol parameters;

[0250] The contract subject submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys, and returns them to the contract subject.

[0251] The contract subject firewall re-randomizes the received private key to obtain a re-randomized user private key;

[0252] The contract subject calculates the current session token and timestamp information, performs multi-party contract subject identity authentication based on the re-randomized user private key, negotiates a consistent current session key, and uses the current session key to encrypt the electronic contract content.

[0253] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0254] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method 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, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0255] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0256] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An electronic contract multi-party authentication and data protection method, characterized in that: The method comprises: S1: construct an electronic contract multi-party authentication model, the model including an authentication server, a contract subject and a contract subject firewall; S2: The authentication server generates security parameters, selects a cyclic addition group from a non-singular elliptic curve, determines a protocol master key based on the security parameters and the cyclic addition group, and forms protocol parameters; The authentication server generates security parameters and selects a cyclic addition group, including: The authentication server sets the length parameter n, and selects different prime numbers a and b with a length of [n / 3] bits, and generates security parameters based on the selected prime numbers a and b. The generation formula of the security parameters is: gcd(β,a 2 b)=1 in: gcd(·) means finding the greatest common divisor; β represents the security parameter generated by the authentication server, which satisfies a 2 The greatest common divisor between b is 1; The authentication server initializes and generates a prime number p, constructing a finite field G with a length of p. p , where the finite field G p There is a set Z p : Z p ={0,1,...,p-1} Based on the generated finite field, the elliptic curve E(G p ): in: mod represents the modulus symbol; e, g are the parameters of the elliptic curve; ≡ represents the congruence symbol; (x,y) represents the elliptic curve E(G p ) where (x,y)∈(G p ) 2 Denote x∈Z p , y∈Z p ; Determine the parameter q, where q < p, and select q coordinate points in the elliptic curve E(G p ) to form a cyclic additive group Q, and randomly select a coordinate point from the cyclic additive group as the reference coordinate point Q0; The authentication server determines the protocol master key and constructs the protocol parameters based on the security parameter β and the cyclic addition group Q. The construction process of the protocol master key and protocol parameters is as follows: S21: The authentication server generates the protocol master key r0: r0=βQ0 S22: The authentication server constructs a hash security function based on the cyclic addition group Q: <h2 style=";text-align:left;direction:ltr">H0:{0,1}<h2 style=";text-align:left;direction:ltr"> * <h2 style=";text-align:left;direction:ltr"> ×Q→{0,1}<h2 style=";text-align:left;direction:ltr"> q H1:{0,1} *2 ×Q×{0,1} * →{0,1} q H2:{0,1} *3 ×Q×Q→{0,1} q in: H0, H1, and H2 represent the three constructed hash security functions; ×Q means multiplying any coordinate point in the cyclic additive group Q; {0,1} * An arbitrary long bit string representing the input to a secure hash function, →{0,1} q It represents the mapping to a bit string of length q; S23: The authentication server generates protocol parameters: {Q0, p, q, H0, H1, H2}, and broadcasts the generated protocol parameters to the contract subject in the electronic contract multi-party subject authentication model; S3: The contract subject submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys, and returns them to the contract subject. S4: The contract subject firewall re-randomizes the received private key to obtain a re-randomized user private key; S5: The contract subject calculates the current session token and timestamp information, performs multi-party contract subject identity authentication based on the re-randomized user private key, and negotiates a consistent current session key, and uses the current session key to encrypt the electronic contract content; The current session key negotiation process between the nth contract subject and the jth contract subject in the electronic contract multi-party authentication model is as follows: S51: The nth contract subject randomly selects a temporary parameter k n ∈Z p , calculate the current session token M n : M n =k n Q0 And get the current timestamp information t n , construct the negotiation message with the j-th contract subject: in: Indicates that the nth contract subject is at t n The negotiation message with the j-th contract subject generated by the timestamp; j∈[1,N]; S52: The jth contract subject receives the negotiation message After that, a temporary parameter k is randomly selected j ∈Z p , calculate the current session token M j : M j =k j Q0 And get the current timestamp information t j , construct and obtain the negotiation reply message with the nth contract subject: in: Indicates that the j-th contract subject is at t j The negotiation reply message of the nth contract subject generated by the timestamp; sk' j Represents the j-th contract subject private key sk j The randomization results, R j represents the key generation parameters of the j-th contract subject; S53: The jth contract subject verifies the negotiation information and generates the current session key after passing the verification. The verification method is: if |t j -t n |If it is less than the preset timestamp threshold, the verification is passed; The current session key generation formula is: Key j (n,t j ,T)=H1(k j M j )sk′ j (pk n H0(R n ,ID′ n )+Q0) in: Key j (n,t j ,T) represents the current session key for the communication between the j-th contract subject and the n-th contract subject, where the valid timestamp range of the current session key is [t j ,t j +T], where T represents the preset validity period of the session key; S54: The nth contract subject verifies the negotiation reply information, and generates the current session key after the verification is passed; the generation formula of the current session key is: Key n (j,t j ,T)=H1(k n M n )sk′ n (pk j H0(R j ,ID′ j )+Q0) in: Key n (j,t j ,T) represents the current session key for the nth contract subject to communicate with the jth contract subject; If the nth contract subject and the jth contract subject are both legal users, then Key j (n,t j ,T)=Key n (j,t j ,T); Use the current session key to encrypt the contents of the electronic contract, including: The nth contract subject proposes the content of the electronic contract, and uses the current session key of different contract subjects to encrypt the electronic contract content, and sends the encrypted result to the corresponding contract subject according to the current session key adopted. The contract subject that receives the encrypted result uses its own private key to decrypt the encrypted result, gives its own signature, encrypts it with the current session key, and sends the encrypted result to the nth contract subject. The nth contract subject uses the private key sk n Decryption is performed to obtain the authentication signature, where the electronic contract signature process between the nth contract subject and the jth contract subject is as follows: The nth contract subject encrypts the electronic contract content data: data * (j)=Key n (j,t j ,T) data pk n mod(pk n ) 2 in: data * (j) is the encryption result that needs to be sent to the j-th contract entity; The data * (j) is sent to the jth contract subject, who uses his own private key to * (j) Decryption is performed, where the decryption formula is: The j-th contract subject gives its own signature for the decrypted result, encrypts its own signature using the current session key, and sends the encrypted result to the n-th contract subject. The n-th contract subject uses the private key skn to decrypt and obtain the signature result of the j-th contract subject.

2. The electronic contract multi-party authentication and data protection method as claimed in claim 1, characterized in that: The electronic contract multi-party authentication model is constructed in step S1, including: Constructing an electronic contract multi-party subject authentication model, wherein the electronic contract multi-party subject authentication model includes an authentication server, multi-party contract subjects and a contract subject firewall; The authentication server is used to generate security parameters and form protocol parameters for communication between multiple contract parties based on the security parameters. According to the user information submitted by the contract party, the protocol parameters are used to generate public and private keys and anonymous identities respectively, and the generated results are returned to the corresponding contract party. The contract subject is the user subject that needs to perform electronic contract signature authentication. Each contract subject has an independent contract subject firewall, which is used to re-randomize the key message sent by the contract subject. The multi-party contract subjects and the corresponding contract subject firewall set are: {(ID n ,F n )|n∈[1,N]} in: ID n Indicates the user information of the nth contract subject, F n It represents the contract subject firewall corresponding to the nth contract subject, and N represents the number of user subjects to be authenticated in the electronic contract.

3. The electronic contract multi-party authentication and data protection method as claimed in claim 1, characterized in that: In the step S3, the authentication server generates public and private keys and an anonymous identity respectively based on the submitted user information using the protocol parameters and the protocol master key and returns them to the contract subject, including: The contract subject in the electronic contract multi-party authentication model submits user information to the authentication server. The authentication server generates public and private keys and anonymous identities based on the submitted user information using protocol parameters and protocol master keys and returns them to the contract subject. The authentication server generates the public and private keys and anonymous identities for the nth contract subject as follows: S31: Receive the user information ID of the nth contract subject in the electronic contract multi-party subject authentication model n , and randomly select Rn∈Zp, and calculate rn=RnQ0, where rn,Rn is the key generation parameter of the nth contract subject; S32: Generate the public and private keys of the nth contract subject using the hash security function: pkn=rn skn=RnH1(H0(r0,Rn,ID n ,Q0),rn) in: pkn represents the public key of the nth contract subject in the electronic contract multi-party authentication model; skn represents the private key of the nth contract subject in the electronic contract multi-party authentication model; S33: Generate the anonymous identity of the nth contract subject: ' ID′n=H2(ID n ) in: ID' n Represents the anonymous identity of the nth contract subject in the electronic contract multi-party authentication model; The authentication server sends the public and private keys (pkn, skn) and key generation parameters of the nth contract subject in the electronic contract multi-party authentication model to the nth contract subject, and sends the anonymous identity ID of the nth contract subject to the authentication server. n The broadcast is sent to all contract parties in the electronic contract multi-party authentication model.

4. The electronic contract multi-party authentication and data protection method as claimed in claim 3, characterized in that: In step S4, the contract subject firewall re-randomizes the received private key, including: The contract subject firewall re-randomizes the received private key, where the contract subject firewall F n The re-randomization process for the private key skn is: Randomly select a random value αn from the set Zp, and use the random value αn to randomize the private key skn: ' skn=αnskn in: sk' n Indicates the randomization result of the private key skn.

Citation Information

Patent Citations

  • Method for anonymously signing electronic contract and signing system

    CN114519206A

  • Cloud auditing method and system for anonymous data

    CN116366239A