The present invention relates to the field of cryptography.
In the field of cryptography, there is a large use of symmetric algorithms, such as the algorithm known as AES (Advanced Encryption Standard—see Federal Information Processing Standards Publication 197 issued by the U.S. National Institute of Standards and Technology at http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf). A symmetric encryption/decryption uses a key to encrypt a message (sometimes referred to as “plaintext”) and uses the same key to decrypt the encrypted message (sometimes referred to as “ciphertext”). A symmetric encryption/decryption algorithm, such as AES, takes a set of two inputs of given and fixed sizes: key and message. However, in practice it is necessary to be able to encrypt larger elements than the fixed size for the message, and various modes of encryption have been designed to allow for encryption/decryption of large messages such as a stream of content (e.g., a movie or song, etc.). There are several known modes of encryption/decryption, including the ECB mode and the CBC mode and counter (CTR) mode. The present description primarily relates to the counter mode of operation.
The various embodiments described herein can provide improved protection and security for keys used in a counter mode of operation, particularly for AES encryption in a counter mode of operation. In one embodiment, at least a portion of the key used in the AES encryption algorithm is hidden by precomputing internal states within the AES algorithm; the internal states that are precomputed can be limited to those internal states that are calculated by using the key to derive the internal state. Once these internal states are calculated for a given key and nonce, these internal states can be saved for later use and at least a portion of the key is not needed for later encryption or decryption operations. Thus, those portions of the key can be kept secret and not exposed during the later encryption or decryption operation. The precomputed internal states can be saved and then used to calculate external output states in the later encryption or decryption operations; the external output states are those values outputted from, for example, the AES encryption algorithm that are XORed with either a plaintext block (in the case of encryption) or a ciphertext block (in the case of decryption). An external output state is an output from a block cipher algorithm that uses various internal states to derive the output. The precomputed internal states can be used to calculate external output states for a key stream that can be used to encrypt plaintext or decrypt cipher text. The precomputed internal states can be precomputed for an unknown length of plaintext or ciphertext that, in one embodiment, is less than a predetermined maximum length. The unknown length can be, in one embodiment, arbitrary as long as it is less than or equal to the predetermined maximum length. For example, it can be assumed, in one embodiment, that the plaintext or ciphertext is not larger than 32 GB (Gigabytes) in length.
The precomputed internal states can be stored at a server and then used at the server (or used at another server) to encrypt the plaintext (e.g. a movie or song or book or other content) to create ciphertext and then the ciphertext can be transmitted to a client that can decrypt the ciphertext using the precomputed internal states (without having to use at least a portion of the key to decrypt the ciphertext). The client can receive a transmission of the precomputed internal states with the transmission of the ciphertext or at a different time or through a different channel.
A method, according to one embodiment described herein can include: precomputing a set of internal states, within a symmetric key block cipher algorithm in counter mode, using a key and a set of one or more nonces; and storing the precomputed set of internal states for use in a later encryption or decryption operation, the later encryption or decryption operating being performed without using or exposing at least a portion of the key and in one embodiment, can be performed without using or exposing any portion of the key. In one embodiment, the later encryption or decryption operation is performed without using or exposing any part of the key. The set of internal states that are precomputed can be those internal states that use the key as an input to an operation, in the symmetric key block cipher algorithm, that produces those internal states, while other internal states can be left for computation during the later encryption or decryption operations. The set of one or more nonces is, in one embodiment, limited to a predetermined value such that the number of nonces in the later encryption or decryption operation is limited (cannot exceed) to the predetermined value that is related to a maximum plaintext length having a maximum number of blocks. In one embodiment, the symmetric key block cipher algorithm can be the Advanced Encryption Standard (AES), and the storing of the precomputed set of internal states does not store any external output state for any nonce in the set of one or more nonces. The later encryption or decryption operation, in one embodiment, computes the external state for a particular nonce and then (1) encrypts a plaintext block by XORing (performing an exclusive OR logic operation) the plaintext block with the external state for the particular nonce, or (2) decrypts a ciphertext block by XORing the ciphertext block with the external state for the particular nonce. The later encryption or decryption operation can compute the external state for a particular nonce without using any part of the key in one embodiment or without using a portion of the key in another embodiment. In one embodiment, the set of nonces includes an initial nonce (also referred to as a seed), and a plurality of updated nonces are derived from the initial nonce and from a plurality of counter values; in one embodiment, the plurality of counter values are restricted to a predetermined number of least significant bytes (LSB) of the plurality of updated nonces. The restriction to the predetermined number is done, in one embodiment, in order to allow for the precomputation of internal states. In one embodiment, the plurality of updated nonces are computed in the later encryption or decryption operation from the precomputed set of internal states, and the later encryption or decryption operation does not need to compute an updated nonce or seed from an initial nonce.
A method, according to one embodiment performed at a client system, can include the operations of: receiving a precomputed set of internal states, within a symmetric key block cipher algorithm in counter mode, and storing the precomputed set of internal states for use in a decryption operation that is performed without using or exposing at least a portion of a key. The precomputed set of internal states were precomputed using the key and a plurality of nonces; in one embodiment, the number of nonces in the plurality of nonces is limited to a predetermined number in order to allow for the precomputation of the internal states. The client system can compute the external state for a particular nonce by using the internal states to derive the external state and can then decrypt the ciphertext block.
The various methods described herein can be performed in one or more data processing systems that include or use one or more machine readable non-transitory storage media that store executable computer program instructions which, when executed by the one or more data processing systems, cause the one or more systems to perform any one of the methods described herein.
The above summary does not include an exhaustive list of all embodiments in this disclosure. All systems and methods can be practiced from all suitable combinations of the various aspects and embodiments summarized above, and also those disclosed in the Detailed Description below.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
Various embodiments and aspects will be described with reference to details discussed below, and the accompanying drawings will illustrate the various embodiments. The following description and drawings are illustrative and are not to be construed as limiting. Numerous specific details are described to provide a thorough understanding of various embodiments. However, in certain instances, well-known or conventional details are not described in order to provide a concise discussion of embodiments.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in conjunction with the embodiment can be included in at least one embodiment. The appearances of the phrase “in one embodiment” in various places in the specification do not necessarily all refer to the same embodiment. The processes depicted in the figures that follow are performed by processing logic that comprises hardware (e.g. circuitry, dedicated logic, etc.), software, or a combination of both. Although the processes are described below in terms of some sequential operations, it should be appreciated that some of the operations described may be performed in a different order. Moreover, some operations may be performed in parallel rather than sequentially.
At least some of the various embodiments described herein can provide improved protection and security for keys used in a counter mode of encryption/decryption operations, such as encryption operations using AES encryption in a counter mode of operation. In one embodiment, at least a portion of a key used in an encryption and/or decryption algorithm, such as the AES algorithm, is hidden by precomputing internal states within the algorithm. Once these internal states are calculated for a given key and nonce, these internal states can be saved for later use to encrypt or decrypt content and at least a portion of the key can be hidden (not exposed and not used) in the later use.
Once the precomputed internal AES states are stored for later use, they can be used to generate external AES states for encryption or decryption using the AES algorithm in a counter mode.
Exemplary Implementation
The following sections provide two specific exemplary implementations that are shown in a pseudocode format. A conventional, prior art AES (in counter mode) implementation is also provided in the following sections for the purposes of comparison relative to the two implementations. These specific exemplary implementations are also described in U.S. provisional patent application No. 61/770,927, filed on Feb. 28, 2013, which application is incorporated herein by reference. The first exemplary implementation is described in sections IV and V of Appendix A of that U.S. provisional patent application, and that implementation uses the AES algorithm in counter mode and hides a portion of the key while another portion is exposed and used in the encryption and decryption processes. The second exemplary implementation is described in section VI of Appendix A of that U.S. provisional patent application, and the second exemplary implementation uses the AES algorithm in counter mode and hides all of the key (so none of the key is exposed or used in the encryption and decryption processes, such as the processes shown in
The following section provides an implementation for a conventional AES algorithm in counter mode; as with the two exemplary implementations, “in” is the nonce, “out” is the external state outputted from the algorithm and “key” is the AES key. This implementation of the conventional AES algorithm uses three (3) functions: “AES_ENC (In, Out, key)”; and “IncrementSeed(Seed)”; and “AES_CTR_MODE(key,Seed,Input,Output,Len)”. For example, in the listing below, “def AES_ENC (In, Out, Key):” defines an AES encryption function and the function includes known operators (such as “<<”, etc.) and expressions in the Python language. The listings below are written in the Python language. The notation “\” is meant to indicate a new line; in other words (for example), the expression
is equivalent to the expression “a=b+c”. No precomputation of internal states of the AES algorithm is performed in this conventional approach shown in this listing.
First Exemplary Implementation
This section provides an example of an implementation in which a portion of the AES key is hidden during encryption and decryption. This implementation uses four (4) functions: “AES_PRECOMPUTSATION_SECTIONV(In, NextState32B, key)”; and “AES_ENC_PRECOMPSUTATION_SECTIONV(In, NextState32B, Out, Key)”; and “IncrementSeed(Seed)”; and “AES_CTR_MODE_PRECOMPUTSATION_SECTIONV(Key, Seed, NextState32B, Input, Output, Len)”. The function “AES_PRECOMPUTSATION_SECTIONV(In, NextState32B, Key)” precomputes an internal state referred to as NextState32B; the values of NextState32B for a key being all 0 and a seed (nonce) being all 0 are:
[1650697670, 1655031395, 2764464995, 3345179557]
This exemplary implementation is provided and shown in the following pseudocode.
Second Exemplary Implementation
This section provides an example of an implementation in which a table of differences (“DB_0” through “DB_15”) is used and in which all of the AES key is hidden during encryption and decryption. This implementation uses four (4) functions:
The function “AES_PRECOMPUTSATION_SECTION_VI” precomputes the table of differences (DB_0, . . . , DB_15) and the function “AES_ENC_PRECOMPUTSATION_SECTION_VI” uses the precomputed table of differences to perform encryption/decryption. The values of the table of differences for a key being all 0's and a seed being all 0's is:
The following test code can be used to compare the outputs from the two exemplary implementations to the conventional AES (in counter mode) implementation to verify that they produce the same ultimate result.
Exemplary Data Processing Systems
The various embodiments described herein can be implemented in a variety of data processing systems which can be distributed across and connected to one or more networks. In one embodiment, one or more server systems can encrypt the content and precompute the internal states for later use by one or more client systems which can retrieve the encrypted content and the precomputed internal states. The one or more client systems can then decrypt the encrypted content using the precomputed internal states, and the decryption process will use and expose, at most, only a portion of the key.
As shown in
The mass storage 811 is typically a magnetic hard drive or a magnetic optical drive or an optical drive or a DVD RAM or a flash memory or other types of memory system which maintain data (e.g., large amounts of data) even after power is removed from the system. Typically the mass storage 811 will also be a random access memory although this is not required. While
In the foregoing specification, specific exemplary embodiments have been described. It will be evident that various modifications may be made to those embodiments without departing from the broader spirit and scope set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.
This application is a continuation of co-pending U.S. application Ser. No. 14/015,523 filed on Aug. 30, 2013, now issued as U.S. Pat. No. 9,264,222, which claims the benefit of U.S. provisional patent application No. 61/770,927, filed on Feb. 28, 2013, which application is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5201000 | Matyas et al. | Apr 1993 | A |
6628786 | Dole | Sep 2003 | B1 |
7177424 | Futuya et al. | Feb 2007 | B1 |
7305084 | Hawkes | Dec 2007 | B2 |
7694133 | Sibert | Apr 2010 | B2 |
7739741 | Saffre | Jun 2010 | B2 |
7870380 | VanHeyningen et al. | Jan 2011 | B2 |
8600049 | Gueron et al. | Dec 2013 | B2 |
8605897 | Golic | Dec 2013 | B2 |
8639947 | Elovici et al. | Jan 2014 | B2 |
8862900 | Chen | Oct 2014 | B2 |
20020012432 | England | Jan 2002 | A1 |
20020071552 | Rogaway | Jun 2002 | A1 |
20020085710 | Ananth | Jul 2002 | A1 |
20020120838 | Abdulkader | Aug 2002 | A1 |
20020176572 | Ananth | Nov 2002 | A1 |
20030081769 | Hamilton | May 2003 | A1 |
20040019785 | Hawkes et al. | Jan 2004 | A1 |
20040042620 | Andrews et al. | Mar 2004 | A1 |
20040083362 | Park | Apr 2004 | A1 |
20040187001 | Bousis | Sep 2004 | A1 |
20060050875 | Gammel et al. | Mar 2006 | A1 |
20060126835 | Kim | Jun 2006 | A1 |
20060285684 | Rogaway | Dec 2006 | A1 |
20070263861 | Kiyomoto et al. | Nov 2007 | A1 |
20080281789 | Kao et al. | Nov 2008 | A1 |
20090103722 | Anderson | Apr 2009 | A1 |
20090172394 | Johnston et al. | Jul 2009 | A1 |
20100027781 | Galbi et al. | Feb 2010 | A1 |
20100027783 | Yup | Feb 2010 | A1 |
20100058070 | Garay et al. | Mar 2010 | A1 |
20100098244 | Ciet et al. | Apr 2010 | A1 |
20100268960 | Moffat et al. | Oct 2010 | A1 |
20110055558 | Liu et al. | Mar 2011 | A1 |
20110096923 | Rollgen | Apr 2011 | A1 |
20110255689 | Bolotov et al. | Oct 2011 | A1 |
20120002807 | Michiels et al. | Jan 2012 | A1 |
20120087490 | Ollikainen et al. | Apr 2012 | A1 |
20120128153 | Golic | May 2012 | A1 |
20120141093 | Yamaguchi et al. | Jun 2012 | A1 |
20120170740 | Lee | Jul 2012 | A1 |
20130275758 | Marlow | Oct 2013 | A1 |
20140019502 | Goettfert | Jan 2014 | A1 |
20140133656 | Wurster et al. | May 2014 | A1 |
20140219443 | Brainis | Aug 2014 | A1 |
Number | Date | Country |
---|---|---|
2458774 | May 2012 | EP |
Entry |
---|
Paul, “Cryptanalysis of Stream Ciphers Based on Arrays and Modular Addition”, Katholieke Universiteit Leuven, Nov. 2006, 149 pages. |
Eastlake, “Randomness Recommendations for Security”, RFC 1750, Dec. 1994, 30 pages. |
Billet, “Cryptanalysis of a White Box AES Implementation”, SAC 2004, LNCS 3357, Springer-Verlag, 2005 pp. 227-240. |
Michiels, “Cryptanalysis of White-Box Implementations”, Phillips Research Laboratories, International Association for Cryptologic Research, 2008, 14 pages. |
Chow, “White-Box Cryptography and an AES Implementation”, Proceeding SAC '02 Revised Papers from the 9th Annual International Workshop on Selected Areas in Cryptography, 2003, pp. 250-270. |
Shamir, “Playing hide and seek with stored keys”, Proceeding FC '99 Proceedings of the Third International Conference on Financial Cryptography, Sep. 22, 1998, pp. 118-124. |
Zola, “Parallel Speculative Encryption of Multiple AES Contexts on GPUs”, IEEE, 2012, 9 pages. |
Rogaway, “OCB: A Block-Cipher Mode of Operation for Efficient Authenticated Encryption”, CCS'01, Nov. 5-8, 2001, pp. 196-205. |
Wu, “Cryptanalysis and Design of Stream Ciphers”, Katholieke Universiteit Leuven, Jul. 2008, 151 pages. |
Announcing the Advanced Encryption Standard (AES), Federal Information Processing Standards Publication 197, Nov. 26, 2001. |
Using Advanced Encryption Standard (AES) Counter Mode with IPsec Encapsulating Security Payload (ESP), R. Housley, Vigil Security, Jan. 2004. |
“Block cipher modes of operation”, downloaded from Wikipedia Feb. 22, 2013, http://en.wikipedia.org/wiki/Block—cipher—modes—of—operation. |
“Cryptographic nonce”, downloaded from Wikipedia on Dec. 19, 2012, http://en.wikipedia.org/wiki/Cryptographic—nonce. |
AES Counter Mode details (Intel AES-NI implementation), submitted by Nicolae Popovic on Nov. 11, 2011, http://software.intel.com/en-us/blogs/2011/11/11/aes-counter-mode-details-intel-aes-ni-implementation. |
“Advanced Encryption Standard”, downloaded from Wikipedia Feb. 22, 2013, http://en.wikipedia.org/wiki/Advanced—Encryption—Standard. |
Patrick P. Tsang, Sean W. Smith, “Secure Cryptographic Precomputation with Insecure Memory”, 2007. |
Weidong Shi et al., High Efficiency Counter Mode Security Architecture via Prediction and Precomputation, Proceedings of the 32nd International Symposium on Computer Architecture (ISCA '05), IEEE 2005. |
Morris Dworkin, “Computer Security”, “Recommendation for Block Cipher Modes of Operation, Methods and Techniques”, NIST Special Publication 800-38A, Dec. 2001. |
Elaine Barker et al., “Computer Security—Recommendation for Cryptographic Key Generation, NIST Special Publication 800-133”, Nov. 2012. |
Number | Date | Country | |
---|---|---|---|
20160211972 A1 | Jul 2016 | US |
Number | Date | Country | |
---|---|---|---|
61770927 | Feb 2013 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14015523 | Aug 2013 | US |
Child | 15000223 | US |