US12547412B2 - Fully homomorphic encrypted processing acceleration - Google Patents
Fully homomorphic encrypted processing accelerationInfo
- Publication number
- US12547412B2 US12547412B2 US18/674,855 US202418674855A US12547412B2 US 12547412 B2 US12547412 B2 US 12547412B2 US 202418674855 A US202418674855 A US 202418674855A US 12547412 B2 US12547412 B2 US 12547412B2
- Authority
- US
- United States
- Prior art keywords
- coupled
- memory
- input
- multiplexer
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active, expires
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3867—Concurrent instruction execution, e.g. pipeline or look ahead using instruction pipelines
Definitions
- Various aspects of the present invention relate generally to homomorphic encryption and more specifically to hardware accelerators for processing fully homomorphically encrypted data.
- Fully Homomorphic Encryption provides a simple use model to securely outsource computation on sensitive data to a third party. Basically, an FHE system can process encrypted data without a requirement to unencrypt the data. Therefore, third parties may be able to process sensitive data.
- a device for processing fully homogeneous encrypted data comprises a command input with pipeline stages and a register file coupled to the command input via a non-pipelined stage and an ultimate pipelined stage. Further, the device includes a first multiplexer with a first input coupled to the register file, a second input coupled to a data input, and a select coupled to the first pipeline stage of the command input, and a second multiplexer with a first input coupled to the register file, a second input coupled to a first pipeline stage of the command input, and a select coupled to the first pipeline stage of the command input.
- a multiplier couples to outputs of the first multiplexer and the second multiplexer, wherein the multiplier has a predetermined number of pipeline stages.
- a third multiplexer includes a first input coupled to an output of the multiplier, a second input coupled to the output of the first multiplexer, and a select coupled to a penultimate pipeline stage of the command input
- a fourth multiplexer includes a first input coupled to ground, a second input coupled to the output of the second multiplexer, and a select coupled to the penultimate pipeline stage of the command input.
- the device includes an adder element with a first input coupled to an output of the third multiplexer, a second input coupled to an output of the fourth multiplexer, a select line coupled to the penultimate pipeline stage of the command input, and an output coupled to the register file.
- FIG. 1 is block diagram illustrating a device (a board) for processing fully homomorphic encrypted (FHE) data using a dedicated FHE accelerator, according to various aspects of the present disclosure
- FIG. 2 is a diagram illustrating a radix-4 NTT element for use in the dedicated FHE accelerator of FIG. 1 , according to various aspects of the present disclosure
- FIG. 3 is a diagram showing a radix-16 NTT built using several radix-4 NTTs of FIG. 2 , according to various aspects of the present disclosure
- FIG. 4 is a block diagram illustrating a conflict-free memory access, according to various aspects of the present disclosure
- FIG. 5 is a block diagram illustrating a size-four permutation processing elements (PE), according to various aspects of the present disclosure
- FIG. 6 is a block diagram illustrating a size-four permutation processing elements (PE), according to various aspects of the present disclosure
- FIG. 7 is a block diagram of a random number generator, according to various aspects of the present disclosure.
- FIG. 8 is a block diagram illustrating a MAC PE unit including a pipeline, according to various aspects of the present disclosure.
- Fully Homomorphic Encryption provides a simple use model to securely outsource computation on sensitive data to a third party.
- f was computed homomorphically.
- the third party receives only ciphertexts and a public key but never a secret key that allows decryption. As a result, sensitive inputs are protected under the security of the encryption scheme. Because the result of the computation remains encrypted, the output also remains unknown to the third party: only the holder of the secret key can decrypt and access it.
- the ciphertexts of all FHE schemes are noisy: during encryption, a small noise term is added to the input data. Decryption can still recover the correct result, provided that the noise is small enough.
- the function is represented in terms of operations provided by the scheme (typically addition and multiplication) and compute these operations on the encrypted inputs (i.e., there is no decryption when performing the operations). Each operation increases the noise in the resulting ciphertext, so only a limited number of homomorphic operations may be computed before a limit of decryption failure is reached.
- FHE uses bootstrapping, which reduces noise by decrypting a ciphertext homomorphically.
- bootstrapping is very expensive, so its use is often minimized.
- bootstrapping and key switching tend to heavily dominate computation and data movement costs of an application: in a simple 1,024-point, 10-feature logistic regression, these tasks account for over 95% of the computational effort and the vast majority of data movement.
- embodiments systems and devices incorporate the homomorphic encryption scheme known as BGV encryption (named after the people who proposed the encryption scheme: Brakerski, Gentry, and Vaikuntanathan).
- BGV homomorphic encryption scheme
- CKKS Cyheon-Kim-Kim-Son FHE and others
- BGV guarantees finite data structures by also reducing the coefficients: the plaintext space is computed modulo t (denoted ), and the ciphertext space is a pair of elements modulo q (denoted ).
- BGV has encryption and decryption procedures to move between the plaintext space and the ciphertext space. While these operations are never executed by the device performing outsourced computation, it is necessary to explain the ciphertext format in order to understand homomorphic operations.
- BGV To prevent ciphertext expansion, switch between keys and slow down noise growth, BGV defines two auxiliary procedures:
- modulus switching is run before each multiplication to reduce the noise to its minimum level.
- Key switching is run after each permutation or multiplication to keep the ciphertext format consistent.
- N/A 128 bits Ring dimension N 512-65536 65536 Plaintext modulus pr >2 127 3 Ciphertext packing 2-65536 64 slots Max log 2 (QP) for key switching 20-1782 1782 bits Max log 2 (Q) for ciphertext 20-1782 1263 bits Max multiplicative depth L N/A 31
- the device 100 is a daughter card or other type of printed circuit board that includes an interface 102 to a host system.
- the interface 102 can be any high-speed bus structure including, but not limited to, Peripheral Component Interconnect extended (PCI-X), Peripheral Component Interconnect Express (PCIe). Rapid I/O, HyperTransport, etc.
- the interface 102 of the device 100 includes pins 104 that may be unidirectional data pins, bidirectional data pins, power pins, ground pins, etc., depending on the bus structure associated with the interface 102 . Further, in several embodiments, a custom bus structure is used as the interface 102 .
- the device further includes a mass memory 108 for storing data.
- the mass memory 108 may be any reasonable type of memory.
- the mass memory 108 can be one or more double data-rate (DDR) random access memory (RAM) chips, other RAM chips (dynamic RAM, static RAM, etc.), flash, high-bandwidth memory (HBM), etc.).
- DDR double data-rate
- RAM random access memory
- HBM high-bandwidth memory
- the mass storage 108 serves as the staging area for data that is scheduled for processing and for results that are ready for retrieval by the host system.
- a high-speed interconnect 110 is coupled between the interface 102 and the mass memory 108 .
- the interface 102 receives input data (e.g., homomorphically encrypted data), and memory controllers (e.g., memory access interface 106 a , 106 b ) interface with the memory to store the received data.
- input data e.g., homomorphically encrypted data
- memory controllers e.g., memory access interface 106 a , 106 b
- RAM chips 108 a , 108 b used for the mass memory 108 .
- Twin double-data-rate interfaces allow for a maximized practical throughput by avoiding collisions between the interface-to-mass-storage access stream and the dedicated-fully-homomorphic-encryption-accelerator-to-mass-storage access stream.
- Each memory chip 108 a , 108 b will have the corresponding memory access interface 106 a , 106 b to communicate with the high-speed interconnect 110 .
- the device 100 also include a joint test action group (JTAG) interface 120 for debugging the dedicated fully homomorphic encryption accelerator 114 and a configuration system 122 including a configuration JTAG interface 124 , a RISC processor 126 , and low-speed input/outputs 128 .
- JTAG joint test action group
- the device 100 further includes a secondary bus 130 for direct communication with a remote dedicated fully homomorphic encryption accelerator on a similar remote apparatus.
- the dedicated fully homomorphic encryption accelerator 114 , the JTAG interface 120 for debugging the dedicated fully homomorphic encryption accelerator 114 , the configuration system 122 and the secondary bus 130 may all be part of the same application specific integrated circuit (as shown in FIG. 1 ), may all be discrete chips, or may be spread among two or more chips.
- the dedicated fully homomorphic encryption accelerator 114 includes a memory buffer (herein called a ciphertext buffer (CTB)) 140 and several processing elements 150 (discussed below). As will be discussed below, the processing elements 150 may also include memory structures.
- the CTB 140 should be about three orders of magnitude less than the mass storage 108 . For example, if the mass storage includes 256 gigabytes (GB) of memory, then the CTB 140 can be about 64-256 megabytes (MB). However, the CTB 140 should be considerably faster; for example a round-trip latency for the mass storage can be over 100 nanoseconds (ns) while the round-trip latency for the CTB 140 should be about 3 ns.
- the CTB 140 includes 64 MB.
- a single CTB page will include multiple residue polynomials.
- the CTB 140 is too small (e.g., 64 MB) to hold sizeable working sets of ciphertexts and key switching matrices.
- the mass memory 108 ensures that CTB 140 capacity misses do not have to spill to memory of the host system.
- the dedicated fully homomorphic encryption (FHE) accelerator 114 also includes processing elements (PEs) 150 .
- PEs processing elements
- Multiple PEs 150 work in parallel to quickly perform operations on the encrypted data using at least four types of parallelism: (i) over multiple ciphertexts, (ii) over polynomials within a ciphertext, (iii) over residue levels of a polynomial, and (iv) over coefficients of a residue polynomial.
- the dedicated FHE accelerator 114 of the present disclosure focuses on (iv) exploiting coefficients of the residue polynomial for at least two reasons: (1) the number of residues decreases with the modulus level in the BGV scheme, leading to would-be idle RPAUs (residue polynomial arithmetic units) as the computation gets closer to bootstrapping; and (2) as the lowest level of parallelism, coefficient-level parallelism offers the best opportunity to exploit locality of reference.
- the NTT PEs can compute 2562-point with only two round trips to memory for each coefficient. Smaller NTTs may also be computed with the NTT PEs through shortcuts in the butterfly network.
- FIG. 2 illustrates a radix-4 negacyclic NTT unit with a pre-multiplier array 158 and a post-multiplier array 160 . Note that only three of the inputs have multipliers 158 a - c and three of the outputs have multipliers 160 a - c . The result is a three-stage NTT architecture.
- FIG. 3 illustrates how to use the radix-4 NTT unit of FIG. 2 compute the full NTT flow graph in two passes that each take 4 chunks. In between passes through the NNT architecture is an implicit memory transposition that is enabled with a conflict-free CTB design-discussed herein.
- the NTT PE 156 uses four parallel three-stage NTT units.
- NTT neuropeptide tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-tyrene-to-t-radix-256) architectures.
- the inner N1-point NTT coefficients are in column-major order, whereas the outer N2-point NTT data is in row-major order.
- the crux of building conflict-free NTT schedules is to structure the data so that it can be read out in either order without bank conflicts. This requires a minimum of 256 independently addressable banks, each containing 216 bank addresses (for a total CTB size of 224 values).
- encrypted data are packed in ciphertexts that consist of very large arrays of polynomial coefficients.
- each ciphertext polynomial in the current implementation is stored as two arrays, each including 32 residue polynomials of 65536 coefficients each.
- the data gets stored in a two-dimensional layout (e.g., 256 rows ⁇ 256 columns, 128 by 128, etc.). Some operations require the data in row-major order and sometimes in column-major order.
- This approach may be extended further to an even higher degree of parallelism by reducing the bits of the chunk index and XORing the upper bits of the row and column index with the chunk index while leaving the rest of the index unmodified.
- memInstr_bits_memAddr For these address calculations, it is useful to break the thirteen-bit memInstr_bits_memAddr into a seven-bit page [12:6] and a six-bit chunk [5-0]. A further bit determines whether the access is row-wise or column-wise.
- a custom “on-the-fly” Permutation (PE 154 , FIG. 1 ) computes these XOR-based permutations as data moves to or from the other PEs in the accelerator.
- the Permutation PE may be used to implement conflict-free XOR permutations, but also any BGV ring automorphism without additional hardware.
- the CTB includes coefficients within a residue polynomial that are arranged in a scrambled ordering to achieve conflict-free addressing.
- the permutation PE reorders data coming out of the CTB, as discussed below.
- twiddle factors of many embodiments of the dedicated FHE accelerator described herein are 32-bit integers. However, several embodiments use different sizes for twiddle factors (e.g., 64 bits, 80 bits, 128 bits, etc.) to the point where the size of the twiddle factors may be variable and set with a parameter. Regardless, for a ring of dimension N, there are N ⁇ 1 twiddle factors for each residue for both forward and inverse NTT, and a maximum of 56 residues at max-capacity key switching, together requiring ⁇ 29.4 MB of twiddle factor material in a na ⁇ ve implementation.
- the four NTT units have 5116 multipliers total that must be fed each cycle with twiddles, requiring massively parallel access into this storage memory.
- the FHE accelerator prevents this storage requirement in two ways. First, a new twiddle decomposition method reduces a required parallel number of distinct twiddle accesses. Second, a custom twiddle factor factory drastically reduces a number of twiddles stored.
- twiddle factors are different between forward NTT operations and inverse NTT operations.
- the amount of memory needed to store the twiddle factors ranges in tens of megabytes, it would time consuming to load onto the chip through external memory or the host interface every time an NTT operation needs to be performed. Therefore, the twiddle factors are determined on chip via mathematical PEs (e.g., MACs, etc.) on the fly. and consumed at full speed to keep the NTT unit processing at the desired throughput without stalling.
- PEs e.g., MACs, etc.
- the twiddle factors are split into three categories, specifically corresponding to the time needed for processing relative to the NTT operation: (1) Pre-twiddles, which are the constants that are multiplied by the data before the NTT operation; (2) Butterfly twiddles, which are the constants that are used by the NTT butterfly network itself during the NTT operation execution; and (3) Post-twiddles, which are the constants that are multiplied by the data after the NTT butterfly operation.
- the remaining twiddle factor complexity sits in the post-multiply twiddles.
- For each chunk k there are 255 twiddles ⁇ ik 256 2 .
- a memory storing vectors of 255 twiddles with depth 255 for each residue is still much too large.
- the permutation PE is a processing element that (for a Permutation PE with a size of SIZE) receives SIZE values as an input and produces SIZE values at the output, where SIZE is a power of two and the output is a re-ordered version of the input.
- a slightly more general permutation PE supports permutations of the form i ⁇ (i ⁇ a+b) ⁇ c, such that the Permutation PE may be used to implement conflict-free XOR permutations, but also any BGV ring automorphism without additional hardware.
- Each permutation unit reorders an array of input coefficients to produce a permuted output array of the same length.
- Concatenating two permutation PEs provides for implementation of all required permutations of input to output rotations, which allows the device to perform the automorphism and NTT operations without using additional memory. For example, this means that the data gets read out of memory one row at a time, gets reordered on the fly, and gets written back in the same location in memory they came from, without needing to use temporary scratch memory for any intermediate results.
- a first permutation PE is a read permutation PE
- a second permutation PE is a write permutation PE.
- the generic structure of both permutation PEs are the same: logic to perform i ⁇ (i ⁇ a+b) ⁇ c (as is known, the ⁇ symbol is an exclusive OR (XOR)).
- the Read Permutation PE unscrambles data in conflict-free CTB bank ordering in order to pass it to the other PEs expecting natural ordering (e.g., an NTT PE, an arithmetic PE, etc.).
- the Write Permutation PE passes data in the opposite direction (i.e., from the NTT to the CTB). It implements the general permutation i ⁇ (i ⁇ a+b) ⁇ c (where a is an odd number) in order to re-scramble the data into its conflict-free layout, or to compute ring automorphisms. This class of permutations is sufficient to perform any ring automorphism in combination with the shuffling required by the conflict-free memory layout. For testing, the formula can be written as permutation i ⁇ (i ⁇ a+b) % SIZE ⁇ c, where % is a modulo operator.
- the output of the Read Permutation PE is fed directly into the input of the Write Permutation PE to achieve the complete operation of the automorphism.
- FIGS. 5 - 6 illustrate size-four and size-eight permutation PEs.
- Each permutation PE includes inputs X 0-(SIZE-1) , inputs for a, b, and c Xa-c, outputs Y 0-(SIZE-1) , and a network of several conditional step nodes (CSs) 562 k,r .
- the CSs are arranged in columns and rows, where k is a numbered column and r is a numbered row. For example, 562 2,1 is a CS in column 2, row 1.
- a routing tag (i ⁇ (i ⁇ a+b) % SIZE ⁇ c) can be added to the input data at each CS 562 node to facilitate a routing process without having to control each individual CS node 562 in the network externally.
- the tag will have size log 2 (SIZE).
- SIZE size log 2
- the tag is inspected and if a control value is one, then the inputs values to the CS node are swapped. Otherwise, the values on the inputs of the CS node pass through in the same order they arrived.
- the control bit for a node at column j of the network corresponds to the j th bit of the tag value.
- additional optimization of the permutation PE architecture may include reducing the number of bits of the value sent to the CS nodes by one for every column, because once a bit is used at a column (for that column), the bit may be removed from the values being sent between CS nodes.
- control bits may be stored in tables or calculated and transmitted differently to the CS nodes.
- the permutation PEs are arranged in a network topology such that each node receives a pair of inputs and either outputs them in the same or reversed order.
- a small network 460 is shown in FIG. 4 to create a 4 ⁇ 4 network from four 2 ⁇ 2 permutation PEs.
- other topologies may be used (e.g., a 256 by 256 as discussed above).
- any permutation of the form i ⁇ (i*a+b) XOR c, for any a (being an odd number), b, and c may be performed.
- This class of permutations is sufficient to perform any ring automorphism in combination with the shuffling required by the conflict-free memory layout.
- any permutation of the form i ⁇ (i*a+b) XOR c, for any a (being an odd number), b, and c can be performed.
- This class of permutations is sufficient to perform any ring automorphism in combination with the shuffling required by the conflict-free memory layout discussed herein.
- the dedicated FHE accelerator uses key-switching to homomorphically encrypt and decrypt the data.
- These key-switching operations require keys that are large and pre-calculating them in advance and storing them in memory takes a substantial amount of memory storage as well as a large amount of memory bandwidth when fetching them from external memory.
- a first half of each of the keys is just required to be randomized (with a uniform distribution over a finite field).
- a finite field random number generator i.e., a uniform random number generator
- a programmable seed and modulus parameter is used to generate the first half of each key-switching key as it is needed (i.e., “on the fly”) instead of pre-calculating and storing both halves of the key-switching keys in memory.
- the programmable seed provides repeatability in generating the same key multiple times if needed. This on-the-fly calculation cuts down on required memory space and reduces memory bandwidth to about half during key-switching.
- the second half of a key-switching key is generated based on the first half of a key-switching key and may be further based on user data, program data, or both.
- the second half of the key-switching key may be pre-calculated and stored in memory or may be derived on-the-fly from the first half of the key-switching key.
- the random number generator should have a large degree of parallelism to ensure timely generation of a random polynomial, (OUTPUT_SIZE).
- the random number generator generates OUTPUT_SIZE random numbers per cycle.
- a residue polynomial has N number of residues, so the random number generator requires N/OUTPUT_SIZE number of cycles to generate the full polynomial.
- the random number generator operates in two modes: configuration mode and generation mode.
- configuration mode configuration commands are used to configure the random number generator, which occurs before generation mode.
- generation parameters (e.g., sent as part for the configuration commands, determined using the configuration commands, etc.) are set up and stored in registers for the random number generator to use in generation mode.
- generation parameters may include s_val (seed value), g_val (generator value), p_val (prime modulus value), rng_val, etc.
- the random number generator In generation mode, the random number generator generates OUTPUT_SIZE values per cycle. For proper seeding, each period p_val corresponds to OUTPUT_SIZE s_val values. There are two p_val and s_val setting strategies to avoid the parallel generators from producing overlapping/correlated values.
- the s_val are equally spaced in the period p_val, so that:
- each of the parallel generators should be running over a non-overlapping segment of the random number generator's period, which is commonly equal to the prime modulus of the polynomial that is being generated.
- the random number generator also receives p_val[i] which is used for the modulo operation. Further, the RNG loads an appropriate g_val[i] from the configuration in order to set up the generate command.
- the random number generator After receiving a generate command, the random number generator generates data for as many cycles as needed to generate data needed to produce one residue of the key-switching key (or half-key), starting from the last value generated and updating forward. For each cycle, the random number generator does not reload the seed, prime, generator values, or combinations thereof, but instead continues from where it left off. If the parameters for the generator need to change then a configuration command is necessary. The process repeats for each residue of the key-switching key until the full key-switching key is assembled. Each residue polynomial has its own seed and prime modulus, so the configuration and generation process has to repeat as many times as there are residues. For each prime modulus i and output value j the generator updates as follows:
- rng_val [ i , j ] ( rng_val [ i , j ] + g_val [ i ] ) ⁇ mod ⁇ p_val [ i ]
- FIG. 7 A block diagram of an implementation of a random number generator is shown in FIG. 7 . Again the number of seed values (s_val) denoted the OUTPUT_SIZE.
- the Key-Switching operation in dedicated FHE accelerator is one of the most computationally expensive and frequent operations used.
- a program sequence schedules these operations in such a way that they could take advantage of a custom-design Multiply-Accumulate unit enhanced with a local register file 174 so that sum-of-products (SOP) intermediate results can be stored locally and thus eliminated the need for writing them back in memory after each computation, which eliminates a need to fetch them again for the next sum.
- SOP sum-of-products
- the MAC PE 152 includes an input receiver 170 that goes to a multiplexer 172 that chooses between the input 170 or a register file 174 .
- a second multiplexer 176 chooses between another input (CMD) 178 and the register file 174 .
- the outputs of the two multiplexers 172 , 276 feed a multiplier 180 (which can also be bypassed).
- the output of the multiplier 180 (which is shown as a three-stage pipelined multiplier in FIG. 5 ) feeds a third multiplexer 182 that chooses between the first multiplexer 172 and the multiplier 180 .
- a fourth multiplexer 184 chooses between 0 and the second multiplexer 176 .
- the outputs of the third and fourth multiplexers 182 , 184 feed an accumulator 186 that either accumulates (similar to conventional MAC functions) or is used as an adder (which may also be used for subtraction), depending on an operation selected.
- An output of the accumulator feeds a register 188 , which in turn feeds the register file 174 .
- the command i.e., operation
- the register 188 of the accumulator 186 also feeds an output 190 of the MAC PE.
- Each pipeline stage is represented by P0-P6.
- the vertical lines P1-P6 indicate where in the MAC PE the pipeline stage is located.
- a base extension commonly used in key-switching involves the register file 174 inside the MAC PE to enable local data reuse in tight arithmetic loop operations.
- the size of the register file is tailored to the loop size that is common in fast-base extension operations found in FHE key-switching algorithms.
- an inner loop of the key switching algorithm involves pre-computing a table of about twelve or so residue polynomials and then computing many (up to around forty) different weighted sums of those twelve values, with constant weights.
- Naive designs i.e., current methods
- would require twelve multiplications to compute the table, plus four-hundred-eighty multiplications and four-hundred-forty additions to compute the weighted sums, for a total of 1372 memory reads+932 memory writes 2304 memory accesses.
- the MAC PE is designed to be able to execute this algorithm with minimal memory traffic.
- Precomputing the table requires 12 memory reads, but the table itself can be stored entirely within the local register file.
- Computing each weighted sum requires twelve multiply-accumulate operations and no memory reads—all operands are either local registers or immediates. Further, only one memory write is required to save the result of each weighted sum.
- the routine takes twelve memory reads and forty writes which equals fifty-two memory accesses in total. This is a forty-four times reduction compared to the naive design or a ten times reduction compared to the accumulator-only design.
- the structure of the MAC PE described above supports modulo arithmetic operations (ring-based arithmetic operations), because both the multiplier 180 and adder 186 include modular reduction functionality.
- the output of the MAC PE is already reduced to be an element of the ring.
- the multiplier used in the MAC PE calculates:
- Such a summing requires one addition, one comparison and one subtraction.
- one MAC operation in the MAC PE could perform nine operations that would be necessary in a traditional compute platform that operates on integer operations or typical processor. This nine-to-one operation reduces a number of memory accesses required.
- the MAC unit design achieves not just a reduction in absolute memory traffic, it also reduces a total execution time of operations, as well as a percentage of cycles that require memory accesses.
- the base extension routine in the naive design would do 2304 memory accesses over 2304 elapsed cycles, using 100% of the memory bandwidth over that time.
- the accumulator-only design would do 544 memory accesses in 544 cycles, again using 100% of available memory bandwidth.
- the routine does 52 memory accesses over 492 cycles, which is only 10.6% of the available memory bandwidth.
- the other 89.4% remains available for performing other operations in parallel, such as computing NTTs and transferring data to and from off-chip memory.
- the memory traffic reduction that the MAC unit provides has a direct impact on the overall performance of the system.
- the different PEs of the system herein allow the system to be scalable. For example, the PEs may be repeated thousands of times to scale the device. As another example, many devices ( 100 , FIG. 1 ) may be added to the system to upscale the system.
- aspects of the present disclosure may be embodied as a system, method or computer program product. Accordingly, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer readable storage medium(s) having computer readable program code embodied thereon.
- the computer readable medium may be a computer readable signal medium or a computer readable storage medium.
- a computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
- a computer readable storage medium may be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
- a computer storage medium does not include propagating signals.
- a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof.
- a computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
- Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
- Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Network using an Network Service Provider).
- LAN local area network
- WAN wide area network
- Network Service Provider for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
- These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
- the computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
- each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Complex Calculations (AREA)
Abstract
Description
-
- Addition: compute ([c0+c′0]q, [c1+c′1]q). The encrypted plaintext is (m1+m′1, . . . , +).
- Multiplication: compute ([c0·c′0]q, [c0·c′1+c1·c′0]q, [c1·c′1]q). The resulting ciphertext is a vector of three elements, but this can be reduced back to two with a post-processing step called key switching. The encrypted plaintext is (m1·m′1, . . . , ·m′).
- Permutation: compute (ϕk(c0), ϕk(c1)), where the map ϕk is called an automorphism. It is parameterized by an odd integer k, and defined as ϕk: c(X)→c(Xk). These automorphisms induce a permutation on the elements of the encoded tuple, so the output encrypts some permutation of (m1, . . . , m). Although the resulting ciphertext has only two elements, there is still a need for post-processing by means of key switching.
-
- Modulus switching: given a ciphertext (c0, c1)∈ and a new modulus q′, compute a ciphertext (c′0, c′1)∈ that decrypts with respect to q′. Modulus switching also scales the noise by a factor of q′/q.
- Key switching: given a key switching matrix (vector(k0), vector(k1)) and either a product ciphertext (c0, c1, c2)∈3q or a permuted ciphertext (c0, c1) ∈2q, compute a ciphertext (c′0, c′1)∈2q that decrypts under c0+c1·S=m+te (mod q). Thus key switching brings the ciphertext back to its original format.
| Parameter | Range | Example |
| Security parameter | N/A | 128 bits |
| Ring dimension N | 512-65536 | 65536 |
| Plaintext modulus pr | >2 | 1273 |
| Ciphertext packing | 2-65536 | 64 slots |
| Max log2(QP) for key switching | 20-1782 | 1782 bits |
| Max log2(Q) for ciphertext | 20-1782 | 1263 bits |
| Max multiplicative depth L | N/A | 31 |
for j=1 . . . . OUTPUT_SIZE−1, As shown in
Claims (4)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/674,855 US12547412B2 (en) | 2023-05-26 | 2024-05-25 | Fully homomorphic encrypted processing acceleration |
| US19/396,144 US20260081750A1 (en) | 2023-05-26 | 2025-11-20 | Fully homomorphic encrypted processing acceleration |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US202363504620P | 2023-05-26 | 2023-05-26 | |
| US18/674,855 US12547412B2 (en) | 2023-05-26 | 2024-05-25 | Fully homomorphic encrypted processing acceleration |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/396,144 Continuation-In-Part US20260081750A1 (en) | 2023-05-26 | 2025-11-20 | Fully homomorphic encrypted processing acceleration |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| US20240394067A1 US20240394067A1 (en) | 2024-11-28 |
| US12547412B2 true US12547412B2 (en) | 2026-02-10 |
Family
ID=93564718
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/674,855 Active 2044-08-07 US12547412B2 (en) | 2023-05-26 | 2024-05-25 | Fully homomorphic encrypted processing acceleration |
Country Status (1)
| Country | Link |
|---|---|
| US (1) | US12547412B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12587360B1 (en) | 2025-08-08 | 2026-03-24 | Chain Reaction, Ltd. | Multi-chip accelerator architecture for fully homomorphic encryption inference |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018147497A1 (en) * | 2017-02-08 | 2018-08-16 | 서울대학교산학협력단 | Method for processing dynamic data by fully homomorphic encryption method |
| US20180294950A1 (en) * | 2017-04-11 | 2018-10-11 | The Governing Council Of The University Of Toronto | Homomorphic Processing Unit (HPU) for Accelerating Secure Computations under Homomorphic Encryption |
| US10817262B2 (en) * | 2018-11-08 | 2020-10-27 | Enveil, Inc. | Reduced and pipelined hardware architecture for Montgomery Modular Multiplication |
| US20210216283A1 (en) * | 2020-01-14 | 2021-07-15 | Commissariat A L'energie Atomique Et Aux Energies Alternatives | Device and method for generating a random number drawn according to a nonuniform distribution |
| US20210266168A1 (en) * | 2020-02-21 | 2021-08-26 | Hong Kong Applied Science and Technology Research Institute Company Limited | Zero knowledge proof hardware accelerator and the method thereof |
| US20220188072A1 (en) * | 2021-12-23 | 2022-06-16 | Intel Corporation | Systems and methods for calculating large polynomial multiplications |
| US20230014392A1 (en) * | 2021-07-01 | 2023-01-19 | Jpmorgan Chase Bank, N.A. | Method and system for privacy-preserving portfolio pricing |
| US20230132500A1 (en) * | 2021-11-04 | 2023-05-04 | Samsung Electronics Co., Ltd. | Crypto processor and electronic device including the same |
| US20230140257A1 (en) * | 2021-10-29 | 2023-05-04 | Intel Corporation | Modular addition instruction |
| US20240048352A1 (en) * | 2022-08-02 | 2024-02-08 | Alibaba (China) Co., Ltd. | Multiplication unit, number field transformation circuit and privacy computation device |
-
2024
- 2024-05-25 US US18/674,855 patent/US12547412B2/en active Active
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018147497A1 (en) * | 2017-02-08 | 2018-08-16 | 서울대학교산학협력단 | Method for processing dynamic data by fully homomorphic encryption method |
| US20180294950A1 (en) * | 2017-04-11 | 2018-10-11 | The Governing Council Of The University Of Toronto | Homomorphic Processing Unit (HPU) for Accelerating Secure Computations under Homomorphic Encryption |
| US10817262B2 (en) * | 2018-11-08 | 2020-10-27 | Enveil, Inc. | Reduced and pipelined hardware architecture for Montgomery Modular Multiplication |
| US20210216283A1 (en) * | 2020-01-14 | 2021-07-15 | Commissariat A L'energie Atomique Et Aux Energies Alternatives | Device and method for generating a random number drawn according to a nonuniform distribution |
| US20210266168A1 (en) * | 2020-02-21 | 2021-08-26 | Hong Kong Applied Science and Technology Research Institute Company Limited | Zero knowledge proof hardware accelerator and the method thereof |
| US20230014392A1 (en) * | 2021-07-01 | 2023-01-19 | Jpmorgan Chase Bank, N.A. | Method and system for privacy-preserving portfolio pricing |
| US20230140257A1 (en) * | 2021-10-29 | 2023-05-04 | Intel Corporation | Modular addition instruction |
| US20230132500A1 (en) * | 2021-11-04 | 2023-05-04 | Samsung Electronics Co., Ltd. | Crypto processor and electronic device including the same |
| US20220188072A1 (en) * | 2021-12-23 | 2022-06-16 | Intel Corporation | Systems and methods for calculating large polynomial multiplications |
| US20240048352A1 (en) * | 2022-08-02 | 2024-02-08 | Alibaba (China) Co., Ltd. | Multiplication unit, number field transformation circuit and privacy computation device |
Also Published As
| Publication number | Publication date |
|---|---|
| US20240394067A1 (en) | 2024-11-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11416638B2 (en) | Configurable lattice cryptography processor for the quantum-secure internet of things and related techniques | |
| Kim et al. | SHARP: A short-word hierarchical accelerator for robust and practical fully homomorphic encryption | |
| Fritzmann et al. | RISQ-V: Tightly coupled RISC-V accelerators for post-quantum cryptography | |
| US12500732B2 (en) | Methods of operating on data in a fully homomorphic encryption system using in-situ processing-in-memory and related circuits | |
| US20230318829A1 (en) | Cryptographic processor device and data processing apparatus employing the same | |
| ES2954562T3 (en) | Hardware accelerated machine learning | |
| US10545865B2 (en) | Systems and methods for implementing low-latency lookup circuits using sparse hash functions | |
| KR20230078131A (en) | Appratus and method of homomorphic encryption operation using iterative array number theoretic transform | |
| US12512961B2 (en) | Multi-modal cryptographic processor | |
| US20240421971A1 (en) | Semi-custom accelerator device for bootstrappable fully homomorphic encryption | |
| US20230269067A1 (en) | Homomorphic encryption operation accelerator, and operating method of homomorphic encryption operation accelerator | |
| CN105335331B (en) | A kind of SHA256 realization method and systems based on extensive coarseness reconfigurable processor | |
| CN112464296B (en) | A Large Integer Multiplier Hardware Circuit for Homomorphic Encryption | |
| Zhang et al. | Bp-ntt: Fast and compact in-sram number theoretic transform with bit-parallel modular multiplication | |
| CN116488788A (en) | Hardware accelerator of fully homomorphic encryption algorithm, homomorphic encryption method and electronic equipment | |
| CN108959168B (en) | SHA512 full pipeline circuit based on on-chip memory and its realization method | |
| KR102075848B1 (en) | Method, Apparatus and Recording Medium Of Polynomial Operation Optimization Processing | |
| US12547412B2 (en) | Fully homomorphic encrypted processing acceleration | |
| US12603756B2 (en) | Fully homomorphic encrypted processing acceleration | |
| US20240396704A1 (en) | Fully homomorphic encrypted processing acceleration | |
| Kim et al. | Anaheim: Architecture and Algorithms for Processing Fully Homomorphic Encryption in Memory | |
| CN100492342C (en) | Division on an array processor | |
| US20240396706A1 (en) | Fully homomorphic encrypted processing acceleration | |
| US20260081750A1 (en) | Fully homomorphic encrypted processing acceleration | |
| Dalal et al. | A hardware framework for the fast generation of multiple long-period random number streams |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY |
|
| FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO SMALL (ORIGINAL EVENT CODE: SMAL); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION |
|
| AS | Assignment |
Owner name: NIOBIUM MICROSYSTEMS, OHIO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:DIMOU, GEORGIOS;ARCHER, DAVID A., DR.;HUFFMAN, BRIAN;AND OTHERS;SIGNING DATES FROM 20240710 TO 20240729;REEL/FRAME:071860/0448 |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: ALLOWED -- NOTICE OF ALLOWANCE NOT YET MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS |
|
| AS | Assignment |
Owner name: NIOBIUM MICROSYSTEMS, INC., OHIO Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 71860 FRAME 448. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT;ASSIGNORS:DIMOU, GEORGIOS;ARCHER, DAVID;HUFFMAN, BRIAN;AND OTHERS;SIGNING DATES FROM 20240710 TO 20240729;REEL/FRAME:073515/0487 |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT RECEIVED Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED |
|
| STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
| CC | Certificate of correction |