Computing accelerator, data processor, and related methods

By designing a computing accelerator to perform multiplication operations and ciphertext format conversion on homomorphic encrypted polynomials, the problem of high computational complexity of homomorphic encrypted ciphertexts is solved, and the computing efficiency is improved.

CN117200962BActive Publication Date: 2026-11-20ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210608385.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2026-11-20
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The ciphertext format generated by homomorphic encryption is complex, resulting in high computational complexity for computing services and requiring more time or hardware resources.

Method used

Design a computation accelerator that includes a polynomial multiplication unit, a coefficient extraction unit, and a ciphertext wrapping unit. By performing multiplication operations and ciphertext format conversion on multiple input polynomials, the computational complexity is reduced.

Benefits of technology

By simplifying the computation process of the computing accelerator, the computational efficiency of homomorphic encryption is improved, and hardware requirements are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117200962B_ABST
    Figure CN117200962B_ABST
Patent Text Reader

Abstract

A computing accelerator, a data processor and related methods for homomorphic encryption are disclosed. The computing accelerator is configured to perform computations on a plurality of input polynomials to generate an output polynomial, wherein the input polynomials are ciphertexts generated from plaintext data according to a ring-based fault-tolerant learning encryption, and the output polynomial is a result of performing linear computations on the plaintext data. The computing accelerator includes a polynomial multiplication unit, a polynomial multiplication unit and a coefficient extraction unit. The polynomial multiplication unit multiplies a first input polynomial and a second input polynomial in the input polynomials to generate an intermediate polynomial. The coefficient extraction unit converts the intermediate polynomial into a target polynomial according to a target coefficient of the intermediate polynomial, wherein the target coefficient is a result of performing linear computations on a portion of the plaintext data. A ciphertext wrapping unit generates the output polynomial according to at least the target polynomial.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a computing accelerator, and more particularly to a computing accelerator capable of accelerating linear computations for homomorphic encryption. Background Technology

[0002] Because artificial intelligence models, such as neural networks, can analyze massive amounts of data and extract meaningful information, they are beneficial to the development of many industries. However, running AI models often requires large amounts of expensive computing hardware resources, which not every company or research institution can afford. Therefore, to enable more industries to benefit from the data analysis capabilities of AI, server manufacturers have begun to offer remote computing services. In other words, users can upload the data they want to calculate or analyze to the cloud, and the server provider can remotely provide the computing service, ultimately sending the results back to the user.

[0003] However, user-provided data may be confidential, thus posing security risks to such services. To address this, homomorphic encryption has been introduced to enhance data security during service delivery. Homomorphic encryption allows service providers to perform specific algebraic operations on the encrypted ciphertext, and the decrypted encrypted data will yield the same result as the plaintext data. In other words, service providers can perform specific operations, such as linear calculations, directly on the ciphertext without knowing its content, thereby improving service security. However, homomorphically encrypted ciphertext typically has a complex format, resulting in higher computational complexity and requiring more time or hardware resources for service providers to complete the computation. Therefore, improving the computational efficiency of homomorphic encryption has become a pressing issue in this field. Summary of the Invention

[0004] One objective of this application is to disclose a computation accelerator. The computation accelerator performs computation on multiple input polynomials of homomorphic encryption to generate an output polynomial, wherein the multiple input polynomials are ciphertext generated by encrypting plaintext data using on-ring fault-tolerant learning, and the output polynomial is the result of linear computation corresponding to the plaintext data. The computation accelerator includes a polynomial multiplication unit, a coefficient extraction unit, and a ciphertext wrapping unit. The polynomial multiplication unit multiplies a first input polynomial and a second input polynomial among the multiple input polynomials to generate a first intermediate polynomial, wherein the first input polynomial corresponds to multiple first plaintext values ​​in the plaintext data, the second input polynomial corresponds to multiple second plaintext values ​​in the plaintext data, and the first intermediate polynomial is ciphertext encrypted using on-ring fault-tolerant learning. The coefficient extraction unit converts the first intermediate polynomial into a first target polynomial of the fault-tolerant learning ciphertext based on a first target coefficient among the multiple coefficients of the first intermediate polynomial, wherein the first target coefficient is the result of performing the linear computation corresponding to the multiple first plaintext values ​​and the multiple second plaintext values. The ciphertext wrapping unit is used to generate the output polynomial based on at least the first target polynomial, wherein the output polynomial is ciphertext encrypted with on-ring fault-tolerant learning.

[0005] Another embodiment of this application provides a data processor. The data processor is used to convert plaintext data into multiple homomorphically encrypted input polynomials, and to transmit the multiple input polynomials to a remote computing accelerator so that the computing accelerator performs the linear computation required for the plaintext data. The data processor includes an encoding unit and an encryption unit. The encoding unit is used to encode multiple values ​​in the plaintext data into multiple plaintext input polynomials according to the type of linear computation. The encryption unit is used to encrypt the multiple plaintext input polynomials according to on-ring fault-tolerant learning to generate the multiple input polynomials.

[0006] Another embodiment of this application provides a method for performing computations on multiple input polynomials of homomorphic encryption to complete linear computations of plaintext data. The method includes: a computing accelerator receiving a plurality of input polynomials, wherein the plurality of input polynomials are ciphertext generated by encrypting plaintext data using on-ring fault-tolerant learning; the computing accelerator multiplying a first input polynomial and a second input polynomial among the plurality of input polynomials to generate a first intermediate polynomial, wherein the first input polynomial corresponds to a plurality of first plaintext values ​​in the plaintext data, the second input polynomial corresponds to a plurality of second plaintext values ​​in the plaintext data, and the first intermediate polynomial is ciphertext encrypted using on-ring fault-tolerant learning; the computing accelerator converting the first intermediate polynomial into a first target polynomial of the fault-tolerant learning ciphertext based on target coefficients among a plurality of coefficients of the first intermediate polynomial, wherein the first target coefficients are the result of performing the linear computation corresponding to the plurality of first plaintext values ​​and the plurality of second plaintext values; the computing accelerator generating the output polynomial based on at least the first target polynomial, wherein the output polynomial is ciphertext encrypted using on-ring fault-tolerant learning; and the computing accelerator outputting the output polynomial to a data processor.

[0007] The data processor, computing accelerator, and homomorphic encryption computing method provided in the embodiments of this application can encode the numerical values ​​in plaintext data into polynomials according to the type of linear computation. Therefore, after homomorphic encryption of the polynomial, the computing accelerator only needs to multiply the corresponding polynomials to generate intermediate polynomials. It can then obtain the ciphertext corresponding to the calculation result of the plaintext data from the coefficients of specific terms of the intermediate polynomials, thereby reducing the computational complexity required by the computing accelerator and achieving the effect of accelerating computation. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of an embodiment of the homomorphic encryption computing system disclosed herein.

[0009] Figure 2 This is a flowchart of an embodiment of the homomorphic encryption computation method disclosed herein.

[0010] Figure 3 yes Figure 1 A schematic diagram of an embodiment of a computing accelerator.

[0011] Figure 4 yes Figure 3 A schematic diagram of an embodiment of a polynomial multiplication unit.

[0012] Figure 5 yes Figure 3 A schematic diagram of an embodiment of the encrypted message wrapping unit. Detailed Implementation

[0013] The following disclosure provides various implementations or examples that can be used to achieve different features of this disclosure. Specific examples of components and configurations described below are for simplification purposes. It is understood that these descriptions are illustrative only and are not intended to limit the scope of this disclosure. For example, in the following description, forming a first feature on or over a second feature may include, in some embodiments, the first and second features being in direct contact with each other; and may also include, in some embodiments, additional components being formed between the first and second features, such that the first and second features may not be in direct contact. Furthermore, component symbols and / or reference numerals may be reused in multiple embodiments of this disclosure. Such reuse is for the purpose of brevity and clarity and does not in itself represent a relationship between the different embodiments and / or configurations discussed.

[0014] While the numerical ranges and parameters used to define the broader scope of this application are approximate values, the relevant values ​​in specific embodiments have been presented as precisely as possible. However, any numerical value inevitably contains standard deviations due to individual test methods. Here, "approximately" generally means that the actual value is within plus or minus 10%, 5%, 1%, or 0.5% of a particular value or range. Alternatively, the term "approximately" may mean that the actual value falls within the acceptable standard error of the average, as determined by those skilled in the art to which this application pertains. It is understood that, except for experimental examples, or unless explicitly stated otherwise, all ranges, quantities, values, and percentages used herein (e.g., to describe material usage, duration, temperature, operating conditions, quantity ratios, and the like) are modified with "approximately". Therefore, unless otherwise stated, the numerical parameters disclosed in this specification and the accompanying claims are approximate values ​​and are subject to change as needed. At a minimum, these numerical parameters should be understood as the indicated significant digits and values ​​obtained by applying general rounding. Here, a range of values ​​is expressed as a distance from one endpoint to the other or between the two endpoints; unless otherwise stated, the range of values ​​described herein includes the endpoints.

[0015] Figure 1 This is a schematic diagram of an embodiment of the homomorphic encryption computing system 100 disclosed herein. The homomorphic encryption computing system 100 includes a data processor 110 and a computing accelerator 120. In this embodiment, the data processor 110 can encrypt the plaintext data D1 to be computed into ciphertext using homomorphic encryption technology, while the computing accelerator 120 can perform calculations on the received ciphertext and transmit the ciphertext of the calculation result to the data processor 110. In this way, after decrypting the ciphertext of the calculation result, the data processor 110 can obtain the calculation result of the plaintext data D1.

[0016] In this embodiment, the computing accelerator 120 can be located on the server side or server-side used to provide computing services, while the data processor 110 can be located on the data provider side or user side using the computing services. That is, the data processor 110 can utilize the computing accelerator 120 located on the remote server side to perform linear calculations on the plaintext data D1, thereby reducing the hardware requirements of the user side where the data processor 110 is located.

[0017] In the embodiments disclosed herein, the homomorphic encryption computing system 10 can use ring-learning with error (RLWE) technology to perform homomorphic encryption. Since RLWE encryption uses a polynomial as the input data format, the data processor 110 can first encode the plaintext data D1 to be computed into a plaintext polynomial, and then encrypt the plaintext polynomial to generate the ciphertext polynomial of RLWE.

[0018] like Figure 1 As shown, the data processor 110 may include an encoding unit 112 and an encryption unit 114. The encoding unit 112 can encode multiple values ​​in the plaintext data D1 into multiple plaintext input polynomials PP1 to PPX, while the encryption unit 114 can encrypt the plaintext input polynomials PP1 to PPX according to on-ring fault-tolerant learning to generate multiple input polynomials IP1 to IPX, where X is an integer greater than 1. Correspondingly, the computing accelerator 120 can receive the ciphertext input polynomials IP1 to IPX generated by the data processor 110 and perform calculations on the input polynomials IP1 to IPX.

[0019] Since on-ring fault-tolerant learning can only ensure that the result of linear computation is still homomorphic ciphertext, but cannot guarantee that the ciphertext will remain homomorphic after other forms of operation, the computation accelerator 120 is generally used to perform linear computations required in neural network or artificial intelligence models on the ciphertext, such as, but not limited to, vector dot product, matrix multiplication, and convolution. Since these linear computations and polynomial multiplications are mainly dot product operations, if the data processor 110 can encode the values ​​in the plaintext data D1 into polynomials in an appropriate order during the encoding stage, the computation accelerator 120 can quickly complete the linear computation of the plaintext data D1 by multiplying the corresponding values ​​through polynomial multiplication. This effectively reduces the computational burden on the data processor 110.

[0020] For example, the data processor 110 can encode the vector v [p0, p1, p2, p3, p4] in plaintext data D1 into a polynomial P(x) according to one encoding order, and can encode the vector u [q0, q1, q2, q3, q4] in plaintext data D1 into a polynomial Q(x) according to another reverse encoding order, as shown in equations (1) and (2).

[0021] Equation (1) Equation (2) In this case, the polynomial R(x) obtained by multiplying polynomial P(x) and polynomial Q(x) can be represented as shown in equation (3).

[0022] Equation (3) In equation (3), the coefficients of the fourth-order terms of the polynomial R(x) This is equivalent to the dot product of vectors v and u. In other words, after receiving the homomorphically encrypted ciphertext polynomials P(x) and Q(x), the computation accelerator 120 only needs to multiply the two ciphertext polynomials and extract the coefficients of their fourth terms to obtain the dot product of vectors v and u. It does not need to decompose the components of vectors v and u from the ciphertext polynomials and then perform the corresponding multiplication operations. Therefore, it can effectively simplify the computational complexity of the computation accelerator 120.

[0023] In this embodiment, the encoding unit 112 can encode the values ​​in the plaintext data D1 into the coefficients of the plaintext input polynomials PP1 to PPX in an appropriate order according to the type of linear calculation to be performed, such as, but not limited to, vector dot product, matrix multiplication, and convolution. This allows the computing accelerator 120 to receive the ciphertext of the plaintext input polynomials PP1 to PPX, i.e., after the input polynomials IP1 to IPX, perform polynomial multiplication on the input polynomials IP1 to IPX2 and quickly obtain the required calculation result from the polynomial coefficients after multiplication, thereby reducing the computational load of the computing accelerator 120.

[0024] Figure 2 This is a flowchart of an embodiment of the homomorphic encryption computation method 200 disclosed herein. The computation method 200 can be executed by the homomorphic encryption computation system 100 and may include steps S210 to S290.

[0025] In step S210, the encoding unit 112 in the data processor 110 can encode multiple values ​​in the plaintext data D1 into plaintext input polynomials PP1 to PPX according to the type of linear computation. For example, the encoding unit 112 can encode the aforementioned vectors u and v into polynomials P(x) and Q(x) as plaintext input polynomials PP1 and PP2. However, this disclosure is not limited to this. In some other embodiments, the homomorphic encryption system 100 may have specific requirements for the number of terms in the plaintext input polynomials PP1 and PP2, such as, but not limited to, 1024 terms. In this case, the encoding unit 112 will encode the values ​​in the plaintext data accordingly. In addition, the plaintext data D1 may also correspond to multiple matrices in matrix multiplication or input images and convolution kernels in convolution calculations. In this case, the encoding unit 112 will encode the values ​​in the plaintext data D1 according to the type of computation to be performed to generate plaintext input polynomials PP1 and PP2.

[0026] After the encoding unit 112 completes the encoding, the encryption unit 114 in the data processor 110 can encrypt the plaintext input polynomials PP1 to PPX in step S220 according to on-ring fault-tolerant learning to generate input polynomials IP1 to IPX. Then, in step S230, the computing accelerator 120 can receive the input polynomials IP1 to IPX generated by the data processor 110, and calculate the input polynomials IP1 to IPX in steps S240 to S260 to generate the output polynomial OP1 corresponding to the calculation result.

[0027] Figure 3 This is a schematic diagram of an embodiment of the computing accelerator 120 disclosed herein. Figure 3 As shown, the computation accelerator 120 may include a polynomial multiplication unit 122, a coefficient extraction unit 124, and a ciphertext wrapping unit 126. In step S240, the polynomial multiplication unit 122 in the computation accelerator 120 can perform multiplication calculations on the input polynomials IP1 to IPX to generate intermediate polynomials MP1 to MPY, where Y is an integer greater than 1. For example, the polynomial multiplication unit 122 can multiply the input polynomials IP1 and IP2 to obtain the intermediate polynomial MP1. Since polynomial multiplication is a linear computation, the intermediate polynomial MP1 will still be the ciphertext for fault-tolerant learning on the ring.

[0028] Furthermore, since polynomial multiplication is quite complex, in this embodiment, the polynomial multiplication unit 122 can use number theory transformations to simplify the calculation of polynomial multiplication. Figure 4 This is a schematic diagram of an embodiment of the polynomial multiplication unit 122 disclosed herein. Figure 4 In this context, the polynomial multiplication unit 122 may include a number theory transformation unit 1221, a multiplication unit 1222, and an inverse number theory transformation unit 1223.

[0029] In this embodiment, the number theory transformation unit 1221 can perform number theory transformations or Fast Fourier Transforms (FFTs) on the input polynomials IP1 and IP2. In this case, the multiplication unit 1222 only needs to multiply each coefficient of the transformation polynomial CP1 with the corresponding coefficient in the transformation polynomial CP2 to generate the intermediate transformation polynomial MCP. That is, when the degree of the terms in the input polynomials IP1 and IP2 is N, where N is an integer greater than 1, the multiplication of the transformation polynomials CP1 and CP2 only requires (N+1) coefficient multiplication operations. In contrast, without transformation, the multiplication of the input polynomials IP1 and IP2 requires (N+1) coefficient multiplication operations. 2 This involves multiplication of coefficients. Therefore, the complexity of polynomial multiplication can be reduced after the transformation. After multiplying the transformation polynomials CP1 and CP2 to generate the intermediate transformation polynomial MCP, the inverse number theory transformation unit 1223 can perform an inverse number theory transformation or an inverse fast Fourier transform on the intermediate transformation polynomial MCP to generate the intermediate polynomial MP1.

[0030] In this embodiment, the input polynomial IP1 can correspond to multiple first plaintext values ​​in plaintext data D1, such as, but not limited to, the component values ​​p0, p1, p2, p3, and p4 of vector v, while the input polynomial IP2 can correspond to multiple second plaintext values ​​in plaintext data D1, such as, but not limited to, the component values ​​q0, q1, q2, q3, and q4 of vector u. In this case, the input polynomials IP1 and IP2 are equivalent to the ring-based fault-tolerant learning ciphertext of polynomials P(x) and Q(x) shown in equations (1) and (2), and as shown in equation (3), the coefficients of the intermediate polynomial MP1 will be related to the various dot product results of the first plaintext values ​​p0, p1, p2, p3, and p4 and the second plaintext values ​​q0, q1, q2, q3, and q4.

[0031] In this embodiment, if the homomorphic encryption computation system 100 intends to perform a linear computation on plaintext data D1, which is the dot product of vectors v and u, then the fourth-order coefficients of the intermediate polynomial MP1 will correspond to the result of the dot product calculation of the first plaintext values ​​p0, p1, p2, p3, and p4 and multiple second plaintext values ​​q0, q1, q2, q3, and q4. Therefore, in step S250, the coefficient extraction unit 124 can use the fourth-order coefficients of the intermediate polynomial MP1 as its target coefficients, and convert the intermediate polynomial MP1 of the loop-tolerant learning ciphertext into the target polynomial TP1 based on its target coefficients.

[0032] However, this disclosure is not limited to performing vector dot products on plaintext data. In some embodiments, the user's goal may be to perform linear computations other than vector dot products on plaintext data D1. For example, plaintext data D1 may contain an input image and a convolution kernel, and the user's goal is to obtain the feature image after convolving the input image with the convolution kernel. In this case, in step S210, data processor 110 may, for example, encode multiple plaintext values ​​in plaintext data D1 corresponding to at least a portion of the input image into a plaintext input polynomial PP1, and encode multiple second plaintext values ​​in plaintext data D1 corresponding to the convolution kernel into a plaintext input polynomial PP2. In this way, after data processor 110 performs appropriate encoding, computation accelerator 120 can obtain the target coefficients corresponding to at least a portion of the feature image from the polynomial coefficients of intermediate polynomial MP1 after multiplying input polynomials IP1 and IP2 to generate intermediate polynomial MP1.

[0033] In some other embodiments, the plaintext data D1 may contain a first matrix and a second matrix, and the user's goal is to obtain a third matrix obtained by multiplying the two matrices. In this case, in step S210, the data processor 110 may, for example, encode multiple elements in the first row of the first matrix into a plaintext input polynomial PP1, and encode multiple elements in the first column of the second matrix into a plaintext input polynomial PP2. In this case, the target coefficients of the intermediate polynomial MP1 may, for example, correspond to the matrix elements in the first row and first column of the third matrix.

[0034] In some embodiments, in order to ensure that the computing accelerator 120 can retrieve the corresponding target coefficient in step S250, after the data processor 110 determines the encoding method of the plaintext data D1 according to the type of linear computation, the data processor 110 can send a message to the computing accelerator 120 to inform the computing accelerator 120 of the encoding method it uses or the item corresponding to the target coefficient.

[0035] Furthermore, based on the content of the plaintext data D1 and the requirements of the linear computation to be performed, the data processor 110 may generate more than two input polynomials IP1 to IPX in steps S210 to S220. Therefore, in step S240, the computing accelerator 120 may also perform multiple sets of polynomial multiplications on the input polynomials IP1 to IPX, and generate multiple intermediate polynomials MP1 to MPY accordingly. Taking the aforementioned convolution calculation and matrix multiplication as an example, the intermediate polynomials MP1 to MPY may correspond to, for example, a portion of the output feature image or one of the elements in the third matrix. Therefore, after the coefficient extraction unit 124 converts the intermediate polynomials MP1 to MPY into target polynomials TP1 to TPY according to the target coefficients of the intermediate polynomials MP1 to MPY, the ciphertext wrapping unit 126 of the computing accelerator 120 may further wrap the target polynomials TP1 to TPY into the output polynomial OP1 of the fault-tolerant learning ciphertext on the ring in step S260. In this way, the data processor 110 can obtain a more complete calculation result based on the output polynomial OP1, such as a complete feature image or all elements in the third matrix.

[0036] It should be noted that in method 200, the computational accelerator 120 performs two ciphertext format conversions on the polynomial it computes. The first conversion occurs in step S250, where the computational accelerator 120 converts the on-ring fault-tolerant learning ciphertext into fault-tolerant learning ciphertext. The second conversion occurs in step S260, where the computational accelerator 120 converts multiple fault-tolerant learning ciphertexts into a single on-ring fault-tolerant learning ciphertext. In this embodiment, these two ciphertext format conversion procedures can be performed based on the principles of on-ring fault-tolerant learning and fault-tolerant learning, as well as various known methods.

[0037] For example, step S260 can be divided into two parts: the first part is to merge multiple fault-tolerant learning ciphertexts, and the second part is to transform the merged ciphertext. Figure 5 This is a schematic diagram of an embodiment of the ciphertext wrapping unit 126 disclosed herein. The ciphertext wrapping unit 126 includes multiple ciphertext merging circuits 1261 and ciphertext conversion circuits 1262.

[0038] The ciphertext merging circuit 1261 can combine target polynomials TP1 to TPY into a merging polynomial CMP1. Figure 5 In this process, each ciphertext merging circuit 1261 can merge two target polynomials or merge the merging polynomials output by two ciphertext merging circuits 1261, until all target polynomials TP1 to TPY are merged into the merging polynomial CMP1. That is, if Y is 2... K Where K is a positive integer, then the ciphertext wrapping unit 126 may include (2 K-1) ciphertext merging circuit 1261. Thus, (2 K -1) A single ciphertext merging circuit 1261 can operate in a pipelined manner to perform polynomial merging operations. Since the merged polynomial CMP1 generated by the ciphertext merging circuit 1261 is still fault-tolerant learning encrypted ciphertext, the ciphertext conversion circuit 1262 can then convert the merged polynomial CMP1 into an output polynomial OP1 based on on-ring fault-tolerant learning encryption. However, this disclosure is not limited to combining the target polynomials TP1 to TPY in a pipelined manner. In some other embodiments, the designer can also set an appropriate number of ciphertext merging circuits 1261 as needed. For example, the ciphertext wrapping unit 126 may also include only a single ciphertext merging circuit 1261, and after merging two polynomials, its output polynomial can be used again as the input polynomial of the ciphertext merging circuit 1261 to be merged with another polynomial. By repeating the operation, intermediate polynomials MP1 to MPY can be combined into the merged polynomial CMP1 using less hardware.

[0039] After the computing accelerator 120 generates the output polynomial OP1 based on the target polynomials TP1 to TPY, the computing accelerator 120 can output the output polynomial OP1 to the data processor 110 in step S270.

[0040] like Figure 1 As shown, the data processor 110 may further include a decryption unit 116 and a decoding unit 118. The decryption unit 116 receives the output polynomial OP1 returned by the computing accelerator 120, and in step S280, decrypts the output polynomial OP1 according to on-ring fault-tolerant learning to generate the output plaintext polynomial OPP1. Then, in step S290, the decoding unit 118 decodes the plaintext polynomial OPP1 according to the type of linear computation to obtain the result R1 after performing linear computation on the plaintext data D1.

[0041] In summary, since the data processor, computing accelerator, and homomorphic encryption method provided in the embodiments disclosed herein can encode the numerical values ​​in plaintext data into polynomials based on the type of linear computation, after homomorphic encryption of the polynomials, the computing accelerator only needs to multiply the corresponding polynomials to generate intermediate polynomials. It can then obtain the ciphertext corresponding to the calculation result of the plaintext data from the coefficients of specific terms in the intermediate polynomials. This reduces the computational complexity required by the computing accelerator, achieving the effect of accelerating computation. Furthermore, since the computing accelerator can also convert intermediate polynomials into target polynomials based on the coefficients of specific terms in multiple intermediate polynomials, and then wrap multiple target polynomials into an output polynomial, the transmission between the data processor and the computing accelerator can also be made more efficient.

[0042] The foregoing description briefly outlines the features of certain embodiments of this application, enabling those skilled in the art to more fully understand the various forms of this disclosure. Those skilled in the art will readily recognize that this disclosure serves as a basis for designing or modifying other processes and structures to achieve the same objectives and / or advantages as the embodiments described herein. Those skilled in the art should understand that these equivalent embodiments remain within the spirit and scope of this disclosure, and various changes, substitutions, and modifications can be made without departing from the spirit and scope of this disclosure.

Claims

1. A computing accelerator, characterized in that, The computation accelerator is used to perform computations on multiple input polynomials for homomorphic encryption to produce an output polynomial, wherein the multiple input polynomials are ciphertext generated by encrypting plaintext data according to on-ring fault-tolerant learning, and the output polynomial is the result of linear computation corresponding to the plaintext data. The computation accelerator includes: A polynomial multiplication unit is used to multiply a first input polynomial and a second input polynomial among the plurality of input polynomials to generate a first intermediate polynomial, wherein the first input polynomial corresponds to a plurality of first plaintext values ​​in the plaintext data, the second input polynomial corresponds to a plurality of second plaintext values ​​in the plaintext data, and the first intermediate polynomial is ciphertext encrypted with on-ring fault-tolerant learning. A coefficient extraction unit is configured to convert the first intermediate polynomial into a first target polynomial of fault-tolerant learning ciphertext based on a first target coefficient among a plurality of coefficients of the first intermediate polynomial, wherein the first target coefficient is the result of performing the linear calculation corresponding to the plurality of first plaintext values ​​and the plurality of second plaintext values; and A ciphertext wrapping unit is used to generate the output polynomial based on at least the first target polynomial, wherein the output polynomial is ciphertext encrypted with on-ring fault-tolerant learning.

2. The computing accelerator as described in claim 1, characterized in that, The linear computation corresponds to the convolution computation, the plurality of first plaintext values ​​correspond to at least a portion of the input image, the plurality of second plaintext values ​​correspond to the convolution kernel, and the first target coefficient of the first intermediate polynomial corresponds to at least a portion of the feature image after the convolution kernel and the input image are convolved.

3. The computing accelerator as described in claim 1, characterized in that, The linear calculation corresponds to the vector dot product calculation, the plurality of first plaintext values ​​correspond to the first vector, the plurality of second plaintext values ​​correspond to the second vector, and the first target coefficient of the first intermediate polynomial corresponds to the vector dot product of the first vector and the second vector.

4. The computing accelerator as described in claim 1, characterized in that, The linear calculation corresponds to matrix multiplication calculation, the plurality of first plaintext values ​​correspond to a plurality of first elements in the same row of the first matrix, the plurality of second plaintext values ​​correspond to a plurality of second elements in the same column of the second matrix, and the first target coefficient of the first intermediate polynomial corresponds to a matrix element after the first matrix and the second matrix are multiplied.

5. The computing accelerator as described in claim 1, characterized in that, The polynomial multiplication unit includes: The number theory transformation unit is used to perform number theory transformation or fast Fourier transform on the first input polynomial and the second input polynomial to generate a first transformation polynomial and a second transformation polynomial. A multiplication unit is used to multiply each coefficient of the first transformation polynomial with a corresponding coefficient in the second transformation polynomial to generate an intermediate transformation polynomial; and The inverse number theory transformation unit is used to perform an inverse number theory transformation or an inverse fast Fourier transform on the intermediate transformation polynomial to generate the first intermediate polynomial.

6. The computing accelerator as described in claim 1, characterized in that: The polynomial multiplication unit is further used to multiply the third input polynomial and the fourth input polynomial among the plurality of input polynomials to generate a second intermediate polynomial, wherein the third input polynomial corresponds to a plurality of third plaintext values ​​in the plaintext data, the fourth input polynomial corresponds to a plurality of fourth plaintext values ​​in the plaintext data, and the second intermediate polynomial is ciphertext encrypted with on-ring fault-tolerant learning. and The coefficient extraction unit is further used to convert the second intermediate polynomial into a second target polynomial based on the second target coefficient among the multiple coefficients of the second intermediate polynomial, wherein the second target coefficient is the result of performing the linear calculation corresponding to the multiple third plaintext values ​​and the multiple fourth plaintext values.

7. The computing accelerator as described in claim 6, characterized in that, The encrypted message unit includes: At least one ciphertext merging circuit is used to combine at least the first target polynomial and the second target polynomial into a merging polynomial, wherein the merging polynomial is ciphertext encrypted based on fault-tolerant learning; and A ciphertext conversion circuit is used to convert the merging polynomial into the output polynomial encrypted based on fault-tolerant learning on the ring.

8. A data processor, characterized in that, The data processor is used to convert plaintext data into multiple input polynomials for homomorphic encryption, and to transmit the multiple input polynomials to a remote computing accelerator so that the computing accelerator performs the linear computations required for the plaintext data. An encoding unit is configured to encode multiple numerical values ​​in the plaintext data into multiple plaintext input polynomials according to the type of the linear computation; and An encryption unit is used to encrypt the plurality of plaintext input polynomials based on on-ring fault-tolerant learning to generate the plurality of input polynomials; The encoding unit determines the first encoding order and the second encoding order based on the type of the linear calculation. According to the first encoding order, it arranges multiple first values ​​in the plaintext data into multiple coefficients of multiple terms of the first plaintext input polynomial in the multiple plaintext input polynomials. According to the second encoding order, it arranges multiple second values ​​in the plaintext data into multiple coefficients of multiple terms of the second plaintext input polynomial in the multiple plaintext input polynomials. The total number of the plurality of first values ​​is the same as the total number of the plurality of second values, and the first encoding order is different from the second encoding order.

9. The data processor as described in claim 8, characterized in that, Also includes: The decryption unit is used to receive the output polynomial returned by the computing accelerator and decrypt the output polynomial according to the on-ring fault-tolerant learning to generate the output plaintext polynomial. and A decoding unit is used to decode the output plaintext polynomial according to the type of the linear computation to obtain the result of the plaintext data after performing the linear computation.

10. A method for implementing a computing accelerator, characterized in that, The method for performing computations on multiple input polynomials for homomorphic encryption to complete linear computations of plaintext data includes: The computing accelerator receives the plurality of input polynomials, wherein the plurality of input polynomials are ciphertext generated by encrypting the plaintext data according to on-ring fault-tolerant learning; The computing accelerator multiplies a first input polynomial and a second input polynomial among the plurality of input polynomials to generate a first intermediate polynomial for fault-tolerant learning ciphertext on the ring, wherein the first input polynomial corresponds to a plurality of first plaintext values ​​in the plaintext data, and the second input polynomial corresponds to a plurality of second plaintext values ​​in the plaintext data. The computing accelerator transforms the first intermediate polynomial into a first target polynomial based on the target coefficients among the multiple coefficients of the first intermediate polynomial, wherein the target coefficients are the result of performing the linear calculations corresponding to the multiple first plaintext values ​​and the multiple second plaintext values, and the first target polynomial is ciphertext encrypted with fault-tolerant learning. The computing accelerator generates an output polynomial based on at least the first target polynomial, wherein the output polynomial is ciphertext encrypted with on-ring fault-tolerant learning; and The computing accelerator outputs the output polynomial to the data processor.

11. The method as described in claim 10, characterized in that, The linear computation corresponds to the convolution computation, the plurality of first plaintext values ​​correspond to at least a portion of the input image, the plurality of second plaintext values ​​correspond to the convolution kernel, and the target coefficients of the first intermediate polynomial correspond to at least a portion of the feature image after the convolution kernel and the input image are convolved.

12. The method as described in claim 10, characterized in that, The linear calculation corresponds to the vector dot product calculation, the plurality of first plaintext values ​​correspond to the first vector, the plurality of second plaintext values ​​correspond to the second vector, and the target coefficient of the first intermediate polynomial corresponds to the vector dot product of the first vector and the second vector.

13. The method as described in claim 10, characterized in that, The linear calculation corresponds to matrix multiplication calculation, the plurality of first plaintext values ​​correspond to a plurality of first elements in the same row of the first matrix, the plurality of second plaintext values ​​correspond to a plurality of second elements in the same column of the second matrix, and the target coefficient of the first intermediate polynomial corresponds to a matrix element after the first matrix and the second matrix are multiplied.

14. The method as described in claim 10, characterized in that, The step of the computational accelerator multiplying the first input polynomial among the plurality of input polynomials with the second input polynomial to produce the first intermediate polynomial includes: The first input polynomial and the second input polynomial are subjected to number theory transformation or fast Fourier transform to generate a first transformation polynomial and a second transformation polynomial; Multiply each coefficient of the first transformation polynomial by a corresponding coefficient in the second transformation polynomial to generate an intermediate transformation polynomial; and The intermediate transformation polynomial is subjected to inverse number theory transformation or inverse fast Fourier transform to generate the first intermediate polynomial.

15. The method as described in claim 10, characterized in that, Also includes: The data processor encodes multiple values ​​in the plaintext data into multiple plaintext input polynomials according to the type of linear computation to be performed; The data processor encrypts the plurality of plaintext input polynomials based on on-ring fault-tolerant learning to generate the plurality of input polynomials. and The data processor transmits the plurality of input polynomials to the computing accelerator.

16. The method as described in claim 10, characterized in that, Also includes: The data processor decrypts the output polynomial based on on-ring fault-tolerant learning to generate an output plaintext polynomial. and The data processor decodes the plaintext polynomial to obtain the result of performing the linear calculation on the plaintext data.