Contract data processing method and contract management client
By using the encryption processing method of private key and random values in electronic contracts, the encryption sequence is determined and the public key is used for encryption and decryption, the problem of low security of electronic contracts is solved, and the security and management security of contract data are improved.
Patent Information
- Application Number
- CN202411183488.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
Electronic contracts have low security problems due to network intrusion attacks, resulting in the risk of contract data leakage.
By using the contract data processing method, the contract data is encrypted and decrypted using the private keys and random values of the first signing party and the second signing party, the encryption sequence is determined, and the encryption and decryption process is carried out in combination with the public key to ensure the security of the contract data. sex.
It improves the security of contract data, enhances the storage security of random values, ensures that contract data can be correctly obtained during decryption, and improves the management security of contract data.
Smart Images

Figure CN119172114A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of contract data processing, and in particular to a contract data processing method and a contract management client. Background Art
[0002] With the development of network technology, electronic contracts are becoming more and more common, and two or more parties will also start project cooperation by signing electronic contracts. The use of electronic contracts can reduce the risk of loss. However, electronic contracts may still be subject to network intrusion attacks, resulting in contract data leakage. Therefore, in the existing technology, electronic contracts have the technical defect of low security. Summary of the invention
[0003] The purpose of this application is to provide a contract data processing method and a contract management client, which can overcome the shortcomings and deficiencies in the prior art.
[0004] A first aspect of an embodiment of the present application provides a contract data processing method, including:
[0005] When encrypting contract data, the contract data is encrypted according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory, to obtain contract encrypted data; the first signing random value is a random value generated when the first signatory signs the electronic contract; the second signing random value is a random value generated when the corresponding second signatory signs the electronic contract;
[0006] Encrypting the first signed random value and the second signed random value to obtain random value encrypted data;
[0007] When decrypting the contract data, the random value encrypted data is decrypted to obtain the first signed random value and the second signed random value;
[0008] The contract encrypted data is decrypted according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data.
[0009] Further, the step of encrypting the contract data according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory to obtain the contract encrypted data includes:
[0010] Determining an encryption order of the contract data according to the first signed random value and the second signed random value;
[0011] The contract data is encrypted using the first signing private key and the second signing private key according to the encryption order to obtain contract encrypted data.
[0012] Further, the step of determining the encryption order of the contract data according to the first signed random value and the second signed random value includes:
[0013] Determining an encryption order of the contract data according to the size of the first signing random value and the second signing random value;
[0014] Alternatively, according to a preset calculation method, the calculation value of the first signing random value and the second signing random value is obtained to determine the encryption order of the contract data according to the calculation value.
[0015] Further, the step of determining the encryption order of the contract data according to the size of the first signing random value and the second signing random value includes:
[0016] If the first signing random value is greater than or equal to the second signing random value, determining that the encryption order of the first signing private key precedes that of the second signing private key;
[0017] If the first signing random value is smaller than the second signing random value, the encryption order of the first signing private key is determined to be after the second signing private key.
[0018] Further, the step of obtaining the operation value of the first signing random value and the second signing random value according to a preset operation method to determine the encryption order of the contract data according to the operation value includes:
[0019] Adding the first signed random value and the second signed random value to obtain the operation value; or subtracting the first signed random value and the second signed random value to obtain the operation value;
[0020] The encryption order of the contract data is determined according to the operation value.
[0021] Furthermore, the step of determining the encryption order of the contract data according to the operation value includes:
[0022] If the operation value is an odd number, determining that the encryption order of the first signing private key is prior to that of the second signing private key;
[0023] If the operation value is an even number, the encryption order of the first signing private key is determined to be after the second signing private key.
[0024] Furthermore, the step of encrypting the first signed random value and the second signed random value to obtain random value encrypted data includes:
[0025] The first signing random value and the second signing random value are encrypted according to the first signing public key to obtain the random value encrypted data.
[0026] Further, the step of decrypting the random value encrypted data to obtain the first signed random value and the second signed random value includes:
[0027] The random value encrypted data is decrypted according to the first signing private key to obtain the first signing random value and the second signing random value.
[0028] Further, the step of decrypting the contract encrypted data according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data includes:
[0029] Obtaining a decryption order according to the first signed random value and the second signed random value; the decryption order is opposite to the encryption order;
[0030] According to the decryption order, the first signing public key and the second signing public key are used to decrypt the contract encrypted data to obtain the contract data.
[0031] A second aspect of an embodiment of the present application provides a contract management client, which is used to store the contract encrypted data and random value encrypted data as described above, and to display the contract data obtained by decryption.
[0032] Compared with the prior art, the present application can encrypt the contract data according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory, to obtain contract encrypted data, thereby improving the security of the contract data, and then encrypt the first signing random value and the second signing random value, thereby improving the storage security of the first signing random value and the second signing random value, so as to further improve the security of the contract data. When the user needs to decrypt the contract encrypted data, the random value encrypted data needs to be decrypted first to obtain the first signing random value and the second signing random value, and then the contract encrypted data can be decrypted in combination with the first signing public key of the first signatory and the second signing public key shared by each of the second signatories, so as to obtain and view the contract data, thereby improving the security of managing the contract data.
[0033] In order to provide a clearer understanding of the present application, the specific implementation of the present application will be described below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1This is a flowchart of a contract data processing method according to an embodiment of the present application.
[0035] Figure 2 This is a flowchart of step S1 of a contract data processing method according to an embodiment of the present application.
[0036] Figure 3 This is a flowchart of step S4 of the contract data processing method according to one embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0038] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0039] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include the majority form, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0040] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0041] See also Figure 1 , which is a flow chart of a contract data processing method according to an embodiment of the present application, comprising:
[0042] S1: When encrypting contract data, the contract data is encrypted according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory, to obtain contract encrypted data; the first signing random value is a random value generated when the first signatory signs the electronic contract; the second signing random value is a random value generated when the corresponding second signatory signs the electronic contract;
[0043] Among them, the first signing random value and the second signing random value are both values randomly obtained within a preset value range. The value range can be set by the user, for example, the first signatory sets the first range value, and one of the second signatories sets the second range value, so as to determine the value range according to the first range value and the second range value. Specifically, the difference between the first range value and the second range value needs to be greater than a preset difference threshold. The difference threshold can be set by the user.
[0044] S2: Encrypt the first signed random value and the second signed random value to obtain random value encrypted data;
[0045] S3: when decrypting the contract data, decrypt the random value encrypted data to obtain the first signed random value and the second signed random value;
[0046] S4: Decrypt the contract encrypted data according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data.
[0047] See also Figure 2 In a feasible embodiment, the step of S1: encrypting the contract data according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory to obtain the contract encrypted data includes:
[0048] S11: Determine an encryption order of the contract data according to the first signing random value and the second signing random value;
[0049] S12: Encrypt the contract data using the first signing private key and the second signing private key according to the encryption order to obtain contract encrypted data.
[0050] In a feasible embodiment, the step of S11: determining the encryption order of the contract data according to the first signed random value and the second signed random value, comprises:
[0051] S111: Determine the encryption order of the contract data according to the size of the first signing random value and the second signing random value;
[0052] S112: Alternatively, according to a preset calculation method, the calculation value of the first signing random value and the second signing random value is obtained to determine the encryption order of the contract data according to the calculation value.
[0053] In a feasible embodiment, the step of S111: determining the encryption order of the contract data according to the size of the first signing random value and the second signing random value includes:
[0054] S1111: If the first signing random value is greater than or equal to the second signing random value, determine that the encryption order of the first signing private key is prior to that of the second signing private key;
[0055] S1112: If the first signing random value is smaller than the second signing random value, determine that the encryption order of the first signing private key is after the second signing private key.
[0056] In a feasible embodiment, the step of S112: obtaining the operation values of the first signing random value and the second signing random value according to a preset operation method, and determining the encryption order of the contract data according to the operation values, includes:
[0057] S1121: adding the first signed random value and the second signed random value to obtain the operation value; or subtracting the first signed random value and the second signed random value to obtain the operation value;
[0058] S1122: Determine the encryption order of the contract data according to the operation value.
[0059] In a feasible embodiment, the step of S1122: determining the encryption order of the contract data according to the operation value, includes:
[0060] S11221: If the operation value is an odd number, determine that the encryption order of the first signing private key is prior to that of the second signing private key;
[0061] S11222: If the operation value is an even number, determine the encryption order of the first signing private key after the second signing private key.
[0062] In a feasible embodiment, the step S2: encrypting the first signed random value and the second signed random value to obtain random value encrypted data includes:
[0063] The first signing random value and the second signing random value are encrypted according to the first signing public key to obtain the random value encrypted data.
[0064] In a feasible embodiment, the step of S3: decrypting the random value encrypted data to obtain the first signed random value and the second signed random value includes:
[0065] The random value encrypted data is decrypted according to the first signing private key to obtain the first signing random value and the second signing random value.
[0066] See also Figure 3 In a feasible embodiment, the step of S4: decrypting the contract encrypted data according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data includes:
[0067] S41: obtaining a decryption order according to the first signed random value and the second signed random value; the decryption order is opposite to the encryption order;
[0068] S42: According to the decryption order, the first signing public key and the second signing public key are used to decrypt the contract encrypted data to obtain the contract data.
[0069] Compared with the prior art, the present application can encrypt the contract data according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory, to obtain contract encrypted data, thereby improving the security of the contract data, and then encrypt the first signing random value and the second signing random value, thereby improving the storage security of the first signing random value and the second signing random value, so as to further improve the security of the contract data. When the user needs to decrypt the contract encrypted data, the random value encrypted data needs to be decrypted first to obtain the first signing random value and the second signing random value, and then the contract encrypted data can be decrypted in combination with the first signing public key of the first signatory and the second signing public key shared by each of the second signatories, so as to obtain and view the contract data, thereby improving the security of managing the contract data.
[0070] It should be noted that the contract data processing method disclosed in the present application can be run on a cloud server. For example, when there are only two signatories, the cloud server sends the contract data to the first signatory corresponding to the encryption order, so that the signatory uses the corresponding signing private key to encrypt the contract data to obtain temporary encrypted data. The cloud server then sends the first encrypted data to the next signatory corresponding to the encryption order, so that the signatory uses the corresponding signing private key to encrypt the temporary encrypted data to obtain contract encrypted data. The cloud server can then store the contract encrypted data, or send the contract encrypted data to each signatory separately to drive each signatory to store the contract encrypted data and delete the temporary encrypted data.
[0071] The second embodiment of the present application provides a contract management client, which is used to store the contract encrypted data and random value encrypted data as described above, and to display the contract data obtained by decryption.
[0072] It should be noted that the contract management client provided in the second embodiment of the present application only uses the division of the above-mentioned functional modules as an example when executing the contract data processing method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the contract management client provided in the second embodiment of the present application and the contract data processing method of the first embodiment of the present application belong to the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.
[0073] A third aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the contract data processing method as described above are implemented.
[0074] The fourth aspect of an embodiment of the present application provides a computer device, including a storage device, a processor, and a computer program stored in the storage device and executable by the processor, wherein the processor implements the steps of the contract data processing method as described above when executing the computer program.
[0075] The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. Ordinary technicians in this field can understand and implement it without creative work.
[0076] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0077] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.
[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0083] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for processing contract data, It is characterized in that include: When encrypting contract data, the contract data is encrypted according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory, to obtain contract encrypted data; the first signing random value is a random value generated when the first signatory signs the electronic contract; the second signing random value is a random value generated when the corresponding second signatory signs the electronic contract; Encrypting the first signed random value and the second signed random value to obtain random value encrypted data; When decrypting the contract data, the random value encrypted data is decrypted to obtain the first signed random value and the second signed random value; The contract encrypted data is decrypted according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data.
2. The contract data processing method according to claim 1, It is characterized in that The step of encrypting the contract data according to the first signing private key and the first signing random value of the first signatory, and the second signing private key and the second signing random value of at least one second signatory to obtain the contract encrypted data includes: Determining an encryption order of the contract data according to the first signed random value and the second signed random value; The contract data is encrypted using the first signing private key and the second signing private key according to the encryption order to obtain contract encrypted data.
3. The contract data processing method according to claim 2, It is characterized in that The step of determining the encryption order of the contract data according to the first signed random value and the second signed random value comprises: Determining an encryption order of the contract data according to the size of the first signing random value and the second signing random value; Alternatively, according to a preset calculation method, the calculation value of the first signing random value and the second signing random value is obtained to determine the encryption order of the contract data according to the calculation value.
4. The contract data processing method according to claim 3, It is characterized in that The step of determining the encryption order of the contract data according to the size of the first signing random value and the second signing random value comprises: If the first signing random value is greater than or equal to the second signing random value, determining that the encryption order of the first signing private key precedes that of the second signing private key; If the first signing random value is smaller than the second signing random value, the encryption order of the first signing private key is determined to be after the second signing private key.
5. The contract data processing method according to claim 3, It is characterized in that The step of obtaining the operation values of the first signing random value and the second signing random value according to a preset operation method, and determining the encryption order of the contract data according to the operation values, includes: Adding the first signed random value and the second signed random value to obtain the operation value; or subtracting the first signed random value and the second signed random value to obtain the operation value; The encryption order of the contract data is determined according to the operation value.
6. The contract data processing method according to claim 5, It is characterized in that The step of determining the encryption order of the contract data according to the operation value comprises: If the operation value is an odd number, determining that the encryption order of the first signing private key is prior to that of the second signing private key; If the operation value is an even number, the encryption order of the first signing private key is determined to be after the second signing private key.
7. The contract data processing method according to claim 1, It is characterized in that The step of encrypting the first signed random value and the second signed random value to obtain random value encrypted data includes: The first signing random value and the second signing random value are encrypted according to the first signing public key to obtain the random value encrypted data.
8. The contract data processing method according to claim 1, It is characterized in that The step of decrypting the random value encrypted data to obtain the first signed random value and the second signed random value comprises: The random value encrypted data is decrypted according to the first signing private key to obtain the first signing random value and the second signing random value.
9. The contract data processing method according to claim 1, It is characterized in that The step of decrypting the contract encrypted data according to the first signing public key of the first signatory, the second signing public key shared by each of the second signatories, the first signing random value and the second signing random value to obtain the contract data includes: Obtaining a decryption order according to the first signed random value and the second signed random value; the decryption order is opposite to the encryption order; According to the decryption order, the first signing public key and the second signing public key are used to decrypt the contract encrypted data to obtain the contract data.
10. A contract management client, It is characterized in that Used to store the contract encryption data and random value encryption data as described in any one of claims 1 to 9, and used to display the contract data obtained by decryption.
