FAULT DETECTION IN POST-QUANTUM CYPTOGRAPHY

Information

  • Patent Application
  • 20240137214
  • Publication Number
    20240137214
  • Date Filed
    October 06, 2022
    a year ago
  • Date Published
    April 25, 2024
    22 days ago
Abstract
Various embodiments relate to a data processing system comprising instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, including: applying a first function to the rows of a matrix of polynomials to generate first outputs, wherein the first function excludes the identity function; adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row; multiplying the modified matrix with a vector of polynomials to produce an output vector of polynomials; applying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials; and carrying out a cryptographic operation using output vector when the verification function indicates that no fault occurred in the multiplication of the modified matrix with the vector of polynomials.
Description
TECHNICAL FIELD

Various exemplary embodiments disclosed herein relate generally to fault detection in matrix operations of post-quantum cryptography using redundant data.


BACKGROUND

Protecting against fault attacks is essential to achieve high-assurance cryptographic implementations. In the new lattice-based post-quantum cryptography schemes one often has to multiply one public matrix with a secret vector. Introducing faults in this matrix multiplication might reveal information about the secrets used.


SUMMARY

A summary of various exemplary embodiments is presented below. Some simplifications and omissions may be made in the following summary, which is intended to highlight and introduce some aspects of the various exemplary embodiments, but not to limit the scope of the invention. Detailed descriptions of an exemplary embodiment adequate to allow those of ordinary skill in the art to make and use the inventive concepts will follow in later sections.


Further various embodiments relate to a data processing system including instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, including: applying a first function to the rows of a matrix of polynomials to generate first outputs, wherein the first function excludes the identity function; adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row; multiplying the modified matrix with a vector of polynomials to produce an output vector of polynomials; applying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials; and carrying out a cryptographic operation using the output vector when the verification function indicates that no fault occurred in the multiplication of the modified matrix with the vector of polynomials.


Various embodiments are described, wherein the additional row is calculated as: ƒ21(a0,i), ƒ1(a1,i), . . . , ƒ1(ak−1,i)), where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of the ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.


Various embodiments are described, wherein ƒ1(x)=c·x for a constant secret c, the second function ƒ2 is a summation function, the verification function is defined as:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


a


first


logical


value


if



w
k


-

c







i
=
0


k
-
1




w
i



equals


zero


,







output


a


second


logical


value



otherwise
.











where w0, w1, . . . , wk is the output vector of polynomials.


Various embodiments are described, wherein c is a power of 2.


Various embodiments are described, wherein ƒ1(x)=c−1·x for a constant secret c and c−1 is the modular inversion of c, the second function ƒ2 is a summation function, the verification function is defined as:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


a


first


logical


value


if



c

-
1




w
k


-




i
=
0


k
-
1





w
i



equals


zero



,







output


a


second


logical


value



otherwise
.











where w0, w1, . . . , wk is the output vector of polynomials.


Various embodiments are described, wherein c−1 is a power of 2.


Various embodiments are described, wherein ƒ1(x)=c·x for a constant secret c selected randomly from the values 2i for 0≤i<16, the second function ƒ2 is a summation function, the verification function is defined as:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


a


first


logical


value


if



w
k


-

c





i
=
0


k
-
1





w
i



equals


zero




,







output


a


second


logical


value



otherwise
.











where w0, w1, . . . , wk is the output vector of polynomials.


Various embodiments are described, wherein ƒ1(x)=cj·x for a constant secret cj applied to each column of the matrix of polynomials, the second function ƒ2 is a summation function, the verification function is defined as:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


a


first


logical


value


if



w
k


-




i
=
0


k
-
1






c
i

·

w
i




equals


zero



,







output


a


second


logical


value



otherwise
.











where w0, w1, . . . , wk is the output vector of polynomials.


Various embodiments are described, wherein cj is a power of 2.


Various embodiments are described, further including: randomly shuffling the rows of a matrix of polynomials before multiplying the modified matrix with a vector of polynomials; and relabeling the output vector of polynomials based upon the random shuffling.


Various embodiments are described, further including: randomly shuffling the columns of a matrix of polynomials before multiplying the modified matrix with a vector of polynomials; and shuffling a vector of polynomials using the same random shuffling for the columns before multiplying the modified matrix with a vector of polynomials.


Further various embodiments relate to a data processing system including instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, including: randomly shuffling the rows of a matrix of polynomials; multiplying the randomly shuffled matrix with a vector of polynomials to produce an output vector of polynomials; relabeling the output vector of polynomials based upon the random shuffling; and carrying out a cryptographic operation using relabeled output vector.


Various embodiments are described, further including: applying a first function to the rows of a matrix of polynomials to generate first outputs before randomly shuffling the rows of a matrix of polynomials; adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row before randomly shuffling the rows of a matrix of polynomials; and applying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials.


Various embodiments are described, wherein the additional row is calculated as: ƒ21(a0,i), ƒ1(a1,i), . . . , ƒ1(ak−1,i)), where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of the ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.


Further various embodiments relate to a data processing system including instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, including: randomly shuffling the columns of a matrix of polynomials; shuffling a vector of polynomials using the same random shuffling for the columns; multiplying the randomly shuffled matrix with the shuffled vector of polynomials to produce an output vector of polynomials; and carrying out a cryptographic operation using output vector.


Various embodiments are described, further including : applying a first function to the rows of a matrix of polynomials to generate first outputs before randomly shuffling the columns of a matrix of polynomials; adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row before randomly shuffling the columns of a matrix of polynomials; and applying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials.


Various embodiments are described, wherein the additional row is calculated as: ƒ21(a0,i), ƒ1(a1,i), . . . , ƒ1(ak−1,i)), where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of the ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.





BRIEF DESCRIPTION OF THE DRAWINGS

In order to better understand various exemplary embodiments, reference is made to the accompanying drawings, wherein:



FIG. 1 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that shuffles the rows of a polynomial matrix before a matrix multiplication;



FIG. 2 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that shuffles the columns of a polynomial matrix before a matrix multiplication;



FIG. 3 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that adds redundant information to a polynomial matrix before a matrix multiplication; and



FIG. 4 illustrates an exemplary hardware diagram for implementing a cryptographic operation includes a matrix multiplication.





To facilitate understanding, identical reference numerals have been used to designate elements having substantially the same or similar structure and/or substantially the same or similar function.


DETAILED DESCRIPTION

The description and drawings illustrate the principles of the invention. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the invention and are included within its scope. Furthermore, all examples recited herein are principally intended expressly to be for pedagogical purposes to aid the reader in understanding the principles of the invention and the concepts contributed by the inventor(s) to furthering the art and are to be construed as being without limitation to such specifically recited examples and conditions. Additionally, the term, “or,” as used herein, refers to a non-exclusive or (i.e., and/or), unless otherwise indicated (e.g., “or else” or “or in the alternative”). Also, the various embodiments described herein are not necessarily mutually exclusive, as some embodiments can be combined with one or more other embodiments to form new embodiments.


Protecting against fault attacks is important to achieve high-assurance cryptographic implementations. In the new lattice-based post-quantum cryptography schemes one often has to multiply one public matrix with a secret vector. Introducing faults in this matrix multiplication might reveal information about the secrets used. Embodiments of fault detection will be described herein that show how to introduce additional redundant information which helps to detect such purposefully introduced faults during the computation. This matrix/vector arithmetic is a core operation in many lattice-based post-quantum cryptographic schemes. Such detection of the introduction of faults is needed because such fault attacks might result in the extraction of the private key used. The fault detection method described herein may introduce additional data (in the form of an additional row to the matrix) to the computation. The fault detection method may also shuffle either the rows or the columns of the matrix before carrying out the multiplication. This makes the computation slower but allows one to check if faults were introduced during the computation. Multiple techniques to make the computation on this redundant data more efficient are presented.


In some cryptographic schemes (such as the post-quantum digital signature scheme Dilithium) one works with elements from a polynomial ring Rq=custom-characterq[X]/(Xn+1). More specifically, in the signature generation one has a public matrix A∈Rqcustom-character and a secret vector y∈Rcustom-character. These two objects are multiplied as w=A·y using a matrix/vector product of the individual elements that are all polynomials in the polynomial ring Rq.


One of the techniques to learn information about the secret values is to actively introduce faults during the computation and use this faulty outcome to learn or deduce information about the computation using the secret values. Such an attack is possible during the matrix/vector product. The fault detection method described herein is about the detection of modifications of the values in the public matrix A.


First, some notation will be defined. The elements ai,j∈Rq for 0≤i<k and 0≤j<custom-character of the public matrix A are






A
=


[




a

0
,
0





a

0
,
1








a

0
,


-
1








a

1
,
0





a

1
,
1








a

1
,


-
1






















a


k
-
1

,
0





a


k
-
1

,
1








a


k
-
1

,


-
1






]

.





In a similar way one can define the vector y and its elements yi∈Rq for 0≤i<custom-character






y
=


[




y
0






y
1











y


-
1





]

.





Then by definition the product w=A·y is






w
=


A
·
y

=


[




w
0






w
1











w

k
-
1





]

=


[







i
=
0



-
1





a

0
,
i


·

y
i











i
=
0



-
1





a

1
,
i


·

y
i
















i
=
0



-
1





a


k
-
1

,
i


·

y
i






]

.







In the Dilithium signature scheme, the main part of the signature z is computed as z=y+c·s1, with y being the previously mentioned secret vector, c is called the challenge and is a sparse polynomial derived from w, and s1 is the secret signing key. For valid signatures it is computationally hard to recover s1 from z because the secret vector y is generated such that it masks any information about s1 in z.


The Dilithium signature scheme provides two options to generate the secret vector y. It can either be generated randomly for each signature, or deterministically derived from the hash of the message and a secret key. The first is referred to as randomized signing and the latter as deterministic signing.


Deterministic signing is in particular vulnerable to differential fault attacks. In the context of Dilithium signature generation, an adversary can trigger the signature of the same message twice and inject a fault to change the value of w. The attacker then gets two signatures z=y+c·s1 and z′=y′+c′·s1. Because the signature process is deterministic the same secret vector y is used for both signatures (y=y′). However, the value of w is faulted in the second signature and as a result the challenges for the two signatures are different (c≠c′). The adversary hence recovers a relation of the form (z−z′)=(c−c′)·s1, and since all values z, z′, c and c′ are public or can be derived from the public signatures, the attacker recovers information on the secret key s1.


Ways to fault the value of w to mount the previous attack include injecting a random fault during the computation of the matrix vector product w=A·y.


One countermeasure that may be used by the fault detection method is to randomize the rows of A. This may include reordering the layout of A and processing the matrix as usual (in-order) or randomizing the order in which the rows of A in the matrix/vector product computation are processed. This randomization helps because it makes inserting a targeted fault much more difficult for a potential adversary.


Define the set S as the set of integers 0 to k−1: S={0, 1, . . . , k−1}. Select a random permutation π1:S→S which is used to “shuffle” the rows of A in a preprocessing step. For example, the first row a0,0, a0,1, . . . , a0,custom-character−1 of A is mapped to row number π1(0) as aπ1(0),0, aπ1(0),1, . . . , aπ1(0),custom-character−1. The inverse permutation is denoted by π1−1 such that π1−11(x))=x as expected. This pre-processing step converts A into  as







A
^

=


[





a
^


0
,
0






a
^


0
,
1









a
^


0
,


-
1









a
^


1
,
0






a
^


1
,
1









a
^


1
,


-
1























a
^



k
-
1

,
0






a
^



k
-
1

,
1









a
^



k
-
1

,


-
1






]

=



[




a



π
1

-
1


(
0
)

,
0





a



π
1

-
1


(
0
)

,
1








a



π
1

-
1


(
0
)

,


-
1








a



π
1

-
1


(
1
)

,
0





a



π
1

-
1


(
1
)

,
1








a



π
1

-
1


(
1
)

,


-
1






















a



π
1

-
1


(

k
-
1

)

,
0





a



π
1

-
1


(

k
-
1

)

,
1








a



π
1

-
1


(

k
-
1

)

,


-
1






]

.






This randomization of the rows makes it much harder to target a specific fault in the public matrix A. The computation of w=A·y can be carried out as follows. First transform A into the randomized A as above. Next, compute







w
ˆ

=




A
·

^


y

=


[





w
^

0







w
^

1












w
^


k
-
1





]

=


[







i
=
0



-
1






a
^


0
,
i


·

y
i











i
=
0



-
1






a
^


1
,
i


·

y
i
















i
=
0



-
1






a
^



k
-
1

,
i


·

y
i






]

=


[







i
=
0



-
1





a



π
1

-
1


(
0
)

,
i


·

y
i











i
=
0



-
1





a



π
1

-
1


(
1
)

,
i


·

y
i
















i
=
0



-
1





a



π
1

-
1


(

k
-
1

)

,
i


·

y
i






]

.








Finally obtain the desired result w by relabeling wiπ1−1(i) for 0≤i<k.



FIG. 1 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that shuffles the rows of a polynomial matrix before a matrix multiplication. First the method randomly shuffles the rows of a matrix of polynomials 102. Next, the method multiplies the randomly shuffled matrix with a vector of polynomials to produce an output vector of polynomials 104. Then the method relabels the output vector of polynomials based upon the random shuffling 106. Finally, the method carries out a cryptographic operation using relabeled output vector 108. The cryptographic operation may be for example a digital signature.


Besides randomizing the rows, the columns of A may instead be shuffled, however this also means that the values of y need to be shuffled accordingly. In a similar manner to randomizing the rows, define the set T as the set of integers 0 to custom-character−1:T={0, 1, . . . , custom-character−1}. Select a random permutation π2:T→T which allows the “shuffling” of the columns of A in a preprocessing step by defining Ã







A
~

=


[





a
~


0
,
0






a
~


0
,
1









a
~


0
,


-
1









a
~


1
,
0






a
~


1
,
1









a
~


1
,


-
1























a
~



k
-
1

,
0






a
~



k
-
1

,
1









a
~



k
-
1

,


-
1






]

=



[




a

0
,


π
2

-
1


(
0
)






a

0
,


π
2

-
1


(
1
)









a

0
,

π
2

-
1


,

(


-
1

)








a

1
,


π
2

-
1


(
0
)






a

1
,


π
2

-
1


(
1
)









a

1
,


π
2

-
1


(


-
1

)






















a


k
-
1

,


π
2

-
1


(
0
)






a


k
-
1

,


π
2

-
1


(
1
)









a


k
-
1

,


π
2

-
1


(


-
1

)






]

.






Similarly, the vector y is also pre-processed (or alternatively, this can be done on-the-fly) by defining {tilde over (y)}







y
˜

=


[





y
~

0







y
~

1












y
~



-
1





]

=


[




y


π
2

-
1


(
0
)







y


π
2

-
1


(
1
)












y


π
2

-
1


(


-
1

)





]

.






The computation of w=A·y may be carried out as follows. First transform A into the randomized à and y into {tilde over (y)}. Next, compute






w
=



A
~

·

y
˜


=


[




w
0






w
1











w

k
-
1





]

=


[







i
=
0



-
1






a
~


0
,
i


·


y
~

i











i
=
0



-
1






a
~


1
,
i


·


y
~

i
















i
=
0



-
1






a
~



k
-
1

,
i


·


y
~

i






]

=


[







i
=
0



-
1





a

0
,


π
2

-
1


(
i
)



·

y


π
2

-
1


(
i
)












i
=
0



-
1





a

1
,


π
2

-
1


(
i
)



·

y


π
2

-
1


(
i
)

















i
=
0



-
1





a


k
-
1

,


π
2

-
1


(
i
)



·

y


π
2

-
1


(
i
)







]

.








No final relabeling is needed.



FIG. 2 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that shuffles the columns of a polynomial matrix before a matrix multiplication. The method begins by randomly shuffling the columns of a matrix of polynomials 202. Next the method shuffles a vector of polynomials using the same random shuffling for the columns 204. Next, the method multiplies the randomly shuffled matrix with the shuffled vector of polynomials to produce an output vector of polynomials 206. Finally, the method carries out a cryptographic operation using output vector 208.


In another fault detection approach, faults may be detected by using redundant information. The approach is to add some redundant information in the form of an additional row of values to the matrix A. This extra information may be used to verify whether faults were introduced during the matrix/vector product. This is done by defining two functions ƒ1:Rq→Rq (first function) and ƒ2:Rqk→Rq (second function). Next, create an additional k-th row of A where each column i (for 0≤i<custom-character) is defined as:





ƒ21(a0,i),ƒ1(a1,i), . . . , ƒ1(ak−1,i)).


This means that after multiplication with y there is an additional element in w:







w
k

=




i
=
0



-
1





f
2

(



f
1

(

a

0
,
i


)

,


f
1

(

a

1
,
i


)

,


,


f
1

(

a


k
-
1

,
i


)


)

·


y
i

.







The functions ƒ1 and ƒ2 are defined in such a way that the newly computed wk may be verified using the first k values w0, w1, . . . , wk−1. This is done with a verification function ƒ3:Rqk+1→{0,1} which given the k+1 vector entries of w determines if a fault was introduced during the computation (ƒ3 returns zero or one) or the verification did not detect a fault (ƒ3 returns one or zero respectively).


Some examples of functions ƒ1 and ƒ2 will now be described. In a first example, the most basic instantiation of this construction is to take ƒ1 as the identity function: ƒ1(x)=x. Define ƒ2 as the summation








f
2

(


a

0
,
i


,

a

1
,
i


,


,

a


k
-
1

,
i



)

=




j
=
0


k
-
1




a

j
,
i


.






Next, ƒ3 may be may defined as:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


one


if



w
k


-




i
=
0


k
-
1




w
i



equals


zero



,






output


zero



otherwise
.










Note that output values, one and zero, of ƒ3 may be swapped, so that one indicates no fault and zero indicates a fault. This works as intended because wk is defined as








w
k

=





i
=
0



-
1





f
2

(


a

0
,
i


,

a

1
,
i


,


,

a


k
-
1

,
i



)

·

y
i



=




i
=
0



-
1






j
=
0


k
-
1




a

j
,
i


·

y
i






,




and ƒ3 indeed outputs one if this subtraction equals zero:








w
k

-




j
=
0


k
-
1



w
j



=



w
k

-




j
=
0


k
-
1






i
=
0



-
1




a

j
,
i


·

y
i





=



w
k

-




i
=
0



-
1






j
=
0


k
-
1




a

j
,
i


·

y
i





=

0
.







In other embodiments the function ƒ1 may be defined to include all functions but the identity function.


In a second example, ƒ1 may be defined as ƒ1(x)=c·x for a constant secret value c∈Rq (and define ƒ2 as the summation function). This results in an additional factor of c in each element in the additional row of A which after multiplication propagates to the final element of w. This means that ƒ3 becomes:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


one


if



w
k


-

c





i
=
0


k
-
1




w
i



equals


zero




,






output


zero



otherwise
.










If the element c is chosen as a power of two, then multiplications can be omitted in practice and replaced by a bit shift.


In a third example, instead of multiplying Σi=0k−1wi with c as in the second example, wk may be multiplied by the modular inverse c−1 mod q. This means that ƒ3 becomes:








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


one


if



c

-
1




w
k


-




i
=
0


k
-
1




w
i



equals


zero



,






output


zero



otherwise
.










This third example may also be optimized in practice. Moreover, for the case of the Dilithium post-quantum signature scheme, q=8380417=223−213+1 and this structure may be made use of. The constant c may be chosen in ƒ1(x)=c·x as a random pick of any of the sixteen values 2i for 0≤i<16. This multiplication is just a shift in practice and efficient to implement. Computing c−1=2−i in ƒ3 can be done efficiently by multiplying with









2

4

5

7

5

q

+
1


2
i





2

-
i





(

mod


q

)

.






This works because (24575q+1)≡0 (mod 2i) for all 0≤i<16. Hence, only a single extra multiplication is needed in the computation of ƒ3.


In a fourth example, the second and third examples may be generalized by using k row-specific constants cj∈Rq for 0≤j<k instead of one global constant c. This means k different functions ƒ1j may be used and an additional k-th row of A is constructed where each column i (for 0≤i<custom-character) is defined as:





ƒ210(a0,i),ƒ11(a1,i), . . . , ƒ1k−1(ak−1,i)).


The verification function ƒ3 becomes








f
3

(


w
0

,

w
1

,


,

w
k


)

=

{






output


one


if



w
k


-




i
=
0


k
-
1





c
i

·

w
i




equals


zero



,






output


zero



otherwise
.











FIG. 3 illustrates a flow diagram of a method of carrying out a cryptographic operation by a processor that adds redundant information to a polynomial matrix before a matrix multiplication. The method first applies a first function to the rows of a matrix of polynomials to generate first outputs, wherein the first function excludes the identity function 302. Next the method adds an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row 304. Then the method multiplies the modified matrix with a vector of polynomials to produce an output vector of polynomials 306. The method also applies a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials 308. Finally, the method carries out a cryptographic operation using the output vector when the verification function indicates that no fault occurred in the multiplication of the modified matrix with the vector of polynomials.


Note that the methods of FIG. 1 and FIG. 2 may be combined with the method of FIG. 3.



FIG. 4 illustrates an exemplary hardware diagram 400 for implementing a cryptographic operation including a matrix multiplication. As shown, the device 400 includes a processor 420, memory 430, user interface 440, network interface 450, and storage 460 interconnected via one or more system buses 410. It will be understood that FIG. 4 constitutes, in some respects, an abstraction and that the actual organization of the components of the device 400 may be more complex than illustrated.


The processor 420 may be any hardware device capable of executing instructions stored in memory 430 or storage 460 or otherwise processing data. As such, the processor may include a microprocessor, microcontroller, graphics processing unit (GPU), neural network processor, field programmable gate array (FPGA), application-specific integrated circuit (ASIC), or other similar devices.


The memory 430 may include various memories such as, for example L1, L2, or L3 cache or system memory. As such, the memory 430 may include static random-access memory (SRAM), dynamic RAM (DRAM), flash memory, read only memory (ROM), or other similar memory devices.


The user interface 440 may include one or more devices for enabling communication with a user such as an administrator. For example, the user interface 440 may include a display, a touch interface, a mouse, and/or a keyboard for receiving user commands. In some embodiments, the user interface 440 may include a command line interface or graphical user interface that may be presented to a remote terminal via the network interface 450.


The network interface 450 may include one or more devices for enabling communication with other hardware devices. For example, the network interface 450 may include a network interface card (NIC) configured to communicate according to the Ethernet protocol or other communications protocols, including wireless protocols. Additionally, the network interface 450 may implement a TCP/IP stack for communication according to the TCP/IP protocols. Various alternative or additional hardware or configurations for the network interface 450 will be apparent.


The storage 460 may include one or more machine-readable storage media such as read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash-memory devices, or similar storage media. In various embodiments, the storage 460 may store instructions for execution by the processor 420 or data upon with the processor 420 may operate. For example, the storage 460 may store a base operating system 461 for controlling various basic operations of the hardware 400. Storage 462 may include instructions for carrying out the cryptographic function including a matrix multiply of FIGS. 1, 2, and 3.


It will be apparent that various information described as stored in the storage 460 may be additionally or alternatively stored in the memory 430. In this respect, the memory 430 may also be considered to constitute a “storage device” and the storage 460 may be considered a “memory.” Various other arrangements will be apparent. Further, the memory 430 and storage 460 may both be considered to be “non-transitory machine-readable media.” As used herein, the term “non-transitory” will be understood to exclude transitory signals but to include all forms of storage, including both volatile and non-volatile memories.


The system bus 410 allows communication between the processor 420, memory 430, user interface 440, storage 460, and network interface 450.


While the host device 400 is shown as including one of each described component, the various components may be duplicated in various embodiments. For example, the processor 420 may include multiple microprocessors that are configured to independently execute the methods described herein or are configured to perform steps or subroutines of the methods described herein such that the multiple processors cooperate to achieve the functionality described herein. Further, where the device 400 is implemented in a cloud computing system, the various hardware components may belong to separate physical systems. For example, the processor 420 may include a first processor in a first server and a second processor in a second server.


As used herein, the term “non-transitory machine-readable storage medium” will be understood to exclude a transitory propagation signal but to include all forms of volatile and non-volatile memory. When software is implemented on a processor, the combination of software and processor becomes a single specific machine. Although the various embodiments have been described in detail, it should be understood that the invention is capable of other embodiments and its details are capable of modifications in various obvious respects.


Because the data processing implementing the present invention is, for the most part, composed of electronic components and circuits known to those skilled in the art, circuit details will not be explained in any greater extent than that considered necessary as illustrated above, for the understanding and appreciation of the underlying concepts of the present invention and in order not to obfuscate or distract from the teachings of the present invention.


Although the invention is described herein with reference to specific embodiments, various modifications and changes can be made without departing from the scope of the present invention as set forth in the claims below. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention. Any benefits, advantages, or solutions to problems that are described herein with regard to specific embodiments are not intended to be construed as a critical, required, or essential feature or element of any or all the claims.


Furthermore, the terms “a” or “an,” as used herein, are defined as one or more than one. Also, the use of introductory phrases such as “at least one” and “one or more” in the claims should not be construed to imply that the introduction of another claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an.” The same holds true for the use of definite articles.


Unless stated otherwise, terms such as “first” and “second” are used to arbitrarily distinguish between the elements such terms describe. Thus, these terms are not necessarily intended to indicate temporal or other prioritization of such elements.


Any combination of specific software running on a processor to implement the embodiments of the invention, constitute a specific dedicated machine.


It should be appreciated by those skilled in the art that any block diagrams herein represent


conceptual views of illustrative circuitry embodying the principles of the invention.

Claims
  • 1. A data processing system comprising instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, comprising: applying a first function to rows of a matrix of polynomials to generate first outputs, wherein the first function excludes the identity function;adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row;multiplying the modified matrix with a vector of polynomials to produce an output vector of polynomials;applying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials; andcarrying out a cryptographic operation using the output vector when the verification function indicates that no fault occurred in the multiplication of the modified matrix with the vector of polynomials.
  • 2. The data processing system of claim 1, wherein the additional row is calculated as: ƒ2(ƒ1(a0,i),ƒ1(a1,i), . . . , ƒ1(ak−1,i)),where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of an ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.
  • 3. The data processing system of claim 2, wherein ƒ1(x)=c·x for a constant secret c,the second function ƒ2 is a summation function,the verification function is defined as:
  • 4. The data processing system of claim 3, wherein c is a power of 2.
  • 5. The data processing system of claim 2, wherein ƒ1(x)=c−1·x for a constant secret c and c−1 is a modular inversion of c,the second function ƒ2 is a summation function,the verification function is defined as:
  • 6. The data processing system of claim 3, wherein c−1 is a power of 2.
  • 7. The data processing system of claim 2, wherein ƒ1(x)=c·x for a constant secret c selected randomly from the values 2i for 0≤i<16,the second function ƒ2 is a summation function,the verification function is defined as:
  • 8. The data processing system of claim 2, wherein ƒ1(x)=cj·x for a constant secret cj applied to each column of the matrix of polynomials,the second function ƒ2 is a summation function,the verification function is defined as:
  • 9. The data processing system of claim 3, wherein cj is a power of 2.
  • 10. The data processing system of claim 1, further comprising: randomly shuffling the rows of a matrix of polynomials before multiplying the modified matrix with a vector of polynomials; andrelabeling the output vector of polynomials based upon the random shuffling.
  • 11. The data processing system of claim 1, further comprising: randomly shuffling the columns of a matrix of polynomials before multiplying the modified matrix with a vector of polynomials; andshuffling a vector of polynomials using the same random shuffling for the columns before multiplying the modified matrix with a vector of polynomials.
  • 12. A data processing system comprising instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, comprising: randomly shuffling rows of a matrix of polynomials;multiplying the randomly shuffled matrix with a vector of polynomials to produce an output vector of polynomials;relabeling the output vector of polynomials based upon the random shuffling; andcarrying out a cryptographic operation using relabeled output vector.
  • 13. The data processing system of claim 12, further comprising: applying a first function to rows of a matrix of polynomials to generate first outputs before randomly shuffling the rows of a matrix of polynomials;adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row before randomly shuffling the rows of a matrix of polynomials; andapplying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials.
  • 14. The data processing system of claim 12, wherein the additional row is calculated as: ƒ2(ƒ1(a0,i),ƒ1(a1,i), . . . , ƒ1(ak−1,i)),where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of an ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.
  • 15. A data processing system comprising instructions embodied in a non-transitory computer readable medium, the instructions for a cryptographic operation including matrix multiplication for lattice-based cryptography in a processor, the instructions, comprising: randomly shuffling the columns of a matrix of polynomials;shuffling a vector of polynomials using the same random shuffling for the columns;multiplying the randomly shuffled matrix with the shuffled vector of polynomials to produce an output vector of polynomials; andcarrying out a cryptographic operation using output vector.
  • 16. The data processing system of claim 15, further comprising: applying a first function to the rows of a matrix of polynomials to generate first outputs before randomly shuffling the columns of a matrix of polynomials;adding an additional row to the matrix of polynomials to produce a modified matrix, wherein each element in the additional row is generated by a second function applied to a column of outputs associated with each element in the additional row before randomly shuffling the columns of a matrix of polynomials; andapplying a verification function to the output vector that produces an indication of whether a fault occurred in the multiplication of the modified matrix with the vector of polynomials.
  • 17. The data processing system of claim 15, wherein the additional row is calculated as: ƒ2(ƒ1(a0,i),ƒ1(a1,i), . . . , ƒ1(ak−1,i)),where ƒ1 is the first function, ƒ2 is the second function, a0,i, a1,i, . . . , ak−1,i are the elements of an ith row of the matrix of polynomials, and k is the number of rows of the matrix of polynomials.