Data transmission method, device, equipment and medium based on certificateless key
By using the collaborative calculation of the key generation center and the data receiver in the certificate-free public key cryptography mechanism, the target symmetric key is determined based on the elliptic curve point and the private key component, the problem of easy exposure of the user's full amount of private key is solved, and the security and information protection of data transmission are improved.
Patent Information
- Application Number
- CN202411742648.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-11-29
AI Technical Summary
During the data transmission process under the existing certificate-free public key cryptography mechanism, the user's full amount of private keys is easily exposed, resulting in low security of information transmission.
By acquiring the target transmission data of the data sender for analysis, the first reference elliptic curve point and ciphertext data are obtained, and sent to the key generation center. The key generation center uses the key generation center to determine the second intermediate value based on the declared public key, the system main private key and the preset secret parameters, and calculate the target multiple point in combination with the private key component of the data receiver, and then determine the target symmetric key to encrypt and decrypt the data.
It reduces the risk of exposure of users' full amount of private keys, improves the security of information transmission, prevents information leakage, and enhances the security of data transmission.
Smart Images

Figure CN119544213B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cryptographic protocols, and in particular to a data transmission method, apparatus, device and medium based on a certificateless key. Background Art
[0002] The theoretical technology behind certificateless public key cryptography was perfected in 2003. In the formal definition of the standard certificateless public key cryptosystem (CL-PKI), the key generation center (KGC) still serves as a partially centralized root of trust. Distributed public key infrastructure (DPKI), based on distributed ledgers, fully leverages the blockchain's role as a trust engine, eliminating the centralized risks inherent in traditional public key infrastructure (PKI) systems.
[0003] The data transmission process under the existing certificateless public key cryptography mechanism requires the data sender and the data receiver to jointly negotiate an asymmetric key for the session, and then encrypt and decrypt the corresponding data based on the asymmetric key. This still poses the risk of the user's full private key being exposed, which can easily lead to information leakage and low security of information transmission. Summary of the Invention
[0004] The present invention provides a data transmission method, apparatus, device and medium based on certificateless keys to reduce the risk of exposure of the user's full private key, thereby reducing the risk of information exposure and improving the security of information transmission.
[0005] According to one aspect of the present invention, a data transmission method based on a certificateless key is provided, which is applied to a data receiver, and includes:
[0006] Obtaining target transmission data sent by a data sender and parsing the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point and ciphertext data;
[0007] Sending the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component, and a preset secret parameter;
[0008] Obtaining a second intermediate value sent by the key generation center, and calculating a target multiplication point based on the second intermediate value, the first reference elliptic curve point, and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point;
[0009] Based on the first reference elliptic curve point, the target multiplication point and the preset secret parameter, a target symmetric key is determined, and based on the target symmetric key and the ciphertext data, corresponding expected transmission data is determined.
[0010] According to one aspect of the present invention, a data transmission method based on a certificateless key is provided, which is applied to a data sender, and the method includes:
[0011] Determine the actual public key of the data recipient based on the data recipient's declared public key and the system master public key generated by the key generation center;
[0012] Determining a first elliptic curve point based on the target random number and a base point of a preset elliptic curve equation, and determining a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key;
[0013] Determining a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypting the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data;
[0014] Target transmission data is constructed based on the ciphertext data and the first elliptic curve point, and the target transmission data is sent to a data receiver.
[0015] According to another aspect of the present invention, there is provided a data transmission device based on a certificateless key, which is configured at a data receiving party, and includes:
[0016] a target parsed data acquisition module, configured to acquire target transmission data sent by a data sender and parse the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point and ciphertext data;
[0017] a second intermediate value determination module, configured to send the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component, and a preset secret parameter;
[0018] a target multiplication point calculation module, configured to obtain a second intermediate value sent by the key generation center and calculate a target multiplication point based on the second intermediate value, a first reference elliptic curve point, and a second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point;
[0019] The expected transmission data determination module is used to determine the target symmetric key based on the first reference elliptic curve point, the target multiplication point and the preset secret parameter, and determine the corresponding expected transmission data based on the target symmetric key and the ciphertext data.
[0020] According to another aspect of the present invention, there is provided a data transmission device based on a certificateless key, which is configured at a data sender, and includes:
[0021] An actual public key determination module, configured to determine the actual public key of the data recipient based on the declared public key of the data recipient generated by the key generation center and the system master public key;
[0022] an elliptic curve point determination module, configured to determine a first elliptic curve point based on a target random number and a base point of a preset elliptic curve equation, and determine a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key;
[0023] a ciphertext data generation module, configured to determine a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypt the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data;
[0024] The target transmission data sending module is used to construct target transmission data based on the ciphertext data and the first elliptic curve point, and send the target transmission data to a data recipient.
[0025] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0026] at least one processor; and
[0027] a memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the certificateless key-based data transmission method according to any embodiment of the present invention.
[0029] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the certificateless key-based data transmission method according to any embodiment of the present invention when executed.
[0030] According to another aspect of the present invention, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the certificateless key-based data transmission method according to any embodiment of the present invention.
[0031] In an embodiment of the present invention, a data receiver parses the target transmission data sent by the data sender to obtain a first reference elliptic curve point and ciphertext data. The receiver then calculates a target multiplication point based on a second intermediate value determined by a key generation center based on the first reference elliptic curve point and the first intermediate value, the first reference elliptic curve point, and the second private key component stored by the data sender. Furthermore, the receiver determines a target symmetric key that can be used to decrypt the target transmission data based on the target backup point and the corresponding first reference elliptic curve point. Because the key generation center references the data receiver's second private key component stored in its own storage when determining the corresponding first intermediate value, the decryption process requires the data receiver and the key generation center to collaborate based on their respective stored private key components, thereby avoiding the risk of exposing the full private key, further helping to prevent information leakage during data transmission and improving the security of data transmission. Furthermore, because preset secret parameters are introduced in both the key generation center's determination of the corresponding first intermediate value and the data receiver's determination of the target symmetric key, attackers are unable to determine the specific value of the corresponding decryption key, further helping to improve the security of data transmission.
[0032] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0034] Figure 1 This is a flowchart of a data transmission method based on a certificateless key provided according to the first embodiment of the present invention.
[0035] Figure 2This is a flowchart of another certificateless key-based data transmission method provided according to the second embodiment of the present invention.
[0036] Figure 3 This is a flowchart of another certificateless key-based data transmission method provided according to the third embodiment of the present invention.
[0037] Figure 4 This is a flowchart of another certificateless key-based data transmission method provided according to Embodiment 4 of the present invention.
[0038] Figure 5 3 is a structural diagram of a data transmission device based on a certificateless key provided according to Embodiment 5 of the present invention.
[0039] Figure 6 3 is a structural diagram of a data transmission device based on a certificateless key provided according to embodiment 6 of the present invention.
[0040] Figure 7 The present invention is a schematic structural diagram of an electronic device for implementing the certificateless key-based data transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] The relevant information and specifications used in the calculation process of the present invention are as follows. These relevant information and specifications are unified and clarified before the key generation center, the data sender (user B), and the data receiver (user A) perform the calculations:
[0044] (1) Mechanism parameters: The elliptic curve system parameters include the size q of the finite field Fq (when q = 2m, it also includes the identity of the element representation and the reduced polynomial); the two elements a and b∈Fq that define the equation of the elliptic curve E(Fq); the base point G on E(Fq) = (x G ,y G )(G≠O), where x G and y G are two elements in Fq; the order n of G and other optional options (such as the cofactor of n). Elliptic curve system parameters and their verification shall comply with the provisions of Chapter 5 of GB / T32918.1-2016.
[0045] (2) Auxiliary functions: The certificateless public key mechanism specified in this part involves the following auxiliary functions: cryptographic hash algorithm, key derivation function, random number generator, digital signature generation algorithm SIGN and digital signature verification algorithm VERIFY. Cryptographic hash algorithm: This part specifies the use of cryptographic hash algorithms approved by the State Cryptography Administration, such as hash cryptographic algorithms. Key derivation function: The key derivation function specified in this part follows the definition of key derivation function specified in Chapter 5 of GB / T32918.4-2016. Random number generator: This part specifies the use of random number generators approved by the State Cryptography Administration. Digital signature generation and verification algorithms: The digital signature generation algorithm SIGN and the digital signature verification algorithm VERIFY specified in this part are independently optimized and designed algorithm mechanisms.
[0046] (3) User identification information: User A has an identifiable identifier IDA of length ENTLA bits, where ENTLA is two bytes converted from the integer ENTLA.
[0047] The sender of the key generation mechanism KGC, the signer of the digital signature mechanism and the verifier specified in this part need to use the cryptographic hash algorithm to obtain the hash value H A According to the method given in 4.2.6 and 4.2.5 of GB / T32918.1-2016, the coordinates x of the elliptic curve equation parameters a, b, and G are G 、y G and P pub The x coordinate Pub 、y Pub Convert the data type to a bit string and calculate HA=
[0048] HASH(ENTLA∥IDA∥a∥b∥x G ∥y G ∥x Pub ∥y Pub ).
[0049] The key generation mechanism specified in this part is based on the method in "H. Petersen and P. Horster. Self-certified Key - Concepts and Applications. In Proc. of Communications and Multimedia Security, pp. 102-116 IFI P Advances in Information and Communication Technology, Springer, 1997," combined with the hash value calculation method for user A specified in Section 5.5 of GB / T 32918.2-2016. The certificateless digital signature mechanism is constructed based on the standard basic digital signature algorithms (SIGN and VERIFY).
[0050] Figure 1 This is a flowchart of a data transmission method based on a certificateless key provided in the first embodiment of the present invention. This embodiment is applicable to decryption scenarios during data transmission based on a certificateless key mechanism. The method can be executed by a data transmission device based on a certificateless key. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, which can be the data receiver. Figure 1 Said method comprises:
[0051] S110 , acquiring target transmission data sent by a data sender and parsing the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point and ciphertext data.
[0052] The target parsed data may be the parsed result obtained by the data receiver after parsing the corresponding target transmission data. The target transmission data may include a first reference elliptic curve point and ciphertext data, and the first reference elliptic curve point may correspond to a first elliptic curve point. The first elliptic curve point may be determined by the data sender based on the target random number and the base point of the preset elliptic curve equation. The target random number may be any value randomly generated by a random number generator, for example, the random number may be r B ∈[1, n-1]. The first elliptic curve point can be represented by C1=(x1, y1), and the first reference elliptic curve point can be represented by C1'=(x1', y1').
[0053] S120. Send the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component and the preset secret parameter.
[0054] Among them, the key production center can generate a random number ms∈[1,n-1] as the system master private key and calculate the system master public key P pub =[ms]G. K A It can be a preset secret parameter, which can be set and adjusted as needed.
[0055] Specifically, KGC can randomly select a bit string k of at least 256 in length. s The data receiver can generate a random number and use it as its second private key component, and can also calculate part of the public key U based on the random number. A , and use its own data recipient identification IDA and part of the public key U A Submit it to the key generation center. The key generation center can use the data receiver's ID and part of the public key U A , calculate the corresponding declared public key. The key generation center can store the data recipient's declared key and partial private key components, but cannot store the data recipient's full private key. The full private key can be the data recipient's complete private key.
[0056] Optionally, A may represent a data recipient, A1, A2, ... represent operation steps performed by A, and K1, K2, ... represent operation steps performed by KGC. The operation process of the second private key component and the declared public key of the data recipient is described as follows:
[0057] A1: User A generates a random number d' A ∈[1,n-1]; where the random number d' A Can be used as the second private key component of the data recipient;
[0058] A2: User A calculates part of the public key U A =[d' A ]G, and the first user identification IDA and the partial public key U A Submit KGC;
[0059] K1: KGC calculates H A =HASH(ENTLA∥IDA∥a∥b∥x G ∥y G ∥x Pub ∥y Pub );
[0060] K2: KGC generates a random number w∈[1,n-1]; wherein, the random number w can be used as the first private key component of the data receiver;
[0061] K3: KGC calculates the declared public key W A =[w]G+U A .
[0062] Exemplarily, the process of determining the first intermediate value by the key generation center may include:
[0063] A first parameter is determined based on the coordinates of the declared public key, the hash value, and the preset secret parameter; the first parameter is point-multiplied with the system master private key and added to the first private key component to obtain a corresponding first intermediate value.
[0064] The first parameter λ can be calculated by: W is calculated according to the method given in 4.2.6 and 4.2.5 of GB / T32918.1-2016. A The x coordinate WA 、y WA The data type is converted to a bit string, and the first parameter λ is calculated as follows: WA ∥y WA ∥H A ∥K A 2) mod n, convert the data type of λ to an integer according to the method given in 4.2.4 and 4.2.3 of GB / T32918.1-2016. For example, the corresponding first intermediate value t A The calculation method can be: A =(w+λ*ms).
[0065] Optionally, determining the second intermediate value based on the first elliptic curve point and the first intermediate value may include: performing a point multiplication on the first elliptic curve point and the first intermediate value to obtain the second intermediate value.
[0066] Specifically, the second intermediate value T can be calculated as follows: T=[t A ]C1.
[0067] S130. Obtain a second intermediate value sent by the key generation center, and calculate a target multiplication point based on the second intermediate value, the first reference elliptic curve point, and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point.
[0068] The first private key component may be a portion of the data recipient's private key stored in a key generation center, and the second private key component may be a portion of the data recipient's private key stored on the data recipient's side. The second elliptic curve point may be determined by the data sender based on the first elliptic curve point and the actual public key. The second elliptic curve point may be represented by C2 = (x2, y2), and the target point may be represented by C2' = (x2', y2'). The actual public key may be determined based on the declared public key, the first parameter, and the system master public key.
[0069] Specifically, the second private key component can be multiplied by the first elliptic curve point and added to the second intermediate value to obtain the corresponding target multiplication point. For example, the target multiplication point (x2', y2') can be calculated as follows: (x2', y2') = [d' A ]C1+T.
[0070] Optional, actual public key P A The calculation method can be: P A =W A +[λ]P pub .
[0071] The actual public key can be the actual public key of the data recipient. The declared public key can be a means of protecting the actual public key, preventing any user from calculating the other party's actual public key without the permission of the KGC. The system master public key can be a key generated by the KGC, and the declared public key can be a public key generated by the key generation center and used to calculate the actual key.
[0072] S140: Determine a target symmetric key based on the first reference elliptic curve point, the target multiplication point, and a preset secret parameter, and determine corresponding expected transmission data based on the target symmetric key and the ciphertext data.
[0073] The target symmetric key can be calculated based on the aforementioned key derivation algorithm, such as the national standard SM2 algorithm. The desired transmission data can be data content that the data recipient needs to obtain from the data transmitter, such as business information. The target symmetric key can be used for encryption and decryption of the desired transmission data. The ciphertext data can be data obtained by encrypting the corresponding desired transmission data using the target symmetric key.
[0074] Specifically, the first horizontal coordinate corresponding to the first reference elliptic curve point, the second horizontal coordinate corresponding to the target point, and a preset secret parameter can be concatenated to obtain a corresponding concatenated value, which is then used as the input of a preset key derivation function (KDF) to obtain a corresponding output, which is used as the corresponding target symmetric key. Furthermore, based on a preset decryption algorithm, the target symmetric key and the ciphertext data can be operated to obtain the corresponding plaintext data, i.e., the desired transmission data. The preset decryption algorithm can be an exclusive-OR operation or other required symmetric encryption algorithm.
[0075] For example, the corresponding target symmetric key K B The calculation method of K can be: B =KDF(x1'||x2'||K A ). The corresponding plaintext data M can be calculated as: M = KB +C2', where M is the expected transmission data.
[0076] In an embodiment of the present invention, a data receiver parses the target transmission data sent by the data sender to obtain a first reference elliptic curve point and ciphertext data. The receiver then calculates a target multiplication point based on a second intermediate value determined by a key generation center based on the first reference elliptic curve point and the first intermediate value, the first reference elliptic curve point, and the second private key component stored by the data sender. Furthermore, the receiver determines a target symmetric key that can be used to decrypt the target transmission data based on the target backup point and the corresponding first reference elliptic curve point. Because the key generation center references the data receiver's second private key component stored in its own storage when determining the corresponding first intermediate value, the decryption process requires the data receiver and the key generation center to collaborate based on their respective stored private key components, thereby avoiding the risk of exposing the full private key, further helping to prevent information leakage during data transmission and improving the security of data transmission. Furthermore, because preset secret parameters are introduced in both the key generation center's determination of the corresponding first intermediate value and the data receiver's determination of the target symmetric key, attackers are unable to determine the specific value of the corresponding decryption key, further helping to improve the security of data transmission.
[0077] Figure 2 This is a flowchart of a data transmission method based on a certificateless key provided in the second embodiment of the present invention. This embodiment is further optimized based on the above embodiments. It should be noted that for parts not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments.
[0078] Furthermore, the following is added: “The target parsed data also includes a target check code” and after determining the corresponding expected transmission data based on the target symmetric key and the ciphertext data, the following is added: “Based on the first reference elliptic curve point and the target multiple point, a reference check code corresponding to the target transmission data is determined; if it is determined that the reference check code and the target check code are the same, the decryption is determined to be successful and the corresponding expected transmission data is output.” to ensure the accuracy and reliability of the expected transmission data obtained by decryption.
[0079] refer to Figure 2 , the method specifically comprises the following steps:
[0080] S210: Obtain target transmission data sent by a data sender and parse the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point, ciphertext data, and a target check code;
[0081] The target transmission data may include the first elliptic curve point, ciphertext data, and a target check code. The target check code may be used to verify the correctness of the expected data obtained after decryption.
[0082] S220. Send the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component and the preset secret parameter.
[0083] S230. Obtain a second intermediate value sent by the key generation center, and calculate a target multiplication point based on the second intermediate value, the first reference elliptic curve point, and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point.
[0084] S240: Determine a target symmetric key based on the first reference elliptic curve point, the target multiplication point, and the preset secret parameter, and determine corresponding expected transmission data based on the target symmetric key and the ciphertext data.
[0085] S250: Determine a reference check code corresponding to the target transmission data based on the first reference elliptic curve point and the target multiplication point.
[0086] For example, the first reference elliptic curve point and the target multiple point can be concatenated, and the concatenated value can be processed based on a set algorithm to obtain a corresponding reference check code. The set algorithm can be a message authentication function with a key or parameters, or can be the aforementioned HASH, etc.
[0087] Specifically, the corresponding reference check code C3' may be calculated as: C3'=HMAC(C1'||C2').
[0088] S260: If it is determined that the reference check code and the target check code are the same, determine that the decryption is successful and output the corresponding expected transmission data.
[0089] Specifically, the reference check code and the target check code can be compared. If the comparison result is the same, it can indicate that the decryption is correct, and the corresponding plaintext is output as the corresponding expected transmission data. If the comparison result is different, it can indicate that the decryption is wrong, and the corresponding plaintext is refused to be output.
[0090] Exemplarily, obtaining the second intermediate value sent by the key generation center may include:
[0091] Obtain a second intermediate value ciphertext sent by the key generation center; wherein the second intermediate value ciphertext is obtained by the key generation center encrypting the second intermediate value information based on the intermediate public key of the recipient, where the intermediate public key of the recipient is determined based on the second private key component and a base point of a preset elliptic curve equation; and decrypt the second intermediate value ciphertext based on the second private key component to obtain the second intermediate value.
[0092] The intermediate public key of the receiver can be the partial public key U calculated by user A above. A The recipient's intermediate public key and the second private key component can be used to encrypt and decrypt the same data, respectively.
[0093] It can be understood that, during the data transmission process between the data recipient and the KGC, the second private key component of the data recipient is used as the decryption private key corresponding to the transmitted data, and the intermediate public key of the recipient determined by the second private key component and the base point of the preset elliptic curve equation is used as the encryption public key of the transmitted data, thereby helping to avoid information leakage during the data transmission process between the corresponding KGC and the data recipient, and further helping to improve the information security during the overall data transmission process.
[0094] In an embodiment of the present invention, the data recipient further calculates a corresponding reference check code during the decryption of the corresponding ciphertext data, and further determines whether the decryption is correct based on the comparison between the reference check code and the target check code, thereby helping to avoid errors in the expected transmission data obtained by decryption, and further helping to improve the accuracy and reliability of the corresponding expected transmission data output by the decryption process.
[0095] Figure 3 This is a flowchart of a data transmission method based on a certificateless key provided in the third embodiment of the present invention. This embodiment is applicable to encryption scenarios in the process of data transmission based on a certificateless key mechanism. The method can be executed by a data transmission device based on a certificateless key. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, which can be the data sender. Figure 3 Said method comprises:
[0096] S310: Determine the actual public key of the data recipient based on the declared public key of the data recipient generated by the key generation center and the system master public key.
[0097] Exemplarily, the data sender may generate a corresponding actual public key according to the first parameter, the declared public key and the system master public key.
[0098] The first parameter can be determined based on the declared public key coordinates, the hash value, and the preset secret parameter. The calculation method of the first parameter can be: according to the method given in 4.2.6 and 4.2.5 of GB / T32918.1-2016, the coordinates x of WA are WA 、y WA The data type is converted to a bit string, and the first parameter λ is calculated as follows: WA ∥y WA ∥H A ∥K A ∥2) mod n, convert the data type of λ to an integer according to the method given in 4.2.4 and 4.2.3 of GB / T32918.1-2016. Optional, the actual public key P A The calculation method can be: P A =W A +[λ]P pub .
[0099] S320: Determine a first elliptic curve point according to the target random number and a base point of a preset elliptic curve equation, and determine a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key.
[0100] The target random number can be any value randomly generated by a random number generator, for example, the random number can be r B ∈[1, n-1]. The first elliptic curve point can be represented by (x1, y1). The second elliptic curve point can be represented by (x2, y2).
[0101] Specifically, the target random number can be multiplied by the corresponding base point to obtain the corresponding first elliptic curve point. The first elliptic curve point can also be multiplied by the actual public key to obtain the corresponding second elliptic curve point.
[0102] For example, the calculation method of the corresponding first elliptic curve point C1 can be: C1 = [r B ]G=(x1,y1). The corresponding second elliptic curve point can be calculated as follows: B ]P A =(x2,y2).
[0103] S330: Determine a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypt the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data.
[0104] The target symmetric key can be calculated based on the aforementioned key derivation algorithm, such as the national standard SM2 algorithm. The desired transmission data can be data content that the data recipient needs to obtain from the data transmitter, such as business information. The target symmetric key can be used for encryption and decryption of the desired transmission data.
[0105] Specifically, the first horizontal coordinate corresponding to the first elliptic curve point, the second horizontal coordinate corresponding to the second elliptic curve point, and a preset secret parameter can be concatenated to obtain a corresponding concatenated value, which is then used as the input of a preset key derivation function (KDF) to obtain a corresponding output, and the output is used as the corresponding target symmetric key. Furthermore, based on a preset encryption algorithm, the target symmetric key and the desired transmission data can be operated to obtain the corresponding ciphertext data. The preset encryption algorithm can be an exclusive-OR operation or other required symmetric encryption algorithm.
[0106] For example, the corresponding target symmetric key K B The calculation method of K can be: B =KDF(x1||x2||K A ). The corresponding ciphertext data C2 can be calculated as: C2 = M + K B Wherein, M can be the expected transmission data.
[0107] S340: Construct target transmission data based on the ciphertext data and the first elliptic curve point, and send the target transmission data to a data receiver.
[0108] Specifically, the ciphertext data and the first elliptic curve point can be combined to obtain the corresponding target transmission data, and then the target transmission data can be sent to the data recipient, so that the data recipient can decrypt the corresponding ciphertext data based on the target transmission data to obtain the corresponding expected transmission data.
[0109] Exemplarily, the data receiver decrypts the corresponding ciphertext data based on the target transmission data to obtain the corresponding expected transmission data, which may include:
[0110] Obtain target transmission data sent by a data sender and parse the target transmission data; wherein the target transmission data includes a first elliptic curve point and ciphertext data; send the first elliptic curve point to a key generation center so that the key generation center determines a second intermediate value based on the first elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component and the preset secret parameters; obtain the second intermediate value sent by the key generation center, and calculate a target multiple point based on the second intermediate value, the first elliptic curve point and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiple point corresponds to the second elliptic curve point; determine a target symmetric key based on the first elliptic curve point, the target multiple point and the preset secret parameters, and determine the corresponding expected transmission data based on the target symmetric key and the ciphertext data.
[0111] In an embodiment of the present invention, the data sender determines the data receiver's actual public key based on the data receiver's declared public key and the system master public key generated by the key generation center. This ensures that neither the data receiver nor the data sender stores the complete actual public key. Instead, the data is encrypted by obtaining the declared public key on demand through the KGC and then calculating the actual public key, thereby significantly enhancing the security of the cryptographic system. Furthermore, since a first elliptic curve point is determined based on a target random number and a base point of a preset elliptic curve equation, a corresponding second elliptic curve point is determined based on the first elliptic curve point and the actual public key, and then a target symmetric key is determined based on the first and second elliptic curve points and preset secret parameters. The target symmetric key is then used to encrypt the desired transmitted data to obtain the corresponding ciphertext data. Therefore, during the decryption process, the data receiver and the key generation center can collaboratively decrypt the data using their respective stored private key components, thereby helping to minimize the risk of exposing the full private key and, in turn, preventing information leakage during data transmission, thereby improving the information security of data transmission.
[0112] In an optional embodiment, the algorithm verification process between the corresponding collaborative decryption process and the corresponding encryption process may be:
[0113] When encrypting: C1=[r B ]G;[r B ]P A =(x2,y2);
[0114] During collaborative decryption: KGC returns T = [(w + λ * ms)] C1;
[0115] When obtaining (x2',y2'), calculate [d' A]C1+T, specifically can be:
[0116] [d' A ]C1+T=[d' A ]C 1+ [(w+λ*ms)]C1=[d' A+ (w+λ*ms)]C1=[r B ][w+λ*ms+d' A ]G=[r B ]([w+d' A ]G+[λ*ms]G)=[r B ]([w]G+U A +[λ]P pub )=[r B ](W A +[λ]P pub )=[r B ]P A
[0117] Correspondingly, if the calculated (x2', y2') and (x2, y2) are the same, and the same K is calculated later B If the HMAC result is the same as the correct decryption result, decryption can be successful.
[0118] Figure 4 This is a flowchart of a data transmission method based on a certificateless key provided in the fourth embodiment of the present invention. This embodiment is further optimized based on the above embodiments. It should be noted that for parts not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments.
[0119] Furthermore, after encrypting the data to be transmitted based on the target symmetric key to obtain the corresponding ciphertext data, "determine the target check code based on the first elliptic curve point and the ciphertext data" is appended, and "construct the target transmission data based on the ciphertext data and the first elliptic curve point" is refined into "construct the target transmission data based on the ciphertext data, the first elliptic curve point and the target check code" to ensure the accuracy and reliability of the expected transmission data obtained in the subsequent decryption process.
[0120] refer to Figure 4 , the method specifically comprises the following steps:
[0121] S410: Determine the actual public key of the data recipient based on the declared public key of the data recipient generated by the key generation center and the system master public key.
[0122] S420: Determine a first elliptic curve point according to the target random number and a base point of a preset elliptic curve equation, and determine a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key.
[0123] S430: Determine a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypt the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data.
[0124] S440: Determine a target check code based on the first elliptic curve point and the ciphertext data.
[0125] For example, the first elliptic curve point and the second elliptic curve point can be concatenated, and the concatenated value can be processed based on a predetermined algorithm to obtain a corresponding target check code. The predetermined algorithm can be a message authentication function HMAC with a key or parameters, or can be the aforementioned HASH, etc.
[0126] Specifically, the corresponding reference check code C3 may be calculated as: C3=HMAC(C1||C2).
[0127] S450: Construct the target transmission data based on the ciphertext data, the first elliptic curve point, and the target check code, and send the target transmission data to a data receiver.
[0128] Specifically, the ciphertext data, the first elliptic curve point and the target check code can be combined to obtain the corresponding target transmission data, and then the target transmission data can be sent to the data recipient so that the data recipient can decrypt the corresponding ciphertext data based on the target transmission data to obtain the corresponding expected transmission data.
[0129] Exemplarily, before determining the actual public key of the data recipient based on the declared public key of the data recipient and the system master public key generated by the key generation center, the method may further include:
[0130] Obtain the public key ciphertext sent by the key generation center; wherein, the public key ciphertext is obtained by the key generation center encrypting the declared public key and the system master public key of the data recipient based on the sender's intermediate public key, and the sender's intermediate public key is determined based on the data sender's own private key component and the base point of the preset elliptic curve equation; decrypt the public key ciphertext based on the own private key component to obtain the data recipient's declared public key and the system master public key.
[0131] The data sender's own private key component can be a random number generated by user B (data sender), for example, d' B∈[1,n-1]. The sender's intermediate public key and its own private key components can be used to encrypt and decrypt the same data respectively.
[0132] For example, the calculation method of the sender's intermediate public key can be: U B =[d' B ]G. Among them, U B It can be the sender's intermediate public key.
[0133] It can be understood that, during the data transmission process between the data sender and the KGC, the data sender's own private key component is used as the decryption private key corresponding to the transmitted data, and the sender's intermediate public key determined by the data sender's own private key component and the base point of the preset elliptic curve equation is used as the encryption public key of the transmitted data, thereby helping to avoid information leakage during the data transmission process between the corresponding KGC and the data sender, and further helping to improve the information security during the overall data transmission process.
[0134] In an embodiment of the present invention, the data sender further generates a corresponding target check code during the process of encrypting and transmitting the expected transmission data and sends it to the corresponding data receiver, so that the data receiver can judge whether the decryption is correct based on the target check code after decrypting the corresponding ciphertext data to obtain the corresponding expected transmission data. This helps to avoid errors in the expected transmission data obtained by decryption, and further helps to improve the accuracy and reliability of the expected transmission data output by the subsequent decryption process.
[0135] Figure 5 This is a structural diagram of a data transmission device based on a certificateless key provided in the fifth embodiment of the present invention. This embodiment is applicable to decryption scenarios during data transmission based on a certificateless key mechanism. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, which can be a data receiver. Figure 5 Said device comprises:
[0136] The target parsed data acquisition module 510 is configured to acquire the target transmission data sent by the data sender and parse the target transmission data to obtain target parsed data; wherein the target parsed data includes the first reference elliptic curve point and the ciphertext data;
[0137] a second intermediate value determination module 520 configured to send the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component, and a preset secret parameter;
[0138] The target multiplication point calculation module 530 is configured to obtain a second intermediate value sent by the key generation center and calculate a target multiplication point based on the second intermediate value, the first reference elliptic curve point, and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point;
[0139] The expected transmission data determination module 540 is used to determine the target symmetric key based on the first reference elliptic curve point, the target multiplication point and the preset secret parameter, and determine the corresponding expected transmission data based on the target symmetric key and the ciphertext data.
[0140] The technical solution of the embodiment of the present invention is that, because the key generation center refers to the second private key component of the data recipient stored by itself when determining the corresponding first intermediate value, the data recipient and the key generation center need to collaborate based on their respective stored private key components during the decryption process, thereby avoiding the risk of exposing the full private key, thereby helping to avoid information leakage during data transmission and improving the information security of data transmission. On this basis, because the preset secret parameters are introduced in the process of determining the corresponding first intermediate value by the key generation center and determining the target symmetric key by the data recipient, attackers are unable to solve the specific value of the corresponding decryption key, thereby helping to further improve the security of data transmission.
[0141] Optionally, the target parsed data also includes a target check code; accordingly, after the expected transmission data determination module 540, the corresponding device may further include:
[0142] a reference check code determination module, configured to determine a reference check code corresponding to the target transmission data based on the first reference elliptic curve point and the target multiple point;
[0143] The expected transmission data output module is configured to determine that the decryption is successful and output the corresponding expected transmission data if it is determined that the reference check code and the target check code are the same.
[0144] Optionally, the target doubling point calculation module 530 may include:
[0145] a second intermediate value ciphertext obtaining unit, configured to obtain a second intermediate value ciphertext sent by the key generation center; wherein the second intermediate value ciphertext is obtained by the key generation center encrypting the second intermediate value information based on the recipient's intermediate public key, where the recipient's intermediate public key is determined based on the second private key component and a base point of a preset elliptic curve equation;
[0146] The second intermediate value obtaining unit is configured to decrypt the second intermediate value ciphertext based on the second private key component to obtain the second intermediate value.
[0147] The certificateless key-based data transmission device provided in the embodiments of the present invention can execute any of the certificateless key-based data transmission methods provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing each certificateless key-based data transmission method. For matters not fully described in the embodiments of the present invention, reference can be made to the description of any of the certificateless key-based data transmission methods in the embodiments of the present invention.
[0148] Figure 6 This is a structural diagram of a data transmission device based on a certificateless key provided in the sixth embodiment of the present invention. This embodiment is applicable to encryption scenarios in the process of data transmission based on a certificateless key mechanism. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, which can be the data sender. Figure 6 Said device comprises:
[0149] An actual public key determination module 610 is configured to determine the actual public key of the data recipient based on the data recipient's declared public key generated by the key generation center and the system master public key;
[0150] an elliptic curve point determination module 620 for determining a first elliptic curve point based on a target random number and a base point of a preset elliptic curve equation, and determining a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key;
[0151] a ciphertext data generation module 630 for determining a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypting the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data;
[0152] The target transmission data sending module 640 is configured to construct target transmission data based on the ciphertext data and the first elliptic curve point, and send the target transmission data to a data receiver.
[0153] In an embodiment of the present invention, the data sender determines the data receiver's actual public key based on the data receiver's declared public key and the system master public key generated by the key generation center. This ensures that neither the data receiver nor the data sender stores the complete actual public key. Instead, the data is encrypted by obtaining the declared public key on demand through the KGC and then calculating the actual public key, thereby significantly enhancing the security of the cryptographic system. Furthermore, since a first elliptic curve point is determined based on a target random number and a base point of a preset elliptic curve equation, a corresponding second elliptic curve point is determined based on the first elliptic curve point and the actual public key, and then a target symmetric key is determined based on the first and second elliptic curve points and preset secret parameters. The target symmetric key is then used to encrypt the desired transmitted data to obtain the corresponding ciphertext data. Therefore, during the decryption process, the data receiver and the key generation center can collaboratively decrypt the data using their respective stored private key components, thereby helping to minimize the risk of exposing the full private key and, in turn, preventing information leakage during data transmission, thereby improving the information security of data transmission.
[0154] Optionally, after the ciphertext data generating module 630, the apparatus may further include:
[0155] a target check code determination module, configured to determine a target check code based on the first elliptic curve point and the ciphertext data;
[0156] Accordingly, the target transmission data sending module 640 may include:
[0157] A target transmission data construction unit is configured to construct the target transmission data based on the ciphertext data, the first elliptic curve point, and the target check code.
[0158] Optionally, before the actual public key determination module 610, the apparatus may further include:
[0159] a public key ciphertext acquisition module, configured to acquire the public key ciphertext sent by the key generation center; wherein the public key ciphertext is obtained by the key generation center encrypting the data recipient's declared public key and the system master public key based on the sender's intermediate public key, where the sender's intermediate public key is determined based on the data sender's own private key component and the base point of a preset elliptic curve equation;
[0160] The public key ciphertext decryption module is used to decrypt the public key ciphertext based on its own private key component to obtain the declared public key and system master public key of the data recipient.
[0161] The certificateless key-based data transmission device provided in the embodiments of the present invention can execute any of the certificateless key-based data transmission methods provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing each certificateless key-based data transmission method. For matters not fully described in the embodiments of the present invention, reference can be made to the description of any of the certificateless key-based data transmission methods in the embodiments of the present invention.
[0162] According to an embodiment of the present invention, the present invention further provides an electronic device, a readable storage medium and a computer program product.
[0163] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0164] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0165] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0166] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the certificateless key-based data transmission method.
[0167] In some embodiments, the xxx method may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the certificateless key-based data transmission method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the certificateless key-based data transmission method in any other appropriate manner (e.g., by means of firmware).
[0168] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0169] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0170] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0171] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0172] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0173] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0174] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0175] Cloud computing refers to a technology system that provides network access to elastically scalable shared pools of physical or virtual resources. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on-demand in a self-service manner. Cloud computing technology provides efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as for model training.
[0176] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not a limitation herein.
[0177] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A data transmission method based on a certificateless key, applied to a data receiver, the method comprising: Obtaining target transmission data sent by a data sender and parsing the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point and ciphertext data; Sending the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component, and a preset secret parameter; Obtaining a second intermediate value sent by the key generation center, and calculating a target multiplication point based on the second intermediate value, the first reference elliptic curve point, and the second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point; Based on the first reference elliptic curve point, the target multiplication point and the preset secret parameter, a target symmetric key is determined, and based on the target symmetric key and the ciphertext data, corresponding expected transmission data is determined.
2. The method according to claim 1, characterized in that The target parsed data also includes a target check code; accordingly, after determining the corresponding expected transmission data based on the target symmetric key and the ciphertext data, the method further includes: Determining a reference check code corresponding to the target transmission data based on the first reference elliptic curve point and the target multiple point; If it is determined that the reference check code is the same as the target check code, the decryption is determined to be successful and the corresponding expected transmission data is output.
3. The method according to claim 1, characterized in that Obtaining the second intermediate value sent by the key generation center, including: Obtaining a second intermediate value ciphertext sent by the key generation center; wherein the second intermediate value ciphertext is obtained by the key generation center encrypting the second intermediate value information based on the recipient's intermediate public key, where the recipient's intermediate public key is determined based on the second private key component and a base point of a preset elliptic curve equation; The second intermediate value ciphertext is decrypted based on the second private key component to obtain the second intermediate value.
4. A data transmission method based on a certificateless key, applied to a data sender, the method comprising: Determine the actual public key of the data recipient based on the data recipient's declared public key and the system master public key generated by the key generation center; Determining a first elliptic curve point based on the target random number and a base point of a preset elliptic curve equation, and determining a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key; Determining a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypting the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data; Target transmission data is constructed based on the ciphertext data and the first elliptic curve point, and the target transmission data is sent to a data receiver.
5. The method according to claim 4, characterized in that After encrypting the data to be transmitted based on the target symmetric key to obtain corresponding ciphertext data, the method further includes: Determining a target check code based on the first elliptic curve point and the ciphertext data; Correspondingly, constructing the target transmission data based on the ciphertext data and the first elliptic curve point includes: constructing the target transmission data based on the ciphertext data, the first elliptic curve point and the target check code.
6. The method according to claim 4, characterized in that Before determining the actual public key of the data recipient based on the declared public key of the data recipient and the system master public key generated by the key generation center, the method further includes: Obtaining a public key ciphertext sent by a key generation center; wherein the public key ciphertext is obtained by encrypting the data recipient's declared public key and the system master public key using the sender's intermediate public key, where the sender's intermediate public key is determined based on the data sender's own private key component and a base point of a preset elliptic curve equation; The public key ciphertext is decrypted based on the own private key component to obtain the declared public key and system master public key of the data recipient.
7. A data transmission device based on a certificateless key, configured at a data receiver, the device comprising: a target parsed data acquisition module, configured to acquire target transmission data sent by a data sender and parse the target transmission data to obtain target parsed data; wherein the target parsed data includes a first reference elliptic curve point and ciphertext data; a second intermediate value determination module, configured to send the first reference elliptic curve point to a key generation center, so that the key generation center determines a second intermediate value based on the first reference elliptic curve point and the first intermediate value; wherein the first intermediate value is determined by the key generation center based on the declared public key of the data recipient, the system master private key, the first private key component, and a preset secret parameter; a target multiplication point calculation module, configured to obtain a second intermediate value sent by the key generation center and calculate a target multiplication point based on the second intermediate value, a first reference elliptic curve point, and a second private key component; wherein the first private key component and the second private key component constitute the full private key of the data recipient, and the target multiplication point corresponds to the second elliptic curve point; The expected transmission data determination module is used to determine the target symmetric key based on the first reference elliptic curve point, the target multiplication point and the preset secret parameter, and determine the corresponding expected transmission data based on the target symmetric key and the ciphertext data.
8. A data transmission device based on a certificateless key, configured at a data sender, comprising: An actual public key determination module, configured to determine the actual public key of the data recipient based on the declared public key of the data recipient generated by the key generation center and the system master public key; an elliptic curve point determination module, configured to determine a first elliptic curve point based on a target random number and a base point of a preset elliptic curve equation, and determine a corresponding second elliptic curve point based on the first elliptic curve point and the actual public key; a ciphertext data generation module, configured to determine a target symmetric key based on the first elliptic curve point, the second elliptic curve point, and a preset secret parameter, and encrypt the desired transmission data based on the target symmetric key to obtain corresponding ciphertext data; The target transmission data sending module is used to construct target transmission data based on the ciphertext data and the first elliptic curve point, and send the target transmission data to a data recipient.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the certificateless key-based data transmission method according to any one of claims 1 to 3, or 4 to 6.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the certificateless key-based data transmission method according to any one of claims 1 to 3, or 4 to 6 when executed.
Citation Information
Patent Citations
An implementation method of certificateless public key cryptosystem based on elliptic curve
CN108989053A
SM2-based signature verification method, device and system
CN112887081A