Method and apparatus for hardware-accelerated encryption/decryption

An integrated circuit for data encryption/decryption and secure key management is disclosed. The integrated circuit may be used in conjunction with other integrated circuits, processors, and software to construct a wide variety of secure data processing, storage, and communication systems. A preferred embodiment of the integrated circuit includes a symmetric block cipher that may be scaled to strike a favorable balance among processing throughput and power consumption. The modular architecture also supports multiple encryption modes and key management functions such as one-way cryptographic hash and random number generator functions that leverage the scalable symmetric block cipher. The integrated circuit may also include a key management processor that can be programmed to support a wide variety of asymmetric key cryptography functions for secure key exchange with remote key storage devices and enterprise key management servers. Internal data and key buffers enable the device to re-key encrypted data without exposing data. The key management functions allow the device to function as a cryptographic domain bridge in a federated security architecture.

FIELD OF THE INVENTION

The present invention relates generally to the field of data encryption/decryption, and more specifically to the field of hardware-accelerated data encryption/decryption.

BACKGROUND AND SUMMARY OF THE INVENTION

Data security is imperative for a broad spectrum of applications, particularly in the commercial and government sectors. Cryptography is one of the most trusted and widely used approaches for securing data in transit and data at rest. By obfuscating the data through a reversible transformation, encryption provides a way to ensure the confidentiality of data when the security of communication links or data storage devices cannot be guaranteed. For example, the Internet Protocol Security (IPsec) protocol encrypts IP packets, allowing confidential data to be transmitted over public IP networks.

Commercial and government organizations typically store their data using various types of Redundant Array of Independent Disks (RAID) configurations in order to maximize data availability. By partitioning data fields into small data units and striping the data blocks across parallel disk drives, RAIDs allow data to be stored and accessed faster than if it were stored on a single drive. RAIDs also provide various levels of error correction that guard against the failure of an individual drive in the array. When a drive fails, most systems allow an operator to replace the drive without interrupting the operation of the system. Some RAID configurations allow the RAID control device to automatically reconstruct the contents of the drive from the available error correction information.

While magnetic disk drives such as RAIDs represent a high-performance and relatively inexpensive medium for data storage, it should also be noted that such magnetic disk drives have a limited operational life. As such, commercial and government organizations must periodically discard old and/or failed magnetic drives. The vast stockpile of discarded and/or failed magnetic drives represents a significant security risk and liability for commercial and government enterprises. Even with failed drives, while some component of the drive may have failed, a significant amount of data may still be recovered from the magnetic disk. Drives may be sent to a destruction facility that physically grinds the drives into small pieces, but this is an expensive process and requires a significant amount of physical security measures to be implemented for the transport of the failed drives to such a facility. Encryption represents a more secure and cost effective option for securing stored data. By encrypting each data block prior writing it to disk and decrypting each data block after reading it from disk, stored data is obfuscated and protected from physical theft of the drive before or after drive failure. Cryptography may be employed in data communication and storage applications in a variety of other ways. The prior two examples simply highlight the tangible benefits. Other applications include securing digital voice, video, and image data.

A symmetric key block cipher is the most common type of cryptography employed for data confidentiality. Given a fixed-size block of input data (or plaintext) and a key, a block cipher produces a fixed-size block of encrypted output data (or ciphertext) using an unvarying transformation. A block cipher that uses the same key to encrypt and decrypt data is called a symmetric key block cipher. The Advanced Encryption Standard (AES) specified by the National Institute of Standards and Technology (NIST) is the Rijndael block cipher operating on data blocks of size 128 bits and using keys of size 128 bits, 192 bits, or 256 bits. Each transformation step in the Rijndael block cipher is referred to as a round. AES specifies the number of rounds based on the key size: 128 bit keys use 10 rounds, 192 bit keys use 12 rounds, and 256 bit keys use 14 rounds.

Despite advances in cryptographic algorithms, encryption and decryption remain computationally intensive tasks. For software applications running on general purpose processors (GPPs), adding a software implementation of encryption and decryption consumes a significant amount of processing resources, thus reducing the achievable performance of the application. One advantage of block ciphers such as AES block ciphers is their amenability to pipelined hardware implementation. In the case of AES, the inputs and processing of one round need not depend on the results of a subsequent round; i.e. there are no inherent feedback loops in the execution of the algorithm. A fully pipelined hardware implementation for AES could instantiate a series of 14 round circuits where each round circuit implements one round of the AES block cipher. An example of such an implementation is shown inFIG. 12. Depending on the key size in use, a supporting control circuit intercepts the state data at the appropriate round to be output as ciphertext. For a key size of 128 bits, the output of round10is used as the ciphertext. For a key size of 192 bits, the output of round12is used as the ciphertext. For a key size of 256 bits, the output of round14is used as the ciphertext. Regardless of key size, the pipelined block cipher circuit ofFIG. 12can be made to accept one block of data per clock cycle and only a single pass through the pipeline is needed to encrypt data. The resulting throughput for the circuit ofFIG. 12is the achievable clock frequency multiplied by the block size. A conservative estimate in current technology is a clock frequency of 200 MHz, resulting in a throughput of 25.6 Gbps (billion bits per second).

However, in many instances, the throughput needs of an encryption/decryption system will need to be balanced with the desired amounts of power consumption within the system. It should be noted that at higher clock frequencies and larger numbers of pipeline rounds, the power consumed by the block cipher when encrypting/decrypting data will increase. Therefore, the inventors herein believe that a need exists in the art for a block cipher design that is scalable to balance throughput goals against power consumption goals.

Toward this end, the inventors disclose as an embodiment of the invention a scalable block cipher circuit, wherein the scalable block cipher circuit is scalable to balance throughput with power consumption as desired by a practitioner of this embodiment of the invention. The scalable block circuit can be deployed on an integrated circuit, preferably as a hardware logic circuit on the integrated circuit. Optionally, this hardware logic circuit can be realized using reconfigurable logic. However, it should also be noted that this hardware logic circuit can be realized using non-reconfigurable logic (e.g., deployed as an application specific integrated circuit (ASIC)).

As used herein, “hardware logic circuit” refers to a logic circuit in which the organization of the logic is designed to specifically perform an algorithm and/or application of interest by means other than through the execution of software. For example, a GPP would not fall under the category of a hardware logic circuit because the instructions executed by the GPP to carry out an algorithm or application of interest are software instructions. As used herein, the term “GPP” refers to a hardware device that fetches instructions and executes those instructions (for example, an Intel Xeon processor or an AMD Opteron processor). Examples of hardware logic circuits include ASICs and reconfigurable logic circuits. The term “reconfigurable logic” refers to any logic technology whose form and function can be significantly altered (i.e., reconfigured) in the field post-manufacture. This is to be contrasted with a GPP, whose function can change post-manufacture, but whose form is fixed at manufacture. This can also be contrasted with those hardware logic circuits whose logic is not reconfigurable, in which case both the form and the function are fixed at manufacture (e.g., an ASIC, as mentioned above). An example of a reconfigurable logic circuit is a field programmable gate array (FPGA). Furthermore, the term “firmware” refers to data processing functionality that is deployed in a hardware logic circuit such as an ASIC or FPGA. The term “software” will refer to data processing functionality that is deployed on a GPP.

As another embodiment, the inventors disclose a block cipher circuit comprising a plurality of pipelined round circuits, wherein the block cipher circuit is configured to perform encryption and decryption utilizing the same order of round circuits within the pipeline regardless of whether encryption or decryption is being performed. Furthermore, such a block cipher circuit can employ multiplexers within a plurality of the round circuits to adjust the order of stages within each round circuit to accommodate both encryption and decryption operations. Further still, such a block circuit can employ on-the-fly key expansion and inverse expansion.

While the use of a strong block cipher, a large key size, and a clever encryption mode significantly reduces the probability of a successful attack on ciphertext, it should also be noted that key management is of equal importance in protecting the security of encrypted data. Key management represents one of the most challenging aspects of data security. As used herein, “key management” refers to the process of selecting, generating, authenticating, distributing, updating, and storing the keys used by a block cipher for encrypting/decrypting data. As used herein, “key management function” refers to a specific key management task (e.g., key generation, key distribution, etc.).

To address a perceived need in the art for improved key management security, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption, wherein the integrated circuit is also configured to perform a plurality of different types of key management functions (e.g., key management functions such as key selection, key generation, key authentication, key distribution, and key storage). The inventors also note that a challenge to integrating multiple type of key management functions into a single integrated circuit is the constraint as to the amount of space available on the integrated circuit. Thus, an efficient design for integrated key management is needed such as the inventive embodiments disclosed herein.

Further still, to increase the flexibility of encryption/decryption, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption wherein an encryption mode wrapper circuit is included on the integrated circuit for selectively performing additional operations on data going to and/or coming from the block cipher circuit to thereby define a desired encryption mode for the encryption operation. Preferably, the encryption mode wrapper circuit is realized as a hardware logic circuit on the integrated circuit.

Further still, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption wherein a data routing and control circuit is included on the integrated circuit for performing various data routing and control functions among the various circuits that are also included on the integrated circuit. Preferably, the data routing and control circuit is realized as a hardware logic circuit on the integrated circuit.

Further still, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption wherein volatile memory is included on the integrated circuit for temporarily storing any plaintext data that is needed by the integrated circuit during its operation, to thereby prevent exposure of plaintext outside the integrated circuit.

Further still, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption wherein volatile memory is included on the integrated circuit for temporarily storing any keys used by the block cipher circuit to encrypt/decrypt data, to thereby prevent exposure of the actual keys used by the block cipher for encryption/decryption outside the integrated circuit.

Further still, the inventors disclose as an embodiment of the invention an integrated circuit configured to perform encryption/decryption and a plurality of different types of key management functions, wherein the integrated circuit comprises a scalable block cipher circuit, an encryption mode wrapper circuit, a data routing and control circuit, and volatile memory for storing data and keys. Preferably, these circuits are realized as hardware logic circuits on the integrated circuit. The integrated circuit can also include a Direct Memory Access (DMA) engine circuit for reading data and commands into and writing data and commands out of the integrated circuit. The DMA engine circuit may also preferably be realized as a hardware logic circuit.

These and other features, advantages, and embodiments of the present invention will be apparent to those having ordinary skill in the art upon review of the following drawings and detailed description.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1depicts an integrated circuit (IC)150that includes a block cipher circuit103, a data routing and control circuit102, a Direct Memory Access (DMA) engine circuit101, and a scalable system interface circuit100. Integrating these functions into a single IC150completely offloads the encryption and decryption tasks from other components in a system within which the IC150resides, thereby freeing up system resources to improve system performance or support additional tasks. The IC150also increases the security of the system by never exposing intermediate encryption results outside of the IC150. The combination of the scalable system interface circuit100and DMA engine circuit101enables the IC150to be easily combined with a wide variety of processing architectures. This combination also allows the system interface to be easily scaled to match the performance requirements of the system and the block cipher circuit103.

An example of a suitable platform upon which the IC150can be deployed in described in the above-referenced and incorporated U.S. Patent Application Publication 2007/0237327. However, it should be understood that other platforms could be used.

As one embodiment for the block cipher circuit103, the inventors disclose a scalable block cipher circuit for inclusion in the IC150. Preferably, this scalable block cipher circuit comprises scalable symmetric key block cipher circuit that comprises a plurality of pipelined round circuits for encryption/decryption, wherein the number of pipelined round circuits is specified at design time. Any block cipher encryption technique that is amenable to hardware implementation can be used for the scalable block cipher circuit, such as the triple data encryption algorithm (TDEA) and the AES algorithm. Block cipher circuits with fewer round circuits than the number of required rounds for the given key size require the data to make multiple passes through the circuit. For example,FIG. 13(a) shows a scalable AES block cipher circuit1300with seven round circuits1302where data must make two passes to encrypt/decrypt regardless of key size (e.g., whether the key size is 128/192/256 bits). As such, each round circuit1302can perform operations for multiple rounds of the encryption/decryption process, as denoted inFIG. 13(a), wherein the different rounds that each round circuit1302performs is depicted on each round circuit1302. On average, circuit1300is able to accept a new data block1308every two clock cycles. Assuming a fixed clock frequency, this necessarily reduces the throughput of the circuit by a factor of two relative to the block cipher circuit ofFIG. 12. The ability to scale the pipelined circuit with respect to its number of rounds1302allows the system to meet a given throughput goal while minimizing circuit size, cost, and power consumption.

In a preferred embodiment, the scalable block cipher circuit103is a hardware logic circuit. As examples, this hardware logic circuit can be deployed in reconfigurable logic or nonreconfigurable logic.

For systems with variable performance requirements, the circuit1300may be scaled to meet the maximum throughput goal. In situations where the throughput goal is reduced, the number of active round circuits1302may be reduced by disabling the clock to the round circuits1302at the end of the pipeline and feeding back the output of the last active round circuit1302. This allows the system to minimize power consumption while retaining the ability to increase circuit throughput based on system demands.

Preferably, the scalable block cipher circuit is configured for either or both of two types of scaling: design-time scaling and run-time scaling. Design-time scaling allows the system designer to specify the depth of the processing pipeline in order to achieve a maximum throughput performance metric. In general, increasing the depth of the processing pipeline increases the maximum throughput of the block cipher. The system designer may choose the minimum pipeline depth that achieves a given performance metric. Reducing the depth of the pipeline reduces the size and dynamic power consumption of the block cipher circuit. Run-time scaling allows the system to dynamically adjust the depth of the pipeline by disabling pipeline round circuits. This allows the system to actively manage power consumption while retaining the ability to increase system throughput when necessary.

An example of a run-time scalable block cipher circuit would include a pipeline such as that shown inFIG. 12or13, but where there are feedback loops to the pipeline entry from the output of each round circuit to thereby allow the block cipher circuit to be scaled at run-time as desired based on which round circuit output is fed back. Two exemplary approaches that could be used for operating such a run-time scalable block cipher circuit are a tri-state bus for the feedback path and clock enable propagation. With clock enable propagation, one could accept a certain number of words per cycle, then propagate the clock enable signal along with the data, thereby eliminating the need for additional tri-state buffers or multiplexers.

FIG. 13(b) depicts an exemplary run-time scalable block cipher circuit1350which can operate to reduce the number of active round circuits1302at run time. The data state and round key outputs from each round circuit1302are connected to the data state and round key feedback buses1352and1354respectively via tri-state buffers1356. When a buffer1356is enabled, that buffer drives its input value on the bus. When a buffer1356is not enabled, that buffer's input is disconnected from the bus. Similarly, the data state output of each round circuit is also connected to an output bus1358. A power control circuit1360controls the enable signals to each tri-state buffer1356, wherein these enable signals can be defined at run-time for the block cipher circuit1350. In the example ofFIG. 13(b), the power control circuit1360operates to enable 5 rounds of the 7 round pipeline (as shown by the highlighted tri-state buffers1356connected to the outputs of the fifth round circuit1302). Furthermore, in this example, a 192-bit key is used, which therefore means that the data output of the 12thround forms the cipher text. Thus, the power control circuit1360also operates to enable the tri-state buffer connected to the output of the second round circuit1302to drive bus1358when round12is completed (as shown by the highlighted tri-state buffer1356connected to the data output of the second round circuit1302).

Data may be scheduled for input into the block cipher circuit1300in multiple ways. One mechanism is to use fixed time slot scheduling where input data1308is accepted on the first timing cycle. In general, the number of timing cycles is equal to the number of passes required to produce output ciphertext given the pipeline depth and the key size. In the configuration shown inFIG. 13(a), the number of timing cycles is two; input data1308and input key1310(state1, round key1) is accepted on the first timing cycle and first pass data1304and first pass key1306(state8, round key8) is accepted on the second timing cycle, then the cycle repeats. The multiplexers1310and1312at the head of the pipeline select input data and round keys on the first timing cycle, and feedback data and round keys on subsequent timing cycles, as specified by a command signal1314from control circuitry within the block cipher circuit. The fixed time slot scheduling approach allows the circuit1300to achieve a consistent data ingest rate.

Another mechanism for input data scheduling in multi-pass implementations is to dynamically multiplex data and keys into the first round, giving priority to data and keys on the feedback path (1304/1306). Data valid signals can be used to denote valid data on the input path (1308/1310) and the feedback path (1304/1306). On each clock cycle, these signals can be used in simple combinational logic to control the multiplexers1310and1312at the head of the pipeline. This approach allows contiguous input plaintext blocks to be ingested by the pipeline until the pipeline is full. It does require the ability to pause and possibly buffer the input data stream until the data in the pipeline completes its second pass.

As the number of pipeline round circuits1302decreases, the number of passes required diverges for different key sizes. For example, a pipeline depth of five requires two passes for 128 bit keys, but three passes for 192 bit and 256 bit keys. In general, design-time scaling allows the AES block cipher pipeline depth to range from 1 to 14. One mechanism for achieving design-time scaling is through the use of parameterized Hardware Description Language (HDL) code. Parameters in the code can be used to specify the pipeline depth. Conditional statements including those parameters can be used to instantiate the necessary round circuits and supporting control logic.

In order to provide the scalability described above, the block cipher circuit103can employ a novel design that supports encryption and decryption from a single circuit and implements on-the-fly key expansion for round key generation. An exemplary algorithm such as the AES algorithm involves rounds composed of four key stages: round key addition, byte substitution, shifting of rows, and mixing of columns. For encryption and decryption, each round consists of the same stages arranged differently.FIG. 19(a) shows the ordering of stages in each round for the encryption process. Note that the order of stages differs for the last round; the final mix columns stage is replaced with an add round key stage.FIG. 19(b) shows the order of stages in each round for the decryption process. Note that the order of stages differs for the first round; the mix columns stage is replaced by an add round key stage.

In order to maximize circuit utilization and minimize area and power consumption, the block cipher circuit103can include one instance of each stage per round to handle both encryption and decryption. Meta-information accompanies the data as it passes from round to round and from stage to stage within a round. The meta-information supplies the parameters of the desired AES operation. Included among exemplary meta-information are: the round key, key size, whether encrypting or decrypting, as well as an index of the current round. It is worth noting that, as a data block completes a round, the round key will have been expanded for the next round and the current round index will be incremented. The presence of meta-information reduces latency by allowing each round to operate under different parameters, rather than requiring the entire pipeline to operate under the same parameters until the completion of the specified operation. This is also what enables the AES circuit to be constructed with the variable depth round pipeline as previously discussed. Data leaving the last instantiated round of the pipeline could need to be looped back to the beginning of the pipeline, while new data could also be ready to enter the pipeline. The parameters of these two data states may vary greatly, if by nothing other than their respective round keys. When determining what data enters the pipeline, precedence is given to data needing to be looped through the pipeline. However, in an effort to fully utilize the pipeline (and therefore reduce latency) new data may enter the pipeline when no data is ready for an additional pass through the pipeline. An example is provided inFIG. 20. In this instance a five-round deep pipeline is to be used to encrypt a 3 Kb file with a fixed 128-bit key, thus ten rounds will be required to encrypt twenty-four 128-bit blocks. This figure is not meant to serve as a timing diagram, it is only to illustrate the use of meta-information. Since each round consists of four pipelined stages, it is possible for a round to include four 128-bit data blocks. The example also does not show the effect of stalls on the round pipeline. A 3 Kb file was chosen since this will ensure that a decision will be made concerning the propagation of new data and data requiring an additional pass through the circuit. A superscript is placed on the parameters to indicate the round in which they were produced; a superscript of zero signifies the initial value. InFIG. 20, the blocks will be output from the pipeline as they complete their second pass. Note that block F requires a second pass and will be looped back to the first round pipeline stage.

FIGS. 21(a) and21(b) show the standard view of AES encryption and decryption. The figures show a ten-round, 128-bit key size, implementation, although the underlying concept of a round is applicable for all key sizes. By design, AES decryption is AES encryption in reverse. This presents two principle obstacles to having encryption and decryption coalesced in a single circuit. Most notably, the order of operations within a round is reversed from encryption to decryption. Furthermore, the last round of encryption is unique in that it does not utilize a mix columns stage in favor of an additional add round key stage. The final round of encryption is treated as a special case, however this requires that the first round of decryption be treated as a special case. Special cases and multiple possible data paths can quickly bloat the logic resources required to finalize a design in hardware.

To alleviate these limitations, a new notion of an AES round was formulated for a preferred embodiment of a scalable block cipher circuit. It is worth noting that the byte substitution and shifting of rows stages are interchangeable. The byte substitution stage is the direct mapping of each byte in the state to a corresponding fixed and predefined value, while the shifting of rows stage involves rotating the rows of the state based on the row number. Therefore, the order of these stages is irrelevant. The inventors further note that the byte substitution and shifting of rows stages could be combined into a single stage, along with universally shifting the grouping of stages to comprise a round. An embodiment of a scalable block cipher circuit can thus make use of the interchangeability of the byte substitution and the shifting of rows stages to conceptually “shift” the round boundaries in order to achieve a more consistent ordering of stages for both encryption and decryption. Due to this shifting, an initial add round key stage must be performed prior to entering the circuit's round pipeline. In a preferred embodiment for the scalable block cipher circuit, the special case round is now reserved for the last round when encrypting as well as when decrypting.FIGS. 22(a) and22(b) illustrate the composition of rounds for a preferred embodiment of the scalable block cipher circuit. Thus, the order of the round circuits in the block cipher circuit ofFIGS. 22(a) and (b) is fully independent with respect to whether encryption or decryption is performed.

By adopting the shifted view of an AES round, encryption and decryption begin to correlate and exhibit a design that is more befitting to hardware logic implementation. It is apparent that the order of the mix columns and add round key stages within a round are dependent upon whether the data block is being encrypted or decrypted. It is fairly straightforward in hardware to deploy multiplexers to allow for a single instantiation of each stage within a round, as shown inFIG. 23. A multiplexer placed in front of each of these stages can accept data (and meta-information) from the shifting of rows stage as well as from the output of the other stage. It is also necessary to feed each of these stages output to another multiplexer to determine the final output to exit the round. Each multiplexer determines which data to use based on whether the current round is encrypting or decrypting. This is an improvement over the standard view of an AES round, since the standard view would require that this configuration of multiplexers be duplicated at the head and tail of each round; thus requiring the instantiation of multiple mix columns and add round key stages within each round.

Each round of the block cipher requires a round key be derived from the original key by a defined technique for key expansion. A round key is 128-bits, regardless of specified key size, since it is to be applied to the 128-bit state of the round. For encryption, the round key of the first round is taken directly from the original key. Subsequent round keys are computed from the previous round key through a combination of exclusive- or operations, logical rotations, and byte substitutions. Key expansion also involves an exponentiation of 2, where the degree depends on the round. This is where the round index from the meta-information comes into play. The round index is also used, along with a maximum round value derived from the key size, to signal when execution is complete and the data block is ready to exit the AES pipeline.

A preferred embodiment of the block cipher circuit can also perform on-the-fly key expansion. The round key is only utilized in the round key addition stage of each round. By pipelining the layout of the block cipher, round keys may be expanded (or de-expanded in the case of decryption) within the round, prior to the round key addition stage. This requires that the initial encryption key be fed to the first round, and all necessary round keys will be expanded within the circuit. This improves latency for encryption since the AES circuit can begin executing immediately without waiting for the key to be pre-expanded.

Decryption is encryption in reverse, so the initial round key for decryption is the tail of the expanded encryption key. Utilizing similar techniques, a preferred embodiment of the block cipher circuit can also provide on-the-fly key expansion as well as on-the-fly key de-expansion. With such an embodiment, each encryption key, loaded into a key table by a key management processor (as explained hereinafter with respect toFIG. 3), will also have a corresponding decryption key loaded into the key table. This would involve expanding the encryption key based on the specified key size. The key management processor (which may be embodied as a hardware logic circuit) could handle this and load both the encryption and decryption key into the key table. Since key expansion in no way involves the cipher data, a relatively small sub-module could be implemented in hardware to arrive at a decryption key upon the loading of an encryption key to the key table.

In order to greatly simplify the integration of the scalable symmetric key block cipher circuit1300into standard system architectures, the inventors also disclose an IC150that includes a scalable system interface circuit100. In general, the scalable system interface circuit100may be selected at design-time to be any standard or custom interface core. Its primary function is to act as a protocol bridge that presents a standard interface to the DMA engine circuit101. Examples of system interface protocols include PCI, PCI-X, PCI Express, HyperTransport, and Infiniband. Some standard interface protocols such as PCI Express include scalability across a spectrum of performance points. The PCI Express protocol allows the number of 2.5 Gb/s bi-directional links to be 1, 4, 8, or 16. This allows the throughput of the system interface core to be scaled to match the throughput of the scalable block cipher. Given a system throughput goal, this scalability allows the integrated circuit to achieve minimum size and power consumption.

With reference toFIG. 1, input data flows across the input system interface110, through the scalable system interface circuit100, and across the DMA engine input interface112. Output data is passed from the DMA engine output interface113, through the scalable system interface circuit100, and across the output system interface111.

In a preferred embodiment, the scalable system interface circuit100is a hardware logic circuit. As examples, this hardware logic circuit can be deployed in reconfigurable logic or nonreconfigurable logic.

The DMA engine circuit101provides a mechanism for transferring data to and from the integrated circuit using memory transaction semantics. These memory transaction semantics provide flexibility in defining protocols for exchanging data and commands between the IC150and other system components. In a preferred embodiment, the DMA engine circuit101is a hardware logic circuit. As examples, this hardware logic circuit can be deployed in reconfigurable logic or nonreconfigurable logic.

The DMA engine circuit101preferably contains a set of configuration registers that are assigned a system address range at system initialization. These extensible registers define circuit configurations, specify the location of data buffer descriptors, and control the assertion of interrupts to the system. In addition to presenting a standard memory transaction interface to other system components, the DMA engine circuit101presents a standard data and command transfer interface to the data routing and control circuit102. An example of a DMA engine circuit101that can be used in the practice of a preferred embodiment is the firmware socket module disclosed in pending U.S. patent application Ser. No. 11/339,892, filed Jan. 26, 2006, entitled “Firmware Socket Module for FPGA-Based Pipeline Processing”, and published as U.S. Patent Application Publication 2007/0174841, the entire disclosure of which is incorporated herein by reference. While a preferred embodiment disclosed in the Ser. No. 11/339,892 application is for deployment on an FPGA, the firmware socket module disclosed therein could also be used for deployment on other devices, including ASICs, as would be understood by those having ordinary skill in the art.

With reference toFIG. 1, input commands and data are passed from the DMA engine circuit101to the data routing and control circuit102across interface114. Output commands and data are passed from the data routing and control circuit102to the DMA engine circuit101across interface115.

IV. Data Routing and Control Circuit:

The data routing and control circuit102manages data destined for to and emanating from the scalable symmetric block cipher circuit103. Functions for the data routing and control circuit102include processing commands that direct the IC150to load a key, set the key size, encrypt data, and decrypt data. With reference to the embodiment ofFIG. 1, input plaintext blocks and keys are passed to the scalable symmetric block cipher circuit103across input interface116, and output ciphertext blocks are passed from the scalable symmetric block cipher circuit103to the data routing and control circuit102across interface117. Keys and control signals and passed between the data routing and control circuit102and the scalable symmetric block cipher circuit103across interface124.

In a preferred embodiment, the data routing and control circuit102is a hardware logic circuit. As examples, this hardware logic circuit can be deployed in reconfigurable logic or nonreconfigurable logic.

Encryption modes generally define additional transformations to apply to the inputs and outputs of a block cipher. Modes are typically used to improve security, but may also be used to improve performance or extend functionality by addition authentication. Examples of encryption modes include cyclic block chaining (CBC), tweakable storage cipher (LRW and XTS), counter (CTR), and others. An example of such “other” encryption modes is the encryption technique disclosed in the above-referenced and incorporated U.S. Patent Application Publication 2007/0237327, entitled “Method and System for High Throughput Blockwise Independent Encryption/Decryption”. Another example of an encryption mode is the electronic code book (ECB) mode of encryption, wherein the output of a symmetric key block cipher is directly utilized as the ciphertext. However, relative to other encryption modes, with ECB, no additional transformations on the inputs and outputs of the block cipher are needed.

FIG. 2(a) depicts an IC250wherein an encryption mode wrapper circuit200is in communication with the inputs and outputs of the scalable block cipher circuit103to selectively define an encryption mode from a plurality of possible encryption modes for IC250. Based on a control signal over interface302from the data routing and control circuit102, the encryption mode wrapper circuit can select which additional transformations will (or will not in the case of ECB) be performed on the input to and/or output from the block cipher circuit103. In a preferred embodiment, the encryption mode wrapper circuit200is a hardware logic circuit. As examples, this hardware logic circuit can be deployed in reconfigurable logic or nonreconfigurable logic.

As one example of an encryption mode that can be employed by the encryption mode wrapper circuit,FIG. 14shows a dataflow diagram of the tweakable storage cipher (XTS) mode. XTS is designed to operate on independent fixed sized data units. A data unit number (logical storage block number) i is encrypted using a unique tweak key KTto generate a tweak value T. For each 128-bit data block in the data unit, Pj, the “tweak” value T is multiplied by the j-th power of a primitive element in the field GF(2128), where j is the relative position of the 128-bit data block in the data unit. The resulting value Tjis combined with the 128-bit data block Pjusing a bitwise exclusive-OR operation prior to input to the AES block cipher. The same “tweak” is combined with the 128-bit output of the block cipher C′jusing a bitwise exclusive-OR operation to produce the ciphertext Cj. The multiplication and bitwise exclusive-OR operations can be performed by the encryption mode wrapper circuit on data destined for and returning from the block cipher circuit103to thereby achieve the desired XTS effect. Furthermore, the block cipher circuit103can optionally be utilized beforehand to generate the tweak value T.

Shown inFIG. 2(b) is a block diagram of an IC250with an encryption mode wrapper circuit200that supports multiple encryption modes with a plurality of encryption mode circuits using a shared block cipher circuit103. In the example ofFIG. 2(b), the encryption mode circuits comprise an XTS mode circuit204, a CBC mode circuit205, and a CTR mode circuit206. The selection of which encryption mode circuits will be included in the encryption mode wrapper circuit200can be made at design time. Also, it should be understood that more or fewer as well as different encryption mode circuits could be included in the encryption mode wrapper circuit200.

In the example ofFIG. 2(b), the data routing and control circuit102is extended to route data to and from the multiple encryption mode circuits. The data routing and control circuit102passes input data to encryption mode circuits204,205, and206across interface216. This input interface may be monitored by all encryption mode circuits, as a given input data block will processed by one encryption mode circuit. Thus, the encryption mode wrapper circuit200can be configured such that all encryption mode circuits operate on all data, where the output of the appropriate encryption mode circuit can be passed as output based on a control signal delivered to a multiplexer by the data routing and control circuit. Another way to control which encryption mode circuit is effectively utilized is to pass an input data valid signal synchronous to the data to the appropriate encryption mode circuit, wherein the encryption mode circuits will only input data from interface216when their input data valid signal is asserted. Also note that interface216may deliver data directly to the block cipher in the event that an encryption mode circuit is not used for data inbound to the block cipher. Multiplexer218selects data for the scalable symmetric block cipher input among encryption mode output interfaces and interface216(no encryption mode) based on a control interface220from the data routing and control circuit102. The same control interface220controls the selection of output ciphertext using multiplexer219. The output of the scalable symmetric block cipher circuit is passed to the encryption mode circuits across interface217. This output interface may be monitored by all encryption mode circuits, as a given output data block will be processed by one encryption mode circuit, with the same processing options for the different encryption mode circuits as explained above. Interface217also passes data directly to multiplexer219for the case that an encryption mode circuit is not used for data outbound from the block cipher. It should be noted that if the no encryption mode circuits are used to perform additional transformations on data going to and coming from the block cipher circuit, this effectively amounts to the ECB mode of encryption.

A circuit design for XTS mode circuit203inFIG. 2(b) is shown inFIG. 16as circuit1601. The scalable symmetric block cipher circuit103inFIG. 2(b) is shown as AES block cipher1600inFIG. 16. Block cipher1600contains a pipeline of n rounds, where n is chosen to meet the system throughput requirements as previously described. Circuit1601contains a scalable AES block cipher1602in order to compute tweak values in parallel to data block encryption and decryption. It should be noted that AES block cipher1602is not the same block cipher as block cipher circuit103which also shares the integrated circuit. The system passes the data unit number i for a pending data unit to the mode circuit. AES block cipher1602computes tweak value T using symmetric tweak key KT. Tweak values T are stored in buffer1603until the first block of the data unit is input to the mode circuit. Block cipher1602is scaled to meet the data unit throughput requirements of the system. Given that data units contain multiple blocks, the data unit throughput requirement will be less than the data block throughput requirement. Cipher1602may therefore be scaled to contain fewer pipeline round circuits, consuming less area and power. By containing an independent block cipher for tweak computation and pre-processing tweak values, circuit1601maximizes the achievable throughput of the system by allowing a new data block to be input to scalable block cipher1600every clock cycle. For each data block, Pj, the tweak value T is multiplied1604by the j-th power of a primitive element in the field GF(2128) to generate value Tj. (The tweak value T may be retrieved from the buffer and stored in a register until all data blocks of the data unit are processed.) The value Tjis combined with data block Pjusing a bitwise exclusive-OR1605to produce value P′j. Value P′jis passed to AES block cipher1600along with symmetric data key KB. Value Tjis stored in buffer1606until associated ciphertext block C′jis output from block cipher1600. Value Tjis then retrieved from buffer1606and combined with ciphertext block C′jusing bitwise exclusive-OR1607. The resulting ciphertext block Cjis output from the circuit.

FIG. 17shows an alternative circuit design1701for XTS mode circuit203inFIG. 2(b). Circuit1701does not include an independent block cipher for tweak computation, allowing for a smaller circuit with less power consumption. Circuit1701uses block cipher circuit103(shown as block cipher1700inFIG. 17)for computing tweak values. Thus, circuit1710schedules tweak value computations between data unit encryption computations using scheduler circuit1702. Input buffers1703-1706store keys, data blocks, and data unit numbers while they await processing by the circuit. Scheduler1702controls the flow of keys and data to block cipher1700by multiplexing data blocks and data unit numbers using multiplexer1709and multiplexing data keys and tweak keys using multiplexer1708. For a tweak computation, the next data unit number is retrieved from buffer1705and passed to block cipher1700via multiplexer1709. The associated tweak key is retrieved from buffer1703and passed to block cipher1700via multiplexer1708. When a tweak value T is output from block cipher1700, it passes through gate1710and is stored in buffer1711. For data encryption computations, tweak value T is retrieved from buffer1711and is multiplied1712by the j-th power of a primitive element in the field GF(2128) to generate value Tj. Note that the value j may be produced by the scheduler as it is simply the data block number within the data unit. Alternatively, the j values may be queued along with data blocks. The value Tjis combined with data block Pjusing exclusive-OR1707to produce value P′j. Value Tjis also stored in buffer1713. Value P′jpasses through multiplexer1709to block cipher1700. Likewise, data key KBpasses through multiplexer1708to block cipher1700. When value C′jis output from block cipher1700, value Tjis retrieved from buffer1713and the values are combined using exclusive-OR1714to produce output ciphertext Cj.

It should be noted that circuit1701may be pipelined such that once the tweak value T is computed, a new data block from the given data unit may be passed to the block cipher1700on each clock cycle. The goal of the scheduler circuit is to minimize the overhead of sharing the block cipher for tweak computation. A variety of scheduling techniques may be used.FIGS. 18(a) and (b) provide three examples where the pipelined block cipher requires n time steps to complete a block encryption operation, but a new block may be passed to the cipher at each time step. The examples also assume that the number of data blocks in a data unit b is less than the number of pipeline rounds in the block cipher n.FIG. 18(a) shows the amount of time required to completely process a single data unit. The tweak computation requires n time units. The first data block is passed to the cipher at time step n. The first ciphertext block emerges from the block cipher at time unit2n. The last ciphertext block emerges from the block cipher at time unit2n+b. If the scheduler waits until the last ciphertext block emerges from the block cipher to begin the next computation, then the circuit will process one data unit every2n+b time units. This may be necessary in cases where the pipelined block cipher is unable to process blocks with different keys at the same the time; i.e., The pipeline must be flushed prior to changing the key.

Note that the scalable symmetric block cipher circuit disclosed herein may also be pipelined in such a way as to allow a new key to be loaded with each input data block. With reference toFIG. 18(a), the data unit number of the next data block could be input to the system on cycle n+b. This would allow the system to process one data unit every n+b cycles.

It should further be noted that only one pipeline round is active while the tweak value is computed. As shown inFIG. 18(b), the scheduler may use these cycles to pre-compute tweak values for pending data units. The scheduler may compute n tweak values without inducing any additional delay on the pending data units. When n data units are available for pre-computation, the circuit will process n data units every n+(n−1)b time units. For example, assume a time unit is 5 nanoseconds (200 MHz clock), a data unit is 512 bytes (contains 32 16-byte data blocks), and the block cipher pipeline is 40 stages deep. In this case the circuit would process20data units every 1288 cycles (6.44 microseconds), or 1.6 billion bytes per second.

FIG. 2(c) depicts an IC250wherein the encryption mode wrapper circuit200includes an encryption mode processor (EMP)207. The functionality of EMP207is preferably defined by firmware and provides support for a broad range of encryption modes (wherein the firmware defines additional transformations on the inputs and outputs of the block cipher circuit103). The EMP207also allows new encryption modes to be added post manufacture. The computational complexity of the additional transformations defined by encryption modes is expected to be significantly less than that of the block cipher. This allows a simple EMP circuit207to match the performance of the block cipher103. A wide variety of embedded processor designs are suitable for the EMP.

A strong block cipher, large key size, and clever encryption mode significantly reduces the probability of a successful attack on the ciphertext. Properly managing the creation, allocation, storage, and distribution of keys is of equal importance. If an attacker can easily gain access to a key or set of keys, encrypted data may be compromised without the need for sophisticated cryptanalysis. There are a wide variety of key management systems that typically adhere to a set of well-accepted guidelines. The guidelines include choosing random values for keys, regularly rotating the keys (encrypting data with a new key), protecting keys during storage and transmission, and guarding against component failures in the system. As shown inFIG. 3, the inventors disclose as an embodiment of the invention an IC350that includes several key management functions which offload other system components and increase the security of the system by only exposing keys inside of the IC350.

The IC350builds upon the ICs shown inFIG. 1andFIG. 2. The IC350includes one or more encryption mode circuits (e.g., XTS mode circuit204) as well as one or more additional circuits that are configured to provide key management functionality (e.g., circuits305and306). In a preferred embodiment, circuits305and306are hardware logic circuits. As examples, these hardware logic circuits can be deployed in reconfigurable logic or nonreconfigurable logic.

In addition to extending the set of circuits sharing the scalable block cipher circuit103, the IC350adds a data buffer307, key table308, key management processor (KMP)309, and non-volatile random access memory (NVRAM) interface328. All of these components interface to the data routing and control circuit102. While the data buffer307and key table308may take the form of non-volatile memory, preferably volatile memory is used for buffer307and/or table308to enhance security. The data buffer307allows keys to be rotated without exposing plaintext outside of the IC350. The key table308allows a large number of keys and their associated meta-data to be stored and quickly accessed by other components in the IC350. The NVRAM interface328allows keys to be stored in a secure non-volatile device accessible only by the IC350. The KMP309is responsible for loading keys into the key table and reading keys out of the key table for storage or transfer.

The KMP309may directly load keys generated by circuits on the IC350into the key table308, ensuring that keys are never exposed outside of the IC350. The KMP309may also load keys from the NVRAM interface328. The KMP309may also implement a key transfer protocol with a remote key server to load keys from the remote key server into the key table308or read keys from the key table308and encrypt them prior to transfer to a remote key server for storage.FIG. 4(a) andFIG. 4(b) show examples of key storage options.

In most data security applications, key load and key transfer are rare tasks relative to encryption and decryption of data blocks. In this case the KMP309may be implemented as an embedded instruction processor whose function is defined by firmware. Example functions include asymmetric key cryptography (AKC), also known as public key cryptography. In public key cryptography, a pair of keys (private and public) are used to encrypt and decrypt data. As implied by the names, the private key is kept secret and the public key is made freely available. Data encrypted with the private key may be decrypted with the public key. It is prohibitively difficult to reproduce a given encrypted data block without the private key. Used in this way, AKC provides an authentication mechanism for data receivers to verify that a message was produced by the sender. Data encrypted with the public key may only be decrypted with the private key. Used in this way, AKC provides a secure one-way communication from public key holders to the private key holder. Key exchange and shared key establishment protocols also utilize public key cryptography. The KMP309may be configured to perform any of these functions in support of a specific key management architecture.

The additional key management features provided in the IC350enable the IC350to be easily integrated in a broad spectrum of applications and key management systems. The modularity and flexibility of the key management functions allow the key management architecture to be changed over time to address emerging security concerns. The additional key management features also allow the device to act as a cryptographic domain bridge in a federated security architecture. As shown inFIG. 5, a federated security architecture allows multiple security domains to be defined where each domain may define its own encryption and key management policies. For example, with reference toFIG. 5, data in domain A is encrypted with AES-XTS and the 256-bit symmetric keys are encrypted and stored on media (e.g., RAIDs). Data in domain B is encrypted using AES-CTR and the 128-bit keys are stored on a centralized key server. The IC350functions as a cryptographic domain bridge for data flowing across the domain boundary by decrypting data using the algorithm and key specified by the source domain then encrypting data using the algorithm and key specified by the destination domain.

An example of a key management function that can be provided by IC350is key rotation. With key rotation, the encryption keys used to secure the data are periodically changed. Data buffer307allows the IC350to support key rotation without exposing plaintext data outside of the integrated circuit. Data is first decrypted using the existing key. The data routing and control circuit102routes the decrypted data blocks to data buffer307across interface325. Data buffer307is not accessible from outside the integrated circuit and its contents are erased when power is removed. Once the decryption operation is complete, the plaintext data blocks are routed back through the encryption circuits, encrypted using a new key, and transferred out of the IC350. Note that in addition to changing the key used to secure the data, the encryption mode may also be changed. The data routing and control circuit102manages the process of passing the correct key to the scalable symmetric block cipher circuit103via interface324, selecting the appropriate encryption mode via control interfaces320-321, and routing data to and from the data buffer307via interface325, the cryptography circuits via interfaces via interfaces316-317, and the DMA engine circuit101via interfaces314-315.

Another key management function that can be provided by IC350is key generation. The IC350can provide support for secure key generation using the RNG circuit305. In a preferred embodiment, a key generation command from the key management application contains a seed value and a destination index that specifies the location in the key table308to store the generated key. The command is received by the system interface circuit100and passed to the data routing and control circuit102. The data routing and control circuit102passes the specified seed to the RNG circuit305via interface316and directs the RNG circuit to produce a key of a specified value via control interface322. The key is returned to the data routing and control circuit which stores the key in the specified index in the key table308via interface326.

There are a wide variety of techniques for generating pseudo-random sequences given a seed value. Several techniques do not require a block cipher, such as a linear feedback shift register (LFSR) with a prime polynomial feedback function. A preferred embodiment for the RNG circuit305utilizes the seed value as a key for the symmetric block cipher and the output of a free-running counter as the data input. Arbitrarily long random values may be constructed by concatenating the output ciphertext.

The IC350also contains a cryptographic hash circuit306that may be used for key authentication and key generation. Key authentication involves ensuring that a received key is from a known source. The input to the hash circuit306is an arbitrary length “message”. The output of the hash circuit is a fixed-length digest. Thus, given the arbitrary length input text, a cryptographic hash function circuit306produces a fixed length digest, wherein the hash function has the properties that it is prohibitively difficult to reconstruct the original input text given the digest, and it is prohibitively difficult to choose two input texts that produce the same digest. These properties are useful for key generation from input pass phrases, data validation, and data authentication using digital signatures.

In a preferred embodiment the symmetric block cipher circuit103is used to compute the cryptographic hash. A diagram of a cryptographic hash circuit306that utilizes a symmetric block cipher circuit is shown inFIG. 15. It should be noted that this block cipher circuit is the integrated circuit's block cipher circuit103. The message is partitioned into blocks and input to the block cipher. The output digest is the concatenation of the final j hash values produced by the circuit, where j is at least one and at most the number of blocks in the input message. Hash value i, Hi, is the result of the bitwise exclusive-OR of block i of the message, Mi, and the ciphertext produced by encrypting Miusing the previous hash value Hi-1as the key. Other block cipher-based cryptographic hash circuits are feasible;FIG. 15is exemplary.

The IC350also contains a key table memory308that provides storage for a large number of encryption keys and associated meta-data. Examples of key meta-data include key size and timestamp. Key size specifies the size of the key and is used to properly configure the scalable symmetric block cipher circuit103. Key timestamp specifies the time of key creation and can be used to manage key lifecycle. The key timestamp may be included with the key when it is transferred into the IC350, or written by the IC350when the IC350generates the key. Each storage location in the key table is a key index. Stored at each key index may be an encryption key, a pre-expanded decryption key, and associated key meta-data. System commands may specify the key to use for a particular cryptography operation by specifying the key index instead of explicitly passing the key. The inclusion of a key table308prevents the need to transfer keys prior to every operation, reducing the latency of the operation by providing immediate access to the required key.

The meta-data fields in a key table entry may also be extended to include configuration data such as encryption mode parameters. For example, the meta-data fields may include encryption mode, data unit size, and an additional mode key. Associating meta-data with a key simplifies the system control semantics, allowing the system to specify the key index and a pointer to the data. The meta-data is fetched by the DMA engine circuit101and the key index is used to retrieve all of the configuration parameters that dictate the processing of the data.

Note that while the IC350shows only one encryption mode circuit (XTS mode circuit204), the IC350may be extended to include additional encryption mode circuits or an encryption mode processor as shown inFIGS. 2(b) and (c). Additional cryptography functions that utilize a symmetric block cipher other than the RNG circuit305and hash circuit306may also be added.

The IC350also contains a key management processor (KMP)309. The KMP309may be a fixed circuit, but in a preferred embodiment the KMP309is an embedded instruction processor whose behavior is defined by firmware. Examples of suitable embedded instruction processors include ARM and LEON processors. The KMP309allows keys to be transferred into and out of the IC350using a wide variety of key transfer protocols. The advantage of a firmware programmable processor is the ability to modify the key management functions supported by the IC350, post-manufacture. In addition to supporting secure key transfer into and out of the IC350, the KMP309can also be configured to perform key authentication and key encryption/decryption (key wrapping/unwrapping). Commands and data are transferred to and from the KMP via interface326that links the data routing and control circuit102and the key table308. The KMP manages the reading and writing of keys to/from the key table from external sources. The KMP ensures that keys transferred out of the IC350are encrypted using a Key Encryption Key (KEK) or shared session key established through a suitable key exchange protocol. Examples of public key cryptography techniques that may be implemented in the KMP for establishing session keys and transferring keys into and out of the IC350include RSA and elliptic curve cryptography (ECC).

The IC350also includes an interface circuit328to a non-volatile random access memory (NVRAM) device. An NVRAM device may be included in the IC350or included in the system as an additional component with a secure, point-to-point interface with the IC350. The NVRAM device provides storage for keys, KEKs, and firmware for embedded processors in the IC350. In a preferred embodiment, the firmware for the KMP and EMP, if present, are read out of the NVRAM device through the NVRAM interface circuit328when power is applied to the IC350. Simple boot programs in the embedded processors issue read commands that are routed through the data routing and control circuit102, across interface327, to NVRAM interface circuit328. Read responses are routed back to the embedded processors by the data routing and control circuit. The KMP may issue key read and write commands to the NVRAM interface in cases were keys or KEKs are stored in the NVRAM.

FIG. 4(a) depicts an exemplary system that includes the integrated circuit350in the storage controller401of a secure file server400. The secure file server stores data on one or more arrays of high-speed disks402. The storage controller401includes an Input/Output (IO) Processor403that connects to the disk array via interconnect410and links to the rest of the file server via system interface411. The encryption and key management IC350enables the storage controller401to encrypt all data written to the disk array and decrypt all data read from the disk array without reducing the data throughput. Data is transferred between the IC350and IO Processor via interface412.

FIG. 4(a) also highlights a variety of options for symmetric key and KEK storage. The location of keys within the system is dictated by the key management architecture. The storage controller401may include a secure NVRAM device405for symmetric key, KEK, and firmware storage. The secure file server may also include a secure NVRAM device406for key and KEK storage. The secure file server may also include a network interface414to a remote key server407that securely stores symmetric keys and KEKs. Key transfers to and from the remote key server are executed by the key management processor (KMP) in the IC350.

FIG. 4(b) depicts an exemplary system that includes the IC350in the network interface controller501of a secure network firewall500. In this system, the IC350interfaces with a network processor503that also includes interfaces to external communication links515and the firewall system511. Like the secure file server example inFIG. 4(a), the example inFIG. 4(b) shows a variety of key and KEK storage options, including a remote key server507.

FIGS. 6-11illustrate a plurality of different exemplary key management functions that the IC350can perform. These key management functions provide the IC350with the ability to securely load keys into the IC350and transfer keys out of the IC350using the flexible KMP. It should be noted however, that the IC350can be configured to perform additional and/or different key management functions if desired by a practitioner of this embodiment of the invention.

FIG. 6illustrate a process flow for loading symmetric keys wrapped with a KEK, wherein the KEK is derived from a user-supplied pass-phrase, and wherein the KEK-wrapped symmetric keys are stored in an NVRAM device. At step600, a key load command containing a user-supplied pass-phrase is passed to the IC350. The pass-phrase is passed to the cryptographic hash circuit306for generation of the digest therefrom (step602). The resulting digest is the key encryption key (KEK) that is loaded into the symmetric block cipher circuit103. First, however, the KEK is verified at step604. There are a variety of ways to ensure that the KEK generated from the pass-phrase is the same KEK used to wrap the keys that are on the NVRAM device. Of course, the appropriate pass-phrase must be used for the KEK to be successfully generated. Furthermore, this KEK may be used to encrypt a known value (which can be referred to as a “cookie”). This encrypted known value can be stored on the NVRAM with the wrapped keys. The verify step604would then decrypt the known value and check for its correctness. If the decrypted value is not equal to the known value, the IC will respond with an error command (step606) and not decrypt the wrapped keys.

Following successful verification, an encrypted key is read from the NVRAM device and passed to the symmetric block cipher circuit at step608. At step610, the block cipher circuit103decrypts the symmetric key using the KEK. The KMP then stores the decrypted symmetric key in the key table location specified by the command (step612). If the command specified multiple keys to be loaded, the process repeats (step614to step608), but the KEK need not be regenerated. Once all keys are read, decrypted, and loaded into the key table, the KMP generates a command acknowledgement that is returned to the system (step616).

FIG. 7illustrates a process flow for loading symmetric keys wrapped with a KEK, wherein the KEK is stored in a secure NVRAM device accessible only to the IC350. A key load command containing one or more KEK-wrapped symmetric keys is passed to the IC350(step700). A register may be used to store the current KEK. At step702, if that register value is not valid, then the KEK is read from the NVRAM device (step704). The KEK is loaded into the symmetric block cipher circuit103and KEK register. The encrypted symmetric key is also passed to the symmetric block cipher. At step706, the block cipher circuit103decrypts the KEK-wrapped symmetric key using the KEK. The KMP then stores the decrypted symmetric key in the key table location specified by the command (step708). If the command specified multiple keys to be loaded, the process repeats (step710to step700), but the KEK need not be reloaded. Once all keys are decrypted and loaded into the key table, the KMP generates a command acknowledgement that is returned to the system (step712).

FIG. 8illustrates a process flow for transferring symmetric keys out of the key table where each key is encrypted prior to transfer using a KEK that is stored in the NVRAM device. A key read command specifying one or more table indexes to read is passed to the IC350at step800. The KMP reads the first symmetric key from the key table at the index specified by the command (step802). A register may be used to store the current KEK. If step804results in a finding that the register value is not valid, then the KEK is read from the NVRAM (step806). Once the register value is valid, the KEK is loaded into the symmetric block cipher circuit103, and the block cipher circuit103encrypts the symmetric key using the KEK (step808). If the command specified multiple keys to be read, the process repeats (step810to step802), but the KEK need not be reloaded. Once the keys are encrypted, they are transferred out of the IC350as a command response (step812).

FIG. 9illustrates a process flow for loading symmetric keys using public key cryptography, where the symmetric keys are encrypted with the advertised public key and decrypted with the private key. At step900, a public-private key generation command is passed to the IC350, instructing it to generate an ephemeral key pair for a secure key transfer session. The KMP then generates a public-private key pair (step902) and returns the public key with the command response (step904). A register may be used to store the private key. A subsequent key load command containing one or more encrypted symmetric keys is passed to the IC350(step906). The KMP decrypts the symmetric key using the private key of the ephemeral pair (step908). The KMP then loads the symmetric key into the key table at the specified index (step910). If the command specified multiple keys to be loaded, the process repeats (step912to step906). Once all keys are decrypted and loaded into the key table, the KMP generates a command acknowledgement that is returned to the system (step914).

FIG. 10illustrates a process flow for loading symmetric keys using public key cryptography where the symmetric keys are encrypted with a shared key, wherein the shared key is derived from the advertised public keys. At step1000, a public-private key generation command is passed to the IC350, instructing it to generate an ephemeral key pair for a secure key transfer session. The KMP then generates a public-private key pair (step1002) and returns the public key and shared key parameters with the command response (step1004). A register may be used to store the private key and shared key parameters. A subsequent key load command containing one or more encrypted symmetric keys and the public key of the key sender is passed to the IC350(step1006). The KMP derives the shared key using its key pair, the sender's public key, and the shared key parameters (step1008) using a protocol such as ECC. Once derived, the KMP uses the shared key to decrypt the symmetric key (step1010). The KMP then loads the symmetric key into the key table at the specified index (step1012). If the command specified multiple keys to be loaded, the process repeats (step1014to step1006), but the shared key need not to be derived again. Once all keys are decrypted and loaded into the key table, the KMP generates a command acknowledgement that is returned to the system (step1016).

FIG. 11illustrates a process flow for reading symmetric keys using public key cryptography where the symmetric keys are encrypted with a shared key, wherein the shared key is derived from advertised public keys. At step1100, a public-private key generation command is passed to the IC350, instructing it to generate an ephemeral key pair for a secure key transfer session. The KMP generates a public-private key pair (step1102) and returns the public key and shared key parameters with the command response (step1104). A register may be used to store the private key. A subsequent command containing the public key of the reading application (i.e., the destination of the encrypted keys), the shared key parameters, and the key table indexes to be read is input to the IC350at step1106. Using the private and public keys, the sender's public key, and the shared key parameters, the KMP derives the shared key at step1108using a protocol such as ECC. At step1110, the first symmetric key is read from the key table at the specified index. The KMP encrypts the key with the shared key (step1112) and outputs the encrypted symmetric key (step1114). If the command specified multiple keys to be read, the process repeats (step1116to step1110), but the shared key need to be derived again. Once all keys are encrypted and transferred out of the IC350, the KMP generates a command acknowledgement that is returned to the system (step1118).

It should be noted that the preceding processes and associated flow diagrams forFIGS. 6-11are exemplary and by no means exhaustive. The flexible key management capabilities of IC350provide for a wide variety of other key management functions to also be employed.

To generate a firmware template for loading onto an FPGA, wherein the firmware template embodies one or more of the hardware logic circuits described herein for any of ICs150/250/350, the process flow ofFIG. 24can be performed. First, code level logic2400for the desired hardware logic circuits that defines both the operation of the circuits and their interaction with each other is created. This code, at the register level, is preferably Hardware Description Language (HDL) source code, and it can be created using standard programming languages and techniques. As examples of an HDL, VHDL or Verilog can be used. Thus, with respect to the embodiment ofFIG. 3, this HDL code2400could comprise a data structure corresponding to a combination of various IC circuits shown inFIG. 3.

Thereafter, at step2402, a synthesis tool is used to convert the HDL source code2400into a data structure that is a gate level logic description2404for the hardware logic circuits. A preferred synthesis tool is the well-known Synplicity Pro software provided by Synplicity, and a preferred gate level description2404is an EDIF netlist. However, it should be noted that other synthesis tools and gate level descriptions can be used. Next, at step2406, a place and route tool is used to convert the EDIF netlist2404into a data structure that comprises the template2408that is to be loaded into the FPGA. A preferred place and route tool is the Xilinx ISE toolset that includes functionality for mapping, timing analysis, and output generation, as is known in the art. However, other place and route tools can be used in the practice of the present invention. The template2408is a bit configuration file that can be loaded into an FPGA through the FPGA's Joint Test Access Group (JTAG) multipin interface, as is known in the art. Other techniques for loading the template into the FPGA include loading from an attached non-volatile memory device, e.g., Electrically Erasable Programmable Read Only Memory (EEPROM), and loading the template from an attached reconfigurable logic device (e.g., another FPGA).

However, it should also be noted that the process of generating template2408can begin at a higher level, as shown inFIGS. 25(a) and (b). Thus, a user can create a data structure that comprises high level source code2500. An example of a high level source code language is SystemC, an IEEE standard language; however, it should be noted that other high level languages could be used. Thus, with respect to the embodiment ofFIG. 3, this high level source code2500could comprise a data structure corresponding to a combination of various IC circuits shown inFIG. 3.

At step2502, a compiler such as a SystemC compiler can be used to convert the high level source code2500to the HDL code2400. Thereafter, the process flow can proceed as described inFIG. 24to generate the desired template2408. It should be noted that the compiler and synthesizer can operate together such that the HDL code2400is transparent to a user (e.g., the HDL source code2400resides in a temporary file used by the toolset for the synthesizing step following the compiling step). Further still, as shown inFIG. 25(b), the high level code2502may also be directly synthesized at step2506to the gate level code2404.

As would be readily understood by those having ordinary skill in the art, the process flows ofFIGS. 24 and 25(a)-(b) can not only be used to generate configuration templates for FPGAs, but also for other hardware logic devices, such as other reconfigurable logic devices and ASICs.

While the present invention has been described above in relation to its preferred embodiments, various modifications may be made thereto that still fall within the invention's scope. Such modifications to the invention will be recognizable upon review of the teachings herein. Accordingly, the full scope of the present invention is to be defined solely by the appended claims and their legal equivalents.