A method for exchanging authentication keys, a method for storing evidence on a chain and a device
By using the certification key exchange method in the blockchain technology, using symmetrical key and decomposition algorithm, etc., entity A and multiple witnesses and blockchain servers have been established to solve the failed to use the existing technology to effectively use it effectively More witnessed the problem of model models, and the security chain and effective verification of evidence data are realized.
Patent Information
- Application Number
- CN202210091924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-01-27
AI Technical Summary
The failure of the prior art to effectively utilize the multi-witness model to ensure the safe linkage and valid verification of evidence, making it difficult to guarantee the reliability and security of electronic evidence.
Adopt a certification key exchange method to establish a secure connection between physical A and multiple witnesses Wi and blockchain server B through the symmetrical key, hash algorithm and algorithm, to ensure the security transmission of evidence data And certificate.
The amount of calculation of the certification algorithm has been reduced, the security and reliability of the evidence data is improved, the requirements for the procedure of realistic judicial evidence are met, and the electronic data deposit scheme of the witness is more witnessed.
Smart Images

Figure CN114462014B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and specifically to an authentication key exchange method, an evidence chain storage method and a device for multi-party witness verification. Background Art
[0002] Electronic evidence collection is a thorny issue because electronic evidence is easy to copy and forge. With the help of blockchain technology, it is now possible to generate and store electronic evidence on the chain, making the electronic evidence reliable in integrity and validity. The framework of the technical solution is that the entity holding the evidence, the witness, and the blockchain will use pre-shared key symmetric encryption to complete identity authentication; then, the evidence data will be transmitted and verified through a hash function.
[0003] Among the existing technical solutions, most do not consider the role of witnesses in the evidence storage process, and some solutions only consider the case of a single witness. However, in the actual judicial evidence collection process, a more practical multi-witness model is needed to ensure the security of evidence on the chain and effective verification, which has become a technical problem that urgently needs to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides an authentication key exchange method, an evidence chain storage method and a device. In the technical solution of the present invention, when the server needs to process a large amount of data from different sources, it is necessary to run the authentication algorithm and establish a secure connection with many different nodes. In order to reduce the amount of calculation required for the authentication algorithm, only the symmetric key encryption and decryption algorithm, the hash algorithm and the XOR algorithm are used in the authentication algorithm, and these algorithms consume less computation.
[0005] The technical solution adopted by the present invention is as follows:
[0006] An authentication key exchange method applied to entity A, which holds evidence and is ready to upload evidence data to a chain:
[0007] Step AW01: Generate a random number N using a random number generator A ;
[0008] Step AW02: According to the random number N A and key K AW Use symmetric encryption function to calculate ciphertext And use the ordinary channel to transmit the ciphertext and identity information A Sent to witness W;
[0009] Step AW03: Receive the ciphertext Enc from the witness W through the normal channel K′ (ID A ,NW );
[0010] Step AW04: Calculate the key
[0011] Step AW05: Decrypt the ciphertext Enc using the key K′ K′ (ID A ,N W ),Right now
[0012] Dec K′ (Enc K′ (ID A , N W ))=ID A , N W ;
[0013] And the decryption result A ,N W Verify identity information A Does it exist? If not, then end; if it does exist, then execute step AW06;
[0014] Step AW06: Calculate the session key Z using the following formula: AW ;
[0015]
[0016] Step AW07: Use random number N A To calculate the ciphertext Enc K′ (N A ) and sends it to witness W using a normal channel.
[0017] An authenticated key exchange method applied to the witness W:
[0018] Step WA01: Receive ciphertext from entity A via a normal channel and ID A ;
[0019] Step WA02: Use the symmetric decryption function to decrypt the ciphertext Decrypt to get the random number N A ,Right now
[0020]
[0021] Step WA03: Generate a random number N using a random number generator W ;
[0022] Step WA04: Calculate the key
[0023] Step WA05, calculate the ciphertext EncK′ (ID A , N W ), and send it to entity A using a normal channel;
[0024] Step WA06: Receive the ciphertext Enc from entity A through the common channel K′ (N A );
[0025] Step WA07: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (N A ) to decrypt, and compare the decrypted result with the random number N A In comparison;
[0026] If the decryption result is the same as the random number N A If they are not equal, then the process ends; if the decrypted result is equal to the random number N A If they are equal, continue to execute step WA08;
[0027] Step WA08: Calculate session key
[0028] An authenticated key exchange method, entity A uses the above method, multiple witnesses W i The above methods are used respectively, between entity A and multiple witnesses W i A session key Z is established between AW i; where i identifies different witnesses.
[0029] An authenticated key exchange method applied to the witness W:
[0030] Step WB01: Generate a random number N using a random number generator W ;
[0031] Step WB02: According to the random number N W Calculate ciphertext And use the ordinary channel to and identity information ID W Send to blockchain server B;
[0032] Step WB03: Receive the ciphertext Enc from blockchain server B through the common channel K′ (ID W , N B );
[0033] Step WB04: Use key K WB To calculate the key
[0034] Step WB05: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (IDW , N B ) to decrypt, that is
[0035] Dec K′ (Enc K′ (ID W , N B ))=ID W , N B ;
[0036] And the decrypted result ID W , N B Verify your identity W Does it exist? If not, then end; if it does exist, then continue to execute step WB06;
[0037] Step WB06: Calculate session key
[0038] Step WB07: According to the random number N W Calculate the ciphertext Enc K′ (N W ), and transmit the ciphertext Enc K′ (N W ) is sent to blockchain server B.
[0039] An authentication key exchange method applied to blockchain server B:
[0040] Step BW01: Receive ciphertext from witness W via normal channel and ID W ;
[0041] Step BW02: Use the symmetric decryption function to decrypt the ciphertext Decrypt to get the random number N W ,Right now
[0042]
[0043] Step BW03: Generate a random number N using a random number generator B ;
[0044] Step BW04: Calculate the key
[0045] Step BW05, calculate the ciphertext Enc K′ (ID W , N B );and send it to witness W using a normal channel;
[0046] Step BW06: Receive the ciphertext Enc from the witness W through the normal channel K′ (NW );
[0047] Step BW07: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (N W ) to decrypt, that is, Dec K′ (Enc K′ (N W )) and compare the decrypted result with the random number N W In comparison;
[0048] If the decryption result is the same as the random number N W If they are not equal, then the process ends; if the decrypted result is equal to the random number N W If they are equal, continue to step BW08;
[0049] Step BW08: Calculate session key
[0050] A method for exchanging authentication keys. The blockchain server B uses the above authentication key exchange method. Multiple witnesses W i The authenticated key exchange method is used respectively between the blockchain server B and multiple witnesses W i Session key Among them, i identifies different witnesses.
[0051] A method for storing evidence on a chain based on multi-party witness verification, the method comprising the following steps:
[0052] Step 1: Entity A and multiple witnesses W i Each of them communicates, i identifies a different witness;
[0053] The following sub-steps are included on the entity A side:
[0054] Step A1: Use session key Z AW Encrypt the evidence data ED to get the ciphertext
[0055] Step A2: Use the cryptographic hash function hmac to calculate the hash value H ED =hmac(Z AW , ED);
[0056] Step A3: Use the common channel to connect CT and H ED Sent to witness W;
[0057] Among them, in the witness W i The side includes the following sub-steps:
[0058] Step W1: Receive CT and H from entity A through a common channel. ED ;
[0059] Step W2: Use the symmetric decryption function to decrypt CT to obtain the evidence data ED, that is,
[0060] Step W3, use the cryptographic hash function hmac to calculate hmac(Z AW , ED), and verify whether the calculated result is consistent with the H received from entity A ED equal;
[0061] If they are not equal, then end; if they are equal, then continue to execute W4;
[0062] Step W4, generate a witness certificate WP;
[0063] Step W5, using the cryptographic hash function hmac to calculate two hash values H1=hmac(ED) and H2=hmac(WP);
[0064] Step W6: Use the cryptographic hash function hmac to calculate the hash value H3=hamc(Z WB , H1||H2);
[0065] Step W7: Use a common channel to send H1, H2, and H3 to blockchain server B;
[0066] Step 2: Multiple witnesses W i Each of them communicates with blockchain server B respectively;
[0067] Among them, the blockchain server B side includes the following sub-steps:
[0068] Step B1: Receive hash values H1, H2, H3 sent by witness W through the normal channel;
[0069] Step B2, use the cryptographic hash function hmac to calculate hmac(Z WB , H1||H2), and verify whether the calculated result is equal to H3 received from witness W;
[0070] If they are not equal, then end; if they are equal, then continue to execute B3;
[0071] Step B3: Store H1, H2, and H3 in the blockchain;
[0072] Step 3: Blockchain server B verifies the received multiple sets of H1, H2, and H3. If they come from multiple witnesses W i Only when the value of H1 is equal, the blockchain server B will store H1, H2, and H3 in the blockchain; if they are not equal, an error message will be returned.
[0073] An authentication key exchange device comprises a memory and a processor, wherein the memory stores one or more programs; when the one or more programs are executed by the processor, the processor implements the above authentication key exchange method.
[0074] A device for storing evidence on a chain based on multi-witness verification, the device comprising a memory and a processor, the memory storing one or more programs; when the one or more programs are executed by the processor, the processor implements a method for storing evidence on a chain.
[0075] Through the embodiments of the present application, the following technical effects can be obtained: Compared with the existing blockchain evidence storage scheme, the present invention designs a multi-witness electronic data evidence storage scheme. When the server needs to process a large amount of data from different sources, it needs to run the authentication algorithm and establish a secure connection with many different nodes. In order to reduce the amount of calculation required for the authentication algorithm, our authentication algorithm only uses symmetric key encryption and decryption algorithms, hash algorithms, and XOR algorithms. These algorithms consume less computation, which also makes the scheme more in line with the requirements of the actual judicial evidence collection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0077] Figure 1 Schematic diagram of the composition structure of the multi-witness evidence storage model. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0079] Before describing the technical solution of the present invention in detail, the terminology used in the present invention is first introduced as follows:
[0080] A represents the entity holding the evidence data
[0081] W stands for Witness
[0082] B represents blockchain server
[0083] S xy Represents the Diffie-Hellman static key between entities x and y
[0084] K x Represents the static key S from Diffie-Hellman x The key derived from
[0085] KDF(·) represents the key derivation function
[0086] N x Represents the random number generated by entity x
[0087] Enc x (·) represents a symmetric encryption function using key x
[0088] Dec x (·) is the symmetric decryption function using key x
[0089] Figure 1 Schematic diagram of the composition structure of the multi-witness evidence storage model.
[0090] 1. Initialization phase:
[0091] Step 01: Entity A and witness W share the Diffie-Hellman static key S between AW AW ;
[0092] Step 02: Witness W and blockchain server B share the Diffie-Hellman static key S between W and B. WB ;
[0093] Step 03: Based on the Diffie-Hellman static key S between AWs AW Diffie-Hellman static key S between WB WB , entity A and witness W calculate the key K AW ; Witness W and blockchain server B calculate K WB ; Due to the shared properties of the Diffie-Hellman static key, the result of the above calculation (K AW and K WB ) is equal between AW and WB. For example, K calculated by A AW K calculated from W AW It's the same.
[0094] Among them, K AW =KDF(S AW ), K WB =KDF(S WB), KDF(·) represents the key derivation function;
[0095] 2. Authenticated key exchange (AKE) between entity A and witness W:
[0096] (1) Entity A’s algorithm:
[0097] Step AW01: Entity A generates a random number N using a random number generator. A ;
[0098] Step AW02: Entity A generates a random number N according to the random number N. A and key K AW Use symmetric encryption function to calculate ciphertext
[0099] Entity A uses a normal channel to send the ciphertext and identity information ID A Sent to witness W;
[0100] Step AW03: Entity A receives the ciphertext Enc from witness W through a normal channel. K′ (ID A , N W );
[0101] Step AW04: Entity A calculates the key
[0102] Step AW05: Entity A uses the symmetric decryption function to decrypt the ciphertext Enc received from witness W. K′ (ID A , N W ) to decrypt and verify the decryption result;
[0103] Dec K′ (Enc K′ (ID A , N W ))=ID A , N W
[0104] Entity A verifies identity information ID A Does it exist? If not, then end; if it does exist, then execute step AW06;
[0105] Step AW06: Entity A calculates the session key Z using the following formula: AW ;
[0106]
[0107] Step AW07: Entity A uses random number N A To calculate the ciphertext Enc K′(N A ), and use the normal channel to encode the ciphertext Enc K′ (N A ) is sent to witness W;
[0108] (2) Witness W’s algorithm:
[0109] Step WA01: Witness W receives ciphertext from entity A via a normal channel and ID A ;
[0110] Step WA02: Witness W uses the symmetric decryption function to decrypt the ciphertext received from entity A. Decrypt to get the random number N A ;
[0111]
[0112] Step WA03: Witness W generates a random number N using a random number generator. W ;
[0113] Step WA04: Witness W calculates the key
[0114] Step WA05, witness W calculates the ciphertext Enc K′ (ID A , N W ), and use the normal channel to encode the ciphertext Enc K′ (ID A , N W ) is sent to entity A;
[0115] Step WA06: Witness W receives the ciphertext Enc from entity A via a normal channel. K′ (N A );
[0116] Step WA07: Witness W uses the symmetric decryption function to decrypt the ciphertext Enc received from entity A. K′ (N A ) to decrypt, and compare the decrypted result with the random number N A In comparison;
[0117] If the decryption result is the same as the random number N A If the decrypted result is equal to the random number N, the exchange of authentication keys ends. A If they are equal, continue to execute step W08;
[0118] Step WA08: Witness W calculates the session key
[0119] Through the above algorithm of entity A and witness W, a secure session key Z is established between entity A and witness W. AW When there are multiple witnesses W i , the superscript of W identifies different witnesses. Entity A uses the above algorithm to communicate with multiple W i Establish a secure session key Z AW i.
[0120] 3. Authentication key exchange (AKE) phase between witness W and blockchain server B:
[0121] (1) Witness W’s algorithm:
[0122] Step WB01: Witness W generates a random number N using a random number generator. W ;
[0123] Step WB02: Witness W uses random number N W Calculate ciphertext Witness W uses a normal channel to send the ciphertext and identity information ID W Send to blockchain server B;
[0124] Step WB03, witness W receives the ciphertext Enc from blockchain server B through the normal channel K′ (ID W , N B );
[0125] Step WB04, witness W uses key K WB To calculate the key
[0126] Step WB05: Witness W uses the symmetric decryption function to decrypt the ciphertext Enc received from blockchain server B. K′ (ID W , N B ) to decrypt and verify the decryption result;
[0127] Dec K′ (Enc K′ (ID W , N B ))=ID W , N B
[0128] Witness W verifies whether identity W exists. If not, the process ends. If so, the process continues to step W06.
[0129] Step WB06: Witness W calculates the session key
[0130] Step WB07, witness W according to the random number N W Calculate the ciphertext Enc K′ (N W ), and transmit the ciphertext Enc K′ (N W ) is sent to blockchain server B;
[0131] (2) Blockchain server B’s algorithm:
[0132] Step BW01: Blockchain server B receives ciphertext from witness W through a normal channel and ID W ;
[0133] Step BW02: Blockchain server B uses the symmetric decryption function to decrypt the ciphertext received from witness W. Decrypt to get the random number N W ;
[0134]
[0135] Step BW03: Blockchain server B uses a random number generator to generate a random number N B ;
[0136] Step BW04: Blockchain server B calculates the key
[0137] Step BW05, blockchain server B calculates the ciphertext Enc K′ (ID W , N B ); Blockchain server B uses a normal channel to send the ciphertext Enc K′ (ID W , N B ) is sent to witness W;
[0138] Step BW06: Blockchain server B receives the ciphertext Enc from witness W through a normal channel K′ (N W );
[0139] Step BW07, blockchain server B uses the symmetric decryption function to decrypt the ciphertext Enc received from witness W. K′ (N W ) to decrypt, that is, Dec K′ (Enc K′ (N W )) and compare the decrypted result with the random number N W In comparison;
[0140] If the decryption result is the same as the random number N WIf they are not equal, then the process ends; if the decrypted result is equal to the random number N W If they are equal, continue to step BW08;
[0141] Step BW08: Blockchain server B calculates the session key
[0142] Through the above algorithm of witness W and blockchain server B, a secure session key Z is established between witness W and blockchain server B. WB When there are multiple witnesses W i , the superscript of W identifies different witnesses. The blockchain server B uses the above algorithm to communicate with multiple W i Establishing a secure session key
[0143] 4. Evidence storage algorithm between entity A, witness W and blockchain server B:
[0144] At this stage, entity A, witness W and blockchain server B will use the session key Z established by the previously authenticated key exchange algorithm to exchange the session key Z. AW , Z WB , complete the storage of evidence data ED.
[0145] (1) Algorithm of entity A:
[0146] Step A1: Entity A uses session key Z AW Encrypt the evidence data ED to get the ciphertext
[0147]
[0148] Step A2: Entity A uses the cryptographic hash function hma c Calculate the hash value H ED =hmac(Z AW , ED);
[0149] Step A3: Entity A uses a common channel to send the ciphertext CT and the hash value H ED Sent to witness W;
[0150] (2) Witness W’s algorithm:
[0151] Step W1: Witness W receives CT and H from entity A through a normal channel. ED ;
[0152] Step W2: Witness W uses the symmetric decryption function to decrypt CT to obtain evidence data ED, that is,
[0153] Step W3, witness W uses the cryptographic hash function hmac to calculate hmac(Z AW , ED), and verify whether the calculated result is consistent with the H received from entity A ED equal;
[0154] If they are not equal, then end; if they are equal, then continue to execute W4;
[0155] Step W4, witness W generates a witness certificate WP;
[0156] Step W5, witness W uses the cryptographic hash function hmac to calculate two hash values H1=hmac(ED) and H2=hmac(WP);
[0157] Step W6: Witness W uses the cryptographic hash function hmac to calculate the hash value H3 = hamc(Z WB , H1||H2);
[0158] Step W7: Witness W sends H1, H2, and H3 to blockchain server B using a common channel.
[0159] (3) Blockchain Server B Algorithm:
[0160] Step B1, blockchain server B receives H1, H2, H3 sent by witness W through the ordinary channel;
[0161] Step B2: Blockchain server B uses the cryptographic hash function hmac to calculate hmac(Z WB , H1||H2), and verify whether the calculated result is equal to H3 received from witness W;
[0162] If they are not equal, then end; if they are equal, then continue to execute B3;
[0163] Step B3: Blockchain server B stores H1, H2, and H3 in the blockchain.
[0164] When multiple witnesses are required to verify the same piece of evidence, entity A will verify it with multiple witnesses W. i Communicate, then witness W i Then communicate with blockchain server B separately and write the evidence into the blockchain after verification; finally, blockchain server B will receive multiple H1, H2, and H3, and compare them with the evidence from multiple witnesses W. i Only after the value of H3 sent is equal, blockchain server B will store H1, H2, and H3 in the blockchain, otherwise an error message will be returned.
[0165] In summary, the present invention designs a multi-witness electronic data storage scheme. When the server needs to process a large amount of data from different sources, it needs to run the authentication algorithm and establish a secure connection with many different nodes. In order to reduce the amount of calculation required for the authentication algorithm, our authentication algorithm only uses symmetric key encryption and decryption algorithms, hash algorithms, and XOR algorithms. These algorithms consume less computation, which also makes the scheme more in line with the requirements of the actual judicial evidence collection process. In addition, the cryptographic hash function used in the algorithm can be the function given in the SM3 cryptographic hash algorithm, or it can be the SHA-256 secure hash function.
[0166] In some embodiments, part or all of the computer program may be loaded and / or installed on the device via the ROM. When the computer program is loaded and executed, one or more steps of the method described above may be performed.
[0167] The functions described above in the present application may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), load programmable logic devices (CPLDs), and the like.
[0168] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0169] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0170] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.
[0171] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An authentication key exchange method applied to entity A, where entity A holds evidence and is ready to upload the evidence data to a chain, characterized in that: Step AW01: Generate a random number N using a random number generator A ; Step AW02: According to the random number N A and key K AW Use symmetric encryption function to calculate ciphertext And use the ordinary channel to transmit the ciphertext and identity information ID A Sent to witness W; Step AW03: Receive the ciphertext Enc from the witness W through the normal channel K′ (ID A , N W ); Step AW04: Calculate the key Step AW05: Decrypt the ciphertext Enc using the key K′ K′ (ID A , N W ),Right now Dec K′ (Enc K′ (ID A ,N W ))=ID A ,N W ; And the decrypted result ID A , N W Verify identity information ID A Does it exist? If not, then end; if it does exist, then execute step AW06; Step AW06: Calculate the session key Z using the following formula: AW ; Step AW07: Use random number N A To calculate the ciphertext Enc K′ (N A ) and sends it to witness W using a normal channel.
2. An authentication key exchange method applied to a witness W, characterized in that: Step WA01: Receive ciphertext from entity A via a normal channel and ID A ; Step WA02: Use the symmetric decryption function to decrypt the ciphertext Decrypt to get the random number N A ,Right now Step WA03: Generate a random number N using a random number generator W ; Step WA04: Calculate the key Step WA05, calculate the ciphertext Enc K′ (ID A , N W ), and send it to entity A using a normal channel; Step WA06: Receive the ciphertext Enc from entity A through the common channel K′ (N A ); Step WA07: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (N A ) to decrypt, and compare the decrypted result with the random number N A In comparison; If the decryption result is the same as the random number N A If they are not equal, then the process ends; if the decrypted result is equal to the random number N A If they are equal, continue to execute step WA08; Step WA08: Calculate session key 3. An authentication key exchange method, characterized in that: Entity A adopts the method as claimed in claim 1, and multiple witnesses W i The method as claimed in claim 2 is respectively adopted, in which entity A and multiple witnesses W i A session key Z is established between AW i; where i identifies different witnesses.
4. An authentication key exchange method applied to a witness W, characterized in that: Step WB01: Generate a random number N using a random number generator W ; Step WB02: According to the random number N W Calculate ciphertext And use the ordinary channel to and identity information ID W Send to blockchain server B; Step WB03: Receive the ciphertext Enc from blockchain server B through the common channel K′ (ID W , N B ); Step WB04: Use key K WB To calculate the key Step WB05: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (ID W , N B ) to decrypt, that is Dec K′ (Enc K′ (ID W ,N B ))=ID W ,N B ; And the decrypted result ID W , N B Verify your identity W Does it exist? If not, then end; if it does exist, then continue to execute step WB06; Step WB06: Calculate session key Step WB07: According to the random number N W Calculate the ciphertext Enc K′ (N w ), and transmit the ciphertext Enc K′ (N W ) is sent to blockchain server B.
5. An authentication key exchange method applied to a blockchain server B, characterized in that: Step BW01: Receive ciphertext from witness W via normal channel and ID W ; Step BW02: Use the symmetric decryption function to decrypt the ciphertext Decrypt to get the random number N W ,Right now Step BW03: Generate a random number N using a random number generator B ; Step BW04: Calculate the key Step BW05, calculate the ciphertext Enc K′ (ID W , N B );and send it to witness W using a normal channel; Step BW06: Receive the ciphertext Enc from the witness W through the normal channel K′ (N W ); Step BW07: Use the symmetric decryption function to decrypt the ciphertext Enc K′ (N W ) to decrypt, that is, Dec K′ (Enc K′ (N W )), and compare the decrypted result with the random number N W In comparison; If the decryption result is the same as the random number N W If they are not equal, then the process ends; if the decrypted result is equal to the random number N W If they are equal, continue to step BW08; Step BW08: Calculate session key 6. An authentication key exchange method, characterized in that: Blockchain server B adopts the method as claimed in claim 5, and multiple witnesses W i The method as claimed in claim 4 is respectively adopted, in which the blockchain server B and multiple witnesses W i Session key Among them, i identifies different witnesses.
7. A method for storing evidence on a chain based on multi-party witness verification, characterized in that: The method comprises the following steps: Step 1: Entity A and multiple witnesses W i Each of them communicates, i identifies a different witness; The following sub-steps are included on the entity A side: Step A1: Use session key Z AW Encrypt the evidence data ED to get the ciphertext Step A2: Use the cryptographic hash function hma c Calculate the hash value H ED =hmac(Z AW , ED); Step A3: Use the common channel to connect CT and H ED Sent to witness W; Among them, in the witness W i The side includes the following sub-steps: Step W1: Receive CT and H from entity A through a common channel. ED ; Step W2: Use the symmetric decryption function to decrypt CT to obtain the evidence data ED, that is, Step W3, use the cryptographic hash function hmac to calculate hmac(Z AW , ED), and verify whether the calculated result is consistent with the H received from entity A ED equal; If they are not equal, then end; if they are equal, then continue to execute W4; Step W4, generate a witness certificate WP; Step W5, using the cryptographic hash function hmac to calculate two hash values H1=hmac(ED) and H2=hmac(WP); Step W6: Use the cryptographic hash function hmac to calculate the hash value H3=hamc(Z WB , H1||H2); Step W7: Use a common channel to send H1, H2, and H3 to blockchain server B; Step 2: Multiple witnesses W i Each of them communicates with blockchain server B respectively; Among them, the blockchain server B side includes the following sub-steps: Step B1: Receive hash values H1, H2, H3 sent by witness W through the normal channel; Step B2, use the cryptographic hash function hmac to calculate hmac(Z WB , H1||H2), and verify whether the calculated result is equal to H3 received from witness W; If they are not equal, then end; if they are equal, then continue to execute B3; Step B3: Store H1, H2, and H3 in the blockchain; Step 3: Blockchain server B verifies the received multiple sets of H1, H2, and H3. If they come from multiple witnesses W i Only when the value of H1 is equal, the blockchain server B will store H1, H2, and H3 in the blockchain; if they are not equal, an error message will be returned.
8. An authentication key exchange device, comprising a memory and a processor, characterized in that: The memory stores one or more programs; when the one or more programs are executed by the processor, the processor implements the method according to claim 3 or 6.
9. A device for storing evidence on a chain based on multi-witness verification, the device comprising a memory and a processor, characterized in that: The memory stores one or more programs; when the one or more programs are executed by the processor, the processor implements the method according to claim 7.
Citation Information
Patent Citations
Session key negotiation method and device, and data storage method and device
CN114444104A
One-key secret key establishing method and device for multi-party evidence storage
CN114462062A