Multi-party joint random seed negotiation method and device

Through the combination of post-quantum cryptography algorithm and elliptic curve cryptography algorithm, the problem of insufficient security of random seeds when multiple parties jointly perform safe multi-party calculations is solved, and extremely high forward security is achieved.

CN116301726BActive Publication Date: 2024-11-19ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310441579.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2024-11-19
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

In the prior art, when multiple parties jointly perform security multi-party computing tasks, the security of negotiated random seeds is insufficient, making it difficult to ensure the forward security of random seeds.

Method used

Using the post-quantum cryptographic algorithm, the public and private keys are obtained and sent through the first party. The second party processes the public key in a secure environment to generate random seeds and encapsulate them into seed ciphertexts. The first party decrypts them to obtain random seeds. Elliptic curve cipher algorithm enhances security.

Benefits of technology

Even if the communication data is intercepted and the security environment is compromised, it is still difficult to deduce random seeds used to generate random numbers, ensuring extremely high forward security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116301726B_ABST
    Figure CN116301726B_ABST
Patent Text Reader

Abstract

In the embodiments of this specification, a multi-party joint random seed negotiation method and device are provided. The first party can obtain the first public key and the first private key of the first post-quantum cryptographic algorithm, and send a first message including at least the first public key to the second party; the second party can process the first public key in its secure environment according to the first post-quantum cryptographic algorithm, obtain the first random seed and the seed ciphertext of the first random seed, and then send a second message including at least the seed ciphertext to the first party; correspondingly, the first party can decrypt the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the computer field, and more particularly, to a multi-party joint random seed negotiation method and device. Background Art

[0002] For some transactions that need to be jointly executed by multiple parties, the multiple parties may need to jointly negotiate a random seed, and then use the random seed to generate several random numbers to support their joint execution of related transactions. For example, for a Secure Multi-Party Computation (SMPC) task jointly executed by multiple parties, such as a secure multi-party computing multiplication task based on secret sharing technology, multiple parties may need to jointly negotiate a random seed, and use the random seed to generate several random numbers to support their joint execution of the secure multi-party computing multiplication task.

[0003] It is hoped that a new technical solution will be developed to enable multiple parties to negotiate random seeds more securely. Summary of the invention

[0004] One or more embodiments of the present specification provide a multi-party joint random seed negotiation method and device.

[0005] In a first aspect, a multi-party joint random seed negotiation method is provided, including: a first party obtains a first public key and a first private key of a first post-quantum cryptographic algorithm; the first party sends a first message to a second party, the first message including the first public key; the second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; the second party sends a second message to the first party, the second message including the seed ciphertext; the first party decrypts the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0006] In a possible implementation manner, the method further includes: the first party clearing the first public key and the first private key; and the second party clearing the first public key.

[0007] In a possible implementation, the method further includes: the first party generates a first signature of the first public key based on a second private key of a second post-quantum cryptographic algorithm in its secure environment, and the first message also includes the first signature and the second public key of the second post-quantum cryptographic algorithm; the second party verifies the legitimacy of the second public key, and if the second public key passes the verification, verifies the legitimacy of the first signature based on the second public key.

[0008] In a possible implementation manner, the second party verifies the legitimacy of the second public key, including: the second party verifies the legitimacy of the second public key through an authentication server.

[0009] In a possible implementation, the second party verifies the legitimacy of the second public key, including: the second party verifies the legitimacy of the second public key by using its preset first party post-quantum public key.

[0010] In a possible implementation, the method further includes: the second party generates a second signature for the seed ciphertext in its secure environment based on a third private key of a second post-quantum cryptographic algorithm, and the second message also includes the second signature and a third public key of the second post-quantum cryptographic algorithm; the first party verifies the legitimacy of the third public key, and verifies the legitimacy of the second signature if the third public key passes the verification.

[0011] In a possible implementation, the method also includes: the first party obtains a fourth public key and a fourth private key of a third cryptographic algorithm, the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve, and the first message also includes the fourth public key; the second party obtains a fifth public key and a fifth private key of the third cryptographic algorithm, and the second message also includes the fifth public key; the second party calculates intermediate data based on the fourth public key and the fifth private key in its secure environment; the second party calculates a second random seed based on the intermediate data and the first random seed; the first party calculates the intermediate data based on the fifth public key and the fourth private key in its secure environment; the first party calculates a second random seed based on the intermediate data and the first random seed; wherein the second random seed is used to support the first party and the second party to generate a number of random numbers.

[0012] In a possible implementation, the method further includes: the first party generates a third signature of the first public key and the fourth public key based on a second private key of a second post-quantum cryptographic algorithm in its secure environment, and the first message also includes the third signature and the second public key of the second post-quantum cryptographic algorithm; the second party verifies the legitimacy of the second public key, and if the second public key passes the verification, verifies the legitimacy of the third signature based on the second public key.

[0013] In a possible implementation, the method further includes: the second party generates, in its secure environment, a fourth signature of the seed ciphertext and the fifth public key based on a third private key of a second post-quantum cryptographic algorithm, and the second message also includes the fourth signature and the third public key of the second post-quantum cryptographic algorithm; the first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the fourth signature.

[0014] In a possible implementation, the method also includes: the first party generates the first public key and the fifth signature of the fourth public key based on the sixth private key of the fourth cryptographic algorithm in its security environment, and the first message also includes the fifth signature and the sixth public key of the fourth cryptographic algorithm; the fourth cryptographic algorithm is a cryptographic algorithm based on elliptic curves; the second party verifies the legitimacy of the sixth public key, and if the sixth public key passes the verification, verifies the legitimacy of the fifth signature based on the sixth public key.

[0015] In a possible implementation, the method also includes: the second party generates a sixth signature of the seed ciphertext and the fifth public key based on the seventh private key of the fourth cryptographic algorithm in its security environment, and the second message also includes the sixth signature and the seventh public key of the fourth cryptographic algorithm; the fourth cryptographic algorithm is a cryptographic algorithm based on elliptic curves; the second party verifies the legitimacy of the seventh public key, and if the seventh public key passes the verification, verifies the legitimacy of the sixth signature based on the seventh public key.

[0016] In a possible implementation, the security environment includes a trusted execution environment (TEE), a trusted platform module (Trusted Platform Module, TPM) device or a security password card.

[0017] In a second aspect, a multi-party joint random seed negotiation method is provided, which is applied to a first party, and the method includes: obtaining a first public key and a first private key of a first post-quantum cryptographic algorithm; sending a first message to a second party, wherein the first message includes the first public key, so that the second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm, obtains a first random seed and a seed ciphertext of the first random seed, and returns a second message including at least the seed ciphertext to the first party; decrypting the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0018] In a possible implementation, the method further includes: in a secure environment, generating a first signature of the first public key based on a second private key of a second post-quantum cryptographic algorithm, the first message also including the first signature and the second public key of the second post-quantum cryptographic algorithm, so that the second party verifies the legitimacy of the second public key, and if the second public key passes the verification, verifies the legitimacy of the first signature based on the second public key.

[0019] In a possible implementation, the second message also includes a second signature of the seed key and a third public key of a second post-quantum cryptographic algorithm, and the second signature is generated by the second party in its secure environment based on a third private key of the second post-quantum cryptographic algorithm; wherein the method further includes: verifying the legitimacy of the third public key, and verifying the legitimacy of the second signature when the third public key passes the verification.

[0020] In a possible implementation, the method also includes: obtaining a fourth public key and a fourth private key of a third cryptographic algorithm, the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve, the first message also includes the fourth public key, and the second message also includes the fifth public key of the third cryptographic algorithm; in a secure environment, calculating intermediate data based on the fifth public key and the fourth private key; calculating a second random seed based on the intermediate data and the first random seed, the second random seed being used to support the first party and the second party to generate a number of random numbers.

[0021] In a possible implementation, the method further includes: in a secure environment, generating a third signature of the first public key and the fourth public key based on a second private key of a second post-quantum cryptographic algorithm, wherein the first message also includes the third signature and the second public key of the second post-quantum cryptographic algorithm, so that the second party verifies the legitimacy of the second public key, and when the second public key passes the verification, verifies the legitimacy of the third signature based on the second public key.

[0022] In a possible implementation, the second message also includes the seed ciphertext and a fourth signature of the fifth public key, and a third public key of a second post-quantum cryptographic algorithm, and the fourth signature is generated by the second party in its secure environment based on the third private key of the second post-quantum cryptographic algorithm; wherein the method further includes: verifying the legitimacy of the third public key, and verifying the legitimacy of the fourth signature when the third public key passes the verification.

[0023] In a third aspect, a multi-party joint random seed negotiation method is provided, which is applied to a second party, and the method includes: receiving a first message, wherein the first message includes a first public key of a first post-quantum cryptographic algorithm obtained by the first party; in a secure environment, processing the first public key according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; sending a second message to the first party, wherein the second message includes the seed ciphertext, so that the first party decrypts the seed ciphertext according to the first private key of the first post-quantum cryptographic algorithm obtained by it to obtain the first random seed, wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0024] In a possible implementation, the first message also includes a second public key of a second post-quantum cryptographic algorithm and a first signature of the first public key, and the first signature is generated by the first party in its secure environment based on a second private key of the second post-quantum cryptographic algorithm; wherein the method further includes: verifying the legitimacy of the second public key, and if the second public key passes the verification, verifying the legitimacy of the first signature based on the second public key.

[0025] In a possible implementation, the method further includes: in a secure environment, generating a second signature of the seed ciphertext based on a third private key of a second post-quantum cryptographic algorithm, the second message also including the second signature and a third public key of the second post-quantum cryptographic algorithm, so that the first party verifies the legitimacy of the third public key, and verifies the legitimacy of the second signature if the third public key passes the verification.

[0026] In a possible implementation, the first message also includes a fourth public key of a third cryptographic algorithm obtained by the first party, and the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve; the method also includes: obtaining a fifth public key and a fifth private key of the third cryptographic algorithm, wherein the second message also includes the fifth public key, so that the first party calculates intermediate data in its secure environment based on the fifth public key and the fourth private key of the third cryptographic algorithm obtained by it, and calculates a second random seed based on the intermediate data and the first random seed; in a secure environment, calculates the intermediate data based on the fourth public key and the fifth private key; calculates the second random seed based on the intermediate data and the first random seed; wherein the second random seed is used to support the first party and the second party to generate a number of random numbers.

[0027] In a possible implementation, the first message also includes a third signature of the first public key and the fourth public key, and a second public key of the second post-quantum cryptographic algorithm, and the third signature is generated by the first party in its secure environment based on the second private key of the second post-quantum cryptographic algorithm; the method also includes: verifying the legitimacy of the second public key, and verifying the legitimacy of the third signature based on the second public key if the second public key passes the verification.

[0028] In a possible implementation, the method further includes: in a secure environment, generating a fourth signature of the seed ciphertext and the fifth public key based on a third private key of a second post-quantum cryptographic algorithm, wherein the second message also includes the fourth signature and the third public key of the second post-quantum cryptographic algorithm, so that the first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the fourth signature.

[0029] In a fourth aspect, a multi-party joint random seed negotiation device is provided, which is deployed on a first party, and the device includes: a key acquisition unit, configured to obtain a first public key and a first private key of a first post-quantum cryptographic algorithm; a communication processing unit, configured to send a first message to a second party, wherein the first message includes the first public key, so that the second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm, obtains a first random seed and a seed ciphertext of the first random seed, and returns a second message including at least the seed ciphertext to the first party; an encryption and decryption unit, configured to decrypt the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0030] In a fifth aspect, a multi-party joint random seed negotiation device is provided, which is deployed on a second party, and the device includes: a communication processing unit, configured to receive a first message from a first party, the first message including a first public key of a first post-quantum cryptographic algorithm obtained by the first party; a security environment, configured to process the first public key according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; the communication processing unit is configured to send a second message to the first party, the second message including the seed ciphertext, so that the first party decrypts the seed ciphertext according to the first private key of the first post-quantum cryptographic algorithm obtained by it to obtain the first random seed, wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0031] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed in a computing device, the computing device implements the method described in any one of the second aspect or the third aspect.

[0032] In a seventh aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in any one of the second aspect or the third aspect is implemented.

[0033] Through the method and device provided in one or more embodiments of the present specification, the first party can obtain the first public key and the first private key of the first post-quantum cryptographic algorithm, and send a first message including at least the first public key to the second party; the second party can process the first public key according to the first post-quantum cryptographic algorithm in its security environment, obtain the first random seed and the seed ciphertext of the first random seed, and then send a second message including at least the seed ciphertext to the first party; correspondingly, the first party can decrypt the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers. In this way, by obtaining the first public key and the first private key of the standard post-quantum cryptographic algorithm by the first party, the standard post-quantum cryptographic algorithm is used in the security environment of the second party, and the first random seed is generated according to the first public key and encapsulated as a seed ciphertext according to the first public key. Even if the intruder intercepts all the communication data including the seed ciphertext exchanged between the first party and the second party, and successfully breaks through the security environment of the second party in the future, it is still difficult to derive the first random seed used to support the first party and the second party to generate a number of random numbers, and the forward security is extremely high. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic diagram of a process in which two parties jointly perform a multiplication based on secure multi-party computation is provided for exemplary purposes;

[0036] Figure 2 This is one of the flow charts of a multi-party joint random seed negotiation method provided in an embodiment of this specification;

[0037] Figure 3 This is a second flowchart of a multi-party joint random seed negotiation method provided in an embodiment of this specification;

[0038] Figure 4 This is one of the schematic diagrams of a multi-party joint random seed negotiation device provided in an embodiment of this specification;

[0039] Figure 5 This is a second schematic diagram of a multi-party joint random seed negotiation device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0040] Each non-limiting embodiment provided in this specification is described in detail below in conjunction with the accompanying drawings.

[0041] For some transactions that need to be jointly executed by multiple parties, the multiple parties may need to jointly negotiate a random seed, and then use the random seed to generate a number of random numbers to support their joint execution of related transactions. For example, for a secure multi-party computing task jointly executed by multiple parties, the multiple parties may need to jointly negotiate a random seed.

[0042] Secure multi-party computing solves the problem of privacy-preserving collaborative computing between a group of mutually distrusting parties. Secure multi-party computing must ensure the independence of inputs and the correctness of calculations, while not leaking input data to other members participating in the calculation. Secret Sharing (SS) technology can usually be used to support the implementation of secure multi-party computing. The idea of ​​secret sharing is to split private data as secrets in an appropriate manner. The multiple shares / shards after splitting are managed by multiple parties, and multiple parties can only recover private data by collaborating with each other in a specific way.

[0043] The following is an example of how Alice and Bob use secret sharing technology to jointly perform multiplication based on secure multi-party computing on the private value x and the private value y. Figure 1 As shown, Alice can hold her own shard x1 with a privacy value x and her own shard y1 with a privacy value y, and Bob can hold her own shard x2 with a privacy value x and her own shard y2 with a privacy value y. Among them, shard x1 and shard x2 can be used to restore the privacy value, for example, adding or XORing shard x1 and shard x2 can obtain the privacy value x; based on a similar principle, shard y1 and shard y2 can be used to restore the privacy value y. Alice can obtain multiple random numbers such as r1, r2, and q1, and Bob can obtain multiple random numbers such as r1, r2, and q1 in a secure environment. These multiple random numbers are also expressed as multiplication triplets.

[0044] The process in which Alice and Bob jointly perform multiplication based on secure multi-party computation on the private value x and the private value y may include but not precede part or all of the following steps 1 to 7.

[0045] Step 1: Alice calculates the difference between shard x1 and random number r1 to obtain intermediate data d.

[0046] Step 2: Alice calculates the difference between shard y1 and random number r2 to obtain the intermediate data e.

[0047] Step 3: Alice sends the intermediate data d and intermediate data e to Bob.

[0048] Step 4: Alice uses the random number q1 as her own shard z1 of the product z of the privacy value x and the privacy value y.

[0049] Step 5, Bob calculates the sum of shard x2 and intermediate data d in a secure environment to obtain intermediate data u; it can be understood that the value of u is equal to the difference between the privacy value x and the random number r1.

[0050] Step 6, Bob calculates the sum of shard y2 and intermediate data e in a secure environment to obtain intermediate data v; it can be understood that the value of v is equal to the difference between the privacy value y and the random number r2.

[0051] Step 7. In a secure environment, Bob performs masked secure multiplication on the intermediate data u and the intermediate data v based on the random number q1 to obtain shard z2 = (u+r1)*(v+r2)-q1. Shard z2 is the shard of Bob's own product z of the privacy value x and the privacy value y. The result of the addition or XOR operation on shards z1 and z2 is equal to z.

[0052] The above process is exemplary, Alice and Bob may use more or less of the same random numbers, and use other schemes different from the above steps 1 to 7 to securely calculate the product z of the privacy value x and the privacy value y. In addition, Alice can also implement the relevant functions of some or all of the above steps 1 to 4 in its security environment, and the security environment can be specifically implemented as TEE, TPM device / chip or security password card.

[0053] The same pseudo-random number generators Gen-A and Gen-B can be deployed in the security environment of Alice and Bob. If it is possible to ensure that Alice and Bob can securely negotiate the random seed, the random seed can be input into Gen-A and Gen-B, so that Gen-A and Gen-B output random numbers that support Alice and Bob to perform secure multiplication of the private value x and the private value y, such as the aforementioned multiplication triple consisting of multiple random numbers such as r1, r2 and q1.

[0054] The foregoing article exemplarily describes the application of a random seed jointly negotiated by multiple parties in a secure multi-party computing multiplication task jointly executed by multiple parties. However, it is understandable that the random seed jointly negotiated by multiple parties can also be applied to other technical scenarios, such as a key negotiation scenario jointly executed by multiple parties, so that multiple parties can generate the same number of random numbers to be used as keys or key pairs based on the same random seed.

[0055] In the embodiments of this specification, at least one multi-party joint random seed negotiation method and device is provided. The first party can obtain the first public key and the first private key of the first post-quantum cryptographic algorithm, and send a first message including at least the first public key to the second party; the second party can process the first public key according to the first post-quantum cryptographic algorithm in its security environment, obtain the first random seed and the seed ciphertext of the first random seed, and then send a second message including at least the seed ciphertext to the first party; correspondingly, the first party can decrypt the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers. In this way, by obtaining the first public key and the first private key of the standard post-quantum cryptographic algorithm by the first party, the standard post-quantum cryptographic algorithm is used in the security environment of the second party to realize the generation of the first random seed according to the first public key and encapsulate the corresponding seed ciphertext according to the first public key. Even if the intruder intercepts all the communication data including the seed ciphertext exchanged between the first party and the second party, and successfully breaks through the security environment of the second party in the future, it is still difficult to derive the first random seed used to support the first party and the second party to generate a number of random numbers, and the forward security is extremely high.

[0056] Standard post-quantum cryptographic algorithms are cryptographic algorithms that can resist attacks based on quantum computers. Post-quantum cryptographic algorithms used to encrypt and decrypt data include Kyber and Aigis-Enc, and post-quantum cryptographic algorithms used to sign and verify data include Dilithium, FALCON, SPHINCS, and Aigis-Sig.

[0057] At present, we are in a transitional period of standardization and application transformation of post-quantum cryptographic algorithms, that is, in a state where traditional public key algorithms and post-quantum cryptographic algorithms coexist. In the embodiments of this specification, only post-quantum cryptographic algorithms can be used to ensure the security of random seeds, or in order to avoid the existence of currently undiscovered technical defects in post-quantum cryptographic algorithms, traditional public key algorithms and post-quantum cryptographic algorithms can be combined to ensure the security of random seeds. The combination of traditional public key algorithms and post-quantum cryptographic algorithms is compared with the method of using only post-quantum cryptographic algorithms. The negotiated random seeds have higher security.

[0058] Figure 2This is one of the flowcharts of a multi-party joint random seed negotiation method provided in the embodiments of this specification. The method exemplarily describes the process of Alice (corresponding to the first party) and Bob (corresponding to the second party) jointly negotiating a random seed for generating a number of random numbers when only post-quantum cryptographic algorithms are used to ensure security; Alice and Bob can be implemented as any device, platform, equipment or device cluster with computing / processing capabilities.

[0059] Among them, Alice can store the second private key SKPQ0 of the second post-quantum cryptographic algorithm in its secure environment, and store the second public key PKPQ0 of the second post-quantum cryptographic algorithm in its secure environment or outside the secure environment. Bob can store the third private key SKPQ1 of the second post-quantum cryptographic algorithm in its secure environment, and store the third public key PKPQ1 of the second post-quantum cryptographic algorithm in its secure environment or outside the secure environment. Among them, the second private key SKPQ0 and the second public key PKPQ0 are a public-private key pair corresponding to each other, and the third private key SKPQ1 and the third public key PKPQ1 are a public-private key pair corresponding to each other. The second post-quantum cryptographic algorithm may include, for example, Dilithium, FALCON, SPHINCS, or Aigis-Sig.

[0060] See also Figure 2 As shown, the method may include but is not limited to part or all of the following steps S201 to S217.

[0061] Step S201, Alice obtains a first public key pk and a first private key sk of a first post-quantum cryptographic algorithm.

[0062] The first post-quantum cryptographic algorithm includes, for example, Kyber or Aigis-Enc. Alice can randomly generate a temporary key pair consisting of a first public key pk and a first private key sk by calling the key generation function of the first post-quantum cryptographic algorithm.

[0063] Optionally, in step S203, Alice generates a first signature S0 of the first public key pk in her secure environment according to the second private key SKPQ0 of the second post-quantum cryptographic algorithm.

[0064] Step S205: Alice sends a first message to the second party, where the first message includes a first public key pk.

[0065] When Alice executes the aforementioned step S203, the first message may also include a first signature S0 and a second public key PKPQ0 of a second post-quantum cryptographic algorithm.

[0066] When the first message includes the first signature S0 and the second public key PKPQ0 of the second post-quantum cryptographic algorithm, Bob can perform the following step S207 to verify the legitimacy of the second public key PKPQ0, and if the second public key PKPQ0 passes the verification, verify the legitimacy of the first signature S0 based on the second public key PKPQ0.

[0067] Bob can exchange information with the authentication server provided by a third party in his secure environment, so as to verify the legitimacy of the second public key PKPQ0 through the authentication server. Alternatively, Bob can preset the first-party post-quantum public key corresponding to Alice in his secure environment. If the second public key PKPQ0 is the same as the first-party post-quantum public key corresponding to Alice, it is determined that the second public key PKPQ0 has passed the legitimacy verification. Among them, if the second public key PKPQ0 or the first signature S0 fails the legitimacy verification, Bob can terminate the subsequent step S209. If the second public key PKPQ0 or the first signature S0 both pass the legitimacy verification, Bob can continue to execute the subsequent step S209.

[0068] In step S209, Bob processes the first public key pk in his secure environment according to the first post-quantum cryptographic algorithm to obtain the first random seed k1 and the seed ciphertext c of the first random seed k1.

[0069] Optionally, in step S211, Bob generates a second signature S1 of the seed ciphertext c in his secure environment according to the third private key SKPQ1 of the second post-quantum cryptographic algorithm.

[0070] Step S213: Bob sends a second message to Alice, the first party, where the second message includes the seed ciphertext c.

[0071] When Bob executes the aforementioned step S211, the second message may also include a second signature S1 and a third public key PKPQ1 of the second post-quantum cryptographic algorithm.

[0072] When the second message includes the second signature S1 and the third public key PKPQ1 of the second post-quantum cryptographic algorithm, Alice can perform the following step S215 to verify the legitimacy of the third public key PKPQ1 in its security environment, and verify the legitimacy of the second signature S1 if the third public key PKPQ1 passes the verification.

[0073] Alice can exchange information with the authentication server provided by a third party in her secure environment, so as to verify the legitimacy of the third public key PKPQ1 through the authentication server. Alternatively, Alice can preset the second-party post-quantum public key corresponding to Bob in her secure environment. If the third public key PKPQ1 is the same as the second-party post-quantum public key corresponding to Bob, it is determined that the third public key PKPQ1 has passed the legitimacy verification. If the third public key PKPQ1 or the second signature S1 fails the legitimacy verification, Alice can terminate the subsequent step S217. If the third public key PKPQ1 or the second signature S1 both pass the legitimacy verification, Bob can continue to execute the subsequent step S217.

[0074] In step S217, Alice decrypts the seed ciphertext c according to the first private key sk to obtain the first random seed k1.

[0075] After Alice and Bob each obtain the first random seed k1, Alice can also clear the temporary key pair consisting of the first public key pk and the first private key sk obtained in the aforementioned step S201, and Bob can clear the first public key pk received from Alice. Thus, it is prevented that an attacker, after intercepting the intermediate data exchanged between Alice and Bob, steals temporary keys such as the first public key pk and the first private key sk to crack the first random seed k1, thereby ensuring the forward security of the first random seed.

[0076] The first random seed k1 can be used to support Alice and Bob to generate several random numbers. For example, Alice can deploy a pseudo-random number generator Gen-A in her secure environment or outside the secure environment, and Bob can deploy a pseudo-random number generator Gen-B that is the same as the pseudo-random number generator Gen-A in his secure environment. Alice and Bob can each input the first random seed k1 they obtained into Gen-A and Gen-B, so that Gen-A and Gen-B respectively output several random numbers according to the first random seed k1. Among them, because Gen-A and Gen-B are the same, the several random numbers output by Gen-A according to the first random number k1 are the same as the several random numbers output by Gen-B according to the first random number k1. The random numbers can be used to support Alice and Bob to jointly execute a specific transaction. For example, the random numbers can be multiplication triples used to support Alice and Bob to jointly execute a multiplication task based on secure multi-party computing, that is, the random numbers correspond to the aforementioned multiple random numbers such as r1, r2 and q1; further, when Alice holds her own shard x1 of the privacy value x and her own shard y1 of the privacy value y, and Bob holds her own shard x2 of the privacy value x and her own shard y2 of the privacy value y, Alice and Bob can execute the process of steps 1 to 7 of the above example based on the random correspondences to complete the joint execution of the multiplication based on secure multi-party computing on the privacy values ​​x and y.

[0077] Figure 3 This is the second flowchart of a multi-party joint random seed negotiation method provided in the embodiments of this specification. The method exemplarily describes the process in which Alice and Bob jointly negotiate a random seed for generating a number of random numbers when they combine the traditional public key algorithm and the post-quantum cryptographic algorithm to ensure the security of the random seed.

[0078] In a possible implementation, Alice can store the second private key SKPQ0 of the second post-quantum cryptographic algorithm in its secure environment, and store the second public key PKPQ0 of the second post-quantum cryptographic algorithm in its secure environment or outside the secure environment. Correspondingly, Bob can store the third private key SKPQ1 of the second post-quantum cryptographic algorithm in its secure environment, and store the third public key PKPQ1 of the second post-quantum cryptographic algorithm in its secure environment or outside the secure environment. Among them, the second private key SKPQ0 and the second public key PKPQ0 are mutually corresponding public-private key pairs, and the third private key SKPQ1 and the third public key PKPQ1 are mutually corresponding public-private key pairs. The aforementioned second post-quantum cryptographic algorithm may include, for example, Dilithium, FALCON, SPHINCS or Aigis-Sig.

[0079] In a possible implementation, Alice can store the sixth private key SKEC0 of the fourth cryptographic algorithm in its secure environment, and store the sixth public key PKEC0 of the fourth cryptographic algorithm in its secure environment or outside the secure environment. Correspondingly, Bob can store the seventh private key SKEC1 of the fourth cryptographic algorithm in its secure environment, and store the seventh public key PKEC1 of the fourth cryptographic algorithm in its secure environment or outside the secure environment. The sixth private key SKEC0 and the sixth public key PKEC0 are a public-private key pair corresponding to each other, and the seventh private key SKEC1 and the seventh public key PKEC1 are a public-private key pair corresponding to each other. The fourth cryptographic algorithm can be, for example, a traditional public key algorithm based on an elliptic curve, such as ECDH.

[0080] See also Figure 3 As shown, the method may include but is not limited to part or all of the following steps S301 to S333.

[0081] Step S301, Alice obtains a first public key pk and a first private key sk of a first post-quantum cryptographic algorithm.

[0082] The first post-quantum cryptographic algorithm includes, for example, Kyber or Aigis-Enc. Alice can randomly generate a temporary key pair consisting of a first public key pk and a first private key sk by calling the key generation function of the first post-quantum cryptographic algorithm.

[0083] In step S3031, Alice obtains the fourth public key Q0 and the fourth private key d0 of the third cryptographic algorithm in her secure environment.

[0084] In step S3033, Bob obtains the fifth public key Q1 and the fifth private key d1 of the third cryptographic algorithm in his secure environment.

[0085] The third cryptographic algorithm is a cryptographic algorithm based on elliptic curves, such as ECDH. Alice can randomly generate a temporary key pair consisting of a fourth public key Q0 and a fourth private key d0 by calling the key generation function of the third cryptographic algorithm in its secure environment; Bob can randomly generate a temporary key pair consisting of a fifth public key Q1 and a fifth private key d1 by calling the key generation function of the third cryptographic algorithm in its secure environment.

[0086] Optionally, in step S305, Alice generates a third signature SPQ0 of the first public key pk and the fourth public key Q0 in her secure environment according to the second private key SKPQ0 of the second post-quantum cryptographic algorithm.

[0087] Optionally, in step S307, Alice generates a fifth signature SEC0 of the first public key pk and the fourth public key Q0 in her secure environment according to the sixth private key SKEC0 of the fourth cryptographic algorithm.

[0088] In step S309, Alice sends a first message to the second party, and the first message includes the first public key pk and the fourth public key Q0. Depending on whether Alice executes the aforementioned steps S305 and S307, the first message may also include part or all of the third signature SPQ0, the fifth signature SEC0, the second public key PKPQ0 of the second post-quantum cryptographic algorithm, and the sixth public key PKEC0 of the fourth cryptographic algorithm.

[0089] When the first message includes the third signature SPQ0 and the second public key PKPQ0 of the second post-quantum cryptographic algorithm, Bob can perform the following step S311 to verify the legitimacy of the second public key PKPQ0, and if the second public key PKPQ0 passes the verification, verify the legitimacy of the third signature SPQ0 based on the second public key PKPQ0.

[0090] Bob can verify the legitimacy of the second public key PKPQ0 and the third signature SPQ0 in his secure environment. The verification process is similar to the previous verification of the legitimacy of the second public key PKPQ0 and the first signature S0, and will not be repeated here.

[0091] When the first message includes the fifth signature SEC0 and the sixth public key PKEC0 of the fourth cryptographic algorithm, Bob can execute the following step S313 to verify the legitimacy of the sixth public key PKEC0, and if the sixth public key PKEC0 passes the verification, verify the legitimacy of the fifth signature SEC0 based on the sixth public key PKEC0.

[0092] Bob can exchange information with the authentication server provided by the third party in his security environment, so as to verify the legitimacy of the sixth public key PKEC0 through the authentication server. Alternatively, Bob can preset the first-party traditional public key corresponding to Alice in his security environment. If the sixth public key PKEC0 is the same as the first-party traditional public key corresponding to Alice, it is determined that the sixth public key PKEC0 has passed the legitimacy verification.

[0093] Among them, if any of the second public key PKPQ0, the third signature SPQ0, the sixth public key PKEC0 and the fifth signature SEC0 fails to pass the legitimacy verification, Bob can terminate the execution of subsequent steps S315.

[0094] In step S315, Bob processes the first public key pk in his secure environment according to the first post-quantum cryptographic algorithm to obtain the first random seed k1 and the seed ciphertext c of the first random seed k1.

[0095] Step S317, Bob calculates intermediate data in his secure environment according to the fourth public key Q0 and the fifth private key d1, and calculates the second random seed k according to the intermediate data and the first random seed k1.

[0096] The fourth public key Q0 and the fifth private key d1 can be multiplied to obtain the affine coordinates (x b ,y b ), where x b can be used as the intermediate data obtained by calculation. Furthermore, for example, the fourth public key Q0, the fifth public key Q1 and the intermediate data x b A certain key generation function f is passed in to obtain a third random seed k2, and then a second random seed k is generated according to the first random seed k1 and the third random seed k2.

[0097] Optionally, in step S319, Bob generates a fourth signature SPQ1 of the seed ciphertext c and the fifth public key Q1 in his secure environment according to the third private key SKPQ1 of the second post-quantum cryptographic algorithm.

[0098] Optionally, in step S321, Bob generates a sixth signature SEC1 of the seed ciphertext c and the fifth public key Q1 in his secure environment according to the seventh private key SKEC1 of the fourth cryptographic algorithm.

[0099] In step S323, Bob sends a second message to Alice, the first party, including the seed ciphertext c and the fifth public key Q1. Depending on whether Bob executes the aforementioned steps S319 and S321, the second message may also include part or all of the fourth signature SPQ1, the sixth signature SEC1, the third public key PKPQ1 of the second post-quantum cryptographic algorithm, and the seventh public key PKEC1 of the fourth cryptographic algorithm.

[0100] When the second message includes the fourth signature SPQ1 and the third public key PKPQ1 of the second post-quantum cryptographic algorithm, Alice can execute the following step S325 to verify the legitimacy of the third public key PKPQ1, and if the third public key PKPQ1 passes the verification, verify the legitimacy of the fourth signature SPQ1.

[0101] Alice can verify the legitimacy of the third public key PKPQ1 and the fourth signature SPQ1 in her secure environment. The verification process is similar to the previous verification of the legitimacy of the third public key PKPQ1 and the second signature S1, and will not be repeated here.

[0102] When the second message includes the sixth signature SEC1 and the seventh public key PKEC1 of the fourth cryptographic algorithm, Alice can execute the following step S327 to verify the legitimacy of the seventh public key PKEC1, and if the seventh public key PKEC1 passes the verification, verify the legitimacy of the sixth signature SEC1 based on the seventh public key PKEC1.

[0103] Alice can exchange information with the authentication server provided by a third party in its security environment, thereby verifying the legitimacy of the seventh public key PKEC1 through the authentication server. Alternatively, Bob can preset the second-party traditional public key corresponding to Alice in his security environment. If the seventh public key PKEC1 is the same as the second-party traditional public key corresponding to Bob, it is determined that the seventh public key PKEC1 has passed the legitimacy verification.

[0104] Among them, if any of the third public key PKPQ1, the seventh public key PKEC1, the fourth signature SPQ1, and the sixth signature SEC1 fails the legitimacy verification, Alice can terminate the execution of the subsequent step S329.

[0105] In step S329, Alice decrypts the seed ciphertext c according to the first private key sk to obtain the first random seed k1.

[0106] In step S331 , Alice calculates intermediate data in her secure environment based on the fifth public key Q1 and the fourth private key d0 .

[0107] The fifth public key Q1 and the fourth private key d0 can be multiplied to obtain the affine coordinates (x a ,y a ), where x a It can be used as the intermediate data obtained by calculation. It should be noted that, depending on the characteristics of the cryptographic algorithm based on the elliptic curve, the fourth public key Q0 and the fifth private key d1 are multiplied to obtain the affine coordinates (x b ,y b ), and perform point multiplication on the fifth public key Q1 and the fourth private key d0 to obtain the affine coordinate (x a ,y a ), x b Same as x a Therefore, Alice and Bob can obtain the same intermediate data in their respective security environments.

[0108] Thus, Alice can continue to perform step S333 to calculate the second random seed according to the intermediate data and the first random seed k1. Similar to the process of Bob obtaining the second random seed, Alice can, for example, convert the fourth public key Q0, the fifth public key Q1, and the intermediate data x aA certain key generation function f is passed in to obtain a third random seed k2, and then a second random seed k is generated according to the first random seed k1 and the third random seed k2.

[0109] After Alice and Bob each obtain the first random seed k1, Alice can also clear the temporary key pair consisting of the first public key pk and the first private key sk obtained in the aforementioned step S301, and the temporary key pair consisting of the fourth public key Q0 and the fourth private key d0 obtained in the aforementioned step S3031, and Bob can clear the first public key pk received from Alice, and the temporary key pair consisting of the fifth public key Q1 and the fifth private key d1 obtained in step S3033. Thus, it is prevented that the attacker, after intercepting the intermediate data exchanged between Alice and Bob, steals the temporary keys such as the first public key pk, the first private key sk, the fourth public key Q0, the fourth private key d0, the fifth public key Q1 and the fifth private key d1 to crack the first random seed k1 and the second random seed k, and ensures the forward security of the first random seed k1 and the second random seed k.

[0110] The second random seed k can be used to support Alice and Bob to generate several random numbers. For example, Alice can deploy a pseudo-random number generator Gen-A in her secure environment or outside the secure environment, and Bob can deploy a pseudo-random number generator Gen-B that is the same as the pseudo-random number generator Gen-A in his secure environment. Alice and Bob can each input the second random seed k they obtained into Gen-A and Gen-B, so that Gen-A and Gen-B respectively output several random numbers according to the second random seed k. Among them, because Gen-A and Gen-B are the same, the several random numbers output by Gen-A according to the second random number k are the same as the several random numbers output by Gen-B according to the second random number k. The random numbers can be used to support Alice and Bob to jointly execute specific transactions. For example, the random numbers can be used as multiplication triples to support Alice and Bob to jointly execute multiplication tasks based on secure multi-party computing, that is, the random numbers correspond to the aforementioned multiple random numbers such as r1, r2 and q1; further, when Alice holds her own shard x1 of privacy value x and her own shard y1 of privacy value y, and Bob holds her own shard x2 of privacy value x and her own shard y2 of privacy value y, Alice and Bob can execute the process of steps 1 to 7 of the above example based on the random correspondences to complete the joint execution of multiplication based on secure multi-party computing for the privacy values ​​x and y.

[0111] In the aforementioned embodiments, for each method step executed by Alice (corresponding to the first party), unless it is indicated that it needs to be implemented in Alice's security environment, the method step can be implemented outside Alice's security environment or within the security environment, that is, the corresponding function can be selectively implemented in the security environment or outside the security environment.

[0112] Based on the same concept as the above method embodiment, this specification embodiment provides a multi-party joint random seed negotiation device 400, which is deployed at the first party. Figure 4 As shown, the device 400 includes: a key acquisition unit 401, configured to obtain a first public key and a first private key of a first post-quantum cryptographic algorithm; a communication processing unit 403, configured to send a first message to a second party, wherein the first message includes the first public key, so that the second party processes the first public key in its security environment according to the first post-quantum cryptographic algorithm, obtains a first random seed and a seed ciphertext of the first random seed, and returns a second message including at least the seed ciphertext to the first party; an encryption and decryption unit 405, configured to decrypt the seed ciphertext according to the first private key to obtain the first random seed; wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0113] Based on the same concept as the above method embodiment, this specification embodiment provides a multi-party joint random seed negotiation device 500, which is deployed on the second party. Figure 5 As shown, the device 500 includes: a communication processing unit 501, configured to receive a first message from a first party, wherein the first message includes a first public key of a first post-quantum cryptographic algorithm obtained by the first party; a security environment 503, configured to process the first public key according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; the communication processing unit 501 is configured to send a second message to the first party, wherein the second message includes the seed ciphertext, so that the first party decrypts the seed ciphertext according to the first private key of the first post-quantum cryptographic algorithm obtained by it to obtain the first random seed, wherein the first random seed is used to support the first party and the second party to generate a number of random numbers.

[0114] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this specification can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, the computer programs corresponding to these functions can be stored in a computer-readable medium or transmitted as one or more instructions / codes on a computer-readable medium, so that when the computer programs corresponding to these functions are executed by a computer, the method described in any embodiment of this specification is implemented by the computer.

[0115] A computer-readable storage medium is also provided in an embodiment of the present specification, on which a computer program / instruction is stored. When the computer program / instruction is executed in a computing device, the computing device executes the method steps performed by the first party / Alice or the second party / Bob provided in any embodiment of the present specification.

[0116] A computing device is also provided in an embodiment of the present specification, including a memory and a processor, wherein the memory stores executable code / instructions, and when the processor executes the executable code / instructions, the method steps performed by the first party / Alice or the second party / Bob provided in any embodiment of the present specification are implemented.

[0117] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0118] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A multi-party random seed negotiation method, include: The first party obtains a first public key and a first private key of a first post-quantum cryptographic algorithm; The first party sends a first message to the second party, where the first message includes the first public key; The second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; The second party sends a second message to the first party, where the second message includes the seed ciphertext; The first party decrypts the seed ciphertext according to the first private key to obtain the first random seed; The first random seed is used to support the first party and the second party to generate the same random numbers.

2. The method according to claim 1, further comprising: include: The first party clears the first public key and the first private key; The second party clears the first public key.

3. The method according to claim 1, further comprising: include: The first party generates, in its secure environment, a first signature of the first public key according to a second private key of a second post-quantum cryptographic algorithm, wherein the first message also includes the first signature and the second public key of the second post-quantum cryptographic algorithm; The second party verifies the legitimacy of the second public key, and if the second public key passes the verification, verifies the legitimacy of the first signature based on the second public key.

4. The method according to claim 3, wherein the second party verifies the legitimacy of the second public key, include: The second party verifies the legitimacy of the second public key through an authentication server; or, The second party verifies the legitimacy of the second public key through its preset first party post-quantum public key.

5. The method according to claim 1, further comprising: include: The second party generates, in its secure environment, a second signature of the seed ciphertext according to a third private key of a second post-quantum cryptographic algorithm, and the second message also includes the second signature and a third public key of the second post-quantum cryptographic algorithm; The first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the second signature.

6. The method according to claim 1, further comprising: include: The first party obtains a fourth public key and a fourth private key of a third cryptographic algorithm, where the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve, and the first message also includes the fourth public key; The second party obtains a fifth public key and a fifth private key of the third cryptographic algorithm, and the second message also includes the fifth public key; The second party calculates, in its secure environment, intermediate data according to the fourth public key and the fifth private key; The second party calculates a second random seed based on the intermediate data and the first random seed; The first party calculates, in its secure environment, intermediate data according to the fifth public key and the fourth private key; The first party calculates a second random seed based on the intermediate data and the first random seed; The second random seed is used to support the first party and the second party to generate the same random numbers.

7. The method according to claim 6, further comprising: include: The first party generates, in its secure environment, a third signature of the first public key and the fourth public key according to a second private key of a second post-quantum cryptographic algorithm, wherein the first message also includes the third signature and the second public key of the second post-quantum cryptographic algorithm; The second party verifies the legitimacy of the second public key, and if the second public key passes the verification, verifies the legitimacy of the third signature based on the second public key.

8. The method according to claim 6, further comprising: include: The second party generates, in its secure environment, a fourth signature of the seed ciphertext and the fifth public key according to a third private key of a second post-quantum cryptographic algorithm, and the second message also includes the fourth signature and the third public key of the second post-quantum cryptographic algorithm; The first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the fourth signature.

9. The method according to claim 6, further comprising: include: The first party generates, in its secure environment, the first public key and a fifth signature of the fourth public key according to a sixth private key of a fourth cryptographic algorithm, wherein the first message also includes the fifth signature and the sixth public key of the fourth cryptographic algorithm; the fourth cryptographic algorithm is a cryptographic algorithm based on an elliptic curve; The second party verifies the legitimacy of the sixth public key, and if the sixth public key passes the verification, verifies the legitimacy of the fifth signature according to the sixth public key.

10. The method according to claim 6, further comprising: include: The second party generates, in its secure environment, the seed ciphertext and a sixth signature of the fifth public key according to a seventh private key of a fourth cryptographic algorithm, wherein the second message also includes the sixth signature and the seventh public key of the fourth cryptographic algorithm; the fourth cryptographic algorithm is a cryptographic algorithm based on an elliptic curve; The second party verifies the legitimacy of the seventh public key, and if the seventh public key passes the verification, verifies the legitimacy of the sixth signature based on the seventh public key.

11. The method according to any one of claims 1 to 10, wherein the security environment comprises a trusted execution environment (TEE), a trusted platform module (TPM) device, or a secure cryptographic card.

12. A multi-party joint random seed negotiation method, applied to a first party, the method include: Obtaining a first public key and a first private key of a first post-quantum cryptographic algorithm; Sending a first message to a second party, wherein the first message includes the first public key, so that the second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm, obtains a first random seed and a seed ciphertext of the first random seed, and returns a second message including at least the seed ciphertext to the first party; Decrypt the seed ciphertext according to the first private key to obtain the first random seed; The first random seed is used to support the first party and the second party to generate the same random numbers.

13. The method according to claim 12, further comprising: include: In a secure environment, generating a first signature of the first public key according to a second private key of a second post-quantum cryptographic algorithm, wherein the first message also includes the first signature and the second public key of the second post-quantum cryptographic algorithm, so that the second party verifies the legitimacy of the second public key, and verifies the legitimacy of the first signature according to the second public key when the second public key passes the verification; And / or, the second message also includes a second signature of the seed ciphertext and a third public key of a second post-quantum cryptographic algorithm, and the second signature is generated by the second party in its secure environment according to a third private key of the second post-quantum cryptographic algorithm; wherein the method also includes: verifying the legitimacy of the third public key, and verifying the legitimacy of the second signature when the third public key passes the verification.

14. The method according to claim 12, further comprising: include: Obtaining a fourth public key and a fourth private key of a third cryptographic algorithm, where the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve, the first message also includes the fourth public key, and the second message also includes the fifth public key of the third cryptographic algorithm; In a secure environment, calculating intermediate data according to the fifth public key and the fourth private key; A second random seed is calculated according to the intermediate data and the first random seed, where the second random seed is used to support the first party and the second party to generate the same random numbers.

15. The method according to claim 14, further comprising: include: In a secure environment, generating a third signature of the first public key and the fourth public key according to a second private key of a second post-quantum cryptographic algorithm, wherein the first message also includes the third signature and the second public key of the second post-quantum cryptographic algorithm, so that the second party verifies the legitimacy of the second public key, and verifies the legitimacy of the third signature according to the second public key if the second public key passes the verification; And / or, the second message also includes the seed ciphertext and a fourth signature of the fifth public key, and a third public key of a second post-quantum cryptographic algorithm, and the fourth signature is generated by the second party in its secure environment based on the third private key of the second post-quantum cryptographic algorithm; wherein the method also includes: verifying the legitimacy of the third public key, and verifying the legitimacy of the fourth signature if the third public key passes the verification.

16. A multi-party joint random seed negotiation method, applied to a second party, the method include: Receiving a first message, wherein the first message includes a first public key of a first post-quantum cryptographic algorithm obtained by a first party; In a secure environment, processing the first public key according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; A second message is sent to the first party, wherein the second message includes the seed ciphertext, so that the first party decrypts the seed ciphertext according to the first private key of the first post-quantum cryptographic algorithm obtained by the first party to obtain the first random seed, wherein the first random seed is used to support the first party and the second party to generate the same number of random numbers.

17. The method according to claim 16, in, The first message also includes a second public key of a second post-quantum cryptographic algorithm and a first signature of the first public key, wherein the first signature is generated by the first party in its secure environment according to a second private key of the second post-quantum cryptographic algorithm; wherein the method further includes: verifying the legitimacy of the second public key, and if the second public key passes the verification, verifying the legitimacy of the first signature according to the second public key; And / or, the method also includes: in a secure environment, generating a second signature of the seed ciphertext based on a third private key of a second post-quantum cryptographic algorithm, the second message also including the second signature and a third public key of the second post-quantum cryptographic algorithm, so that the first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the second signature.

18. The method according to claim 16, wherein the first message further includes a fourth public key of a third cryptographic algorithm obtained by the first party, wherein the third cryptographic algorithm is a cryptographic algorithm based on an elliptic curve; include: Obtaining a fifth public key and a fifth private key of the third cryptographic algorithm, wherein the second message also includes the fifth public key, so that the first party calculates intermediate data in its security environment according to the fifth public key and the fourth private key of the third cryptographic algorithm obtained by the first party, and calculates a second random seed according to the intermediate data and the first random seed; In a secure environment, calculating the intermediate data according to the fourth public key and the fifth private key; Calculate the second random seed according to the intermediate data and the first random seed; The second random seed is used to support the first party and the second party to generate the same random numbers.

19. The method according to claim 18, in, The first message also includes a third signature of the first public key and the fourth public key, and a second public key of the second post-quantum cryptographic algorithm, wherein the third signature is generated by the first party in its secure environment according to the second private key of the second post-quantum cryptographic algorithm; the method further includes: verifying the legitimacy of the second public key, and verifying the legitimacy of the third signature according to the second public key if the second public key passes the verification; And / or, the method also includes: in a secure environment, generating a fourth signature of the seed ciphertext and the fifth public key according to a third private key of a second post-quantum cryptographic algorithm, wherein the second message also includes the fourth signature and the third public key of the second post-quantum cryptographic algorithm, so that the first party verifies the legitimacy of the third public key, and if the third public key passes the verification, verifies the legitimacy of the fourth signature.

20. A multi-party joint random seed negotiation device, deployed at a first party, the device include: A key acquisition unit, configured to acquire a first public key and a first private key of a first post-quantum cryptographic algorithm; a communication processing unit configured to send a first message to a second party, wherein the first message includes the first public key, so that the second party processes the first public key in its secure environment according to the first post-quantum cryptographic algorithm, obtains a first random seed and a seed ciphertext of the first random seed, and returns a second message including at least the seed ciphertext to the first party; an encryption and decryption unit, configured to decrypt the seed ciphertext according to the first private key to obtain the first random seed; The first random seed is used to support the first party and the second party to generate the same random numbers.

21. A multi-party joint random seed negotiation device, deployed at a second party, the device include: A communication processing unit is configured to receive a first message from a first party, wherein the first message includes a first public key of a first post-quantum cryptographic algorithm acquired by the first party; A security environment configured to process the first public key according to the first post-quantum cryptographic algorithm to obtain a first random seed and a seed ciphertext of the first random seed; The communication processing unit is configured to send a second message to the first party, wherein the second message includes the seed ciphertext, so that the first party decrypts the seed ciphertext according to the first private key of the first post-quantum cryptographic algorithm obtained by it to obtain the first random seed, wherein the first random seed is used to support the first party and the second party to generate the same number of random numbers.

22. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device executes the method according to any one of claims 12 to 19.

23. A computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 12 to 19 is implemented.