Secret state data efficient supervision method and device based on SM2 encryption algorithm
By building an audit module in the data sender and using the SM2 encryption algorithm, the supervisor only needs to obtain audit information for encryption, solving the problems of low cross-domain supervision of data in the existing technology and achieving efficient and secure data supervision.
Patent Information
- Application Number
- CN202411664451.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-01-10
Smart Images

Figure CN119299216A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data transmission, and in particular to a method and device for efficiently supervising secret data based on an SM2 encryption algorithm. Background Art
[0002] In recent years, the real economy and the digital economy have been deeply integrated, and digital industrialization and industrial digitization have generated more and more data. While data plays a role as a new production factor, it faces the security risk of leaking sensitive information during data sharing. Therefore, it is necessary to improve data security governance and supervision capabilities and establish a safe, efficient and convenient cross-domain data flow mechanism.
[0003] The cross-domain data supervision scenario involves three parties, namely the data sender, the data receiver, and the regulator. In this scenario, the regulator needs to review the content of the data sent by the data sender to the data receiver without knowing the plain text of the data sent by the data sender to ensure the safe and compliant flow of data. The current implementation of cross-domain data supervision usually adopts hybrid technologies such as public key hybrid encryption, signature, and message authentication code, and the regulator has the original data of the data sender, resulting in low computing efficiency and performance bottlenecks due to the frequent interaction of massive data. Summary of the invention
[0004] In view of the above analysis, the present invention aims to provide a method and device for efficient supervision of confidential data based on the SM2 encryption algorithm. The supervisor builds a review module into the data sender. During the supervision process, the supervisor only needs to obtain audit information, and does not need to obtain the original data to be reviewed, thereby avoiding the spread of the knowledge of the original data. The supervisor only uses the SM2 encryption algorithm to encrypt the original data to be reviewed and the audit information, thereby realizing supervision efficiently and securely.
[0005] On the one hand, the present invention provides an efficient supervision method for secret data based on the SM2 encryption algorithm, wherein the supervisor embeds a review module in the data sender, and the data sender includes a data generation module and a review module. The supervision method includes the following steps:
[0006] The review module S reviews the compliance of the original data Data of the data generation module A. After the review is passed, it generates audit data Data′ based on the original data Data and sends it to the data generation module A;
[0007] The data generation module A verifies the compliance of the audit data Data′. After the verification is passed, the audit data Data′ and the original data Data are encrypted to obtain the first ciphertext C. J and the second ciphertext C B , and sent to the review module S;
[0008] The review module S verifies the first ciphertext CJ and the second ciphertext C B The correctness of the first ciphertext C J and the second ciphertext C B Sent to the supervisor J and the data receiver B respectively;
[0009] Supervisor J decrypts the first ciphertext C J The audit data Data′ is obtained; the data receiver B decrypts the second ciphertext C B Get the original data Data.
[0010] Furthermore, when the review module S sends the audit data Data′, the first random number k J Send to the data generation module A; the data generation module A encrypts the audit data Data' and the original data Data to obtain the first ciphertext C J and the second ciphertext C B include:
[0011] The data generation module A generates a random number k based on the first random number k. J and the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J ;
[0012] The data generation module A generates a second random number k based on the second random number k generated by the data generation module A. B and the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B .
[0013] Furthermore, the data generation module A is based on the first random number k J and the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J include:
[0014] The data generation module A uses the SM2 algorithm to convert the first random number k J As the random number in SM2, based on the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J , denoted by C J =C J,1 ||C J,3 ||C J,2 ; where || represents the concatenation operation, C J,1 , C J,2 , C J,3 are respectively a ciphertext point, an encrypted number and a hash value in a ciphertext block of the first ciphertext;
[0015] The data generation module A generates a second random number k based on the second random number k generated by the data generation module A. B and the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B include:
[0016] The data generation module A uses the SM2 algorithm to convert the second random number k B As the random number in SM2, based on the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B , denoted by C B =C B,1 ||C B,3 ||C B,2 ; where C B,1 , C B,2 , C B,3 are respectively the ciphertext point, the encrypted number and the hash value in the ciphertext block of the second ciphertext.
[0017] Furthermore, the data generation module A sends the first ciphertext C J and the second ciphertext C B When the second random number k B Sent to the review module S; the review module S verifies the first ciphertext C J The correctness includes:
[0018] Review module S calculates [k J ]G and verify whether it is equal to C J,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm;
[0019] Calculate [k J ]P J =(x J,2 ,y J,2 ), t J =KDF(x J,2 ||y J,2 ,|Data′|), where |Data′| represents the bit length of Data′ and KDF is the key derivation function;
[0020] Calculate Data′⊕t J And verify whether it is equal to C J,2 , if not, terminate;
[0021] Calculate SM3(x J,2 ||Data′||y J,2 ) and verify whether it is equal to C J,3 , if they are not equal, terminate, otherwise the second ciphertext C J correct.
[0022] Further, the review module S verifies the second ciphertext C B The correctness includes:
[0023] The review module S verifies the second random number k B Whether the data generation module A generates k B If the setting range is not met, the system will terminate.
[0024] Calculate [k B ]G and verify whether it is equal to C B,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm;
[0025] Calculate [k B ]P B =(x B,2 ,y B,2 ), t B =KDF(x B,2 ||y B,2 ,|Data|), where |Data| represents the bit length of Data and KDF is the key derivation function;
[0026] Calculate Data⊕t B And verify whether it is equal to C B,2 , if not, terminate;
[0027] Calculate SM3(x B,2 ||Data||y B,2 ) and verify whether it is equal to C B,3 , if they are not equal, terminate, otherwise the second ciphertext C B correct.
[0028] Furthermore, the data generation module A encrypts the audit data Data′ and the original data Data to obtain the first ciphertext C J and the second ciphertext C B When the first ciphertext C is sent to the review module S, the first ciphertext C is also sent to the review module S. J and the second ciphertext C B The first message authentication code and the second message authentication code respectively correspond to each other.
[0029] Furthermore, the data generation module A uses the shared authentication key K with the supervisor J AJ Calculate the first ciphertext C J a corresponding first message verification code;
[0030] The data generation module A uses the shared authentication key K with the data receiver B. AB Calculate the second ciphertext C B The corresponding second message verification code.
[0031] Further, the review module S will verify the first ciphertext C J and the second ciphertext C B When the first message authentication code and the second message authentication code are sent to the supervisor J and the data recipient B respectively, the first message authentication code and the second message authentication code are also sent to the supervisor J and the data recipient B respectively.
[0032] Furthermore, the supervisor J decrypts the first ciphertext C J The audit data Data′ includes:
[0033] The supervisor J verifies the first ciphertext C based on the first message authentication code J Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the supervisor J J Decrypt the first ciphertext C J Get audit data Data′;
[0034] The data receiver B decrypts the second ciphertext C B The obtained data includes:
[0035] The data receiver B verifies the second ciphertext C based on the second message authentication code B Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the data receiver B B Decrypt the second ciphertext C B Get dataData.
[0036] On the other hand, the present invention also provides an efficient supervision device for secret data based on the SM2 encryption algorithm, including a supervisor, a data sender and a data receiver, wherein the data sender includes a data generation module and a review module, wherein:
[0037] The review module S reviews the compliance of the original data Data of the data generation module A. After the review is passed, it generates the audit data Data' based on the original data Data; and verifies the first ciphertext C obtained by the data generation module A encrypting the audit data Data' and the original data Data. J and the second ciphertext C B The correctness of the first ciphertext C J and the second ciphertext C B Sent to the supervisor J and the data receiver B respectively;
[0038] The data generation module A is used to encrypt the audit data Data′ and the original data Data generated by the review module S to obtain the first ciphertext C J and the second ciphertext C B And send it to the review module S;
[0039] Supervisor J is used to receive and decrypt the first ciphertext C JGet audit data Data′;
[0040] Data receiver B is used to receive and decrypt the second ciphertext C B Get dataData.
[0041] The present invention can achieve at least one of the following beneficial effects:
[0042] By building a review module into the data sender, the supervisor only needs to obtain audit information without having to obtain the original data to be reviewed during the supervision process, thereby avoiding the spread of knowledge of the original data and greatly improving security. It also avoids the interaction of massive data information between the supervisor and the data sender, improves efficiency, and avoids performance bottlenecks.
[0043] The method of the present invention only adopts the SM2 encryption algorithm to encrypt the original data and audit information to be reviewed, and does not use public key hybrid encryption, signature, message authentication code and other technologies, thereby improving computing efficiency and realizing supervision efficiently and safely.
[0044] Other features and advantages of the present invention will be described in the following description, and some advantages may become apparent from the description, or may be understood by practicing the present invention. The purpose and other advantages of the present invention may be realized and obtained through the contents particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0046] Figure 1 This is a flow chart of the supervision method of the present invention;
[0047] Figure 2 The diagram is a data interaction diagram among the supervisor, data generation module, review module and data receiver of the present invention. DETAILED DESCRIPTION
[0048] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0049] Method Example 1
[0050] A specific embodiment of the present invention discloses an efficient supervision method for confidential data based on the SM2 encryption algorithm, in which the supervisor J embeds a review module S in the data sender, and the data sender includes a data generation module A and the review module S.
[0051] The supervision method specifically includes the following steps:
[0052] The review module S reviews the compliance of the original data Data of the data generation module A. After the review is passed, it generates audit data Data′ based on the original data Data and sends it to the data generation module A;
[0053] The data generation module A verifies the compliance of the audit data Data′. After the verification is passed, the audit data Data′ and the original data Data are encrypted to obtain the first ciphertext C. J and the second ciphertext C B , and sent to the review module S;
[0054] The review module S verifies the first ciphertext C J and the second ciphertext C B After the correctness of the verification is passed, the first ciphertext C J and the second ciphertext C B Sent to the supervisor J and the data receiver B respectively;
[0055] Supervisor J decrypts the first ciphertext C J The audit data Data′ is obtained; the data receiver B decrypts the second ciphertext C B Get the original data Data.
[0056] The present embodiment discloses an efficient supervision method for confidential data based on the SM2 encryption algorithm. By embedding a review module in the data sender, the supervisor only needs to obtain audit information without obtaining review data during the supervision process, thereby avoiding the spread of the knowledge scope of the review data and greatly improving security. It also avoids the interaction of massive data information between the supervisor and the data sender, improves efficiency, and avoids performance bottlenecks. Only the SM2 encryption algorithm is used to encrypt the original data and audit information to be reviewed, and public key hybrid encryption, signature, message authentication code and other technologies are not used, which improves computing efficiency and realizes supervision efficiently and securely.
[0057] Method Example 2
[0058] In a specific embodiment of the present invention, a method for efficiently supervising secret data based on the SM2 encryption algorithm specifically includes the following steps:
[0059] Step s1, the data generation module A sends the original data Data to be reviewed to the review module S.
[0060] Step s2: After the review module S receives the original data Data from the data generation module A, it performs steps s2-1 to s2-4.
[0061] s2-1. Review the original data Data, and terminate if it does not comply with the rules; specifically, review the original data Data based on the preset data standards and requirements;
[0062] s2-2. Generate audit data Data' based on the original data Data that has passed the review; illustratively, the method for generating audit data is a data desensitization algorithm; specifically, the content of the audit data is determined according to the original data. illustratively, when the original data Data includes an ID card number and a telephone number, the audit data Data' may include a desensitized ID card number, a desensitized telephone number, the number of ID card entries, and the number of telephone number entries, etc.;
[0063] s2-3, the random number generator of the review module S generates a first random number k J ∈[1,n-1];
[0064] s2-4, the first random number k J And the audit data Data′ is sent to the data generating module A.
[0065] Step s3: Data generation module A receives the first random number k J After the audit data Data′ is received, steps s3-1 to s3-6 are performed.
[0066] s3-1. Verify k J Whether k is satisfied J ∈[1,n-1], if not satisfied, terminate;
[0067] s3-2, review whether the audit data Data′ complies with the rules, and terminate if it does not comply with the rules; specifically, the review method corresponds to the method of generating audit data in s2-2;
[0068] s3-3, the random number generator of the data generation module A generates a second random number k B ∈[1,n-1];
[0069] s3-4, using the SM2 algorithm, the first random number k J As the random number in SM2, based on the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J , denoted by C J =C J,1 ||C J,3 ||C J,2 ; where || represents the concatenation operation, C J,1 , C J,2 , C J,3 are the ciphertext point, the encrypted number and the hash value in the ciphertext block of the first ciphertext respectively; it should be noted that the data generation module A pre-stores the public key P of the supervisor JJ and the public key P of the data receiver B B ;
[0070] s3-5, using the SM2 algorithm, the second random number k B As the random number in SM2, based on the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B , denoted by C B =C B,1 ||C B,3 ||C B,2 ; where C B,1 , C B,2 , C B,3 are respectively a ciphertext point, an encrypted number and a hash value in the ciphertext block of the second ciphertext;
[0071] s3-6, the second random number k B 、First ciphertext C J and the second ciphertext C B Sent to review module S.
[0072] Step s4: The review module S receives the second random number k B 、First ciphertext C J and the second ciphertext C B Then, perform steps s4-1 to s4-11.
[0073] s4-1. Verify the second random number k B Whether the data generation module A generates k B If the setting range is not met, the system will terminate.
[0074] s4-2. Calculate [k B ]G and verify whether it is equal to C B,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm;
[0075] s4-3. Calculate [k B ]P B =(x B,2 ,y B,2 ), t B =KDF(x B,2 ||y B,2 ,|Data|), where |Data|
[0076] represents the bit length of Data, KDF is the key derivation function, (x B,2 ,y B,2 ) is the coordinate representation of the elliptic curve point;
[0077] s4-4. Calculate Data⊕t BAnd verify whether it is equal to C B,2 , if not, terminate;
[0078] s4-5. Calculate SM3(x B,2 ||Data||y B,2 ) and verify whether it is equal to C B,3 , if they are not equal, terminate, otherwise the second ciphertext C B correct;
[0079] s4-6, calculate [k J ]G and verify whether it is equal to C J,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm;
[0080] s4-7, calculate [k J ]P J =(x J,2 ,y J,2 ), t J =KDF(x J,2 ||y J,2 ,|Data′|), where |Data′|
[0081] represents the bit length of Data′, KDF is the key derivation function, (x J,2 ,y J,2 ) is the coordinate representation of the elliptic curve point;
[0082] s4-8. Calculate Data′⊕t J And verify whether it is equal to C J,2 , if not, terminate;
[0083] s4-9, calculate SM3(x J,2 ||Data′||y J,2 ) and verify whether it is equal to C J,3 , if they are not equal, terminate, otherwise the first ciphertext C J correct;
[0084] s4-10, the second ciphertext C B Send to data receiver B;
[0085] s4-11, the first ciphertext C J Sent to supervisor J.
[0086] Step s5: Data receiver B decrypts the received second ciphertext C B Get the original data Data;
[0087] Step s6: Supervisor J decrypts the received first ciphertext C J Get the audit data Data′.
[0088] It should be noted that in step s4, the review module S converts the first ciphertext C J and the second ciphertext C B When sent to the supervisor J and the data receiver B respectively (ie, step s4-10 and step s4-11), the order of sending is not limited and they can be performed simultaneously; similarly, step s5 and step s6 are not limited in order and can be performed simultaneously.
[0089] It should be noted that, in this embodiment, since the first ciphertext C J and the second ciphertext C B It is sent by the review module S to the supervisor J and the data receiver B respectively, so it is necessary to B and the second ciphertext C J Implement anti-tampering technical measures.
[0090] In another embodiment, in step s3, the data generation module A encrypts the audit data Data′ and the data Data to obtain the first ciphertext C J and the second ciphertext C B When the first ciphertext C is sent to the review module S, the first ciphertext C is also sent to the review module S. J and the second ciphertext C B The first message authentication code and the second message authentication code respectively correspond to each other.
[0091] Furthermore, the data generation module A uses the shared authentication key K with the supervisor J AJ Calculate the first ciphertext C J a corresponding first message verification code;
[0092] The data generation module A uses the shared authentication key K with the data receiver B. AB Calculate the second ciphertext C B The corresponding second message verification code.
[0093] It should be noted that the first message authentication code and the second message authentication code are used by the supervisor J and the data receiver B to verify the first ciphertext C respectively. J and the second ciphertext C B correctness and completeness.
[0094] The audit module S does not have and cannot obtain the shared authentication key K AB Shared authentication key K AJ Therefore, the review module S cannot obtain the first message authentication code and the second message authentication code respectively calculated based on each of the shared authentication keys, and thus cannot verify the first ciphertext C J and the second ciphertext C B To tamper with.
[0095] Further, in step s4, the review module S verifies the first ciphertext C J and the second ciphertext C B When the first message authentication code and the second message authentication code are sent to the supervisor J and the data recipient B respectively, the first message authentication code and the second message authentication code are also sent to the supervisor J and the data recipient B respectively.
[0096] According to the above description of step s3 and step s4, it can be seen that in this embodiment, the data sender is regarded as a whole. When the data sender sends data to the data receiver, the data sent is jointly generated by the data generation module A and the review module S, including not only the first ciphertext C J and the second ciphertext C B , also includes a first message authentication code and a second message authentication code.
[0097] Further, in step s5, the data receiver B decrypts the second ciphertext C B The obtained data includes:
[0098] Data recipient B verifies the second ciphertext C based on the second message authentication code B Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the data receiver B B Decrypt the second ciphertext C B Get dataData.
[0099] Further, in step s6, the supervisor J decrypts the first ciphertext C J The audit data Data′ includes:
[0100] Supervisor J verifies the first ciphertext C based on the first message authentication code J Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the supervisor J J Decrypt the first ciphertext C J Get the audit data Datav.
[0101] This embodiment discloses an efficient method for supervising confidential data based on the SM2 encryption algorithm. The supervisor embeds a review module into the data sender, and generates audit information through the review module using methods such as a data desensitizing algorithm for real data. The supervisor does not need to know the sender's original data, thus avoiding the need for the supervisor to know the data sender's original data in order to generate audit information on the original data. This reduces the scope of knowledge of the original data and greatly improves data security.
[0102] In this embodiment, the data generation module and the review module generate different random numbers respectively, and only SM2 algorithm is used to encrypt the original data Data and the audit data Data′, so as to realize the privacy protection of the original data Data and the supervision setting of the audit data Datav, and realize the independent password protection processing of the original data Data and the corresponding audit information Data′. Compared with the traditional technology that generally uses multiple technologies such as public key hybrid encryption, signature, message authentication code, blockchain, etc. to achieve privacy supervision, the computing efficiency is greatly improved.
[0103] In this embodiment, the data generation module A generates the first ciphertext C J and the second ciphertext C B When sending to the review module S, the second random number k is cleverly B At the same time, it is sent to the review module S (the current common practice is to only send the first ciphertext C J and the second ciphertext C B ), so that the review module S can verify the correctness of the original data Data on behalf of the supervisor J (while the supervisor does not need to master the original data Data), and ensure the correspondence between Data and Data′, so as to ensure that in the subsequent step s6, the supervisor decrypts the first ciphertext C J The correctness of the audit data Data′ is obtained.
[0104] In this embodiment, the review module S verifies the first ciphertext C J and the second ciphertext C B The accuracy of the algorithm improves the computational efficiency in the supervision process.
[0105] In this embodiment, by implementing anti-tampering technical means, the first ciphertext C sent by the review module S to the data recipient B and the supervisor J is effectively guaranteed. J and the second ciphertext C B correctness and security.
[0106] Device Embodiment
[0107] Another specific embodiment of the present invention discloses an efficient monitoring device for secret data based on the SM2 encryption algorithm, which is characterized by comprising a monitoring party, a data sender and a data receiver, wherein the data sender comprises a data generation module and a review module, wherein:
[0108] The review module S is used to generate audit data Data' based on the original data Data of the data generation module A; and verify the first ciphertext C obtained by encrypting the audit data Data' and the original data Data by the data generation module A. J and the second ciphertext C B The correctness of the first ciphertext C Jand the second ciphertext C B Sent to the supervisor J and the data receiver B respectively;
[0109] The data generation module A is used to encrypt the audit data Datav and the original data Data generated by the review module to obtain the first ciphertext C J and the second ciphertext C B And send it to the review module S;
[0110] Supervisor J is used to receive and decrypt the first ciphertext C J Get the audit data Datav;
[0111] Data receiver B is used to receive and decrypt the second ciphertext C B Get dataData.
[0112] Compared with the prior art, the beneficial effects of an efficient confidential data supervision device based on the SM2 encryption algorithm provided in this embodiment are basically the same as the beneficial effects provided by the method embodiment, which will not be elaborated here.
[0113] It should be noted that the above embodiments are based on the same inventive concept and parts not described repeatedly can be used as reference for each other.
[0114] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. An efficient supervision method for confidential data based on SM2 encryption algorithm, characterized in that: The supervisory party embeds a review module in the data sender, and the data sender includes a data generation module and the review module. The supervision method includes the following steps: The review module S reviews the compliance of the original data Data of the data generation module A. After the review is passed, it generates audit data Data′ based on the original data Data and sends it to the data generation module A; The data generation module A verifies the compliance of the audit data Data′. After the verification is passed, the audit data Data′ and the original data Data are encrypted to obtain the first ciphertext C. J and the second ciphertext C B , and sent to the review module S; The review module S verifies the first ciphertext C J and the second ciphertext C B The correctness of the first ciphertext C J and the second ciphertext C B Send to the supervisor J and data receiver B respectively; Supervisor J decrypts the first ciphertext C J Get audit data Data′; Data receiver B decrypts the second ciphertext C B Get the original data Data.
2. The supervision method according to claim 1, characterized in that: When the review module S sends the audit data Data′, the first random number k J Send to the data generation module A; the data generation module A encrypts the audit data Data' and the original data Data to obtain the first ciphertext C J and the second ciphertext C B include: The data generation module A generates a random number k based on the first random number k. J and the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J ; The data generation module A generates a second random number k based on the second random number k generated by the data generation module A. B and the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B .
3. The supervision method according to claim 2, characterized in that: The data generation module A generates a random number k based on the first random number k. J and the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J include: The data generation module A uses the SM2 algorithm to convert the first random number k J As the random number in SM2, based on the public key P of the supervisor J J Encrypt the audit data Data′ to get the first ciphertext C J , denoted by C J =C J,1 ||C J,3 ||C J,2 ; where || represents the concatenation operation, C J,1 , C J,2 , C J,3 are respectively a ciphertext point, an encrypted number and a hash value in a ciphertext block of the first ciphertext; The data generation module A generates a second random number k based on the second random number k generated by the data generation module A. B and the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B include: The data generation module A uses the SM2 algorithm to convert the second random number k B As the random number in SM2, based on the public key P of the data receiver B B Encrypt the data Data to get the second ciphertext C B , denoted by C B =C B,1 ||C B,3 ||C B,2 ; where C B,1 , C B,2 , C B,3 are respectively the ciphertext point, the encrypted number and the hash value in the ciphertext block of the second ciphertext.
4. The supervision method according to claim 3, characterized in that: The data generation module A sends the first ciphertext C J and the second ciphertext C B When the second random number k B Send to the review module S; Review module S verifies the first ciphertext C J The correctness includes: Review module S calculates [k J ]G and verify whether it is equal to C J,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm; Calculate [k J ]P J =(x J,2 ,y J,2 ), t J =KDF(x J,2 ||y J,2 ,|Data′|), where |Data′| represents the bit length of Data′ and KDF is the key derivation function; Calculate Data′⊕t J And verify whether it is equal to C J,2 , if not, terminate; Calculate SM3(x J,2 ||Data′||y J,2 ) and verify whether it is equal to C J,3 , if they are not equal, terminate, otherwise the second ciphertext C J correct.
5. The supervision method according to claim 4, characterized in that: Review module S verifies the second ciphertext C B The correctness includes: The review module S verifies the second random number k B Whether the data generation module A generates k B If the setting range is not met, the system will terminate. Calculate [k B ]G and verify whether it is equal to C B,1 , if they are not equal, terminate; where G is the ellipse base point of the SM2 algorithm; Calculate [k B ]P B =(x B,2 ,y B,2 ), t B =KDF(x B,2 ||y B,2 ,|Data|), where |Data| represents the bit length of Data and KDF is the key derivation function; Calculate Data⊕t B And verify whether it is equal to C B,2 , if not, terminate; Calculate SM3(x B,2 ||Data||y B,2 ) and verify whether it is equal to C B,3 , if they are not equal, terminate, otherwise the second ciphertext C B correct.
6. The supervision method according to claim 3, characterized in that: The data generation module A encrypts the audit data Data′ and the original data Data to obtain the first ciphertext C J and the second ciphertext C B When the first ciphertext C is sent to the review module S, the first ciphertext C is also sent to the review module S. J and the second ciphertext C B The first message authentication code and the second message authentication code respectively correspond to each other.
7. The supervision method according to claim 6, characterized in that: The data generation module A uses the shared authentication key K with the supervisor J. AJ Calculate the first ciphertext C J a corresponding first message verification code; The data generation module A uses the shared authentication key K with the data receiver B. AB Calculate the second ciphertext C B The corresponding second message verification code.
8. The supervision method according to claim 7, characterized in that: The review module S will verify the first ciphertext C J and the second ciphertext C B When the first message authentication code and the second message authentication code are sent to the supervisor J and the data recipient B respectively, the first message authentication code and the second message authentication code are also sent to the supervisor J and the data recipient B respectively.
9. The supervision method according to claim 8, characterized in that: The supervisor J decrypts the first ciphertext C J The audit data Data′ includes: The supervisor J verifies the first ciphertext C based on the first message authentication code J Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the supervisor J J Decrypt the first ciphertext C J Get audit data Data′; The data receiver B decrypts the second ciphertext C B The obtained data includes: The data receiver B verifies the second ciphertext C based on the second message authentication code B Whether it has been tampered with, if so, terminate, otherwise based on the private key d of the data receiver B B Decrypt the second ciphertext C B Get dataData.
10. An efficient monitoring device for secret data based on SM2 encryption algorithm, characterized in that: It includes the regulator, the data sender and the data receiver. The data sender includes the data generation module and the review module, among which: The review module S reviews the compliance of the original data Data of the data generation module A. After the review is passed, it generates the audit data Data' based on the original data Data; and verifies the first ciphertext C obtained by the data generation module A encrypting the audit data Data' and the original data Data. J and the second ciphertext C B The correctness of the first ciphertext C J and the second ciphertext C B Send to the supervisor J and data receiver B respectively; The data generation module A is used to encrypt the audit data Data′ and the original data Data generated by the review module S to obtain the first ciphertext C J and the second ciphertext C B And send it to the review module S; Supervisor J is used to receive and decrypt the first ciphertext C J Get audit data Data′; Data receiver B is used to receive and decrypt the second ciphertext C B Get dataData.