Usage Guidelines
Note
|
Security threats, as well as the cryptographic technologies to help protect against them, are constantly changing. For more
information about the latest Cisco cryptographic recommendations, see the Next Generation Encryption (NGE) white paper.
|
A transform set is an acceptable combination of security protocols, algorithms, and other settings to apply to IPSec-protected
traffic. During the IPSec security association (SA) negotiation, the peers agree to use a particular transform set when protecting
a particular data flow.
You can configure multiple transform sets, and then specify one or more of these transform sets in a crypto map entry. The
transform set defined in the crypto map entry is used in the IPSec SA negotiation to protect the data flows specified by the
access list of that crypto map entry. During the negotiation, the peers search for a transform set that is the same at both
peers. When such a transform set is found, it is selected and will be applied to the protected traffic as part of the IPSec
SAs of both peers.
When Internet Key Exchange (IKE) is not used to establish SAs, a single transform set must be used. The transform set is
not negotiated.
Before a transform set can be included in a crypto map entry, it must be defined using this command.
Although this command is similar to the
crypto
isakmp
policy command, the IKEv2 proposal differs as follows:
A transform set specifies one or two IPSec security protocols (either AH, ESP, or both) and specifies which algorithms to
use with the selected security protocol. The AH and ESP IPSec security protocols are described in the “Allowed Transform Combinations” section.
To define a transform set, you specify one to four “transforms”--each transform represents an IPSec security protocol (AH
or ESP) plus the algorithm you want to use. When the particular transform set is used during negotiations for IPSec SAs, the
entire transform set (the combination of protocols, algorithms, and other settings) must match a transform set at the remote
peer.
In a transform set you can specify the AH protocol, the ESP protocol, or both. If you specify an ESP protocol in a transform
set, you can specify just an ESP encryption transform set or both an ESP encryption transform set and an ESP authentication
transform set.
The table below lists the acceptable transform set combination selections for the AH and ESP protocols.
Table 4. Allowed Transform Combinations
Transform Type
|
Transform
|
Description
|
AH
Transform
>Pick only one.
|
ah-md5-hmac
|
AH with the MD5 (Message Digest 5) (a Hash-based Message Authentication Code [HMAC] variant) authentication algorithm. (No
longer recommended).
|
ah-sha-hmac
|
AH with the SHA (Secure Hash Algorithm) (an HMAC variant) authentication algorithm.
|
ESP
Encryption
Transform
(
>Pick only one.
|
esp-aes
|
ESP with the 128-bit Advanced Encryption Standard (AES) encryption algorithm.
|
esp-gcm
esp-gmac
|
The
esp-gcm and
esp-gmac transforms are ESPs with either a 128 or 256 bit encryption algorithm. The default for either of these transforms is 128
bits.
Note
|
Both the
esp-gcm and
esp-gmac transforms cannot be configured together with any other ESP transform within the same crypto IPsec transform set using the
crypto ipsec transform-set command.
|
|
esp-aes
192
|
ESP with the 192-bit AES encryption algorithm.
|
esp-aes
256
|
ESP with the 256-bit AES encryption algorithm.
|
esp-des
|
ESP with the 56-bit Data Encryption Standard (DES) encryption algorithm. (No longer recommended).
|
esp-3des
|
ESP with the 168-bit DES encryption algorithm (3DES or Triple DES). (No longer recommended).
|
esp-null
|
Null encryption algorithm.
|
esp-seal
|
ESP with the 160-bit SEAL encryption algorithm. (No longer recommended).
|
ESP
Authentication
Transform
(Pick only one. )
|
esp-md5-hmac
|
ESP with the MD5 (HMAC variant) authentication algorithm. (No longer recommended).
|
esp-sha-hmac
|
ESP with the SHA (HMAC variant) authentication algorithm.
|
IP
Compression
Transform
|
comp-lzs
|
IP compression with the Lempel-Ziv-Stac (LZS) algorithm.
Note
|
The IP Compression Transform is not supported on Cisco IOS XE software.
|
|
Examples of acceptable transform set combinations are as follows:
-
ah-sha-hmac
-
esp-gcm
256
-
esp-aes
-
esp-aes
and
esp-sha-hmac
-
ah-sha-hmac
and
esp-aes and
esp-sha-hmac
-
comp-lzs
and
esp-sha-hmac and
esp-aes (In general, the
comp-lzs transform set can be included with any other legal combination that does not already include the
comp-lzs transform.)
-
esp-seal and
esp-md5-hmac
The parser will prevent you from entering invalid combinations; for example, after you specify an AH transform set, it will
not allow you to specify another AH transform set for the current transform set.
IPSec Protocols: AH and ESP
Both the AH and ESP protocols implement security services for IPSec.
AH provides data authentication and antireplay services.
ESP provides packet encryption and optional data authentication and antireplay services.
ESP encapsulates the protected data--either a full IP datagram (or only the payload)--with an ESP header and an ESP trailer.
AH is embedded in the protected data; it inserts an AH header immediately after the outer IP header and before the inner IP
datagram or payload. Traffic that originates and terminates at the IPSec peers can be sent in either tunnel or transport mode;
all other traffic is sent in tunnel mode. Tunnel mode encapsulates and protects a full IP datagram, while transport mode encapsulates
or protects the payload of an IP datagram. For more information about modes, see the
mode (IPSec) command description.
The esp-seal Transform
There are three limitations on the use of the
esp-seal transform set:
-
The
esp-seal transform set can be used only if no crypto accelerators are present. This limitation is present because no current crypto
accelerators implement the SEAL encryption transform set, and if a crypto accelerator is present, it will handle all IPSec
connections that are negotiated with IKE. If a crypto accelerator is present, the Cisco IOS software will allow the transform
set to be configured, but it will warn that it will not be used as long as the crypto accelerator is enabled.
-
The
esp-seal transform set can be used only in conjunction with an authentication transform set, namely one of these:
esp-md5-hmac, (not recommended)
esp-sha-hmac ,
ah-md5-hmac (not recommended), or
ah-sha-hmac . This limitation is present because SEAL encryption is especially weak when it comes to protecting against modifications
of the encrypted packet. Therefore, to prevent such a weakness, an authentication transform set is required. (Authentication
transform sets are designed to foil such attacks.) If you attempt to configure an IPSec transform set using SEAL but without
an authentication transform set, an error is generated, and the transform set is rejected.
-
The
esp-seal transform set cannot be used with a manually keyed crypto map. This limitation is present because such a configuration would
reuse the same keystream for each reboot, which would compromise security. Because of the security issue, such a configuration
is prohibited. If you attempt to configure a manually keyed crypto map with a SEAL-based transform set, an error is generated,
and the transform set is rejected.
Selecting Appropriate Transform Sets
The following tips may help you select transform sets that are appropriate for your situation:
-
If you want to provide data confidentiality, include an ESP encryption transform set.
-
If you want to ensure data authentication for the outer IP header as well as the data, include an AH transform set. (Some
consider the benefits of outer IP header data integrity to be debatable.)
-
If you use an ESP encryption transform set, also consider including an ESP authentication transform set or an AH transform
set to provide authentication services for the transform set.
-
If you want data authentication (either using ESP or AH), you can choose from the MD5 or SHA (HMAC keyed hash variants) authentication
algorithms. The SHA algorithm is generally considered stronger than MD5 but is slower.
-
Note that some transform sets might not be supported by the IPSec peer.
Note
|
If a user enters an IPSec transform set that the hardware does not support, a warning message will be displayed immediately
after the
crypto
ipsec
transform-set command is entered.
|
Suggested transform set combinations follow:
The Crypto Transform Configuration Mode
After you issue the
crypto
ipsec
transform-set command, you are put into the crypto transform configuration mode. While in this mode, you can change the mode to tunnel
or transport. (These are optional changes.) After you have made these changes, type
exit to return to global configuration mode. For more information about these optional changes, see the
match
address (IPSec) and
mode (IPSec) command descriptions.
Changing Existing Transform Sets
If one or more transform sets are specified in the
crypto
ipsec
transform-set command for an existing transform set, the specified transform sets will replace the existing transform sets for that transform
set.
If you change a transform set definition, the change is only applied to crypto map entries that reference the transform set.
The change will not be applied to existing SAs but will be used in subsequent negotiations to establish new SAs. If you want
the new settings to take effect sooner, you can clear all or part of the SA database by using the
clear
crypto
sa command.
Default Transform Set
You can modify the default transform-set using the
crypto ipsec transform-set default command. You can disable the default transform-set using the
no crypto ipsec transform-set default command.
If you do not specify a transform-set, the default transform-set is used with the default profile.
Examples
The following example defines two transform sets. The first transform set will be used with an IPSec peer that supports the
newer ESP and AH protocols. The second transform set will be used with an IPSec peer that supports only the older transforms.
Router (config)# crypto ipsec transform-set newer esp-aes esp-sha-hmac
Router (config)# crypto ipsec transform-set older ah-md5-hmac esp-des
The following example is a sample warning message that is displayed when a user enters an IPSec transform set that the hardware
does not support:
Router (config)# crypto ipsec transform transform-1 esp-aes 256 esp-sha-hmac
WARNING:encryption hardware does not support transform
esp-aes 256 within IPSec transform transform-1
The following output example shows that SEAL encryption has been correctly configured with an authentication transform set:
Router (config)# crypto ipsec transform-set seal esp-seal esp-sha-hmac
The following example is a warning message that is displayed when SEAL encryption has been configured with a crypto accelerator
present:
Router (config)# show running-config
crypto ipsec transform-set seal esp-seal esp-sha-hmac
! Disabled because transform not supported by encryption hardware
The following example is an error message that is displayed when SEAL encryption has been configured without an authentication
transform set:
Router (config)# crypto ipsec transform seal esp-seal
ERROR: Transform requires either ESP or AH authentication.
The following example is an error message that is displayed when SEAL encryption has been configured within a manually keyed
crypto map:
Router (config)# crypto map green 10 ipsec-manual
%Note: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
Router (config-crypto-map)# set transform seal
ERROR: transform seal illegal for a manual crypto map.