BACKGROUND OF THE INVENTION1. Field of the Invention
The present invention relates to the formation and use of secure network connections. More specifically, the present invention relates to safely scanning network connections without sacrificing user privacy.
2. Description of the Related Art
Computer networks, and in particular Wide Area Networks (WANs) such as the Internet, provide opportunities for the misuse and abuse of communications traveling thereover. For example, two users communicating via the WAN may have their communications intercepted and/or altered. Also, it is possible for one user to misrepresent his or her identity to another user. As a final example, a user may utilize network resources and communications to disrupt all or part of the network.
Thus, there is a need for both privacy and authentication between users of the WAN communicating with one another. In other words, users should be able to rely on the fact that their transmissions will not be intercepted or altered, and that transmissions from someone purporting to be a particular user do in fact originate from that user.
One type of defense against ill-intentioned uses of the WAN is a device operating at the edge of a private network, such as a Gateway, Firewall or some other dedicated network appliance. Such a device operates to filter transmissions between the private network and the WAN and/or to protect the transmissions that do go through by encrypting/decrypting (i.e., encoding/decoding) those transmissions.
Other related types of defenses function by establishing the identity of a sender and/or recipient before sending/receiving a communication. Still other defenses include establishing a secure channel between two communicating devices.
A particular conventional protocol for providing security between devices operating over an Internet Protocol (IP) network is known as IPsec. Short for IP Security, IPsec is a set of protocols supporting the secure exchange of IP packets at a network layer. Two of the protocols used are the Authentication Header protocol (AH) and the Encapsulating Security Payload protocol (ESP).
AH is designed to ensure that transmitted packets are not altered during transit over the network, but does not protect the contents of the packets from being viewed by other users of the network such as intercepting parties. ESP, on the other hand, ensures the confidentiality of the packet contents. ESP provides an optional authentication mechanism; however, this mechanism is only for authenticating the data payload of the packet (and associated ESP headers/trailers). Therefore, ESP does not authenticate an IP Header of a packet indicating an original IP address on the network from which the packet originated. It is also possible to use AH and ESP in conjunction with one another, in order to achieve the advantages of both.
Whether using AH or ESP, IPsec operates in either transport or tunnel mode. Transport mode is often used in host-to-host communications; i.e., when the peer devices are the endpoints of communication. Transport mode is most useful within an overall IPsec environment including the two endpoints. Tunnel mode is typically used in communications between an IPsec-protected system and some other endpoint, such as communications sent from a private network over the Internet. In tunnel mode, the payload of a secured IP packet carries another packet containing the actual data payload to be transmitted.
A common use of the tunnel mode is to implement a Virtual Private Network (VPN). VPNs are networks that use publicly-available network resources, such as the Internet, to construct a network accessible only by selected parties. For example, a company may create its own version of a Local Area Network (LAN) using the Internet, or a worker working from a remote location may be able to utilize company resources at a company headquarters.
In order to implement the various protocols and modes of IPsec such as those discussed above, a security association (SA) is typically formed. An IPsec SA is essentially a contract or agreement between parties defining conditions according to which the two parties will communicate. For example, an IPsec SA is typically a one-way connection that defines, for example, encryption algorithms to be used during information exchange. SAs are defined by such parameters as an IP destination address and a security protocol identifier (e.g., AH or ESP). SAs typically include a security parameter index (SPI), which is a 32 bit identification number.
If an IPsec SA is considered a contract or agreement, then the terms thereof can be considered to be negotiated by a separate protocol (or manually). In other words, both communicating parties must agree on actions that will be taken on communicated packets in order to encrypt/decrypt those packets. One such protocol is known as the Internet Security Association and Key Management Protocol (ISAKMP), and one implementation of ISAKMP is known as the Internet Key Exchange (IKE).
IKE typically operates in two phases. In a first phase, parties agree as to how to protect further negotiation traffic. For example, IKE may authenticate a sender by virtue of, for example, public key encryption, also known as Diffie-Hellman encryption. In public key encryption, each user generates a public and private key, where the public key is then sent to the other party. When each user combines his own private key with the other's public key (and perhaps additional information), they each obtain an identical secret key. This secret key serves as a basis for deriving subsequent cryptographic keys.
In this way, a first user can encrypt a message using the second user's public key, and then only the second user (using his own private key) will be able to decrypt and receive the message.
Also, a first user can use his private key to sign a message and the second user, with the first user's public key, can receive and authenticate the transmitted message. Thus, the first user is authenticated to the second user as the one who sent the transmission; i.e., a “digital signature.”
This latter methodology, however, does nothing to guard against the eventuality that a third party is merely pretending to be the sender (i.e., the first user) when the keys were generated in the first place. Therefore, independent and trusted Certification Authorities (CAs) exist which issue digital certificates verifying the association of a public key with a particular user, along with other identifying information.
There are two primary modes forphase1 of IKE: main mode and aggressive mode. Main mode, generally speaking, is a more involved but more secure method. Aggressive mode, though faster, sacrifices identity protection; however, using the public key encryption methodology just discussed obviates the need for this feature.
In a second phase, IKE negotiates the actual IPsec SA (over which the actual application layer data exchanges will take place) by setting up the encryption/authentication keys for the AH and/or ESP protocols. In particular, “quick mode” negotiates the SAs for general purpose IPsec communications. Also, it should be noted that, typically, only onephase1 negotiation is needed for an associated plurality ofphase2 operations by a plurality of peer devices. This allows the multiple peer devices to each take advantage of thephase1 proceedings, thereby establishing secure connections more quickly and more easily.
As shown in the above discussion, therefore, various solutions exist for implementing private and authenticated network communications.
However, the various conventional solutions suffer from a variety of shortcomings. For example, it is often the case that one device participating in a secure network connection such as IPsec is located behind a gateway or firewall device. As is known, such devices are typically located on the edge of a private network, and serve to intercept and/or route traffic between the private network devices and other devices, frequently via a public network such as the Internet. Firewalls may be implemented by, for example, corporate network administrators and Internet Service Providers (ISPs).
Such firewall devices conventionally serve a number of functions; for example, they are often used to scan or filter network traffic so as to prevent unauthorized data or data types from entering the private networks. In this way, firewalls may prevent viewing of sites prohibited by network administrators, such as gambling sites on the Internet. They may also prohibit data that is deemed likely to contain viruses or other files that could prove harmful to the network. Firewalls may also be used as the sole entry point to the private network from outside of the private network, so that network administrators may require a username/password combination at the firewall in order to allow only authorized users access.
Conventional firewalls, however, are not designed to operate well in conjunction with security protocols discussed above, such as IPsec. For example, if a device on a public network wishes to communicate securely with a device operating behind a firewall on a private network, no satisfactory solution exists.
One conventional solution in this scenario is to simply let encrypted data pass unhindered through the firewall. This solution is shown inFIG. 1A, wheredevices100 and140 (operating on public andprivate networks120 and130, respectively) communicate viafirewall110. However, this solution suffers from the obvious problem that it does not allow the firewall to perform its function of scanning/filtering the data, and may therefore let harmful or undesirable traffic onto the private network.
Another solution would be to establish a secure channel between the remote device and the firewall. Then, decryption can occur at or before the firewall, after which the decrypted packets can be scanned/filtered and forwarded to the recipient device within the private network. However, this solution suffers from the fact that operators of the firewall will have access to the decrypted information intended for the recipient device. In other words, typically a firewall device is not a customer device; it is a service provider device, and, as such, it is not typically secure or desirable (from the customer's viewpoint) to allow access to decrypted packets there. Moreover, if it is necessary to establish a second secure connection between the firewall and the device on the private network in order to re-encrypt the data packets (e.g., negotiate a second SA and set up a second IPsec session), then non-negligible computing resources must be devoted to this task.
Therefore, what is needed is a system and method for establishing a secure connection between a private network device and a second device, even over a WAN such as the Internet, without permitting a firewall operator to access a content of data transmitted via the connection.
SUMMARY OF THE INVENTIONIn a first exemplary embodiment, the present invention relates to a method for implementing secure network communications between a first device and a second device, at least one of the devices communicating with the other device via a separate computer. Such a method may comprise obtaining an encryption parameter that is shared by the first device, second device and separate computer and copying a data packet sent by the first device, within the separate computer. Thereafter, the method may comprise decrypting the copy of the data packet within a portion of the separate computer, wherein contents of the portion are inaccessible to an operator of the separate computer. Finally, the method may comprise scanning the decrypted copy of the data packet for compliance with a predetermined criterion associated with the separate computer for allowing transmissions therethrough.
In a second exemplary embodiment, the present invention relates to a firewall device for mediating communications between a private network device and a device external to the private network. Such a firewall device may comprise an encryption parameter determining circuit operable to determine an encryption parameter that is known to the external device and the private network device, as well as a content scanner containing the encryption parameter and operable to decrypt contents of a transmission from the external device for scanning, said contents being encrypted with said encryption parameter, said decrypted contents being inaccessible to an operator of the firewall device. In the firewall device, the content scanner may permit a forwarding of the transmission to the private network device upon a determination that the contents of the transmission comply with a predetermined criterion of the firewall device.
In a third exemplary embodiment, the present invention relates to an article of manufacture, which comprises a computer readable medium having stored therein a computer program carrying out a method for scanning contents of an encrypted data packet. Such a computer program may comprise a first code segment for acquiring an encryption parameter used by a first and second device to encrypt a data packet that is transmitted therebetween via the article of manufacture, as well as a second code segment for decrypting the data packet, using the encryption parameter. The computer program may further comprise a third code segment for restricting a user of the article of manufacture from accessing contents of the data packet. Finally, the computer program may comprise a fourth code segment for filtering the data packet based on whether the contents comply with a predetermined criterion associated with the article of manufacture.
In a fourth exemplary embodiment, the present invention relates to a method of transmitting data. Such a method may comprise constructing a first encryption parameter with a firewall device that receives and forwards traffic intended for a private network device associated therewith, and thereafter constructing with the firewall device, based on the first encryption parameter, a second encryption parameter that was previously negotiated between the firewall device and the private network device. The method may further comprise receiving at the firewall device a transmission that is encrypted using the second encryption parameter, and thereafter sending the received transmission from the firewall device to the private network device.
In a fifth exemplary embodiment, the present invention relates to a method of transmitting data. Such a method may comprise constructing an encryption parameter with a recipient device through a firewall device and sharing the encryption parameter with the firewall device. The method may further comprise encrypting a transmission using the encryption parameter. Finally, the method may comprise sending the transmission to the recipient device via the firewall device.
In a sixth exemplary embodiment, the present invention relates to a method of filtering encrypted data at a firewall device. Such a method may comprise partitioning a filtering portion of the firewall device from an operator thereof, decrypting the encrypted data within the filtering portion and forwarding the data if it complies with at least one filtering rule associated with the firewall device.
In a seventh exemplary embodiment, the present invention relates to a firewall device. Such a firewall device may comprise means for obtaining an encryption parameter common to both a first device and a second device, means for decrypting encrypted data transmitted from the first device using the encryption parameter and means for forwarding the encrypted data to the second device.
The features and advantages of the invention will become apparent from the following drawings and description.
BRIEF DESCRIPTION OF THE DRAWINGSThe present invention is described with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Additionally, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears.
FIG. 1A demonstrates a prior art networking environment.
FIG. 1B demonstrates a network environment in which one embodiment of the present invention might operate, including a firewall operating on the edge of a private network and communicating with another device via a public WAN.
FIG. 2 demonstrates a methodology for negotiating a pair of SAs according to the embodiment of the invention shown inFIG. 1B.
FIG. 3 describes an embodiment of the invention in which various types of IPsec traffic is relayed through a firewall computer both ways between a pair of devices.
FIGS. 4A,4B and4D describe structures of exemplary IPsec packets that may be transported according to various embodiments of the invention.
FIG. 4C describes an exemplary IPsec packet that does not require specialized scanning related to the present invention.
FIG. 5 demonstrates exemplary hardware components of a firewall computer according to one embodiment of the invention.
FIGS. 6A-6D describe exemplary certificate structures for each device type when certificates are used within the SA process.
FIG. 7 demonstrates a methodology for negotiating a pair of SAs according to an alternate embodiment of the invention.
DETAILED DESCRIPTIONWhile the present invention is described below with respect to various exemplary embodiments, the present invention is not limited to only those embodiments that are disclosed. Other embodiments can be implemented by those skilled in the art without departing from the spirit and scope of the present invention.
In this regard, although IPsec is used herein to demonstrate an exemplary embodiment of the invention, it should be understood that the present invention can be utilized in the context of other conventional network security protocols, such asLayer 2 Tunneling Protocol (L2TP) and Point-to-point Tunneling Protocol (PPTP), as would be apparent. Similarly, other protocols/methodologies besides IKE and public key encryption exist which are useful in implementing network security protocols, and the present invention can be implemented in those environments as well.
Moreover, it should be noted that the terminology and associated definitions used herein are subject to some level of disagreement in the art, as is known. For example, some artisans will describe IKE as an instance of ISAKMP, whereas others will describe IKE as the combination of ISAKMP with certain other protocols. Such terminology and definitions are used singularly and consistently herein only for the purposes of clarity; therefore, it should be understood that such usage is designed merely to explain and not limit the present invention. Similarly, terms such as “encryption,” “encryption parameters” or any other term of art, unless otherwise specified or limited herein, are not intended to be re-defined to have a special meaning herein and should be given their broadest reasonable interpretations consistent with the conventional understanding in the art.
The present invention, in an exemplary embodiment, operates by modifying the functionality of a conventional firewall device operating on the edge of a private network and communicating with another device via a public WAN, such as the Internet. This configuration is shown in both ofFIGS. 1A and 1B, wheredevice140 operates on aprivate network130 behind firewall or otherdedicated network appliance110, and communicates via WAN120 (such as the Internet) withdevice100. Note thatdevice100 could be a single device onWAN120, or could be operating on its own private network or according to any other conventional network configuration, as would be apparent.
Modifications of such afirewall110 according to one embodiment of the invention are implemented in the establishment of a security association(s) (SA(s)) for an IPsec session(s) involvingdevices100 and140, as well as in a forwarding mechanism for the packets being exchanged according to these established parameters.
According to one embodiment of the invention,firewall110 acquires information such as an encryption parameter(s) that allows it to decrypt (and thereafter scan) incoming data. However, this information is restricted to a pre-determined portion of the firewall, such as a single hardware chipset, from which it may not be extracted by an operator of the firewall.
In this way, a copy of an incoming data packet can be made and forwarded to the pre-determined portion such as the single chipset; there it can be decrypted and scanned for compliance with firewall rules. Afterwards, only an affirmative/negative response need be provided by the chipset, whereupon the original version of the data packet (which may be buffered upon its entry to the firewall110) can be passed on by thefirewall110 torecipient device140. The copy of the data packet may then simply be deleted from the chipset where it was decrypted.
In one embodiment of the invention, as discussed with respect toFIGS. 1B and 2, two separate SAs and associated IPsec sessions can be negotiated, withfirewall110 forwarding parameters betweendevices100 and140. In this embodiment, the three devices collaborate to build a common secret key.
In another embodiment of the invention, as discussed with respect toFIG. 7, a first SA may be established betweendevices100 and140, and a second SA may be established betweendevices110 and140. Here,devices100 and140 first establish a secret key together via the first SA.Device140 then uses a public key offirewall110 to pass encrypt and pass the secret key tofirewall110, to be used as described above during IPsec transmissions.
In either embodiment, it will be assumed for the purposes of explanation that an IP address ofdevice140 will generally be available todevice100 over thepublic network120. However, if this is not the case due to the presence ofdevice140 onprivate network130 that restricts access to its member device addresses, then it may be necessary to implement some additional measure(s) for allowingdevices100 and140 to communicate securely. One such exemplary methodology is described in detail in co-pending Application No. (insert number here), which is hereby incorporated herein by reference.
InFIG. 1B, as just described, adevice100 is shown as negotiating SA1 withfirewall110.Firewall110 negotiates a second SA, SA2, withdevice140. Thereafter,separate IPsec tunnels1 and2 are implemented which allowdevices100 and140 to securely communicate with one another. During the negotiation of SA1 and SA2,firewall110 gains access to an encryption parameter that allows it to decrypt information sent betweendevices100 and140. However, decryption of the information occurs only within a portion offirewall110 that is off-limits to an operator of thefirewall110. This portion may thus acquire a copy of incoming data packets, decrypt the copy, scan the copy for compliance with firewall rules, and allow/deny entry of the encrypted packet through thefirewall110 and ontoprivate network130.
FIG. 2 demonstrates a methodology for negotiating a pair of SAs according to the embodiment of the invention shown inFIG. 1B. InFIG. 2,device100 seeks to initiate an SA withdevice140. Note thatdevice100 may itself be a gateway or firewall device, or it may be a router or simply a host connected toWAN120.
As discussed above, an SA describes operations that should be applied to future data packets including an authentication method, an encryption method (and associated algorithm), authentication/encryption keys and various other parameters (such as the Security Parameter Index (SPI), an effective lifetime of the key(s), etc.). IKE allows two devices to negotiate and agree on these operations, including the establishment of the keys. As also noted above, it will be assumed for the purposes of this description thatdevice100 has access to a device address ofdevice140, such as its IP address.
InFIG. 2,device100 initiates aphase1 session (PH1) for the first of the two conventional phases in negotiating an SA using IKE. In this embodiment,device100 sends amessage210 tofirewall110 at an IP address F1 of the firewall that may be advertised (i.e., made public) overWAN120. This message, as discussed above, is generally intended to protect further negotiation traffic by way of, for example, the Main mode. As is known, the Main mode provides protection for the identity of the involved devices. It is typically divided into three sets of messages, each set containing two messages. The first two messages are used for negotiating a security policy for the exchange, the next two messages are used for the Diffie-Hellman keying material exchange and the last two messages are used for authenticating the peers, such as with digital signatures and optional digital certificates.
In one embodiment of the invention,device100 may be preset such that it believes that address F1 is an address fordevice140. In this scenario,firewall110 may be aware upon reception oftransmission210 which device with which it will then establish a secondary SA, SA2, without having to inspect the details of theSA transmission210. This implementation may utilize “loop-back” addresses onfirewall110, one for each possible peer onprivate network130. In other words, there will be a different address F1 associated with each of the private network devices.
Another implementation utilizes a single F1 IP address for all IPsec flows on the WAN side. In this solution,firewall110 must examine thetransmission210 to determine which private network device will be the tunnel endpoint for communications withdevice100. This implementation has the advantage that adevice100 can communicate with a plurality of devices onprivate network130, while itself needing to establish an SA(s) only with firewall110 (i.e., one SA per destination device).
In the latter implementation there is a need to maintain a name and identity ofdevice100, either locally at thefirewall110 or at a Domain Name System/Server (DNS). This information can also be used to identifydevice140 as the sought-after device.
It should be noticed that SA2 may start by using asimilar message220 upon reception byfirewall110 of the first SA1 message. In the various scenarios discussed above, in cases wherefirewall110 does not know the identity of thedestination device140 by one of the above-defined methods, it will wait for an SA message fromdevice100 containing an identification payload. In such a case,firewall110 should proceed with aphase1 negotiation withdevice100 until this message is received.
FIG. 2 describes only the case when either the identity ofdevice140 is included in thefirst message210 or is already known byfirewall110. One limitation when the destination identity is not known is thatfirewall110 should not start negotiating parameters which may turn out to be unsuitable fordevice140; a solution in this case is to define a common set of rules which will be accepted by all devices onprivate network130.
Assumingfirewall110 is aware of the identity ofdevice140,firewall110 may then start asecondary phase1SA message220 for SA2, using another IP address F2 forfirewall110 that belongs toprivate network130 and to whichdevice140 will be able to answer.Device140 is now the SA responder and will answer tofirewall110 using a PH1BA type message230. In other words,device140 will receive parameters associated withdevice100 but having address F2, and will respond with its own parameters to that address.
Afterwards,firewall110 responds to thefirst SA message210 and provides a similaranswer PH1FA message240 todevice100. In other words, the same parameters are negotiated betweenfirewall110 anddevice100 as betweenfirewall110 anddevice140. The two SAs are thus independent, but will negotiate the same rules and parameters thanks to the interleaving of the SA messages.
At thispoint firewall110 provides its own authentication parameters, such as its own authentication public key, but uses the identity ofdevice140. If this checking is done via certificates, then the certificates will be defined according toFIG. 6, as will be discussed.
It should be noted that the SA mechanisms betweendevice100 andfirewall110 on one side anddevice140 andfirewall110 on the other side fully meet the IKE protocol rules and process, so that no change is required ondevices100 or140, which are therefore transparent to this implementation.
Oncephase1 is achieved, a fully secure authenticated channel with possible encryption is established in order to proceed withSA phase2.Phase2 allows the definition of parameters for the IPSec protocol itself, and generally makes use of the Quick mode discussed above. A Diffie-Hellman key exchange may be done to achieve forwarding secrecy.
As referred to above, the conventional Diffie-Hellman methodology allows two users to build a symmetric secret key (same key used for encryption and decryption) using their local private keys, a known Diffie-Hellman (DH) key and the other device's public key (which can either be transmitted viafirewall110, or is obtained from a certificate).
Although conventionally implemented for two users as just explained, this methodology can be extended for any number of users. According to this embodiment of the present invention, a secret shared key can be developed using the Diffie-Hellman algorithm that is common to all ofdevices100,110 and140.
For example, at the beginning of a use of the Diffie-Hellman algorithm,device100 having address A generates a private key referred to as “a.” A corresponding public key will have the form Ta=ga, where the parameter “g” is a known parameter according to the Diffie-Hellman algorithm, i.e., the DH key. Similarly,firewall110 will have private key “f” and public key Tf=gf, whiledevice140 will have private key “b” and public key Tb=gb.
Thereafter,device100 may send public key Tatofirewall110, which can then calculate a secret key Saf=(Ta)f=gaf. Firewall similarly sends T1todevice100, which can then calculate the secret key Sfa=(Tf)a=gaf=Saf. Thus,devices100 and110 share a common secret key, hereafter referred to as “C.”
Oncedevices100 and110 share key C, they may each calculate the same public key TC=gC.Device140 having private key “b,” meanwhile, calculates public key Tbgb, as already pointed out.
Thereafter,device140 sends Tbtofirewall110, which can calculate secret key SbC=(Tb)C=gbC. Firewall similarly sends TCtodevice140, which can then calculate secret key SCb=(TC)b=gCb=SbC.
Finally, to upgrade the secret shared key C withdevice100, thefirewall110 forwards Tbtodevice100, and thendevice100 can compute the new secret key in the same manner as just performed byfirewall110, using secret key C which it already posses from before, i.e.: SbC=(Tb)C=gBC.
In short,devices100 and110 calculate a secret key shared therebetween. Thereafter,devices110 and140 calculate a second secret key shared therebetween, using the first secret key. Finally,device100 is able to calculate the second secret key using the first secret key and the public key ofdevice140. Thus, all three devices share the (second) secret key in common, which can be used for encrypting/decrypting IPsec packets.
Another way of describing the same method is to say thatdevice100 calculates the secret key using its common secret key (C) established withdevice110, the DH key and the public keys ofdevice140, whiledevice140 calculates the same secret key using its own local private key, the DH key and the common public key (Tc) ofdevices100 and110. The common secret key (SbC), once calculated byfirewall110, should only be stored within, for example, a hardware chipset that is not accessible by an administrator of the firewall.
Note that in this description, the secret key is calculated twice betweendevices100 and110. However,device140 may also initiate the exchange(s). In either case, only one of the two end devices should have to perform the two-step secret key calculation.
As long as the SAs betweendevice100 andfirewall110, and betweenfirewall110 anddevice140, are valid, the same secret key is valid. Therefore the same parameters of key lifetime should typically be negotiated both ways.
Either one of thedevices100 or140 might initiate the quick mode exchange associated withphase2 SA negotiations. InFIG. 2,device140 is the initiator of the second phase starting withPH2BI message250.Firewall110 rebuilds asimilar message PH2FI260, where the authentication (public) key ofdevice140 is replaced with a computation of the public keys ofdevices110 and140 together (sincedevice100 will need the parameter ofdevice140 for the secret key computation, as just described).
Device100 answers with its own parameters in PH2AA message270 tofirewall110, and thefirewall110 forwards the message including the same parameter values, except for the authentication key ofdevice100, which is exchanged for a combination of itself and the key offirewall110, todevice140 inPH2FA message280.
Note that an additional message may be sent byFirewall110 to providedevice100 with the IP address to use during the IPsec session as the address fordevice140, especially when the SA IP address fordevice140 is not the same as the one used for IPsec traffic.
A last message that can be viewed as a final acknowledge is also sent back which is not shown inFIG. 2. Such a message ends the SA(s) for IPsec traffic betweendevices100 and140. As SAs are typically asymmetrical, it may be necessary to repeat the above-described process in the reverse direction. However, it may be necessary only to perform aphase2 negotiation, as is known. Once all SAs are active, the IPsec traffic can start in both directions.
FIG. 3 describes IPsec traffic both ways betweendevices100 and140 throughfirewall110. InFIG. 3, only an ESP header is used (i.e., as explained above, encryption is involved but no full packet authentication is necessarily provided). AH may be used in conjunction with ESP if full packet authentication is required, as is known; however, this scenario is not explicitly shown inFIG. 3. In the case where AH is used alone without encryption (i.e., with a packet using the format described inFIG. 4C, below), thefirewall110 can simply perform conventional filtering (since the present invention will not be needed in that scenario).
InFIG. 3, a first IPsec packet is sent fromdevice100 tofirewall110 instep310. Whenfirewall110 recognizes a packet having F1 as destination address, it first checks a protocol field (“PROT”) field in the packet in order to know which process to use. The PROT will indicate whether to use an IPSec ESP flow process or an IPSec AH (+ESP or not) flow. Instep310, the protocol is ESP, and thereforefirewall110 has to copy the packet, store (buffer) the original, decrypt the copied payload and scan the copied payload content. If the copied packet is valid, the original is then forwarded todevice140; otherwise, the packet is discarded and a message can be logged to that effect for network management purposes. Note that the original, buffered packet is forwarded todevice140; in this way, no re-encryption is performed infirewall110, and the packet can be easily and quickly forwarded upon approval of the copied and scanned version of the packet.
FIGS. 4A,4B and4D describe structures of exemplary IPsec packets that may be transported according to various embodiments of the invention.FIG. 4C describes an exemplary IPsec packet that does not require specialized scanning related to the present invention.
InFIG. 4A,packet410 represents an IPsec packet using IPsec tunnel mode with anESP header416. Theinner payload412 andIP header414 are encrypted, while the entire packet except thetunnel header418 is authenticated (i.e. integrated in the packet signature).
InFIG. 4B,packet420 represents an IPsec packet using IPsec transport mode withESP header428 and Generic Routing Encapsulation (GRE) tunneling. Theinner payload422 andIP header424 as well as theGRE portion426 are encrypted, while the entire packet except thetunnel header429 is integrated in the packet signature (i.e., authenticated).
InFIG. 4C,packet430 represents an IPsec packet using IPsec tunnel mode withAH header436. No field is encrypted, while the entire packet including thetunnel header438 is integrated in the packet signature. Therefore, no special process according to the present invention is done infirewall110 with such packets. Rather, they are just monitored by a legacy firewall function capable recognizing the AH header in order to properly locate the original IP header and payload.
InFIG. 4D,packet440 represents an IPsec packet using IPsec tunnel mode with AH andESP headers448 and446, respectively. Theinner payload442 andIP header444 are encrypted, while the entire packet including thetunnel header449 is integrated in the packet signature.
FIG. 5 demonstrates exemplary hardware components of afirewall computer510 according to one embodiment of the invention.
Firewall510 includes two interfaces with which to interact with the twoexternal networks120 and130. The firstinterface INTF A520 has one input WAN_IN and one output WAN_OUT. When a packet arrives on WAN_IN interface, it is transmitted to the INPUT process block530 via P_IN leads and data bus. This process determines whether the packet is a data packet (which may or may not be encrypted), or if it is an SA message marked for interception byFirewall510.
In the latter case, the packet is transmitted via SA_A_IN lead to the SA management and key negotiation block of the WAN side, i.e., SA MGT & KEY NEGO. A570. At this point, the process described inFIG. 2 is performed; this process may involve message modification, coding or decoding and/or an answering transmission(s) todevice100 via an SA_A OUT lead. Similarly, when an SA message is received fromdevice140 onINTF B560, it is received on SA MGT & KEY NEGO.B580 via SA B IN. Answers to an SA message fromdevice140 are sent using an SA B OUT lead toOUTPUT process550, which serves to queue all packet flows.
Information is sent from one SA management block (570,580) to the other by way ofSA BRIDGE595. SA bridge may serve to perform the Diffie-Hellman 3rdparty computation and key creation described above, usingFirewall510 public key Tfgiven todevices100 and140. In addition, the encryption public key fromdevice100, Ta, is sent byblock570 to block590 and similarly the encryption Public Key from B is sent byblock580 to block590. In this way, SecureContent Firewall Scanner590 is able to compute the secret shared key using the encryption public keys Taand Tbtogether with its own encryption private key “f.” Therefore, the secret key always remains secure inchip590, and is never visible to users or administrators of the firewall, nor may it be found using hardware analyzers.
When the packet is a conventional, unencrypted IP packet (or a packet using only an IPsec AH header, as shown inFIG. 4C), rather than an SA message, the packet is forwarded byINPUT process530 to standardfirewall function STDF545, which performs all necessary filtering and/or data scanning, as necessary. Then, if not filtered out, the packet is forwarded toOUTPUT process550 for queuing for export to interfaceINTF B560. The packet will then be transmitted on NET_OUT link, as shown.
If the packet is neither an SA message or a normal (non-encrypted) packet but an encrypted one defined as “to be scanned,” then it is stored inPacket Buffer540 using leads and data bus P-STO. A command SCAN_REQ is also sent byINPUT process530 to SecureContent Firewall Scanner590. The command SCAN_REQ contains a packet pointer, such as a packet number, that allows SecureContent Firewall Scanner590 to get a copy of the packet for decryption, via P-RD Bus. Once decrypted, the packet copy is checked using standard firewall rules. The result may be either to discard the original packet stored inPacket Buffer540 or allow its transmission; in either case, SecureContent Firewall Scanner590 may then discard the scanned copy of the packet.
Alternatively, modification of the packet to conform with firewall rules (or extract only those portions that do not conform with firewall rules, and allow the rest to pass) is also feasible, as would be apparent to one of skill in the art. For example, such packet modification might be implemented by way of a data transmission mechanism from SecureFirewall Content Scanner590 to block550.
The SD_AT lead informsOUTPUT Process550 to send (SD) the packet or Abort (AT) the packet transmission. SD_AT may also include a packet pointer, such as a packet number, in order to identify the packet. A clear CL_GT command can then be sent byOUTPUT Process550 to clear or fetch the above-mentioned packet, using the packet pointer. In the latter case, the packet can be forwarded fromPACKET BUFFER540 toOUTPUT process550 using P_FW bus. The packet can then be transmitted on the NET_OUT link viaINTF B560 and the P_OUT bus.
The mechanism just described with respect toFIG. 5 is a one-way mechanism, in that it protects data going fromdevice100 onWAN120 todevice140 onprivate network130. However, inasmuch as the process of encrypted traffic transmission is asymmetrical for the SA, and for the encrypted traffic itself (which may use different set of keys and parameters), another Secure Firewall Content Scanner chip (or the same if shared), as well as another set of INPUT and OUTPUT processes blocks and Packet Buffer, may be implemented to scan encrypted data transmitted from the direction ofdevice140 todevice100.
FIG. 6 describes exemplary certificate structures for each device type when certificates are used within the SA process. Thecertificates600aand600bfordevices100 and140 inFIGS. 6A and 6B can be standard or “true” certificates, as all the parameters included in the certificate fields really belong to those devices. Acertificate600afor device address A as inFIG. 6A is only given to a device located onWAN120, and acertificate600bfor device address B as inFIG. 6B is only given to a device located onprivate network130.
As shown inFIG. 6A, aportion610aofcertificate600amay contain the certification authority (CA) identity and signature, while aportion620acontains various information fordevice100 having address A, including its identity on theWAN120, IP address, device public key, IPsec authentication public key and IPsec encryption public key.
Similarly, as shown inFIG. 6B, aportion610bofcertificate600bmay contain the CA identity and signature, while aportion620bcontains various information fordevice140 having address B, including its identity on theprivate network130, IP address, device public key, IPsec authentication public key and IPsec encryption public key.
FIG. 6C demonstrates a type ofcertificate600cthat adevice140 having device address B (or a similarly-situated device) may receive when it requests a certificate for a device such asdevice100 having device address A (or a similarly-situated device). A certificate such as600cis a valid “false” certificate, since it is validated by the CA even though it contains some fields with false information in order to work properly. That is, ifcertificate600cis considered to belong tofirewall110, thenfirewall110 is impersonatingdevice100 having address A in purporting to possess that device's identity (as far as theprivate network130 is concerned) and a public encryption key that includes that device's public encryption key plus the firewall's own public encryption key.
Similar comments apply in the inverse tocertificate600dinFIG. 6D. Such acertificate600dallowsfirewall110 to impersonatedevice140 having address B, but presenting its own device public key and IPsec encryption public key.
FIG. 7 demonstrates a methodology for negotiating a pair of SAs according to an alternate embodiment of the invention.
InFIG. 7, afirst SA710 is established betweendevices100 and140 throughfirewall110. Asecond SA720 is then established betweenfirewall110 anddevice140.Devices100 and140 first agree, inexchange730, on an IPsec encryption secret key Ke. Thereafter, this key Ke is encrypted bydevice140 using an encryption public key offirewall110, resulting in PkF(Ke). Then, the encrypted Ke (i.e., PkF(Ke)) is forwarded tofirewall110 bymessage740 withinSA2720.Firewall110 decrypts PkF(Ke) to obtain Ke, and thereafter is free to use Ke to decrypt/scan packets in the manner described above with respect toFIG. 5. Note that, althoughFIG. 7 describes the case where SA2 is established betweendevices110 and140, it could just as easily be established betweendevices100 and110. Also, in this embodiment, it may be necessary to build and use separate keys for transmissions and receptions betweendevices100 and140. If an operator decides to use this feature, then eitherdevice100 can be used to provide both keys, or the process can be run such thatdevice140 provides the second key.
In conclusion, the present invention has described a methodology for scanning incoming data without sacrificing the security of the data. In doing so according to one embodiment of the invention, a common secret key is shared between two endpoint devices and a firewall device. Data is received, buffered and copied upon its entry to the firewall; the copy of the data is decrypted and scanned, using the common secret key, in a portion of the firewall that is inaccessible to an operator of the firewall. If the data does not violate any firewall rules, then the original, buffered data may be passed through the firewall while the scanned copy is deleted. Otherwise, both copies may be deleted, and a network administrator and/or the message sender may be notified that a firewall rules violation has occurred.
Although various embodiments of the present invention have been described in detail herein, not all features and/or implementations of the invention have been described. For example, althoughWAN120 has primarily been discussed as a public network such as the Internet, it may be a local area network (LAN), a private network, etc. Also, only two end peers are discussed in detail in this description, as IPsec is a point-to-point protocol. However, more devices may be interconnected between them through a firewall. It is also possible that more than one device on one side will establish a secure communication to the same device on the other side, even though each IPsec communication is separate and requires it own corresponding security association.
Thus, it should be apparent that while this invention has been described in various explanatory embodiments, other embodiments and variations can be effected by a person of ordinary skill in the art without departing from the scope of the invention.