Encryption method and device, equipment, storage medium and program product
By using fixed point and blind operations in OPRF technology, the elliptic curve scalar multiplication calculation is reduced, and the problem of large amount of calculation in the existing technology is solved, and the efficiency of encryption calculation is improved.
Patent Information
- Application Number
- CN202510428341.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-18
AI Technical Summary
The existing OPRF technology has a large amount of calculation in elliptic curve encryption, resulting in low encryption efficiency.
By obtaining fixed points on the specified elliptic curve, using blinding operations and deblindling operations, combining client keys and remote devices to generate encrypted information, reducing the amount of elliptic curve scalar multiplication calculation.
It significantly improves the efficiency of encryption calculation, reduces the amount of scalar multiplication of random points of elliptic curves, and improves the speed of encryption processing.
Smart Images

Figure CN120337259A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for encryption. Background Art
[0002] In the current Internet operation mode, especially in the field of security, most of the current OPRF (Oblivious Pseudo-Random Function) technologies are implemented using asymmetric encryption. Specifically, elliptic curve encryption is generally used. Each step of the OPRF technology involves an elliptic curve scalar multiplication, and the point of the scalar multiplication is not the base point. Therefore, an elliptic curve random point scalar multiplication needs to be performed in each step, resulting in a large amount of computation and low encryption efficiency. Summary of the Invention
[0003] In a first aspect of the present disclosure, a method for encryption is provided. The method includes: obtaining an indication of a fixed point on a specified elliptic curve from a remote device; performing a blinding operation based on the fixed point, a base point of the specified elliptic curve, target data, and a client key; sending the result of the blinding operation to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device based on the result of the blinding operation; and generating an encrypted result of the target data based on the client key and the encrypted information.
[0004] In a second aspect of the present disclosure, an apparatus for encryption is provided. The apparatus includes: an obtaining module configured to obtain an indication of a fixed point on a specified elliptic curve from a remote device; an execution module configured to perform a blinding operation based on the fixed point, a base point of the specified elliptic curve, target data, and a client key; a sending module configured to send the result of the blinding operation to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device based on the result of the blinding operation; and a generating module configured to generate an encrypted result of the target data based on the client key and the encrypted information.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. The instructions, when executed by the at least one processing unit, cause the electronic device to perform the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. A computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided. The product includes a computer program, where when the computer program is executed by a processor, it implements the method according to the first aspect of the present disclosure.
[0008] It should be understood that the content described in this part is not intended to define the key features or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the following, in combination with the drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where:
[0010] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0011] Figure 2 A schematic diagram of an encryption system according to some embodiments of the present disclosure is shown;
[0012] Figure 3A and Figure 3B A schematic diagram of an encryption step according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A schematic diagram of an encryption process according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A schematic structural block diagram of a device for encryption according to certain embodiments of the present disclosure is shown; and
[0015] Figure 6 A block diagram of a computing device in which one or more embodiments of the present disclosure can be implemented is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] The embodiments of the present disclosure will be described in more detail below with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and its similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". There may also be other explicit and implicit definitions hereinafter.
[0018] It should be noted that in the technical solutions of the present disclosure, the acquisition, storage, application, etc. of the user's personal information all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0019] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained through appropriate means according to relevant laws and regulations.
[0020] For example, when responding to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information, so that the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operations of the technical solutions of the present disclosure according to the prompt message.
[0021] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0022] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the embodiments of the present disclosure. Other ways that meet relevant laws and regulations can also be applied to the embodiments of the present disclosure.
[0023] As used herein, the term "model" can learn the corresponding association relationship between input and output from training data, so that after training is completed, for a given input, a corresponding output can be generated. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple processing units. A neural network model is an example of a model based on deep learning. In this article, "model" can also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms can be used interchangeably in this article.
[0024] "Neural network" is a machine learning network based on deep learning. A neural network can process inputs and provide corresponding outputs, and generally includes an input layer, an output layer, and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications usually include many hidden layers, thus increasing the depth of the network. The layers of the neural network are connected in sequence, so that the output of the previous layer is provided as the input of the next layer, where the input layer receives the input of the neural network, and the output of the output layer is the final output of the neural network. Each layer of the neural network includes one or more nodes (also called processing nodes or neurons), and each node processes the input from the previous layer.
[0025] In the fields of cryptography and security, OPRF technology has various applications such as password authentication key exchange, password strengthening, privacy computing, password management, etc. The form of OPRF technology is similar to the key hash function Hash k (x), but the difference is that it allows one party (the client) to calculate the output of the pseudo-random function F k (·) held by the other party (the server) without revealing the input x to the server, and it can also be constructed without relying on hashing. At the same time, the server also cannot know what the client's input x is. In short, OPRF enables one party to encrypt its input and then send it to the other party for calculation, and this process does not reveal any information about the input.
[0026] Most current OPRF technologies are implemented using asymmetric encryption. Specifically, generally elliptic curve encryption is used. First, both the Client and the Server will initialize separately. During the initialization process, both parties will select the same secure elliptic curve (such as secp256k1, SM2, Curve25519, Ed25519, etc.) and use the same base point; the Server will generate the OPRF key k, and the Client will generate a random key r. Since the data length must be limited to 256 bits when performing elliptic curve encryption, the Client generally performs a hash H(x) on the data x before executing OPRF (traditional OPRF also needs to map the hash value to the elliptic curve first. For some elliptic curves, this process is called HashToCurve, while for some other elliptic curves, the hash value can be directly used as a point on the elliptic curve). Each step of the existing OPRF technologies includes an elliptic curve scalar multiplication, and the point for scalar multiplication is not the base point. Therefore, a random point scalar multiplication of the elliptic curve needs to be done in each step. And if the elliptic curve type is Weisstrass type, the Client also needs to perform a HashToCurve calculation during the initialization process. The operation amount of the elliptic curve random point scalar multiplication is large, and the encryption efficiency is low.
[0027] Embodiments of the present disclosure provide an encryption scheme. According to this scheme, an indication of a fixed point on a specified elliptic curve can be obtained from a remote device; a blinding operation is performed based on the fixed point, a reference point of the specified elliptic curve, target data, and a client key; the result of the blinding operation is sent to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device based on the result of the blinding operation; and an encrypted result of the target data is generated according to the client key and the encrypted information.
[0028] Thus, embodiments of the present disclosure can provide a brand-new encryption scheme, reducing the amount of computation in the encryption scenario by changing the way of encryption calculation.
[0029] Figure 1 FIG. shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. As Figure 1 shown, the example environment 100 may include an electronic device 110. The electronic device 110 may run an application 120 that supports encryption. The application 120 may be any suitable type of application that supports encryption, examples of which may include, but are not limited to: password management, privacy computing, and other suitable types of applications. Embodiments of the present disclosure are not limited in this regard. The user 140 may interact with the application 120 via the electronic device 110 and / or its attached devices.
[0030] In the example environment 100, if the application 120 is active, the electronic device 110 may present an interface 150 for supporting encryption calculations through the application 120. The user 140 can input data to be encrypted in the interface 150, and the encrypted result after encryption by the electronic device 110 and the server 130 will be displayed in the interface 150.
[0031] In some embodiments, the electronic device 110 communicates with the server 130 to implement the supply of services for the application 120. The electronic device 110 may be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable game terminals, VR / AR devices, Personal Communication System (PCS) devices, personal navigation devices, Personal Digital Assistant (PDA), audio / video players, digital cameras / cameras, positioning devices, television receivers, radio broadcast receivers, e-book devices, game devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.).
[0032] The server 130 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. The server 130 can include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and so on. The server 130 can provide background services for the application 120 that supports content presentation in the electronic device 110.
[0033] A communication connection can be established between the server 130 and the electronic device 110. The communication connection can be established in a wired or wireless manner. The communication connection can include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus (USB) connection, a Wireless Fidelity (WiFi) connection, etc. The embodiments of the present disclosure are not limited in this regard. In the embodiments of the present disclosure, the server 130 and the electronic device 110 can implement signaling interaction through the communication connection therebetween.
[0034] It should be understood that the structures and functions of the various elements in the environment 100 are described only for exemplary purposes, without implying any limitation on the scope of the present disclosure.
[0035] Figure 2 A schematic diagram of an encryption system 200 according to some embodiments of the present disclosure is shown. The encryption system 200 can be run in the electronic device 110 and the server 130 to implement the encryption function of the application 120. For ease of discussion, the system 200 will be described with reference to Figure 1 the environment 100.
[0036] As Figure 2 shown, the client (i.e., the electronic device) 110 includes a blinding operation module 210, a first communication module 220, and a deblinding module 250, and the server 130 includes a second communication module 230 and a blinding calculation module 240. Before performing the blinding operation, the electronic device 110 and the server 130 select and use the same secure elliptic curve and the same reference point.
[0037] As Figure 2As shown, the blinding operation module 210 is configured to perform a blinding operation on target data. First, the blinding operation module 210 generates a random key (i.e., the client key) and selects a fixed point from the elliptic curve. Then, the blinding operation module 210 processes the target data using two encryption methods respectively to obtain a first encrypted value and a second encrypted value. Finally, a blinding operation is performed according to the client key, the first encrypted value, the second encrypted value, the reference point of the elliptic curve, and the fixed point of the elliptic curve to obtain the result of the blinding operation. Among them, the fixed point is obtained from the server 130.
[0038] As Figure 2 shown, the first communication module 220 is configured to send the result of the blinding operation to the server 130. In the server 130, the second communication module 230 is configured to receive the result of the blinding operation and send the result of the blinding operation to the blinding calculation module 240. After encrypting the result of the blinding operation, the blinding calculation module 240 generates encrypted information, and then the second communication module 230 sends the encrypted information to the first communication module 220.
[0039] As Figure 2 shown, the blinding calculation module 240 is configured to perform an encryption calculation on the result of the blinding operation to obtain encrypted information. The blinding calculation module 240 generates a server key (i.e., the remote device key), and then splits the server key into two keys: the first key and the second key. Further, the blinding calculation module 240 calculates a fixed point on the elliptic curve according to the first key, the second key, and the reference point of the elliptic curve. Then, the encrypted information is generated using the first key and the result of the blinding operation.
[0040] As Figure 2 shown, the deblinding module 250 is configured to obtain an encrypted result according to the encrypted information and the client key. The deblinding module 250 first calculates the inverse of the client key in the finite field, and then obtains the encrypted result according to the inverse and the encrypted information.
[0041] Figure 3A FIG. shows a schematic diagram of the encryption step 300A in the client according to some embodiments of the present disclosure. For ease of understanding, the following will refer to Figure 1 explain the step 300A.
[0042] Referring to Figure 3A , in block 310, the client 110 and the server 130 select the same secure elliptic curve, such as secp256k1, SM2, Curve25519, Ed25519, etc., and use the same reference point.
[0043] At block 320, the client (i.e., the electronic device) 110 generates a random key r and uses two different encryption methods, such as using two hash algorithms to obtain two hash values H1(x) and H2(x), corresponding to the first encrypted value and the second encrypted value respectively.
[0044] At block 330, the client 110 obtains a fixed point on the elliptic curve from the server 130, and then performs a blinding operation according to the client key, a fixed point on the elliptic curve, the base point of the elliptic curve, and the encrypted target data. In an example of the present disclosure, the calculation formula of the blinding operation is: B = (r·H1(x))×G+(r·H2(x))×K, where G is the base point of the elliptic curve, B is the result of the blinding operation, K is the fixed point on the elliptic curve, the formula includes finite field multiplications r·H1(x) and r·H2(x), elliptic curve base point scalar multiplication operations: the result of r·H1(x) and G, the calculation time of the finite field multiplication is negligible compared to the elliptic curve scalar multiplication, and the elliptic curve base point scalar multiplication and the elliptic curve fixed point scalar multiplication can use methods including but not limited to sliding window, n-NAF expansion, Comb algorithm, etc. to accelerate the calculation performance, which has a significant improvement compared to the elliptic curve random point scalar multiplication operation used in the traditional OPRF in the blinding operation, thus achieving an improvement in the calculation efficiency of the blinding operation.
[0045] At block 340, the client 110 sends the result of the blinding operation to the server 130 so that the server 130 encrypts the result of the blinding operation to obtain the encrypted information B' generated by the server 130.
[0046] At block 350, the client 110 performs a de - blinding operation on the encrypted information to obtain the encrypted result of the target data. The client uses the inverse r of the client key r in the finite field -1 to perform an elliptic curve scalar multiplication with B' to obtain the OPRF result.
[0047] Figure 3B shows a schematic diagram of the encryption step 300B in the client according to some embodiments of the present disclosure. For ease of understanding, the following refers to Figure 1 to explain step 300B.
[0048] At block 360, the client 110 and the server 130 select the same secure elliptic curve.
[0049] At block 370, the server 130 generates a server key k and splits the server key into a first key k1 and a second key k2. In an example, the key k is hashed with SHA512, and the first half of the hash value is used as k1, and the second half is used as k2. In addition, the server 130 also needs to calculate the fixed point on the elliptic curve And send K to the client 110. Since this process is only executed once during initialization, its execution time can also be ignored.
[0050] At block 380, the server 130 obtains the result of the blinding operation from the client 110 and generates encrypted information based on the first key and the result of the blinding operation. The calculation method for generating the encrypted information is: B′ = k1 × B.
[0051] Combined Figure 3A and Figure 3B , the calculation method for the client to perform the de - blinding operation is: F k (x) = r -1 × B′ = [k1·H1(x) + k2·H2(x)] × G, where F k (x) is the encryption result. In the encryption step, there is a significant improvement in computational performance during the execution of the blinding operation. And for the client, the target data x is mapped to two hash values H1(x) and H2(x) by two different hash functions respectively. In addition, there is no need to use the HashToCurve method to map the hash value to the elliptic curve anymore.
[0052] In the embodiments of the present disclosure, the hash value is directly used as a scalar instead of using the hash value as a point on the elliptic curve as in the traditional method. For security reasons, two keys k1 and k2 and two hash values H1(x) and H2(x) are used. If only one key and one hash value are used, both parties can obtain the other party's k and H(x) from the additive homomorphism property of the elliptic curve and the linear relationship of the scalar, thus ensuring the security of the encryption. In addition, in some application scenarios, the server 130 may also directly execute F k (x), and the F k (x) in the present disclosure has only one elliptic curve base point scalar multiplication calculation, while the traditional method is a random point scalar multiplication calculation on the elliptic curve.
[0053] Figure 4 Shows a schematic diagram of an encryption process 400 according to some embodiments of the present disclosure.
[0054] As Figure 4 shown, at block 410, the electronic device 110 obtains an indication of a fixed point on a specified elliptic curve from a remote device.
[0055] At block 420, the electronic device 110 performs a blinding operation based on the fixed point, the reference point of the specified elliptic curve, the target data, and the client key.
[0056] At block 430, the electronic device 110 sends the result of the blinding operation to the remote device to obtain encrypted information, which is generated by the remote device based on the result of the blinding operation.
[0057] At block 440, the electronic device 110 generates an encrypted result of the target data based on the client key and the encrypted information.
[0058] In some embodiments, process 400 further includes: determining a first encrypted value of the target data and a second encrypted value of the target data by performing a first encryption calculation and a second encryption calculation on the target data; and generating the result of the blinding operation based on the client key, the first encrypted value, the second encrypted value, the reference point, and the fixed point.
[0059] In some embodiments, process 400 further includes: the fixed point is determined based on the first key, the second key, and the reference point of the remote device.
[0060] In some embodiments, process 400 further includes: the first key and the second key are obtained by splitting the remote device key of the remote device.
[0061] In some embodiments, process 400 further includes: the first key is the value of the first half of the hashed remote device key, and the second key is the value of the second half of the hashed remote device key.
[0062] In some embodiments, determining the target calculation result includes: obtaining the inverse operation result of the client key; and determining the target calculation result based on the inverse operation result and the encryption calculation result.
[0063] In some embodiments, process 400 further includes: determining a specified elliptic curve from a plurality of elliptic curves; and obtaining the reference point of the specified elliptic curve.
[0064] In some embodiments, process 400 further includes: sending the first encrypted value and the second encrypted value to the remote device to obtain the encrypted result of the target data.
[0065] Embodiments of the present disclosure also provide corresponding apparatuses for implementing the above methods or processes. Figure 5 The schematic structural block diagram of an apparatus 500 for encryption according to certain embodiments of the present disclosure is shown. The apparatus 500 can be implemented as or included in the electronic device 110. Each module / component in the apparatus 500 can be implemented by hardware, software, firmware, or any combination thereof.
[0066] As Figure 5As shown, device 500 includes: an acquisition module 510 configured to acquire an indication of a fixed point on a specified elliptic curve from a remote device; an execution module 520 configured to perform a blinding operation based on the fixed point, a reference point of the specified elliptic curve, target data, and a client key; a sending module 530 configured to send the result of the blinding operation to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device according to the result of the blinding operation; and a generation module 540 configured to generate an encrypted result of the target data according to the client key and the encrypted information.
[0067] In some embodiments, device 500 further includes: determining a first encrypted value of the target data and a second encrypted value of the target data by performing a first encryption calculation and a second encryption calculation on the target data; and generating a result of the blinding operation according to the client key, the first encrypted value, the second encrypted value, the reference point, and the fixed point.
[0068] In some embodiments, device 500 further includes: the fixed point is determined based on a first key, a second key, and a reference point of the remote device.
[0069] In some embodiments, device 500 further includes: the first key and the second key are obtained by splitting the remote device key of the remote device.
[0070] In some embodiments, device 500 further includes: the first key is the value of the first half of the hash processing of the remote device key, and the second key is the value of the second half of the hash processing of the remote device key.
[0071] In some embodiments, device 500 further includes: obtaining an inverse operation result of the client key; and determining a target calculation result according to the inverse operation result and the encryption calculation result.
[0072] In some embodiments, device 500 further includes: determining a specified elliptic curve from multiple elliptic curves; and acquiring a reference point of the specified elliptic curve.
[0073] In some embodiments, device 500 further includes: sending the first encrypted value and the second encrypted value to the remote device to obtain an encrypted result of the target data.
[0074] The units and / or modules included in apparatus 500 may be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or in place of the machine-executable instructions, some or all of the units and / or modules in apparatus 500 may be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0075] It should be understood that one or more steps in the above methods may be performed by a suitable electronic device or combination of electronic devices. Such an electronic device or combination of electronic devices may include, for example, Figure 1 electronic device 110 in
[0076] Figure 6 A block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that Figure 6 the electronic device 600 shown is merely exemplary and should not constitute any limitation on the functions and scope of the embodiments described herein. Figure 6 The electronic device 600 shown may be used to implement Figure 1 electronic device 110 of Figure 5 apparatus 500.
[0077] As Figure 6 shown, the electronic device 600 is in the form of a general-purpose electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and be capable of performing various processes according to programs stored in the memory 620. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing ability of the electronic device 600.
[0078] The electronic device 600 generally includes multiple computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be volatile memory (such as registers, caches, random access memory (RAM)), non-volatile memory (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 730 can be removable or non-removable media and can include machine-readable media, such as a flash drive, a magnetic disk, or any other media that can be capable of storing information and / or data and can be accessed within the electronic device 600.
[0079] The electronic device 600 can further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in Figure 6 it, a disk drive for reading from or writing to a removable, non-volatile magnetic disk (such as a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk can be provided. In these cases, each drive can be connected to a bus (not shown) by one or more data media interfaces. The memory 620 can include a computer program product 625 having one or more program modules that are configured to execute the various methods or actions of the various embodiments of the present disclosure.
[0080] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented by a single computing cluster or multiple computer machines that can communicate via a communication connection. Thus, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, network personal computers (PCs), or another network node.
[0081] The input device 650 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 660 can be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 can also communicate with one or more external devices (not shown) as needed via the communication unit 740, such as a storage device, a display device, etc., communicate with one or more devices that enable a user to interact with the electronic device 600, or communicate with any device that enables the electronic device 600 to communicate with one or more other electronic devices (such as a network card, a modem, etc.). Such communication can be performed via an input / output (I / O) interface (not shown).
[0082] According to an exemplary implementation of the present disclosure, there is provided a computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, there is also provided a computer program product, the computer program product being tangibly stored on a non-transitory computer-readable medium and including computer-executable instructions, and the computer-executable instructions being executed by a processor to implement the method described above.
[0083] Aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0084] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is produced that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, which causes a computer, a programmable data processing device, and / or other devices to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufacture, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0085] The computer-readable program instructions can be loaded onto a computer, other programmable data processing device, or other device, such that a series of operational steps are executed on the computer, other programmable data processing device, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing device, or other device implement the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various implementations of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or by a combination of dedicated hardware and computer instructions.
[0087] The implementations of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The choice of terms used herein is intended to best explain the principles of the implementations, the practical application, or the improvement of technologies in the market, or to enable other ordinary skill in the art to understand the various implementation manners disclosed herein.
Claims
1. An encryption method, comprising: Obtaining an indication of a fixed point on a specified elliptic curve from a remote device; Performing a blinding operation based on the fixed point, a reference point of the specified elliptic curve, target data, and a client key; Sending the result of the blinding operation to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device according to the result of the blinding operation; And Generating an encrypted result of the target data according to the client key and the encrypted information.
2. The method according to claim 1, further comprising: Determining a first encrypted value of the target data and a second encrypted value of the target data by performing a first encryption calculation and a second encryption calculation on the target data; And Generating the result of the blinding operation according to the client key, the first encrypted value, the second encrypted value, the reference point, and the fixed point.
3. The method according to claim 1, wherein the fixed point is determined based on a first key, a second key of the remote device, and the reference point.
4. The method according to claim 3, wherein the first key and the second key are obtained by splitting a remote device key of the remote device.
5. The method according to claim 4, wherein the first key is a value of the first half of the hashed remote device key, and the second key is a value of the second half of the hashed remote device key.
6. The method according to claim 1, wherein determining the target calculation result comprises: Obtaining an inverse operation result of the client key; And Determining the target calculation result according to the inverse operation result and the encryption calculation result.
7. The method according to claim 1, further comprising: Determining the specified elliptic curve from a plurality of elliptic curves; And Obtaining a reference point of the specified elliptic curve.
8. The method according to claim 2, further comprising: Sending the first encrypted value and the second encrypted value to the remote device to obtain the encrypted result of the target data.
9. An apparatus for encryption calculation, comprising: An obtaining module configured to obtain an indication of a fixed point on a specified elliptic curve from a remote device; An execution module configured to perform a blinding operation based on the fixed point, a reference point of the specified elliptic curve, target data, and a client key; A sending module configured to send the result of the blinding operation to the remote device to obtain encrypted information, where the encrypted information is generated by the remote device according to the result of the blinding operation; And A generating module configured to generate an encrypted result of the target data according to the client key and the encrypted information.
10. An electronic device, comprising: At least one processing unit; And At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product tangibly stored in a computer storage medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of claims 1 to 8.