1. Field of the Invention
The present application relates to cryptography accelerators. More specifically, the present application relates to methods and apparatus for data handling in cryptography accelerators.
2. Description of Related Art
Conventional cryptography accelerators include a variety of mechanisms for managing the exchange of data with external devices. In many conventional implementations, specialized data handling mechanisms are configured for specific ports. Port buffers are preconfigured based on expected needs and requirements of particular ports and data path buffers are provided for implementation of cryptographic operations.
Mechanisms for performing cryptographic operations are described in Applied Cryptography, Bruce Schneier, John Wiley & Sons, Inc. (ISBN 0471128457), incorporated by reference in its entirety for all purposes. However, implementation of specialized data handling mechanisms for specific ports and providing buffers throughout a cryptography accelerator causes a variety of inefficiencies including data handling inefficiencies and inflexibility in managing different types of data.
It is therefore desirable to provide methods and apparatus for improving data handling with respect to some or all of the performance limitations noted above.
Methods and apparatus are provided for decoupling a cryptography accelerator interface from cryptographic processing cores. A shared resource is provided at the cryptography accelerator interface having multiple input ports. References to data in the shared resource are provided to allow processing and ordering of data in preparation for processing by cryptographic processing cores without substantial numbers of separate buffers in the cryptographic processing data paths.
In one embodiment, a cryptography accelerator is provided. The cryptography accelerator includes a plurality of input ports, a data input unit input controller, and policy security association lookup circuitry. The data input unit input controller is coupled to the plurality of input ports. The data input unit input controller is configured to write data blocks from the plurality of input ports into an input buffer and write entries corresponding to the data blocks into a buffer pointer table. Policy security association lookup circuitry is configured to receive header information and determine policy and security association information associated with the data blocks. The policy and security association information is forwarded with the data blocks to cryptographic processing cores.
In another embodiment, a method for data handling in a cryptography accelerator is provided. A plurality of data sequences is received at one of a plurality of input ports. The plurality of data sequences are into a shared resource. References to the data sequences are provided in the shared resource. The references identify the data sequences as well as the type of the data sequences. A policy security association lookup is performed to determine policy and security association information associated with the data sequences. The plurality of data sequences are forwarded along with policy and security association information to cryptographic processing circuitry.
In another embodiment, a cryptography accelerator is provided. The cryptography accelerator includes a plurality of input ports, a shared input buffer, a buffer pointer table, and policy security association lookup circuitry. The plurality of input ports are configured to receive data comprising header information and data blocks from entities external to the cryptography accelerator. The shared input buffer is associated with the plurality of input ports. The shared input buffer is configured to hold data blocks from the plurality of input ports. A buffer pointer table is associated with the plurality of input ports. The buffer pointer table has a plurality of entries configured to hold header information from the plurality of input ports. The plurality of entries reference data blocks in the shared input buffer. Policy security association lookup circuitry is configured to receive header information and determine policy and security association information associated with the data blocks. The policy and security association information is forwarded with the data blocks to cryptographic processing cores.
These and other features and advantages of the present invention will be presented in more detail in the following specification of the invention and the accompanying figures, which illustrate by way of example the principles of the invention.
The invention may best be understood by reference to the following description taken in conjunction with the accompanying drawings, which are illustrative of specific embodiments of the present invention.
The present application relates to implementing a cryptography accelerator. More specifically, the present application relates to methods and apparatus for providing a cryptography accelerator capable of performing secure session operations.
Reference will now be made in detail to some specific embodiments of the invention including the best modes contemplated by the inventors for carrying out the invention. Examples of these specific embodiments are illustrated in the accompanying drawings. While the invention is described in conjunction with these specific embodiments, it will be understood that it is not intended to limit the invention to the described embodiments. On the contrary, it is intended to cover alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims.
For example, the techniques of the present invention will be described in the context of a multiple port cryptography accelerator with multiple cores for performing particular cryptographic operations. However, it should be noted that the techniques of the present invention can be applied to a variety of different chip architectures that perform authentication and encryption operations in general. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The present invention may be practiced without some or all of these specific details. In other instances, well known process operations have not been described in detail in order not to unnecessarily obscure the present invention.
Although the processing unit 106 may be the central processing unit (CPU) of a system 100, it does not necessarily have to be the CPU. It can be one of a variety of processors in a multiprocessor system. In one example, a LAN interface 114 is provided to couple the processing system 100 to a local area network (LAN) to allow packet receipt and transmission. Similarly, a Wide Area Network (WAN) interface 112 can also be provided to connect the processing system to a WAN (not shown) such as the Internet. The WAN interface manages in-bound and out-bound packets to allow automatic decryption and authentication processing.
According to various embodiments, the cryptography accelerator 102 is an application specific integrated circuit (ASIC) coupled to the processor 106. The cryptography accelerator 102 can also be a programmable logic device (PLD), field programmable gate array (FPGA), or other device coupled to the processor 106. According to specific embodiments, the cryptography accelerator 102 is implemented either on a card connected to the bus 104 or as a standalone chip integrated in the system 100.
In other embodiments, the cryptography accelerator 102 itself is integrated into the processing core of a CPU of system 100, such as that available from Tensilica Corporation of Santa Clara, Calif. or ARC Cores of San Jose, Calif. In another embodiment, techniques and mechanisms of the present invention are integrated into a CPU such as a CPU available from Intel Corporation of San Jose, Calif. or AMD Corporation of Sunnyvale, Calif. By implementing cryptography accelerator functionality entirely on the processor 106, a separate card or chip in the system 100 is not needed. In still other embodiments, the processing system 100 including the cryptography accelerator 102 is implemented as a system on a chip (SOC). The network interfaces, memory, processing core, and cryptography accelerator functionality are provided on a single integrated circuit device.
The cryptography accelerator 102 is capable of implementing various network security standards, such as Secure Sockets Layer/Transport Layer Security (SSL/TLS), which provide application-transparent encryption and authentication services for network traffic. Network security standards such as SSL/TLS provide authentication through the use of hash algorithms and encryption through the use of encryption algorithms. Two commonly used hash algorithms are MD5 and the Secure Hash algorithm (SHA-1). Other hash algorithms such as MD4 and MD2 are also available. Two commonly used encryption algorithms are DES and RC4. Other encryption algorithms such as triple DES are also available. Authentication and encryption algorithms are described in Applied Cryptography, Bruce Schneier, John Wiley & Sons, Inc. (ISBN 0471128457), incorporated by reference in its entirety for all purposes.
According to various embodiments, the Gigabit MAC provides packet processing such as collision detection, back pressure, and error detection for received data. In one example, another port is a memory mapped port allowing the cryptography accelerator to obtain data from memory associated with the host. Each of the different ports may include buffers of various sizes. In one example, the buffer size is determined based on the expected packet size. For example, much larger buffers would have to be provided to hold incoming traffic for ports supporting 9 k byte packets than for ports that support only 2 k byte packets. In conventional implementations, a system designer would estimate optimal buffer sizes for the various ports. However, because each port maintains its own buffer, inefficiencies in buffer allocation can occur. Some port buffers may be underutilized while other ports receiving a large amount of traffic may not have sufficient buffer space.
In typical implementations, small buffers are also provided in data paths associated with cryptographic processing cores 217 and 209. These buffers are typically required to store data for various cryptography operations along various data paths. Having a large number of separate, fixed sized buffers leads to inefficiencies in both chip design, cost, and resource allocation. Consequently, the techniques of the present invention provide mechanisms for efficiently allocating a shared memory resource that can be optimized for different ports as well as for data paths associated with cryptographic operations.
The shared resource allows the decoupling of the interface from the various cryptographic processing cores. In one example, shared buffers are provided in both input interface 203 and output interface (not shown). The shared resource can be allocated and reallocated based on the particular specifications of the input and output ports.
Using information associated with the data, the data input unit 305 can then determine how the data should be processed. In one example, the data may require no processing at all, and may be forwarded to a bypass line 371 to allow output of the data from the cryptography accelerator 301 with substantially no cryptographic operations performed on the data. In typical implementations, the cryptography accelerator 102 includes multiple ports used for communication with external devices such as the processing unit 106 and system memory unit 108.
In a similar manner, the data input unit 303 may determine that the data from one of the input ports should be processed using one of the cryptographic processing core data paths 331, 333, 335, 337, 341, 343, 345, and 347. Any mechanism shared by various input ports to buffer and distribute data to various cryptographic processing data paths is referred to herein as a data input unit. According to various embodiments, the data input unit 303 determines whether to forward data to cryptographic processing core blocks 339 or 349 based on load information.
The data input unit 303 is configurable to provide buffering for all the different data has in the device. As noted above, in typical implementations, individual buffers were provided not only for the various ports in a cryptography accelerator, but also for the various data paths in a device. According to various embodiments, a single shared resource is provided in the data input unit to provide for buffering the various ports in the cryptographic accelerator and the various data paths in the cryptography accelerator.
In some embodiments, the cryptography accelerator 301 also includes a data routing unit 305 having multiple output ports 351, 353, 355, and 357. Any mechanism shared by output ports to buffer cryptographically processed data is referred to herein as a data routing unit. According to various embodiments, the data routing unit manages the ordering and delay of the data targeted at the various output ports. In typical embodiments, individual buffers were also associated with each of the various output ports. However, the techniques of the present invention provide a shared resource for the various output ports. According to various embodiments, the various ports are not configured with fixed size buffers and each of the ports can be modified to accommodate different types of traffic based on user needs. In one example, a particular output port may be configured to handle large size packets by allocating more buffer space in the data routing unit shared resource to that particular port.
According to various embodiments, blocks of pointers in the buffer pointer table 451 are allocated to the various input ports. The input controller 421 determines if any pointer associated with the input port is available. If a pointer associated with the input port is free or available, the data in the input port is forwarded to input buffer 441 and the pointer is assigned to the data block. In one implementation, an entry in the buffer pointer table 451 lists the free pointers available and their associated input ports. In another implementation, each entry is associated with a flag indicating if the pointer is being used and what port the pointer is associated with. If no pointers associated with the input port or available, the input controller does not hold data from the input port, as all buffer space allocated to the input port has been consumed. Any mechanism for tracking data blocks in a shared resource where the data blocks are destined for cryptographic processing is referred to herein as a buffer pointer table. Any mechanism for allocating the pointers in the buffer pointer table to various data blocks is referred to herein as an input controller 421.
When the input controller 421 has assigned data pointers from the buffer pointer table 451, a load distribution unit 461 can select data from the buffer pointer table entries. The order for all data on a particular port is maintained since the load distribution unit can be configured to select data in order from a single buffer pointer table 451. According to various embodiments, load distribution unit 461 can select data referenced by the buffer pointer table 451 using a variety of mechanisms. In one example, the load distribution unit 461 selects data from ports that have consumed all allocated buffer space. The load distribution unit can also select data entries if the data entries are entire packets. In another example, load distribution unit can select data in round-robin fashion. The load distribution unit also be configured to identify data associated with cryptographic processing.
As will be appreciated, a data destined for cryptographic processing is often processed based on information associated with the data block. In one example, a data block is processed after obtaining security association information associated with the data block. The security association information includes keys such as session keys, initialization vectors, and the particular algorithms needed to process the data. Security association data is often determined using combinations of source and destination addresses and source and destination port numbers. For example, a packet with a source of A and a destination of B may be determined to need triple DES processing, MD5 authentication, and a session key available to the cryptographic processing core from a particular memory address. The load distribution unit 461 identifies information needed for cryptographic processing of the data and provides a pointer to the information. In many instances, the pointer is a pointer to the header of a packet stored in the input buffer 441.
According to various embodiments, the load distribution unit 461 passes information to target list 471. In one example, target list 471 includes multiple lists, each list associated with a particular data path. One list may be associated with bypass data that should be passed through the cryptography accelerator substantially without processing. Other lists may be associated with public key operation data paths. In one example, a modular exponentiation unit list is provided for performing modulus operations on data in the input buffer 441. Still other lists include pointers to data blocks in buffer memory 441 requiring processing by one of the cryptographic accelerator course. The data pointer lists are associated with a header pointer list that identifies how to derive information such as security association information for processing the data corresponding to the pointers in the data pointer list. The output controller 481 is responsible for forwarding data associated with the pointers in the target list to the various data paths. Typically, data associated with each of the lists in the target list 471 is pulled in round-robin fashion. In one example data associated with each list gets the same amount of bandwidth out of the input buffer 441.
The input buffer allows storage of information for use in various cryptographic operations as well as the allocation of memory to various ports as provided by the buffer pointer table 451.
It should be noted that much of the load distribution processing and the data path decision processing is performed using pointers to blocks of memory in the input buffer. In a cryptography processing context, this provides important benefits including the capability to process data and associated security association information along data paths where the data paths can be implemented substantially without data path buffers.
Consequently, merge data unit buffer lists 621 and 623 are linked to policy security association lookup unit header list 631. When a pointer is provided to merge data unit buffer list 621, a pointer is also provided to policy security association lookup unit header list 631. The merge data unit buffer list 621 pointer allows later combination of data with security association information extracted from a policy security association lookup unit. When the data is combined with the security association information, the data can be processed using one of a number of cryptographic processing cores.
In one example, the policy security association lookup unit 791 uses the information in the security association handle 715 to identify security association information. The information identified can be used for both inbound and outbound packets to allow the packets to be classified into flows. In one instance, the security association handle 715 includes up to 2 k of the header of the associated packet. The policy security association lookup unit then issues a security association update 717 to modify data such as sequence numbers associated with a flow.
The policy security association lookup unit 791 acquires security association data 721 and passes the security association data 725 to a merge data unit 793. The merge data unit 793 combines the security association data 723 with the data 711 and header 713. It should be noted that the policy security association lookup unit processing may vary depending on whether the packet is an inbound packet or an outbound packet. For an outbound packet, the policy security association lookup unit may also be responsible for determining header information such as outer IP header information. For an inbound packet, the outer IP header information is included in the data 711 and header information 713. Various types of error checking can also be performed by the policy security association lookup unit 791 to determine that the flow referenced by a security association handle 715 is a valid one.
It should be noted that each merge data unit 793 can then pass the combined data to one of multiple cryptography processing core data paths. In one example, two merge data units are provided in a cryptography accelerator having a data input unit and eight processing cores. The two merge data units are also associated with a single policy security association lookup unit. Each merge data is coupled to four cryptographic cores. In some examples, each merge data unit would select one of the four cryptographic processing cores to handle data based on load.
According to various embodiments, the load distributor schedules data sequences by scheduling the pointers in the buffer pointer table. At 811, the load distributor provides a pointer to a policy security association lookup unit list. It should be noted that some data sequences may require no cryptographic core processing and may instead be provided to a bypass list or a public key processing list. At 813, the output controller pulls data from the input buffer along with any associated policy security association lookup unit header information. The output controller pulls data from the input buffer based on pointers provided in a target list. At 815, the policy security association lookup is performed using information such as header information associated with the data sequence. At 821, a merge data unit combines the data sequence with the results of a policy security association lookup. At 823, input buffer memory and any associated free pointers are returned.
According to various embodiments, the input controller 921 writes data blocks to buffer memory and data block pointers to a buffer pointer table 951 in the order that the input controller receives them. In one example, pointers to blocks 1, 2, and 4 may be placed into a first port buffer list while pointers to blocks 3 and 5 may be placed in a second port buffer list. A routing unit 961 recognizes the ordering and pulls pointers in order and places the pointers in the target list 971. In many implementations, the target list 971 includes lists of pointers each associated with the various output ports. In one example, lists of pointers are provided in target list 971. In one example, four lists of pointers correspond to output ports 911, 913, 915, and 917. Each pointer in the target list 971 corresponds to a block in output buffer 991. It should be noted that in the data input unit, the pointers in the buffer pointer table are allocable to the various input ports based on the particular needs and requirements of the input ports.
In the data routing unit, however, the pointers in the target list 971 are allocable to the various output ports based upon the needs and requirements of the various output ports. In one example, output port 911 may be configured to support large packets. Consequently, the large number of output buffer memory manager 991 would be allocated to output port 911. In one example, the routing unit 961 would pull a first block pointer associated with a flow and place the pointer into a buffer list associated with a Gigabit MAC output port. The routing unit 961 would not pull another block from that particular flow until the second block pointer is pulled. In this manner, the routing unit 961 can pull data blocks in order from the buffer pointer table even if the blocks of data came from different data paths in the cryptographic accelerator.
It should be noted that although the blocks on a particular data path will typically be in order, the blocks received from multiple data paths by the input controller will not necessarily be in order. That is, blocks 3 and 5 in a sequence may be received along a data path before blocks 1, 2 and 4 are received from another data path. The routing unit 961 pulls pointers to data blocks in order from the buffer pointer table and places them in an output port list in the target list 971. The output controller 981 uses the pointers in the target list 971 to identify data blocks in the output buffer 991 to forward to the output ports.
While the invention has been particularly shown and described with reference to specific embodiments thereof, it will be understood by those skilled in the art that changes in the form and details of the disclosed embodiments may be made without departing from the spirit or scope of the invention. It is therefore intended that the invention be interpreted to include all variations and equivalents that fall within the true spirit and scope of the present invention.
This application claims priority under U.S.C. 119(e) from U.S. Provisional Application No. 60/434,745, filed Dec. 18, 2002, Entitled: Methods And Apparatus For Cryptography Accelerator Data Handling, by Mark Buer and Donald P. Matthews, the entirety of which is incorporated by reference for all purposes. The present application is also related to concurrently filed U.S. patent application Ser. No. 10/351,258 entitled Methods And Apparatus For Ordering Data In A Cryptography Accelerator, by Tim Paaske and Mark Buer, U.S. patent application Ser. No. 10/350,907 entitled Cryptography Accelerator Input Interface Data Handling, by Mark Buer and Don Matthews, and U.S. patent application Ser. No. 10/350,922, entitled Cryptography Accelerator Data Routing Unit, by Mark Buer and Don Matthews, the entireties of which are incorporated by reference for all purposes.
Number | Name | Date | Kind |
---|---|---|---|
4491909 | Shimizu | Jan 1985 | A |
4774706 | Adams | Sep 1988 | A |
RE33189 | Lee et al. | Mar 1990 | E |
5161193 | Lampson et al. | Nov 1992 | A |
5297206 | Orton | Mar 1994 | A |
5329623 | Smith et al. | Jul 1994 | A |
5365589 | Gutowitz | Nov 1994 | A |
5471482 | Byers et al. | Nov 1995 | A |
5631960 | Likens et al. | May 1997 | A |
5734829 | Robinson | Mar 1998 | A |
5751809 | Davis et al. | May 1998 | A |
5796744 | Krawczak et al. | Aug 1998 | A |
5796836 | Markham | Aug 1998 | A |
5809147 | De Lange et al. | Sep 1998 | A |
5867706 | Martin et al. | Feb 1999 | A |
5870474 | Wasilewski et al. | Feb 1999 | A |
5870479 | Feiken et al. | Feb 1999 | A |
5933503 | Schell et al. | Aug 1999 | A |
5936967 | Baldwin et al. | Aug 1999 | A |
5943338 | Duclos et al. | Aug 1999 | A |
5949881 | Davis | Sep 1999 | A |
5953416 | Hasebe et al. | Sep 1999 | A |
5983350 | Minear et al. | Nov 1999 | A |
6003135 | Bialick et al. | Dec 1999 | A |
6038551 | Barlow et al. | Mar 2000 | A |
6069957 | Richards | May 2000 | A |
6101255 | Harrison et al. | Aug 2000 | A |
6111858 | Greaves et al. | Aug 2000 | A |
6115816 | Davis | Sep 2000 | A |
6157955 | Narad et al. | Dec 2000 | A |
6189100 | Barr et al. | Feb 2001 | B1 |
6216167 | Momirov | Apr 2001 | B1 |
6226710 | Melchior | May 2001 | B1 |
6269163 | Rivest et al. | Jul 2001 | B1 |
6295602 | Weissman et al. | Sep 2001 | B1 |
6295604 | Callum | Sep 2001 | B1 |
6320964 | Callum | Nov 2001 | B1 |
6327625 | Wang et al. | Dec 2001 | B1 |
6349405 | Welfeld | Feb 2002 | B1 |
6378072 | Collins et al. | Apr 2002 | B1 |
6393026 | Irwin | May 2002 | B1 |
6393564 | Kanemitsu et al. | May 2002 | B1 |
6421730 | Narad et al. | Jul 2002 | B1 |
6477646 | Krishna et al. | Nov 2002 | B1 |
6484257 | Ellis | Nov 2002 | B1 |
6493347 | Sindhu et al. | Dec 2002 | B2 |
6529508 | Li et al. | Mar 2003 | B1 |
6701432 | Deng et al. | Mar 2004 | B1 |
6704871 | Kaplan et al. | Mar 2004 | B1 |
6708273 | Ober et al. | Mar 2004 | B1 |
6751677 | Ilnicki et al. | Jun 2004 | B1 |
6751728 | Gunter et al. | Jun 2004 | B1 |
6760444 | Leung | Jul 2004 | B1 |
6778495 | Blair | Aug 2004 | B1 |
6791947 | Oskouy et al. | Sep 2004 | B2 |
6807183 | Chow et al. | Oct 2004 | B1 |
6831979 | Callum | Dec 2004 | B2 |
6862278 | Chang et al. | Mar 2005 | B1 |
6909713 | Magnussen et al. | Jun 2005 | B2 |
6963979 | Fairclough et al. | Nov 2005 | B2 |
6981140 | Choo | Dec 2005 | B1 |
6983366 | Huynh et al. | Jan 2006 | B1 |
6983374 | Hashimoto et al. | Jan 2006 | B2 |
6996842 | Strahm et al. | Feb 2006 | B2 |
7003118 | Yang et al. | Feb 2006 | B1 |
7005733 | Kommerling et al. | Feb 2006 | B2 |
7017042 | Ziai et al. | Mar 2006 | B1 |
7020137 | Kadambi et al. | Mar 2006 | B2 |
7039641 | Woo | May 2006 | B2 |
7055029 | Collins et al. | May 2006 | B2 |
7062657 | Law | Jun 2006 | B2 |
7086086 | Ellis | Aug 2006 | B2 |
7191341 | Paaske et al. | Mar 2007 | B2 |
7266703 | Anand et al. | Sep 2007 | B2 |
20020001384 | Buer et al. | Jan 2002 | A1 |
20020004904 | Blaker et al. | Jan 2002 | A1 |
20020009076 | Engbersen et al. | Jan 2002 | A1 |
20020039418 | Dror et al. | Apr 2002 | A1 |
20020044649 | Gallant et al. | Apr 2002 | A1 |
20020057796 | Lambert et al. | May 2002 | A1 |
20020078342 | Matthews, Jr. | Jun 2002 | A1 |
20020085560 | Cathey et al. | Jul 2002 | A1 |
20020097724 | Halme et al. | Jul 2002 | A1 |
20020108048 | Qi et al. | Aug 2002 | A1 |
20020165718 | Graumann et al. | Nov 2002 | A1 |
20020191790 | Anand et al. | Dec 2002 | A1 |
20030005144 | Engel et al. | Jan 2003 | A1 |
20030014627 | Krishna et al. | Jan 2003 | A1 |
20030023846 | Krishna et al. | Jan 2003 | A1 |
20030041252 | Fung et al. | Feb 2003 | A1 |
20030046423 | Narad et al. | Mar 2003 | A1 |
20030084308 | Van Rijnswou | May 2003 | A1 |
20030084309 | Kohn | May 2003 | A1 |
20040039936 | Lai | Feb 2004 | A1 |
20040054914 | Sullivan | Mar 2004 | A1 |
20040083375 | Foster et al. | Apr 2004 | A1 |
20040098600 | Eldeeb | May 2004 | A1 |
20040123096 | Buer et al. | Jun 2004 | A1 |
20040123120 | Buer et al. | Jun 2004 | A1 |
20040123123 | Buer et al. | Jun 2004 | A1 |
Number | Date | Country |
---|---|---|
0876026 | Nov 1998 | EP |
1132800 | Sep 2001 | EP |
WO 0180483 | Oct 2001 | WO |
WO 0241599 | May 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20040123119 A1 | Jun 2004 | US |
Number | Date | Country | |
---|---|---|---|
60434745 | Dec 2002 | US |