The embodiments discussed herein relate to outsourcing processing operations with homomorphic encryption.
A trusted execution environment (TEE), which is a secure area of a processor, may provide security guarantees such as confidentiality of user data, even while performing operations (e.g., computations) on the user data.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one example technology area where some embodiments described herein may be practiced.
According to an aspect of an embodiment, a method may include encrypting data at trusted execution environment (TEE) to generate a first ciphertext. The method may also include conveying the first ciphertext to a graphics processing unit (GPU). Further, the method may include performing, at the GPU, at least one somewhat homomorphic encryption (SHE) evaluation operation on the first ciphertext to generate a second ciphertext. Moreover, the method may include conveying the second ciphertext to the TEE. In addition, the method may include decrypting, at the TEE, the second ciphertext to generate a function.
The object and advantages of the embodiments will be realized and achieved at least by the elements, features, and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Example embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
Various embodiments discussed herein relate to outsourcing one or more processing operations via encryption (e.g., homomorphic encryption). More specifically, for example, one or more processing operations (e.g., TEE computations) may be outsourced from a TEE (e.g., of a central processing unit (CPU)) to another processing unit (e.g., graphics processing unit (GPU)) with encryption (e.g., homomorphic encryption).
Fully homomorphic encryption (FHE) may allow for processing operations (e.g., computations) to be performed on a ciphertext of a message. Further, FHE may allow for decryption and recovery of the message. FHE is inherently inefficient and may be considered impractical. A “weaker” variant of FHE, referred to as “somewhat homomorphic encryption” (SHE), allows for homomorphic encryption, but for limited or smaller operations (e.g., computations). In most instances, SHE is much faster than FHE.
TEEs are secure areas of a processor (e.g., a main processor (e.g., a central processing unit (CPU))) that may not be accessed, modified, or examined by any outside party. TEEs allow for performance of various cryptographic operations. TEEs are relatively efficient (e.g., fractionally slower than computing in the clear). However, TEEs only support relatively small amounts of memory and may not allow use of outside resources (e.g., GPUs).
GPUs may be configured for parallelization and/or single instruction multiple data (SIMD) processing. Further, compared to a CPU, GPUs may have lower clock speeds. Although GPUs may have been originally designed for graphics processing, more recently, GPUs are designed for more general computations.
In various embodiments of the present disclosure, SHE may be used within a TEE to implement more efficient secure computation with the TEE using outside resources, such as a GPU. For example, in at least some embodiments, one or more secure computations may be split into multiple SHE computations wherein a TEE may be used in a secure manner.
Various embodiments disclosed herein may eliminate some of the drawbacks of TEEs for performing expensive computations efficiently and without resorting to slow cryptographic schemes, such as software FHE.
Thus, various embodiments of the present disclosure, as described more fully herein, provide a technical solution to one or more problems that arise from technology that could not reasonably be performed by a person, and various embodiments disclosed herein are rooted in computer technology in order to overcome the problems and/or challenges described above. Further, at least some embodiments disclosed herein may improve computer-related technology by allowing computer performance of a function not previously performable by a computer.
Embodiments of the present disclosure will be explained with reference to the accompanying drawings.
According to at least some embodiments, TEE 104 may be configured to encrypt an input (e.g., a message) and generate a ciphertext. More specifically, for example, TEE 104 may be configured to receive an input x (e.g., an input received at processing unit 102) and generate a ciphertext c via an Encrypt function 108. Further, the ciphertext may be conveyed to processing unit 106, which, as described more fully herein, may be configured to generate another ciphertext. In at least some embodiments, ciphertext c and a function ƒ (also referred to herein as an intermediate function) may be conveyed from TEE 104 to processing unit 106.
Further, for example, processing unit 106 may be configured to receive ciphertext c, perform a SHE operation (e.g., a SHE evaluation) (e.g., via an Eval function 110) of function ƒ on ciphertext c to generate ciphertext c′. Moreover, processing unit 106 may be configured convey the other ciphertext (e.g., ciphertext c′) to TEE 104 for decryption. For example, upon receipt thereof, TEE 104 may decrypt ciphertext c′ (e.g., via a Decrypt function 112) to generate a function ƒ(x). TEE 104 may further include a Keygen function 114 for generating a secret key sk, which may be used for decryption (e.g., decryption of ciphertext c′).
Some embodiments of the present disclosure may relate to determining whether a TEE (e.g., TEE 104) should outsource one or more operations (e.g., computations) to another processing unit (e.g., processing unit 106). In at least some embodiments, various factors may be considered in determining whether to outsource one or more operations. For example, a computation time of a function at a TEE (e.g., TEE 104), an encryption time of an input (e.g., a message) at the TEE, an operation time (e.g., an evaluation time) of the function at the other processing unit (e.g., processing unit 106), and/or a decryption time of ciphertext at the TEE may be considered in determining whether to outsource an operation (e.g., a computation).
At block 202, one or more processing times for one or more operations associated with a system (e.g., system 100 of
At block 204, a determination may be made as to whether to outsource one or more operations. In some embodiments, the determination may be made based on at least one of the processing times determined at block 202. If it is determined to outsource the one or more operations, method 200 may proceed to block 206. If it is determined to not outsource the one or more operations, method 200 may proceed to block 208.
For example, in at least some embodiments, if a computation time of a function at a TEE (e.g., TEE 104) is greater than the sum of 1) an encryption time of an input at the TEE; 2) an evaluation time of the function at the other processing unit (e.g., processing unit 106); and 3) a decryption time of ciphertext at the TEE, it may be determined to outsource the computation to the other processing unit (e.g., processing unit 106 of
If the computation time of a function at the TEE (e.g., TEE 104) is less than or equal to the sum of 1) the encryption time of an input at the TEE; 2) the evaluation time of the function at the other processing unit (e.g., processing unit 106); and 3) the decryption time of ciphertext at the TEE, it may be determined to not outsource the computation to the other processing unit (e.g., if computation time of function ƒ in TEE 104 !>(encryption time of input x in TEE 104+homomorphic evaluation time of function ƒ in processing unit 106+decryption time of ciphertext c′ in TEE 104), then the computation of function ƒ may not be outsourced).
At block 206, the one or more operations may be performed at the other processing unit (e.g., processing unit 106 of
Modifications, additions, or omissions may be made to method 200 without departing from the scope of the present disclosure. For example, in some embodiments, at block 202, computation times of n functions ƒ1 (e.g., for evaluation of (e.g., ƒ1(x1), . . . , ƒn(xn))) at the TEE, an encryption time of an input (e.g., input x; see
Further, in this example, at block 204, if computation times of the n functions at a TEE (e.g., TEE 104) is greater than the sum of 1) an encryption time of an input at the TEE; 2) the evaluation times of the n functions at the other processing unit (e.g., processing unit 106); and 3) a decryption time of ciphertext at the TEE, it may be determined to outsource the operations to the other processing unit (e.g., processing unit 106 of
Further, for example, the operations of method 200 may be implemented in differing order. Furthermore, the outlined operations and actions are only provided as examples, and some of the operations and actions may be optional, combined into fewer operations and actions, or expanded into additional operations and actions without detracting from the essence of the disclosed embodiment.
At block 302, an input may be encrypted at a first processing unit to generate a first ciphertext, and method 300 may proceed to block 304. For example, with reference to
At block 304, the first ciphertext may be conveyed to a second processing unit, and method 300 may proceed to block 306. For example, with reference to
At block 306, an operation may be performed on the first ciphertext to generate a second ciphertext, and method 300 may proceed to block 308. For example, with reference again to
At block 308, the second ciphertext may be conveyed to the first processing unit, and method 300 may proceed to block 310. For example, ciphertext c′ may be conveyed from processing unit 106 to processing unit 102 (see
At block 310, the second ciphertext may be decrypted to determine (e.g., compute) a function. For example, with reference to
Modifications, additions, or omissions may be made to method 300 without departing from the scope of the present disclosure. For example, the operations of method 300 may be implemented in differing order. Furthermore, the outlined operations and actions are only provided as examples, and some of the operations and actions may be optional, combined into fewer operations and actions, or expanded into additional operations and actions without detracting from the essence of the disclosed embodiment.
In at least some embodiments, computations at a TEE (e.g., TEE 104 of
In one example use case including matrix multiplication, for matrices of dimensionO(n), in terms of addition and multiplication cost may be O(n3) or in terms of inner product evaluation cost may be O(n2).
For large matrices, a GPU implementation may be much faster (e.g., because an algorithm is highly parallelizable). For homomorphic encryption (e.g., using a TEE and a GPU), the cost for encryption/decryption, which occurs at the TEE, may have a cost of O(n2). The cost for evaluation may remain O(n3). For a fast SHE scheme, evaluation cost at a GPU may be considerably smaller than plain multiplication inside the TEE. Further, SHE schemes, which are very fast and parallelizable for inner product computations, are available.
Fully homomorphic encryption schemes may support an arbitrary function by bootstrapping SHE schemes, in accordance with various embodiments of the present disclosure. For example, bootstrapping may be achieved by refreshing a ciphertext periodically. Bootstrapping, which may be the bottleneck of FHE schemes, may be performed, in accordance with various embodiments.
For example,
For example, in a secure deep learning application, neural networks may be securely evaluated via one or more embodiments of the present disclosure. Neural networks may include layered execution of two basic operations, inner product and thresholding. The inner product evaluation may be a simple form of multiplication that can be outsourced to a processor (e.g., processor 106 of
In this embodiment, the processor (e.g., the GPU) may also facilitate the inner product computations over all inputs (e.g., via SIMD linear algebra operations.) Thus, according to various embodiments, a GPU may be leveraged for parallel computation of each layer of the neural network.
As another example, eigenvalues and eigenvectors may be securely computed. In this example, general algorithms may apply to many higher level algorithms, such as, principal component analysis and quadratic optimization problems. In turn, these algorithms may be used in many machine learning algorithms, such as, support vector machine (SVMs) and domain specific problems (e.g., PageRank and recommendation systems). This example may include iterations of vector and matrix product computations.
According to various embodiments, iterations maybe outsourced to a processor (e.g., processing unit 106 (e.g., a GPU)), which may support linear algebra operations, and encrypted iteration results may be refreshed using a TEE (e.g., TEE 104 of
Generally, processor 610 may include any suitable special-purpose or general-purpose computer, computing entity, or processing device including various computer hardware or software modules and may be configured to execute instructions stored on any applicable computer-readable storage media. For example, processor 610 may include a microprocessor, a microcontroller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a Field-Programmable Gate Array (FPGA), or any other digital or analog circuitry configured to interpret and/or to execute program instructions and/or to process data.
Although illustrated as a single processor in
After the program instructions are loaded into memory 620, processor 610 may execute the program instructions, such as instructions to perform one or more blocks of method 200 and/or method 300 as described herein. According to various embodiments, processor 610 may run SHE and/or FHE operations. For example, processor 610 may determine operation times (e.g., computation times, encryption times, evaluation times, and/or decryption times). Further, for example, processor 610 may perform SHE operations (e.g., Eval function), encrypt and/or decrypt data (e.g., input and/or messages).
Memory 620 and data storage 630 may include computer-readable storage media or one or more computer-readable storage mediums for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable storage media may be any available media that may be accessed by a general-purpose or special-purpose computer, such as processor 610.
By way of example, and not limitation, such computer-readable storage media may include non-transitory computer-readable storage media including Random Access Memory (RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory devices (e.g., solid state memory devices), or any other storage medium which may be used to carry or store desired program code in the form of computer-executable instructions or data structures and which may be accessed by a general-purpose or special-purpose computer. Combinations of the above may also be included within the scope of computer-readable storage media. Computer-executable instructions may include, for example, instructions and data configured to cause processor 610 to perform a certain operation or group of operations.
Communication unit 640 may include any component, device, system, or combination thereof that is configured to transmit or receive information over a network. In some embodiments, communication unit 640 may communicate with other devices at other locations, the same location, or even other components within the same system. For example, communication unit 640 may include a modem, a network card (wireless or wired), an infrared communication device, a wireless communication device (such as an antenna), and/or chipset (such as a Bluetooth device, an 802.6 device (e.g., Metropolitan Area Network (MAN)), a WiFi device, a WiMax device, cellular communication facilities, etc.), and/or the like. Communication unit 640 may permit data to be exchanged with a network and/or any other devices or systems described in the present disclosure. For example, communication unit 640 may allow system 600 to communicate with other systems and/or devices.
Modifications, additions, or omissions may be made to system 600 without departing from the scope of the present disclosure. For example, data storage 630 may be multiple different storage mediums located in multiple locations and accessed by processor 610 through a network.
As indicated above, the embodiments described herein may include the use of a special purpose or general purpose computer (e.g., processor 610 of
As used herein, the terms “module” or “component” may refer to specific hardware implementations configured to perform the operations of the module or component and/or software objects or software routines that may be stored on and/or executed by, for example, processing unit 102, processing unit 104 (see
Terms used in the present disclosure and especially in the appended claims (e.g., bodies of the appended claims) are generally intended as “open” terms (e.g., the term “including” should be interpreted as “including, but not limited to,” the term “having” should be interpreted as “having at least,” the term “includes” should be interpreted as “includes, but is not limited to,” etc.).
Additionally, if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases “at least one” and “one or more” to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim recitation to embodiments containing only one such recitation, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an” (e.g., “a” and/or “an” should be interpreted to mean “at least one” or “one or more”); the same holds true for the use of definite articles used to introduce claim recitations.
In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number (e.g., the bare recitation of “two recitations,” without other modifiers, means at least two recitations, or two or more recitations). Furthermore, in those instances where a convention analogous to “at least one of A, B, and C, etc.” or “one or more of A, B, and C, etc.” is used, in general such a construction is intended to include A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together, etc.
Further, any disjunctive word or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” should be understood to include the possibilities of “A” or “B” or “A and B.”
All examples and conditional language recited in the present disclosure are intended for pedagogical objects to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions. Although embodiments of the present disclosure have been described in detail, various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the present disclosure.