The present invention generally relates to cryptography devices, and more particularly to cryptography devices that avoid manipulation of secret data, such as keys and random number generator seeds, in plaintext to thereby be more resilient to side-channel attacks including whitebox attacks designed to discern such secret data.
Broadly, cryptography provides mechanisms by which a private plaintext message may be protected from being divulged by converting the message into a ciphertext that may only be deciphered, i.e., converted back into the plaintext by specific persons or entities that are privy to a secret key required for performing the deciphering operation.
Two major categories of cryptography are secret key cryptography and private-key-public-key cryptography (herein, simply referred to as public key cryptography). The former includes the Digital Encryption Standard (DES) and the Advanced Encryption Standard (AES). The latter includes Rivest-Shamir-Adelman (RSA).
In secret key cryptography, the encrypting party and the decrypting party share a secret key (the shared secret key) that is used to both encrypt and decrypt a message. In public key cryptography, the recipient of a ciphertext message, i.e., the decrypting party, has a private key or secret key required to decipher ciphertext messages encoded with the public key. In other words, there is an association between a particular private key and a particular public key; they form a key pair. The public key is made available to anyone who wishes to send an encoded message (a ciphertext message) whereas the corresponding secret key is kept secret by the intended recipient of messages.
Public key cryptography also allows creation of digital signatures. The private key is used to sign a message and the public key to verify the signature.
Traditionally, cryptography relied on a message being turned into a ciphertext, that only sender and/or recipient would know the required keys, and that the encryption, decryption, and digital signature processes would not be available for a nefarious person trying to discern the secret message (or sign the message). Keys were protected by not giving access to the machines that were used to decrypt/sign a text. The endpoints of a communication are trusted and the communication channel between the endpoints is protected by turning messages into ciphertext that cannot be decrypted without access to the required decryption key. This is referred to as black box cryptography.
However, there are situations where the cryptography device has to be made available on open devices to a party that not necessarily should have access to the cryptography key. For example, in a digital rights management (DRM) scenario a publisher may wish to make a DRM protected work available to a subscriber. As long as the subscriber satisfies the terms of the subscription, the work is available. However, at the end of a subscription term, the subscriber should not have access to the work.
The open nature of these systems—whether PCs, tablets, or smart phones—renders the cryptography software extremely vulnerable to attack because the attacker has complete control of the execution platform and of the software implementation itself. The attacker can easily analyze the binary code of the cryptography application and, for example, memory pages used for temporary storage during the execution by intercepting system calls, tampering with the binary or execution files. Such manipulation may, for example, be performed using debuggers and hardware emulation tools.
These attacks include trace execution, examination of intermediate results, and access to keys located in memory as well as the performance of static analysis on the cryptography software and alteration of sub-computations for perturbation analysis.
If the work is protected through cryptography, the decryption/signing key may be provided on the subscriber's cryptography device, e.g., a mobile device such as a mobile telephone, in a manner such that the key can be used by the device to decrypt or to sign the work without revealing either the key or the algorithm to the subscriber. The key might be hidden in some way inside the code implementing the decryption or signature algorithm may be obfuscated so that it is very difficult to determine any information about the value of the key. This scenario is referred to as white-box cryptography.
White-box cryptography was first described by Chow et al. in [Chow AES] Stanley Chow, et al., White-Box Cryptography and an AES Implementation, in Proceedings of the 9th International Workshop on Selected Areas in Cryptography (SAC 2002), volume 2595 of Lecture Notes in Computer Science, pp. 250-270. Springer, 2002 and in [Chow DES] Stanley Chow, et al., White-Box Cryptography DES Implementation for DRM applications, in Proceedings of the ACM Workshop on Security and Digital Rights Management (DRM 2002), volume 2696 of Lecture Notes in Computer Science, pp. 1-15. Springer, 2002. [Chow AES] and [Chow DES] are both incorporated herein by reference in their entireties.
However, hitherto, all practical white-box cryptography approaches have been broken. Therefore, there is still an unmet need to provide cryptography devices that protect cryptographic keys from being divulged.
A possible mechanism for protecting encrypted data from being divulged during computations made on the data is homomorphic encryption. Homomorphic encryption allows computations to be performed on ciphertext values such that computation results when decrypted are the same values as if the computations were performed on corresponding plaintext values.
There are several approaches to homomorphic encryption that exhibit the homomorphic property over one operation. For example, the ElGamal cryptography system ([Elgamal] T. Elgamal, A public key cryptosystem and a signature scheme based on discrete logarithms, IEEE Transactions on Information Theory (Vol. 31, Issue. 4, July 1985)) is homomorphic over multiplication. Similarly, the Paillier cryptosystem (Paillier, Pascal “Public-Key Cryptosystems Based on Composite Degree Residuosity Classes”. EUROCRYPT. Springer. pp. 223-238, 1999) is homomorphic over addition.
A very powerful, albeit computationally expensive, cryptography mechanism, known as fully homomorphic encryption (FHE), was introduced by Craig Gentry in 2009 in [Gentry] Fully Homomorphic Encryption Using Ideal Lattices, in Proceedings of the forty-first annual ACM symposium on Theory of computing (STOC '09), pp. 169-178. ACM, 2009. [Gentry] is incorporated herein by reference in its entirety. Broadly, in FHE, calculations may be performed on encrypted values, with results decrypted, to produce results that are the same as if the calculation had been performed on corresponding plaintext values. FHE provides for the application of an arithmetic circuit to a set of ciphertexts wherein the result is an encrypted value that would be the same as if it had been evaluated on the underlying plaintext. To be considered fully homomorphic, the encryption scheme allows for computations using arbitrary functions and is capable of evaluation of any circuit.
FHE has been suggested for use to encrypt secret key cryptography algorithms, notable AES. See, [GHS] Craig Gentry, Shai Halevi, Nigel P. Smart, Homomorphic Evaluation of the AES Circuit, CRYPTO 2012 (a version may be found in http://eprint.iacr.org/2012/099.pdf (accessed on Dec. 3, 2016). In this article, the use case is that a cloud service may compute {M}EK
Unfortunately, FHE is computationally very expensive and is rarely practical to use in real-world use cases. A middle-ground are so-called somewhat homomorphic encryption systems, which limit the homomorphic property to certain calculations beyond a single operation, e.g., evaluation of low-degree polynomials over ciphertext data.
Homomorphic encryption has been considered for use in white-box cryptography. See e.g., [Wyseur] White-Box Cryptography, Brecht Wyseur (COSIC) Ph.D. thesis, (2009), http://www.cosic.esat.kuleuven.be/publications/thesis-152.pdf (accessed on Aug. 29, 2016).
However, there are problems associated with use of homomorphic encryption in a white-box environment. In the white-box environment, the homomorphic decryption is performed by the same entity as the one that computes the homomorphic operations. This access to the algorithm places some vulnerability on the security of the mechanism.
Other problems associated with deployment of homomorphic encryption in white-box cryptography include, first, if the calculation is performed on encrypted data, the encryption result is also encrypted. There needs to be a mechanism for allowing the cryptography device to convert securely the result into a plaintext. Second, fundamental to any cryptographic calculation is knowledge that the entire calculation is performed. For example, for a block cipher such as AES, if all inputs to a cryptographic operation are encrypted, there is no mechanism available to verify that all rounds of the block cipher and all steps of those rounds have been performed.
From the foregoing it will be apparent that there is still a need for improving the security of devices that rely on white-box cryptography for performing cryptography operations.
In the following detailed description, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It is to be understood that the various embodiments of the invention, although different, are not necessarily mutually exclusive. For example, a particular feature, structure, or characteristic described herein in connection with one embodiment may be implemented within other embodiments without departing from the spirit and scope of the invention. In addition, it is to be understood that the location or arrangement of individual elements within each disclosed embodiment may be modified without departing from the spirit and scope of the invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims, appropriately interpreted, along with the full range of equivalents to which the claims are entitled. In the drawings, like numerals refer to the same or similar functionality throughout the several views.
In an embodiment of the invention, a cryptographic device, e.g., a mobile telephone, a tablet, or a personal computer executes a white-box cryptography mechanism using homomorphic, fully homomorphic, or somewhat fully homomorphic encryption to protect a secret entrusted to the cryptographic device, e.g., a secret key (K) used to encrypt and/or decrypt or to cryptographically sign, for example, using a block cipher such as the Advanced Encryption Standard (AES) algorithm or the RSA algorithm for signature (RSA is named after it's inventors, Rivest, Shapiro, and Adleman), from attacks intended to discern the protected secret.
While
In one embodiment, discussed in conjunction with
The ROM 204 and/or NVM 205 may include computer programs 301 as is illustrated in
In a preferred embodiment, the programs include a white-box cryptography mechanism 213. While depicted in
The cryptography mechanism 213 of the cryptography device 103, implements one or more cryptography functions (CF) 215, which may be an implementation of a block cipher such as AES, may be implemented as several computation blocks (BC) 217.
The ROM 204 or NVM 205 may also contain private data, such as a cryptography key 221, stored either in its basic form or as derived quantities. As noted hereinbelow, in a preferred embodiment, the white-box cryptography mechanism executes one or more cryptography functions (CF) 215, which requires a secret key to perform its operation. While in many white-box cryptography mechanisms the secret key is a shared secret key stored on the cryptography device 103, in a preferred embodiment, the secret key that would ordinarily be used to decrypt the message C is not stored on the cryptography device 103 in cleartext form; rather, it is received from a server in an encrypted form and undergoes a key-switch operation. The details of the mechanism by which a stored cryptography key 221 is used instead of the secret key in conjunction with the white-box cryptography mechanism 213 are described in greater detail below.
Thus, the cryptography device 103 may receive a document, a message, or an encrypted program as the encrypted message C 115 via the connector 211. The processor 201 may decrypt the document/message using the cryptography key 221 by executing instructions of the cryptography module 213 according to the mechanism described hereinbelow. Alternatively, the cryptographic module 213 may provide digital signature services, in which case the signs the message using the cryptography key 221.
A white-box cryptography mechanism 419 executing on the cryptography device 403 decrypts the message 415 using the secret key 417 stored on the cryptography device 403. In a prior art white-box cryptography mechanism 419, the cryptography algorithms may be implemented as a set of tables stored in memory with the secret key 417 hidden within these tables.
As is discussed hereinbelow, in a preferred embodiment white-box cryptography mechanism the secret key K is not stored in cleartext on the cryptography device 103. Rather, secret key K is provided in an encrypted form to the cryptography device 103.
The ElGamal cryptosystem, which is homomorphic over multiplication, is described in [Elgamal], incorporated herein in its entirety. Fully homomorphic encryption (FHE) was introduced by Craig Gentry in [Gentry], incorporated herein in its entirety. In the context of describing his solution for FHE, Gentry also describes somewhat homomorphic encryption (SHE). An FHE, by definition, is a mechanism in which an arbitrary arithmetic circuit may be applied to a ciphertext yielding the same result as if the arithmetic circuit had been applied to the corresponding plaintext. Consider a ciphertext (C) and corresponding plaintext (M), encrypted using FHE, such that:
C={M}key
and an arithmetic circuit AC (parameter), then
decrypt (KFHE, AC(C))=AC (M)
In other words, performing the arithmetic operations associated with the arithmetic circuit on the plaintext message results in the same result as if the arithmetic operations are performed on the corresponding ciphertext followed by a decryption of the result.
FHE schemes allow computations of arbitrary functions implemented as arithmetic circuits. According to a preferred embodiment, an FHE scheme is used to evaluate a cryptographic function in a white-box environment. In this scheme, illustrated in
The service provider 113 stores the secret key, K, 221 and the public key for fully homomorphic encryption, EKHE, 503. In one embodiment, the corresponding secret key, DKHE, 504, is stored on the device performing a decryption of a result from an homomorphic evaluation, described hereinbelow.
The service provider also stores or computes the message, C, 115, which may be a message encrypted using cryptographic function CF−1, e.g., using a block cipher, e.g., AES, using the secret key, K, 221. Thus, in one embodiment C is:
C={M}K=CF(K,M)
The service provider 113 performs a homomorphic encryption on both the secret key, K, 221, step 505, and the message, C, 115, step 507, thereby producing the quantities {K}EK
The quantities {K}EK
On the cryptography device 103, the cryptographic function CF is evaluated under homomorphic encryption, 513. The cryptographic function CF may be an inverse of the cryptographic function CF−1 performed by the service provider 113, for example, decryption. Evaluation under homomorphic encryption 513 entails conversion of the cryptographic function CF into an arithmetic circuit 515, which is installed on the cryptography device 103. As an arithmetic circuit compliant with the particular homomorphic encryption algorithm, computations performed on the data input thereto conform with the homomorphic encryption property described hereinabove. Thus, when the arithmetic circuit 515 uses the key {K}EK
A problem with the above-described use of homomorphic encryption in a white-box environment is that the desired output from the cryptography function, CF(K,C), is encrypted as {M}EK
M=decrypt(DKHE,{M}EK
Furthermore, not illustrated in
By performing the cryptographic operation under homomorphic encryption the key K is protected because the entire operation is performed on encrypted quantities {K}EK
In a first alternative embodiment, illustrated in
The mechanism illustrated in
More specifically, contrary to the embodiment of
{DKHE}EK′
which may be calculated 603 and stored on the service provider 113 or on another server.
As in
Rather than using the secret key, DKHE, to decrypt the {M}EK
{M}EK′
i.e., it is a value that is the same as if M had been encrypted using EK′HE and, consequently, it may be decrypted using the alternate homomorphic cryptography secret key, DK′HE 601, step 607. As noted above, the decryption step 607 may be performed by a separate decryption server 117 or directly on the cryptography device 103.
Because the decryption of the message, M, 115 is performed using the encrypted secret HE key, DK′HE 601, the secret key, K, is protected because to discern the secret key K an attacker would (1) have to realize that a key switch using bootstrapping is part of the algorithm, (2) must know how to perform such a key-switch operation, and (3) would have to first decrypt DKHE from {DKHE}EK′
In one embodiment, the decrypt( ) function is implemented to verify 609 the format of the input message. As noted above, in a preliminary step, the message, C, 115 and the key, DK′HE, 601 may be formatted into a secret format wherein the format and the padding used are kept secret. Correct execution of the evaluation of cryptography function CF under homomorphic encryption would preserve that format in the input to the decryption operation 607. The decrypt( ) function may be implemented to verify that its input conforms to the correct format for a message and refuse operation on any input that does not conform. Thus, the decrypt( ) function may not be used to decrypt the secret key, DKHE, from the {DKHE}SK′
One issue with the hereinabove-described method of evaluating a cryptography operation under homomorphic encryption is verification that all rounds and steps individual rounds of the block cipher have been executed correctly. An attacker may seek to discern information by inserting faults into a calculation, so-called, fault attack. Introduction of such faults may cause the block cipher to not compute all rounds or steps of individual rounds. Thus, it is desirable to detect whether all rounds and steps have been executed.
In a further embodiment, tracer verification, illustrated in
In a preferred embodiment, αij is a superincreasing sequence, i.e., a sequence in which a given element is assigned a value that is greater than the sum of all the elements that precede it, e.g., (0 1 2 4 8 16). If αij is made a superincreasing series, the sum ΣiΣjαij allows for the determination of whether any given step i,j has been executed.
A verification sum (A) is also pre-computed in step 701. The verification sum A is defined such that A=ΣiΣjaij.
The assigned-value array α and the corresponding verification sum A are transmitted from the server to the cryptography device 103, Step 703.
Steps 701 and 703 are as discussed above.
The array tij is initialized such that all its elements have the value 0, step 801.
The cryptographic function CF is executed under homomorphic encryption as in
After the entire block cipher has been executed, the sum of all values tij is computed, step 807, defining a quantity T, as follows:
If all rounds and all steps of all rounds have been executed the verification sum A, received from the server as a verification sum, should equal the sum T of the tracer values. Accordingly, A and T are compared, step 809. If they are equal, the evaluation of the cryptography function may be accepted, step 811. Otherwise, an error is flagged, step 813.
In preferred embodiments, discussed below as Tracer Method 1 and Tracer Method 2 in conjunction with
Generally speaking, the concept of the tracer is to mix the homomorphic cryptography function CF (element 515′) with the evolution of the tracer. At each step of each computation block of the cryptography function CF 515′, the tracer is modified using a homomorphic operation.
Consider that the cryptography function CF 515 consists of n blocks, e.g., rounds in a block cipher, which are indexed by an index i, and each block i consists of k, steps, which are indexed by an index j, then, a cryptography function CF′ 515′, which is a modification of the cryptography function CF 515 of
In the embodiment referred to herein as Method 1, illustrated in the flowchart of
eaij={aij}TracerKey
for i=1 to n and j=1 to kn and TracerKey is a public key (or a shared secret key) for the encryption.
Furthermore, in the preliminary step 701, the server 113 computes the sum, A, of the unencrypted tracer values, αij:
A=Σaij
The values eαij and A are provided to the cryptography device 103, step 703 (corresponding to step 901 of
Thus, in a preliminary step, the encrypted assigned-value array eα and the plaintext verification sum A, are generated and provided to the block cipher 515′ of the cryptography device 103, step 901, corresponding to the initial steps 701 and 703 of
Thus, after step 901, for Method 1, the cryptography device 113 has been provisioned with:
As noted above, the cryptographic device 103 is provisioned with the array eαij and the verification sum A, step 901 (corresponding the steps 701 and 703 of
The array etij is initialized such that all the elements thereof have the value 0, step 903.
The cryptography function CF is executed under homomorphic encryption as in
etij=eαij
After all steps of a computation block i have been computed, a tracer sum ETi is computed for that round, step 909:
After the entire cryptography function CF has been executed, i.e., at the conclusion of the n rounds of the cryptography function CF, the cryptographic device 113 computes a sum of all values for ETi, step 911, defining a new quantity ET, as follows:
If all rounds and all steps of all computation blocks have been executed A should equal T or, the corresponding encrypted values, EA should equal ET. Therefore, EA is computed from A so that EA can later be compared to ET, step 913:
EA={A}TracerKey
For EA and ET to be equal, the encryption must be homomorphic. As discussed in greater detail below, that may require that the key used to encrypt the value A be derived from the computation of the value ET and the key used to encrypt the elements αij. This derivation is described in greater detail below.
Next, EA and ET are compared, step 915.
If the EA and ET values are equal, the tracer computation has verified that all steps of all computation blocks of the cryptographic function have been performed correctly; the cryptographic result may be accepted, Step 917.
Otherwise, the EA and ET values not being equal is an indication of an error condition in the cryptographic function. In that case, an error is flagged, step 919.
In an alternative embodiment, referred to herein as Method 2, illustrated in
Thus, after step 1001 (corresponding to Steps 701 and 703), the cryptography device 113 has been provisioned with:
On the cryptography device 103, a tracer array tij is initialized by setting each value to 0, step 1003, where i ranges over the number of computation blocks and for each value i, j ranges over the steps that make up the computation block i.
The cryptography function is executed under homomorphic encryption, step 1005.
Step 1007, for each computation block i, at each step j for computation block i, the cryptography device 103 assigns:
tij=aij
Step 1009, at the conclusion of each computation block i, the cryptography device 103 computes a tracer sum for the computation block i:
and, step 1011, performs the homomorphic encryption operation on the tracer sum Ti:
ETi={Ti}TracerKey
In a subsequent step (step 1013), ETi is used to produce a sum of the tracer sums for all the computation blocks i, ET, which is compared to the value EA provisioned by the server in step 1001. To make that comparison possible, the homomorphic property must hold. That may require that the TracerKey used to compute ET, be derived from the keys used to compute the encryption of each αij value. This is discussed in greater detail below.
After computation of n computation block, n FHE ciphertexts ET1, . . . , ETn have been computed. The sum of these is computed, step 1013:
The value ET is tested against the supplied value against the provisioned value EA, step 1015.
If the values ET and EA are equal, that verifies correct computation of all steps of the cryptographic operation and the result is accepted, step 1017. Conversely, if they are not equal, a condition of improper calculation, for example, due to tampering or some form of side-channel attack, is indicated and an error condition is flagged, step 1019.
The tracer calculations of
Above, the tracer methods of
The encryption may be a fully homomorphic encryption or a partially homomorphic encryption. An example of the former is FHE scheme according to DGHV (M. van Dijk, C. Gentry, S. Halevi, and V. Vaikuntanathan, Fully homomorphic encryption over the integers, Advances in cryptology—EUROCRYPT 2010, Lecture Notes in Comput. Sci., vol. 6110, Springer, Berlin, 2010, pp. 24-43., hereinafter “DGHV”). An example of the latter is ElGamal.
In DGHV, the same key is used to encrypt and to decrypt, i.e., EKTracer=DKTracer, denoted here as PTracer. For the encryption, two random values, r′ and q, and the encryption of a value x (having k bits), denoted as ex, is computed as:
ex={x}P
As these are FHE ciphertexts, if two ciphertext values, ex1 and ex2, are added, the following holds:
ex1=PTracerq1+2k(r′1)+x1
ex2=PTracerq2+2k(r′2)+x2
ex1+ex2=PTracer(q1+q2)+2k(r′1+r′2)+(x1+x2)
thus, the r associated with the sum ex1+ex2 is:
r=(q1+q2,r′1+r′2)=ƒ(r1,r2)
Similarly, if two ciphertext values, ex1 and ex2, are multiplied, the product is:
ex1*ex2=PTracer2*q1q2+PTracer*(2k(q1r′2+q2r′1)+q1x2+q2x1)+2k(2kr′1r′2+r′1x2+r′2x1)+x1x2
with the associated r value
r=(q1q2p+2k(q1r′2+q2r′1)+q1x2+q2x1,2kr′ir′2+r′1x2+r′2x1)=ƒ(r1,r2,x1x2)
i.e., r is a function depending on the random values used and the messages being encrypted.
From which it follows that
encrypt((PTracer,r),x1*x2)=ex1*ex2
In a second example, the ElGamal homomorphic encryption mechanism is used.
In ElGamal, the secret key, DKTracer, and corresponding public key, EKTracer, are not the same. However, they depend on each other through a random value r, as follows:
PKTracer=gDK
An encryption of a value x:
ex={x}EK
Elgamal is homomorphic over multiplication, as follows:
y1*y2=ex1*ex2=(gr
In other words, the product y1*y2=ex1*ex2 is an ElGamal encryption of the product x1*x2 with a value r=r1+r2=ƒ(r1+r2).
From which it follows that:
encrypt((EKTracer,r),x1*x2)=ex1*ex2
Note, the homomorphic encryption operation requires the random value ri, which must be generated in a deterministic way such that r, is related to rij and possibly to αij, depending on the homomorphic algorithm used.
If the encryption is DGHV, each value eαij has been encrypted as:
Thus, since ET is a sum of all the etij values, the value r, designated R, corresponding to ET is a function of all the r values corresponding the etij. Specifically, R corresponding to ET:
And, EA is:
EA={A}P
In the general case, ElGamal is not homomorphic over addition. However, ElGamal is homomorphic over multiplication. Thus, for an embodiment where ElGamal is used as the cryptography system for the tracer, tracer values are multiplied rather than added to produce the check values.
The value R can be precomputed and stored on the cryptography device 103. To enhance the security of the mechanism, R may be stored in an obfuscated manner. For example, R may be decomposed into R′ and R″ such that R=R′ XOR R″. The values R′ and R″ are stored in lieu of R and whenever R is required in a computation it is obtained by R=R′ XOR R″.
In both the DGHV and ElGamal cryptosystems, the ciphertext function includes random numbers. The encrypted tracer methods described hereinabove may be viewed as sequential encryption where each sequence member corresponds to a particular computation block (indexed i) and a computation step (indexed j) of such a computation block. Each such encryption has its own unique random number associated therewith, i.e., a sequence of random numbers. However, so that the encryption on the server and on the cryptography device correspond to one another, the random number sequence must correspond. Accordingly, a deterministic random sequence produced by a deterministic random generator is used on both the server and on the cryptography device.
In a first step, a first deterministic pseudo-random sequence r′=r′1, . . . , r′n) is determined using a seed S′, step 1101, for example, using a Deterministic Random Number Generator, DRNG. One mechanism for securely establishing a first deterministic pseudo-random sequence, which may be used here, is described in the patent application Cryptography Device Having Secure Provision of Random Number Sequences of the same inventors incorporated herein by reference.
As discussed above, a cryptographic function contains a number of computation blocks m, e.g., rounds of a block cipher, and each computation block contains a number of steps, k1, where i is the index for a particular computation block. Thus, the total number of computation steps is:
Therefore, a deterministic random sequence r′ is determined for K elements.
As discussed above, an encrypted tracer array etij, which is an encryption of an assigned value αij where the encryption uses a corresponding random value rij. While these may be indexed using a two-dimensional index (computation block i, step j), they may also be viewed as vectors having K elements and indexed using just one index in such a vector.
Accordingly, corresponding to K (K=Σinki) computation steps, initialize, step 1103, a vector eti (i.e., (et1, . . . , eta)), such that
eti=encrypt((EKTracer,r′i),0k
Thus, the array eti is initialized with random numbers.
Further, αa is initialized as set forth in conjunction with
A second random sequence ri=(r1, . . . , rn) is determined using a seed Rseed, step 1105; the random sequence r, may be generated using the secure random sequence generator of the patent application “Cryptography Device Having Secure Provision of Random Number Sequences” of the same inventors.
The cryptography function CF is executed under homomorphic encryption step 513″, i.e., the cryptographic function has been modified into an arithmetic circuit, which may be executed using homomorphically encrypted values and satisfying the homomorphic property. For each computation block i, for each step j of computation block i, etij is set as follows, step 1107:
etij=encrypt((EKTracer,rij),aij)
where, rij is a random value in the random sequence ri. Alternatively, the random value for the encryption may be a function of rij and the corresponding value αij, i.e., r=ƒ(rij,aij), in which case:
etij=encrypt((EKTracer,r),aij)
where,
r=ƒ(rij,aij)
The encrypt function may be either based on a fully homomorphic scheme, e.g., DGHV, or a somewhat homomorphic scheme, e.g., El Gamal, which is homomorphic over multiplication.
After all steps of a computation block i have been executed, a sum of all the etij values for that computation block are summed and recorded as eTi, step 1109:
After the cryptography function evaluation of 513″, the eTi values are summed and recorded as eT, step 1111:
eT (the sum of the encrypted tracer values for all computation blocks and steps) is compared to a sum of encryptions of the values that are normally assigned to the tracer, namely, αij. These are also encrypted using EKTracer+rij thereby having the same value as the corresponding tracer value, step 1113:
Optionally, a second verification value, eA′, may also be computed directly from the αij values, step 1115. First a value R (referred to herein as the summation random value), which is used to encrypt the sum of αij values, is computed as a function of the sequence ri=(r1, . . . , rn):
R=ƒ(r1, . . . ,rn)
The function ƒ for determining the value of R depends on the relationship of the operations performed and the encryption scheme used. The encrypt function may be either based on a fully homomorphic scheme, e.g., DGHV, or a somewhat homomorphic scheme, e.g., El Gamal, which is homomorphic over multiplication. For example, as noted above, for DHGV, the sum ex of two ciphertexts ex1 and ex2, which are encrypted using keys (q1,r′1) and (q2,r′2), respectively, is encrypted with the key (q1+q2,r′1+r′2). Thus, in the simple case, if eA is merely the sum of two values αi1 and αi2, the value R would be r′i1+r′i2. Generally, R is the sum of all rij values corresponding to the values αij added to form eA.
Because, if the computation has performed all steps, the second verification value, eA′, is supposed to correspond to eT, which was computed in step 1107 and 1109 as a sum of the encrypted αij values, the function R=ƒ(r1, . . . , rn) follows the same steps such that:
encrypt((EKTracer,R),A)=Σencrypt((EKTracer,ri),aij)
A quantity A representing the sum of all αij values is computed:
This value is encrypted using (EKTracer,R) to produce the value eA′:
eA′=encrypt((EKTracer,R),A)
Correct execution of the cryptography function CF should have eT, eA, and eA′ equal. These equalities are verified, step 1117. If the verification holds, the block cipher evaluation result is accepted, step 1119, otherwise, and an error condition may be raised, step 1121.
There are several possible alternative embodiments, for each of the mechanisms described above. For example, the mechanisms described herein may be performed entirely under FHE. However, FHE tends to be very computationally expensive. Therefore, as described below, for example, some calculations may be performed under a less stringent homomorphic requirement, i.e., a somewhat homomorphic encryption.
In a first alternative, Option 1, the public key for the encryption of the tracer, EKTracer, is the same as the public key for the HE, EKFHE, under which the block cipher is evaluated:
EKTracer=EKFHE
An advantage of this approach is that with the use of the same key for both tracer computation and cryptography function evaluation, it is difficult for an attacker to discern which calculation is being performed by the cryptography device 103. However, encryption with FHE tends to be very complex and there is no need for FHE for the tracer computation as only additive homomorphic properties are relied on.
A second alternative, Option 2, a specific key is used to encrypt the tracer, i.e.,
EKTracer≠EKFHE
An advantage is that the secret key, DKTracer, corresponding to the public key, EKrand, may be provided in some context, e.g., to the decryption server 117, to allow for determination specific block cipher steps with errors in the tracer.
Option 2 has three alternatives:
Option 2.1: the encryption scheme is FHE
An advantage of having the encryption scheme as FHE is that it makes it more difficult for an attacker to distinguish between whether tracer computation is being performed or whether cryptography function evaluation is being performed.
However, as noted above, FHE computations are very complex and computationally costly, and FHE is unnecessary for the underlying computation.
Option 2.2: the encryption scheme is HE (homomorphic encryption) over one operation. An example is ElGamal encryption, which is homomorphic over multiplication.
An advantage is that HE is much more computationally efficient than FHE. However, use of HE for tracer encryption renders the calculations easier to distinguish by an attacker.
Option 2.3: use a function F that is not homomorphic rather than actual encryption, e.g., simply masking the random with the tracer. An advantage of this approach is that it is yet more efficient. However, not using homomorphic encryption will not allow for the three-way comparison of values in
As with the method of
The value EA is computed as a sum of the αij values encrypted using the random sequence ri, step 1204:
On the cryptography device 103, a tracer array tij having n members is initialized by setting each member of the array t to 0, step 1205, where i ranges over the number of computation blocks and for each value i, j ranges over the steps that make up the computation block i. For the initialization, it is sufficient to simply sequentially initialize n elements of the array t.
The cryptography function CF 515 is executed under homomorphic cryptography, i.e., the block cipher has been modified into an arithmetic circuit, which may be executed using FHE encrypted values and satisfying being fully homomorphic, step 513′″. For each computation block i, for each step j of computation block i, tij is set to αij, step 1207.
For each computation block, the tij values for that computation block are summed to produce a value Ti, step 1209.
For each computation block i, a value ESi, which is an encryption of the sum Si, is computed, step 1211. However, a component of the encryption key is a value ri, which is a function of the encryption keys used to encrypt the various αij values for corresponding to computation block i. Thus, first the value ri, to be used in the encryption of Ti, corresponding to the rij values used for encrypting the αij values for each block i in step 1204 is computed, step 1210:
ri=ƒ(ri1, . . . ,rik)
where k is the number of steps for computation block i. As discussed hereinabove in conjunction with
For each computation block i, a value ESi is computed as an encryption of the value Si using the value ri, step 1211:
ETi={Ti}EK
At the conclusion of the execution of the computation function CF under FHE 513′″, the sum of the encrypted sums ETi is computed, step 1213, producing a value ET:
If ET equals the value EA provided in step 1204, the tracer computation has been verified. Accordingly, ET and EA are compared, step 1215. If the tracer computation has been confirmed, the result of the computation is accepted, step 1217. Otherwise, an error is flagged, step 1219.
In an alternative use, illustrated in
The message m is formatted to a specified format, e.g., hashed and padded, step 1305. The resulting quantity is a formatted message M.
The formatted message M is combined with an homomorphic ciphertext thereby providing a digital signature of the message, Step 1307. The homomorphic ciphertext portion is produced using the encrypted signing key, {Ksign}EK
As with the cryptography examples described hereinabove, a key change operation may be performed, Step 1311, producing a quantity {S}EK
Decryption, to arrive at the signed message, proceeds as described hereinabove, thereby producing a signed output message M 1317, which, due to the homomorphic property, is the same value as m signed by Ksign. However, by performing the calculation under homomorphic encryption, the key Ksign is not used in plaintext. The tracer mechanisms described hereinabove may be employed to secure the calculation.
From the foregoing, the improvement of the security of a cryptography device operating in a white-box environment and storing secret material, for example, the secret key, K, is apparent. This improvement to cryptography devices is provided by enabling the cryptography devices to use fully homomorphic encryption to perform cryptographic calculations, such as block ciphers, in a manner that does not use the key of the block cipher in a plaintext format. Further, the calculations, while hidden using homomorphic encryption, may be verified using a tracer, which also may be encrypted.
Although specific embodiments of the invention have been described and illustrated, the invention is not to be limited to the specific forms or arrangements of parts so described and illustrated. The invention is limited only by the claims.
Number | Date | Country | Kind |
---|---|---|---|
17306686 | Dec 2017 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2018/083115 | 11/30/2018 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2019/106139 | 6/6/2019 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20200074548 | Aidoo | Mar 2020 | A1 |
20200358611 | Hoang | Nov 2020 | A1 |
Number | Date | Country |
---|---|---|
WO2011120125 | Oct 2011 | WO |
WO2013116916 | Aug 2013 | WO |
WO2019106166 | Jun 2019 | WO |
Entry |
---|
PCT/EP2018/083115, International Search Report, dated Jan. 9, 2019, European Patent Office, P.B. 5818 Patentlaan 2 NL—2280 HV Rijswijk. |
PCT/EP2018/083115, Written Opinion of the International Searching Authority, dated Jan. 9, 2019, European Patent Office, D-80298 Munich, Germany. |
Chillotti Ilaria et al: “Faster Packed Homomorphic Operations and Efficient Circuit Bootstrapping for TFHE”, (Nov. 30, 2017), Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015 : 18th International Conference, Munich, Germany, Oct. 5-9, 2015; Proceedings; [Lecture Notes in Computer Science; Lect. Notes Computer], Springer International Publishing, CH, XP047455824, ISSN: 0302-9743, ISBN: 978-3-642-38287-1 [retrieved on Nov. 30, 2017] the whole document. |
Emmanuela Orsini et al: “Bootstrapping BGV Ciphertexts With a Wider Choice of p and q”, International Association for Cryptologic Research, vol. 20140930:085538, (Sep. 3, 2014), pp. 1-20, XP06107014, the whole document. |
Stanley Chow et al: “White-Box Cryptography an an AES Implementation”, Selected Areas in Cryptography: 9th Annual International Workshop, SAC 2002, (Aug. 15, 2002), XP002769828, cited in the application the whole document. |
Chow S et al: “A White-Box DES Implementation for DRM Applications”, Internet Citation, 2002, XP002476832, Retrieved from the Internet: URL:http://crypto.stanford.edu/DRM2002/whitebox.pdf [retrieved on Apr. 16, 2008] cited in the application the whole document. |
PCT/EP2018/083184, International Search Report, dated Jan. 30, 2019, European Patent Office, P.B. 5818 Patentlaan 2 NL—2280 HV Rijswijk. |
PCT/EP2018/083184, Written Opinion of the International Searching Authority, dated Jan. 30, 2019, European Patent Office, D-80298 Munich, Germany. |
Berbain Come et al: “QUAD: A Practical Stream Cipher with Provable Security”, (May 28, 2006), Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015 : 18th International Conference, Munich, Germany, Oct. 5-9, 2015; Proceedings; [Lecture Notes in Computer Science; Lect.Notes Computer], Springer International Publishing, CH, XP047422747, ISSN: 0302-9743 ISBN: 978-3-319-69952-3 section 3. |
Number | Date | Country | |
---|---|---|---|
20210194666 A1 | Jun 2021 | US |