Homomorphic encryption desktop application system and application method thereof
By designing a homomorphic encryption desktop application system, using the CKKS homomorphic encryption module and Wails framework, the problem of the popularization of homomorphic encryption technology is solved due to ease of use and thresholds, and efficient and secure data processing and privacy protection are achieved.
Patent Information
- Application Number
- CN202411817223.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The popularity and application of homomorphic encryption technology in actual scenarios is limited by the high learning costs and technical thresholds of user usage scenarios, and the system is poorly usable.
A homomorphic encryption desktop application system is designed, including an interaction layer, an application layer and a storage layer. It provides a user-friendly interface through the Wails framework to simplify key generation, encryption, decryption and calculation operations, and uses the CKKS homomorphic encryption module to realize the calculation of encrypted data.
It reduces the learning cost and technical threshold for users to use homomorphic encryption technology, improves the ease of use and response speed of the system, ensures data security and privacy protection, and promotes the popularization and application of homomorphic encryption technology.
Smart Images

Figure CN119728098A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of privacy computing technology and data processing technology, and in particular to a homomorphic encryption desktop application system and an application method thereof. Background Art
[0002] In the scenario of homomorphic encryption, the entry-level use and testing of homomorphic encryption algorithms is a very costly task. Even if the scenario application is developed, the usability of the system is very poor, which hinders the popularization and application of homomorphic encryption technology in actual scenarios.
[0003] In order to reduce the learning cost and technical threshold for users to use homomorphic encryption scenario applications and improve the usability of homomorphic encryption application systems, it is urgent to provide a new homomorphic encryption desktop application system to solve this problem. Summary of the invention
[0004] The purpose of this application is to provide a homomorphic encryption desktop application system and its application method, which solves the problem of how to reduce the learning cost and technical threshold of users using homomorphic encryption scenario applications in the scenario of homomorphic encryption, and improve the usability of the homomorphic encryption application system.
[0005] The purpose of this application is achieved by the following technical solutions: In a first aspect, the present application provides a homomorphic encryption desktop application system for encrypted data computing, the system comprising: An interactive layer, which is used to provide an interactive interface for operators. The interactive interface includes a plurality of interactive buttons. Each of the interactive buttons is used to set key generation, key calculation, encryption, decryption and calculation as the operator's target action after being clicked, and call the application layer function corresponding to the target action through the Wails framework; An application layer, the application layer comprising a CKKS homomorphic encryption module, the CKKS homomorphic encryption module being used to provide the application layer function to the interaction layer; The storage layer is used for storing key files and ciphertext files.
[0006] Furthermore, the application layer also includes: The file management module is used to import and export key files and ciphertext files between different layers, as well as compress and decompress files; The gob serialization and deserialization module is used to serialize and deserialize the data transmitted between the storage layer and the application layer.
[0007] Furthermore, the CKKS homomorphic encryption module is implemented based on the open source library lattigo.
[0008] Furthermore, the CKKS homomorphic encryption module includes a key generation function, a calculation key generation function, an encryption function, a decryption function, an addition function, a subtraction function, a multiplication function and an algorithm parameter configuration function.
[0009] Furthermore, the interactive interface also includes: A key generation module, wherein the key generation module is used to provide a key generation interface when the target action is key generation; An encryption module, the encryption module is used to provide an encryption interface for encrypting the original text when the target action is encryption; A calculation key generation module, wherein the calculation key generation module is used to provide a calculation key generation interface when the target action is calculation key generation; A calculation module, the calculation module is used to provide a calculation interface for obtaining a ciphertext of a calculation result when the target action is calculation; A decryption module is used to provide a decryption interface when the target action is decryption.
[0010] Further, the key generation interface includes a generation button, a private key area and a public key area; The encryption interface includes an encryption original text selection button, a public key area and a ciphertext area; The computing key generation interface includes a private key import button, a private key area and a key area; The calculation interface includes a calculation key area, a result area, and a ciphertext area corresponding to each ciphertext; The decryption interface includes a ciphertext area, a private key area and an original text area.
[0011] Furthermore, the private key area and the public key area of the key generation interface include a display area and a save button respectively; The public key area of the encryption module includes a display area and an encryption button, and the ciphertext area of the encryption module includes a display area and a save button; The private key area of the generated calculation key module includes a display area and a generate button, and the key area of the generated calculation key module includes a save button; Each ciphertext area of the calculation module includes a ciphertext import button and a display area, the calculation key area of the calculation module includes a calculation key import button, a calculation logic selection button and a display area, and the result area of the calculation module includes a save button and a display area; The ciphertext area and the private key area of the decryption module include an import button and a display area respectively, and the original text area includes a decryption button and an original text display area.
[0012] In a second aspect, the present application further provides an application method of a homomorphic encryption desktop application system, using the homomorphic encryption desktop application system as described in any one of the first aspects to perform encrypted data calculation; The method comprises: using the interactive layer of the homomorphic encryption desktop application system to receive a key generation selection operation of an operator, calling an application layer function through a key generation module of the interactive interface to generate a private key and a public key and save them; The interactive layer of the homomorphic encryption desktop application system is used to receive the encryption selection operation of the operator, and the encryption module of the interactive interface is used to encrypt and save multiple encrypted original texts according to the saved public key to obtain the ciphertext corresponding to each encrypted original text; The interactive layer of the homomorphic encryption desktop application system is used to receive the key generation selection operation of the operator, and the private key is imported through the calculation key generation module of the interactive interface to generate and save the calculation key; The interactive layer of the homomorphic encryption desktop application system is used to receive the calculation selection operation of the operator, and multiple ciphertexts and calculation keys are imported through the calculation module of the interactive interface to generate and save the calculation result ciphertext; The interactive layer of the homomorphic encryption desktop application system is used to receive the decryption operation of the operator, and the calculation result ciphertext and the private key are imported through the decryption module of the interactive interface to generate and save plaintext, where the plaintext is used to indicate the result of calculating the ciphertext using the calculation module.
[0013] In a third aspect, the present application also provides an electronic device comprising a memory and at least one processor, the memory storing a computer program, and the at least one processor being configured to implement the steps of the application method of the homomorphic encryption desktop application system described in the second aspect when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the steps of the method described in the second aspect are implemented.
[0015] Compared with the related art, the beneficial effects of the present application are: providing a homomorphic encryption desktop application system and its application method. By using homomorphic encryption technology, the homomorphic encryption desktop application system allows calculations to be performed in a data encryption state, thereby greatly improving the security of the data; the interaction layer provides an operator-friendly interface, so that non-technical operators can also easily perform key generation, encryption, decryption and calculation operations, simplifying the operation process. Since the calculation can be performed directly on the encrypted data, the privacy of the data can be protected, and the data can be prevented from being unauthorizedly accessed during the processing process. Through the Wails framework, the system can quickly respond to the operator's operations, improving the response speed and availability of the system. At the same time, the Wails framework allows developers to use familiar front-end technologies (such as HTML, CSS, JavaScript) to create user interfaces, combined with the logical processing capabilities of the Go backend, making the application of homomorphic encryption technology more popular, lowering the threshold for using homomorphic encryption technology, and allowing more non-professional operators to use the technical solutions provided by this application for data security protection.
[0016] In summary, the homomorphic encryption desktop application system not only improves data security and privacy protection, but also simplifies the operating procedures of operators, is easier to use, reduces the learning cost and technical threshold for using homomorphic encryption scenario applications, and makes homomorphic encryption technology easier to popularize and apply. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present application is further described below in conjunction with the accompanying drawings and embodiments.
[0018] Figure 1 This is a system block diagram of a homomorphic encryption desktop application system provided in an embodiment of the present application.
[0019] Figure 2 It is a schematic diagram of the interactive interface of the homomorphic encryption desktop application system provided in an embodiment of the present application.
[0020] Figure 3 It is a schematic diagram of the interface of the key generation module provided in the embodiment of the present application.
[0021] Figure 4 and Figure 5 It is a schematic diagram of the interface of the encryption module provided in the embodiment of the present application.
[0022] Figure 6 It is a schematic diagram of the interface of the module for generating and calculating a key provided in an embodiment of the present application.
[0023] Figure 7 It is a schematic diagram of the interface of the computing module provided in the embodiment of the present application.
[0024] Figure 8It is a schematic diagram of the interface of the decryption module provided in the embodiment of the present application.
[0025] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] Below, in conjunction with the accompanying drawings and specific implementation methods, the present application is further described. It should be noted that, under the premise of no conflict, the various embodiments described below or the various technical features can be arbitrarily combined to form a new embodiment. The implementation procedures of the present application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation procedures, and the various details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0027] Below, some terms in this application are explained to facilitate understanding by those skilled in the art.
[0028] CKKS (Cheon-Kim-Kim-Song) is an encryption scheme based on partially homomorphic encryption that can support addition and multiplication operations on encrypted data while maintaining the encryption state of the data. The CKKS scheme is particularly suitable for processing real and complex data, and can perform calculations while protecting data privacy.
[0029] Wails is a modern cross-platform desktop application development framework built on the Go language. It allows developers to use familiar front-end technologies (such as HTML, CSS, JavaScript) to create user interfaces. Combined with the logical processing capabilities of the Go backend, developers can quickly build lightweight and efficient desktop applications while keeping the code concise and easy to maintain.
[0030] The following will first explain the homomorphic encryption desktop application system, and then explain its application methods.
[0031] System Embodiments.
[0032] See also Figure 1 , Figure 1 This is a system block diagram of a homomorphic encryption desktop application system provided in an embodiment of the present application.
[0033] This embodiment provides a homomorphic encryption desktop application system for encrypted data calculation, and the system includes: An interactive layer, which is used to provide an interactive interface for operators. The interactive interface includes a plurality of interactive buttons. Each of the interactive buttons is used to set key generation, key calculation, encryption, decryption and calculation as the operator's target action after being clicked, and call the application layer function corresponding to the target action through the Wails framework; An application layer, the application layer comprising a CKKS homomorphic encryption module, the CKKS homomorphic encryption module being used to provide the application layer function to the interaction layer; The storage layer is used for storing key files and ciphertext files.
[0034] In this technical solution, the interaction layer is the interface for the operator to interact with the system, and provides an intuitive operating environment including multiple interactive buttons. The operator selects the operation to be performed by clicking the button, and the operation is, for example, key generation, encryption, decryption, and calculation. When the operator clicks the button, the interaction layer calls the corresponding function in the application layer through the Wails framework to perform the operation selected by the operator. The application layer includes a CKKS homomorphic encryption module, which is responsible for performing actual encryption operations such as key generation, encryption, decryption, and calculation. It can be considered that the CKKS homomorphic encryption module implements the homomorphic encryption algorithm, allowing calculations to be performed directly on encrypted data without decryption first. In a specific application, the application layer function responds to requests from the interaction layer, performs corresponding encryption operations, and then returns the results to the interaction layer. The storage layer is used for the storage layer to store key files and ciphertext files. Among them, the key file contains keys for encryption and decryption, and the ciphertext file contains encrypted data.
[0035] Therefore, by using homomorphic encryption technology, this system allows calculations to be performed in the encrypted state of data, thereby greatly improving the security of data; the interaction layer provides an operator-friendly interface, so that non-technical operators can also easily perform operations such as key generation, encryption, decryption and calculation, simplifying the operation process. Since calculations can be performed directly on encrypted data, the privacy of the data can be protected and unauthorized access to the data during processing can be prevented. Through the Wails framework, the system can quickly respond to operator operations, improving the response speed and availability of the system. Wails is a modern cross-platform desktop application development framework built on the Go language, allowing developers to use familiar front-end technologies (such as HTML, CSS, JavaScript) to create user interfaces. Combined with the logical processing capabilities of the Go backend, the application of homomorphic encryption technology has become more popular, lowering the threshold for using homomorphic encryption technology, and allowing more non-professional operators to use this technology to protect data security.
[0036] In summary, the homomorphic encryption desktop application system not only improves data security and privacy protection, but also simplifies the operating procedures of operators, lowers the technical threshold, and makes homomorphic encryption technology easier to popularize and apply.
[0037] In one embodiment, the application layer further includes: The file management module is used to import and export key files and ciphertext files between different layers, as well as compress and decompress files; The gob serialization and deserialization module is used to serialize and deserialize the data transmitted between the storage layer and the application layer.
[0038] gob is a data serialization format in the Go language, which is used to convert Go language data structures into byte sequences for storage or transmission over the network. Serialization is the process of converting a data structure or object state into a format that can be stored or transmitted (such as a byte stream). Deserialization is the reverse process of serialization, which is to convert a byte sequence back to the original data structure or object state.
[0039] In specific applications, the configuration parameters and key information of the encryption algorithm can be serialized into base64-encoded strings to facilitate transmission between the user interface (i.e., interactive interface) and the back-end logic. At the same time, the operator's operation instructions (such as encryption, decryption, calculation, etc.) are serialized into byte sequences, and the processing results (such as calculated ciphertext) are deserialized and converted into a format that can be displayed by the user interface.
[0040] In one embodiment, the CKKS homomorphic encryption module is implemented based on the open source library lattigo.
[0041] Using the open source library lattigo can simplify the development process because developers can use existing, tested code instead of implementing complex homomorphic encryption algorithms from scratch. At the same time, the open source library lattigo provides a flexible API that allows developers to easily expand and customize homomorphic encryption functions as needed.
[0042] In one embodiment, the CKKS homomorphic encryption module includes a key generation function, a calculation key generation function, an encryption function, a decryption function, an addition function, a subtraction function, a multiplication function and an algorithm parameter configuration function.
[0043] Among them, the key generation function is used to generate a key pair for encrypting and decrypting data. The key pair includes a public key and a private key. The public key is used to encrypt data, while the private key is used to decrypt data. The key generation process follows the specific rules of the CKKS homomorphic encryption algorithm to ensure that the generated key pair can be safely used for subsequent encryption and decryption operations.
[0044] The Generate Compute Key function is used to generate a computation key based on the private key for performing arithmetic operations in the encryption domain. The computation key allows operations such as addition, subtraction, and multiplication to be performed on encrypted data without decrypting the data.
[0045] The encryption function is used to encrypt the original data using the public key to generate ciphertext. The encryption process follows the rules of the CKKS algorithm to ensure that arithmetic operations can still be performed on the data in an encrypted state.
[0046] The decryption function is used to decrypt the ciphertext using the private key and restore the original data. It can be considered that the decryption process ensures that only operators with the private key can access the original data, thereby protecting the privacy of the data.
[0047] Addition, subtraction, and multiplication functions are used to perform arithmetic operations directly on encrypted data. An operation performed on encrypted data produces the same result as performing the same operation on the original data, except that the result is also encrypted.
[0048] The algorithm parameter configuration function is used to configure the parameters of the CKKS algorithm, such as key size, encryption accuracy, etc. By adjusting the parameters, you can balance security and computing efficiency to adapt to different application scenarios.
[0049] In one embodiment, the interactive interface further includes: A key generation module, wherein the key generation module is used to provide a key generation interface when the target action is key generation; An encryption module, the encryption module is used to provide an encryption interface for encrypting the original text when the target action is encryption; A calculation key generation module, wherein the calculation key generation module is used to provide a calculation key generation interface when the target action is calculation key generation; A calculation module, the calculation module is used to provide a calculation interface for obtaining a ciphertext of a calculation result when the target action is calculation; A decryption module is used to provide a decryption interface when the target action is decryption.
[0050] It can be considered that when the operator selects "Generate Key" as the target operation, the system provides a key generation interface. The operator can click the Generate button on this interface to trigger the key generation function, and the system will generate a pair of keys (public key and private key). The generated key will be saved for subsequent encryption and decryption operations.
[0051] When the operator selects "encryption" as the target operation, the system provides an encryption interface for encrypting the original text. The operator enters or selects the original data to be encrypted (such as text or numbers) on this interface and selects the previously generated public key. The operator clicks the encryption button, and the system calls the encryption function to encrypt the original data into ciphertext and save the ciphertext.
[0052] When the operator selects "Generate calculation key" as the target operation, the system provides a calculation key generation interface. The operator selects the previously generated private key on this interface and clicks the Generate button to generate the calculation key. The calculation key is used to perform arithmetic operations on encrypted data to ensure the security of the calculation process.
[0053] When the operator selects "Calculate" as the target operation, the system provides a calculation interface for the ciphertext of the calculation result. The operator enters or selects the ciphertext to be calculated (such as an encrypted number) and the calculation key on this interface, and selects the calculation operation (such as addition, subtraction, or multiplication). The operator clicks the calculation button, and the system calls the corresponding calculation function, performs the calculation on the ciphertext, and generates a new ciphertext result.
[0054] When the operator selects "decryption" as the target operation, the system provides a decryption interface. The operator enters or selects the ciphertext of the calculation result to be decrypted on this interface, and selects the previously generated private key. The operator clicks the decryption button, and the system calls the decryption function to decrypt the ciphertext into original data for the operator to view.
[0055] In one embodiment, the key generation interface includes a generation button, a private key area, and a public key area; The encryption interface includes an encryption original text selection button, a public key area and a ciphertext area; The key generation interface includes a private key import button, a private key area and a key key area; The calculation key generation interface includes a calculation key area, a result area and a ciphertext area corresponding to each ciphertext; The decryption interface includes a ciphertext area, a private key area and an original text area.
[0056] In one embodiment, the private key area and the public key area of the key generation interface include a display area and a save button respectively; The public key area of the encryption module includes a display area and an encryption button, and the ciphertext area of the encryption module includes a display area and a save button; The private key area of the generated calculation key module includes a display area and a generate button, and the key area of the generated calculation key module includes a save button; Each ciphertext area of the calculation module includes a ciphertext import button and a display area, the calculation key area of the calculation module includes a calculation key import button, a calculation logic selection button and a display area, and the result area of the calculation module includes a save button and a display area; The ciphertext area and the private key area of the decryption module include an import button and a display area respectively, and the original text area includes a decryption button and an original text display area.
[0057] Application method embodiments.
[0058] This embodiment provides an application method of a homomorphic encryption desktop application system, which uses the homomorphic encryption desktop application system as described in the system embodiment to perform encrypted data calculations. Its specific implementation method is consistent with the implementation method and the technical effect achieved recorded in the above-mentioned system embodiment, and some contents will not be repeated here.
[0059] The method comprises: using the interactive layer of the homomorphic encryption desktop application system to receive a key generation selection operation of an operator, calling an application layer function through a key generation module of the interactive interface to generate a private key and a public key and save them; The interactive layer of the homomorphic encryption desktop application system is used to receive the encryption selection operation of the operator, and the encryption module of the interactive interface is used to encrypt and save multiple encrypted original texts according to the saved public key to obtain the ciphertext corresponding to each encrypted original text; The interactive layer of the homomorphic encryption desktop application system is used to receive the key generation selection operation of the operator, and the private key is imported through the calculation key generation module of the interactive interface to generate and save the calculation key; The interactive layer of the homomorphic encryption desktop application system is used to receive the calculation selection operation of the operator, and multiple ciphertexts and calculation keys are imported through the calculation module of the interactive interface to generate and save the calculation result ciphertext; The interactive layer of the homomorphic encryption desktop application system is used to receive the decryption operation of the operator, and the calculation result ciphertext and the private key are imported through the decryption module of the interactive interface to generate and save plaintext, where the plaintext is used to indicate the result of calculating the ciphertext using the calculation module.
[0060] As an example, see Figures 2 to 8 , provides a schematic diagram of the interface of the homomorphic encryption desktop application system.
[0061] First enter the system as Figure 2 As shown, click Generate Key to enter Figure 3 In the Generate Key module shown, click the Generate button to generate the key, and click Save to save the key (public key and private key) as a file. Click Copy to copy the key.
[0062] Click Figure 2 Encryption in Figure 4 , Figure 5 Enter the encryption module as shown below. Enter the encrypted original texts (6.5 and 7.9 are used as examples), click File Import, select the saved public key, click the Encrypt button, and save the ciphertexts (ciphertext 1 and ciphertext 2) as files.
[0063] Click Figure 2 The generated calculation key in Figure 6 As shown, enter the Generate Calculation Key module, click Import from File, select the saved private key, and then click the Generate button to generate the calculation key, and then save the calculation key as a file.
[0064] Click Figure 2 Calculations in Figure 7 As shown, enter the calculation module, import ciphertext 1 (encrypted by 6.5) and ciphertext 2 (encrypted by 7.9) from the file, calculate the key, take addition as an example, click the "+" button, and when the interface prompts success, you will get the calculation result ciphertext, and you can click Save to save it.
[0065] Click Figure 2 Decryption in Figure 8 As shown, enter the decryption module, import the calculated result ciphertext from the file, import the private key from the file, click the decryption button, and get the result plaintext (original text) of 14.40021372391072, corresponding to 6.5+7.9=14.4. It can be considered that the remaining value after 14.4 (0021372391072) is a noise error, which is caused by the CKKS algorithm. This error is within the acceptable range of homomorphic encryption.
[0066] Electronic device embodiments.
[0067] This embodiment provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement the steps of any one of the method embodiments when executing the computer program.
[0068] See also Fig. 9 , Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0069] The electronic device 200 includes, for example, at least one memory 210 , at least one processor 220 , and a bus 230 for connecting different platform systems.
[0070] The memory 210 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 211 and / or a cache memory 212 , and may further include a read only memory (ROM) 213 .
[0071] Among them, the memory 210 also stores a computer program, which can be executed by the processor 220, so that the processor 220 executes the steps of the method in the embodiment of the present application. Its specific implementation method is consistent with the implementation method and the technical effect achieved in the embodiment of the above method, and some contents will not be repeated here.
[0072] The memory 210 may also include a utility 214 having at least one program module 215, such program module 215 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0073] Accordingly, the processor 220 may execute the above-mentioned computer program, and may execute the utility 214 .
[0074] Bus 230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or local bus using any of a variety of bus architectures.
[0075] The electronic device 200 may also communicate with one or more external devices 240 such as keyboards, pointing devices, Bluetooth devices, etc., and may also communicate with one or more devices that can interact with the electronic device 200, and / or communicate with any device (such as a router, a modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may be performed through the input and output interface 250. In addition, the electronic device 200 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 through the bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0076] Computer readable storage medium embodiments.
[0077] This embodiment provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by at least one processor, the steps of the method described in the method embodiment are implemented.
[0078] It should be appreciated that the embodiments of the present application may be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner, according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if desired, the program may be implemented in assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed dedicated integrated circuit for this purpose.
[0079] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.
[0080] The terms "first", "second", "third", etc. (if any) in the specification and claims of the present application and the 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 data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to" 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.
[0081] This application is explained from the perspectives of purpose of use, effectiveness, progress and novelty, and has met the functional enhancement and usage requirements emphasized by the Patent Law. The above description and drawings of this application are only the preferred embodiments of this application, and are not intended to limit this application. Therefore, all structures, devices, features, etc. that are similar or identical to this application, that is, all equivalent replacements or modifications made in accordance with the scope of the patent application of this application, should fall within the scope of protection of the patent application of this application.
Claims
1. A homomorphic encryption desktop application system, characterized in that: For encrypted data computing, the system comprises: An interactive layer, which is used to provide an interactive interface for operators. The interactive interface includes a plurality of interactive buttons. Each of the interactive buttons is used to set key generation, key calculation, encryption, decryption and calculation as the operator's target action after being clicked, and call the application layer function corresponding to the target action through the Wails framework; An application layer, the application layer comprising a CKKS homomorphic encryption module, the CKKS homomorphic encryption module being used to provide the application layer function to the interaction layer; The storage layer is used for storing key files and ciphertext files.
2. The homomorphic encryption desktop application system according to claim 1, characterized in that: The application layer also includes: The file management module is used to import and export key files and ciphertext files between different layers, as well as compress and decompress files; The gob serialization and deserialization module is used to serialize and deserialize the data transmitted between the storage layer and the application layer.
3. The homomorphic encryption desktop application system according to claim 1, characterized in that: The CKKS homomorphic encryption module is implemented based on the open source library lattigo.
4. The homomorphic encryption desktop application system according to claim 3 is characterized in that: The CKKS homomorphic encryption module includes a key generation function, a calculation key generation function, an encryption function, a decryption function, an addition function, a subtraction function, a multiplication function and an algorithm parameter configuration function.
5. The homomorphic encryption desktop application system according to claim 4 is characterized in that: The interactive interface also includes: A key generation module, wherein the key generation module is used to provide a key generation interface when the target action is key generation; An encryption module, the encryption module is used to provide an encryption interface for encrypting the original text when the target action is encryption; A calculation key generation module, wherein the calculation key generation module is used to provide a calculation key generation interface when the target action is calculation key generation; A calculation module, the calculation module is used to provide a calculation interface for obtaining a ciphertext of a calculation result when the target action is calculation; A decryption module is used to provide a decryption interface when the target action is decryption.
6. The homomorphic encryption desktop application system according to claim 5, characterized in that: The key generation interface includes a generation button, a private key area and a public key area; The encryption interface includes an encryption original text selection button, a public key area and a ciphertext area; The computing key generation interface includes a private key import button, a private key area and a key area; The calculation interface includes a calculation key area, a result area, and a ciphertext area corresponding to each ciphertext; The decryption interface includes a ciphertext area, a private key area and an original text area.
7. The homomorphic encryption desktop application system according to claim 6, characterized in that: The private key area and the public key area of the key generation interface include a display area and a save button respectively; The public key area of the encryption module includes a display area and an encryption button, and the ciphertext area of the encryption module includes a display area and a save button; The private key area of the generated calculation key module includes a display area and a generate button, and the key area of the generated calculation key module includes a save button; Each ciphertext area of the calculation module includes a ciphertext import button and a display area, the calculation key area of the calculation module includes a calculation key import button, a calculation logic selection button and a display area, and the result area of the calculation module includes a save button and a display area; The ciphertext area and the private key area of the decryption module include an import button and a display area respectively, and the original text area includes a decryption button and an original text display area.
8. An application method of a homomorphic encryption desktop application system, characterized in that: Using the homomorphic encryption desktop application system as described in any one of claims 1 to 7, performing encrypted data calculation; the method comprises: The interactive layer of the homomorphic encryption desktop application system is used to receive the operator's key generation selection operation, and the key generation module of the interactive interface calls the application layer function to generate and save the private key and the public key; The interactive layer of the homomorphic encryption desktop application system is used to receive the encryption selection operation of the operator, and the encryption module of the interactive interface is used to encrypt and save multiple encrypted original texts according to the saved public key to obtain the ciphertext corresponding to each encrypted original text; The interactive layer of the homomorphic encryption desktop application system is used to receive the key generation selection operation of the operator, and the private key is imported through the calculation key generation module of the interactive interface to generate and save the calculation key; The interactive layer of the homomorphic encryption desktop application system is used to receive the calculation selection operation of the operator, and multiple ciphertexts and calculation keys are imported through the calculation module of the interactive interface to generate and save the calculation result ciphertext; The interactive layer of the homomorphic encryption desktop application system is used to receive the decryption operation of the operator, and the calculation result ciphertext and the private key are imported through the decryption module of the interactive interface to generate and save plaintext, where the plaintext is used to indicate the result of calculating the ciphertext using the calculation module.
9. An electronic device, characterized in that: The electronic device comprises a memory and at least one processor, wherein the memory stores a computer program, and the at least one processor is configured to implement the steps of the method of claim 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the steps of the method according to claim 8 are implemented.