<chapter id="ike-1"><title>Internet Key Exchange
(Overview)</title><highlights><para>Internet Key Exchange (IKE) automates key management for IPsec. This
chapter contains the following information about IKE:</para><itemizedlist><listitem><para><olink targetptr="ike-13" remap="internal">What's New in IKE?</olink></para>
</listitem><listitem><para><olink targetptr="ike-2" remap="internal">Key Management With IKE</olink></para>
</listitem><listitem><para><olink targetptr="ike-3" remap="internal">IKE Key Negotiation</olink></para>
</listitem><listitem><para><olink targetptr="ike-5" remap="internal">IKE Configuration Choices</olink></para>
</listitem><listitem><para><olink targetptr="ike-23" remap="internal">IKE and Hardware Acceleration</olink></para>
</listitem><listitem><para><olink targetptr="ike-24" remap="internal">IKE and Hardware Storage</olink></para>
</listitem><listitem><para><olink targetptr="ike-12" remap="internal">IKE Utilities and Files</olink></para>
</listitem><listitem><para><olink targetptr="ike-10" remap="internal">Changes to IKE for the Solaris 10
Release</olink></para>
</listitem>
</itemizedlist><para>For instructions on implementing IKE, see <olink targetptr="ike-task-1" remap="internal">Chapter&nbsp;23, Configuring IKE (Tasks)</olink>. For
reference information, see <olink targetptr="ikeref-1" remap="internal">Chapter&nbsp;24, Internet
Key Exchange (Reference)</olink>. For information about IPsec, see <olink targetptr="ipsec-ov-1" remap="internal">Chapter&nbsp;19, IP Security Architecture (Overview)</olink>.</para>
</highlights><sect1 id="ike-13"><title>What's New in IKE?</title><para><emphasis role="strong">Solaris Express, Developer Edition 2/07</emphasis>:
In this release, IKE can use the AES algorithm, and can be configured in the
global zone to be used in non-global zones.</para><itemizedlist><listitem><para>The <literal>SO_ALLZONES</literal> socket option enables IKE
to handle traffic in non-global zones.</para>
</listitem><listitem><para>For a complete listing of new Solaris features and a description
of Solaris releases, see <olink targetdoc="solwhatsnew" remap="external"><citetitle remap="book">Solaris Express, Developer Edition What&rsquo;s New</citetitle></olink>.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="ike-2"><title>Key Management With IKE</title><para>The management of keying material for IPsec security associations (SAs)
is called <emphasis>key management</emphasis>. Automatic key management requires
a secure channel of communication for the creation, authentication, and exchange
of keys. The Solaris Operating System uses Internet Key Exchange (IKE) to automate key management.
IKE easily scales to provide a secure channel for a large volume of traffic.
IPsec SAs on IPv4 and IPv6 packets can take advantage of IKE.</para><para>When IKE is used on a system with a <trademark>Sun</trademark> Crypto
Accelerator 1000 board or a Sun Crypto Accelerator 4000 board, the public key operations can be
offloaded to the accelerator. Operating system resources are not used for
public key operations. When IKE is used on a system with a Sun Crypto Accelerator 4000 board, the
certificates, public keys, and private keys can be stored on the board. Key
storage that is off the system provides an additional layer of protection.</para>
</sect1><sect1 id="ike-3"><title>IKE Key Negotiation</title><para>The IKE daemon, <command>in.iked</command>, negotiates and authenticates
keying material for SAs in a protected manner. The daemon uses random seeds
for keys from internal functions provided by the Solaris Operating System. IKE provides perfect
forward secrecy (PFS). In PFS, the keys that protect data transmission are
not used to derive additional keys. Also, seeds used to create data transmission
keys are not reused. See the <olink targetdoc="refman1m" targetptr="in.iked-1m" remap="external"><citerefentry><refentrytitle>in.iked</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><para>When the IKE daemon discovers a remote system's public encryption key,
the local system can then use that key. The system encrypts messages by using
the remote system's public key. The messages can be read only by that remote
system. The IKE daemon performs its job in two phases. The phases are called <emphasis>exchanges</emphasis>.</para><sect2 id="ike-32"><title>IKE Key Terminology</title><para>The following table lists terms that are used in key negotiation, provides
their commonly used acronyms, and gives a definition and use for each term.</para><table frame="topbot" id="ike-tbl-2"><title>Key Negotiation Terms, Acronyms,
and Uses</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="20.20*"/><colspec colname="colspec1" colwidth="11.40*"/><colspec colname="colspec2" colwidth="67.40*"/><thead><row rowsep="1"><entry><para>Key Negotiation Term</para>
</entry><entry><para>Acronym</para>
</entry><entry><para>Definition and Use</para>
</entry>
</row>
</thead><tbody><row><entry><para>Key exchange</para>
</entry><entry><para></para>
</entry><entry><para>The process of generating keys for asymmetric cryptographic algorithms.
The two main methods are RSA protocols and the Diffie-Hellman protocol.</para>
</entry>
</row><row><entry><para>Diffie-Hellman protocol</para>
</entry><entry><para>DH</para>
</entry><entry><para>A key exchange protocol that involves key generation and key authentication.
Often called <emphasis>authenticated key exchange</emphasis>.</para>
</entry>
</row><row><entry><para>RSA protocol</para>
</entry><entry><para>RSA</para>
</entry><entry><para>A key exchange protocol that involves key generation and key transport.
The protocol is named for its three creators, Rivest, Shamir, and Adleman.</para>
</entry>
</row><row><entry><para>Perfect forward secrecy</para>
</entry><entry><para>PFS</para>
</entry><entry><para>Applies to authenticated key exchange only. PFS ensures that long-term
secret material for keys does not compromise the secrecy of the exchanged
keys from previous communications. </para><para>In PFS, the key that is used to protect transmission of data is not
used to derive additional keys. Also, the source of the key that is used to
protect data transmission is never used to derive additional keys.</para>
</entry>
</row><row><entry><para>Oakley method</para>
</entry><entry><para></para>
</entry><entry><para>A method for establishing keys for Phase 2 in a secure manner. This
protocol is analogous to the Diffie-Hellman method of key exchange. Similar
to Diffie-Hellman, Oakley group key exchange involves key generation and key
authentication. The Oakley method is used to negotiate PFS.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="ike-26"><title>IKE Phase 1 Exchange</title><para>The Phase 1 exchange is known as <emphasis>Main Mode</emphasis>.
In the Phase 1 exchange, IKE uses public key encryption methods to authenticate
itself with peer IKE entities. The result is an Internet Security Association
and Key Management Protocol (ISAKMP) security association (SA). An ISAKMP
SA is a secure channel for IKE to negotiate keying material for the IP datagrams.
Unlike IPsec SAs, the ISAKMP SAs are bidirectional, so only one security association
is needed.</para><para>How IKE negotiates keying material in the Phase 1 exchange is
configurable. IKE reads the configuration information from the <filename>/etc/inet/ike/config</filename> file. Configuration information includes the following:</para><itemizedlist><listitem><para>Global parameters, such as the names of public key certificates</para>
</listitem><listitem><para>Whether perfect forward secrecy (PFS) is used</para>
</listitem><listitem><para>The interfaces that are affected</para>
</listitem><listitem><para>The security protocols and their algorithms</para>
</listitem><listitem><para>The authentication method</para>
</listitem>
</itemizedlist><para>The two authentication methods are preshared keys and public key certificates.
The public key certificates can be self-signed. Or, the certificates can be
issued by a <olink targetptr="glossary-41" remap="internal">certificate authority (CA)</olink> from
a public key infrastructure (<olink targetptr="glossary-29" remap="internal">PKI</olink>) organization.
Organizations include beTrusted, Entrust, GeoTrust, RSA Security, and Verisign.</para>
</sect2><sect2 id="ike-14"><title>IKE Phase 2 Exchange</title><para>The Phase 2 exchange is known as <emphasis>Quick Mode</emphasis>.
In the Phase 2 exchange, IKE creates and manages the IPsec SAs between systems
that are running the IKE daemon. IKE uses the secure channel that was created
in the Phase 1 exchange to protect the transmission of keying material. The
IKE daemon creates the keys from a random number generator by using the <command>/dev/random</command> device. The daemon refreshes the keys at a configurable
rate. The keying material is available to algorithms that are specified in
the configuration file for IPsec policy, <filename>ipsecinit.conf</filename>.</para>
</sect2>
</sect1><sect1 id="ike-5"><title>IKE Configuration Choices</title><para>The <filename>/etc/inet/ike/config</filename> configuration file
contains IKE policy entries. For two IKE daemons to authenticate each other,
the entries must be valid. Also, keying material must be available. The entries
in the configuration file determine the method for using the keying material
to authenticate the Phase 1 exchange. The choices are preshared keys or public
key certificates.</para><para>The entry <literal>auth_method preshared</literal> indicates that preshared
keys are used. Values for <literal>auth_method</literal> other than <literal>preshared</literal> indicate that public key certificates are to be used. Public key
certificates can be self-signed, or the certificates can be installed from
a PKI organization. For more information, see the <olink targetdoc="refman4" targetptr="ike.config-4" remap="external"><citerefentry><refentrytitle>ike.config</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para><sect2 id="ike-28"><title>IKE With Preshared Keys</title><para>Preshared keys are created by an administrator on one system.
The keys are then shared out of band with administrators of remote systems.
You should take care to create large random keys and to protect the file and
the out-of-band transmission. The keys are placed in the <filename class="directory">/etc/inet/secret/ike.preshared</filename> file on each system.
The <filename>ike.preshared</filename> file is for IKE as the <filename>ipseckeys</filename> file is for IPsec. Any compromise of the keys in the <filename>ike.preshared</filename> file compromises all keys that are derived from the keys in the
file. </para><para>One system's preshared key must be identical to its remote system's
key. The keys are tied to a particular IP address. Keys are most secure when
one administrator controls the communicating systems. For more information,
see the <olink targetdoc="refman4" targetptr="ike.preshared-4" remap="external"><citerefentry><refentrytitle>ike.preshared</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para>
</sect2><sect2 id="ike-29"><title>IKE With Public Key Certificates</title><para>Public key certificates eliminate the need for communicating systems
to share secret keying material out of band. Public keys use the <olink targetptr="glossary-54" remap="internal">Diffie-Hellman protocol</olink> (DH) for authenticating
and negotiating keys. Public key certificates come in two flavors. The certificates
can be self-signed, or the certificates can be certified by a <olink targetptr="glossary-41" remap="internal">certificate authority (CA)</olink>.</para><para>Self-signed public key certificates are created by you, the administrator.
The <command>ikecert certlocal -ks</command> command creates the private part
of the public-private key pair for the system. You then get the self-signed
certificate output in X.509 format from the remote system. The remote system's
certificate is input to the <command>ikecert certdb</command> command for
the public part of the key pair. The self-signed certificates reside in the <filename class="directory">/etc/inet/ike/publickeys</filename> directory on the communicating
systems. When you use the <option>T</option> option, the certificates reside
on attached hardware.</para><para>Self-signed certificates are a halfway point between preshared keys
and CAs. Unlike preshared keys, a self-signed certificate can be used on a
mobile machine or on a system that might be renumbered. To self-sign a certificate
for a system without a fixed number, use a <literal>DNS</literal> (<literal>www.example.org</literal>) or <literal>email</literal> (<literal>root@domain.org</literal>) alternative name.</para><para>Public keys can be delivered by a PKI or a CA organization. You install
the public keys and their accompanying CAs in the <filename class="directory">/etc/inet/ike/publickeys</filename> directory. When you use the <option>T</option> option, the certificates
reside on attached hardware. Vendors also issue certificate revocation lists
(CRLs). Along with installing the keys and CAs, you are responsible for installing
the CRL in the <filename class="directory">/etc/inet/ike/crls</filename> directory.</para><para>CAs have the advantage of being certified by an outside organization,
rather than by the site administrator. In a sense, CAs are notarized certificates.
As with self-signed certificates, CAs can be used on a mobile machine or on
a system that might be renumbered. Unlike self-signed certificates, CAs can
very easily scale to protect a large number of communicating systems.</para>
</sect2>
</sect1><sect1 id="ike-23"><title>IKE and Hardware Acceleration</title><para>IKE algorithms are computationally expensive, particularly in
the Phase 1 exchange. Systems that handle a large number of exchanges can
use a Sun Crypto Accelerator 1000 board to handle the public key operations. The Sun Crypto Accelerator 4000 board can
also be used to handle expensive Phase 1 computations.</para><para>For information on how to configure IKE to offload its computations
to the accelerator board, see <olink targetptr="ike-task-32" remap="internal">How to Configure
IKE to Find the Sun Crypto Accelerator 1000 Board</olink>. For information
on how to store keys, see <olink targetptr="ike-task-11" remap="internal">How to Configure
IKE to Find the Sun Crypto Accelerator 4000 Board</olink>, and
the <olink targetdoc="refman1m" targetptr="cryptoadm-1m" remap="external"><citerefentry><refentrytitle>cryptoadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</sect1><sect1 id="ike-24"><title>IKE and Hardware Storage</title><para>Public key certificates, private keys, and public keys can be
stored on a Sun Crypto Accelerator 4000 board. For <olink targetptr="glossary-59" remap="internal">RSA</olink> encryption,
the board supports keys up to 2048 bits. For <olink targetptr="glossary-45" remap="internal">DSA</olink> encryption,
the board supports keys up to 1024 bits.</para><para>For information on how to configure IKE to access the board, see <olink targetptr="ike-task-32" remap="internal">How to Configure IKE to Find the Sun Crypto Accelerator
1000 Board</olink>. For information on how to add certificates and public
keys to the board, see <olink targetptr="ike-task-14" remap="internal">How to Generate and
Store Public Key Certificates on Hardware</olink>.</para>
</sect1><sect1 id="ike-12"><title>IKE Utilities and Files</title><para>The following table summarizes the configuration files for IKE
policy, the storage locations for IKE keys, and the various commands that
implement IKE.</para><table frame="topbot" pgwide="1" id="ike-11"><title>IKE Configuration Files,
Key Storage Locations, and Commands</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="44.79*"/><colspec colname="colspec1" colwidth="75.98*"/><colspec colname="colspec2" colwidth="33.54*"/><thead><row rowsep="1"><entry><para>File, Command, or Location</para>
</entry><entry><para>Description</para>
</entry><entry><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para><command>/usr/lib/inet/in.iked</command> daemon</para>
</entry><entry><para>Internet Key Exchange (IKE) daemon. Activates automated key management.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="in.iked-1m" remap="external"><citerefentry><refentrytitle>in.iked</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>/usr/sbin/ikeadm</command> command</para>
</entry><entry><para>IKE administration command for viewing and modifying the IKE policy.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikeadm-1m" remap="external"><citerefentry><refentrytitle>ikeadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>/usr/sbin/ikecert</command> command</para>
</entry><entry><para>Certificate database management command for manipulating local
databases that hold public key certificates. The databases can also be stored
on an attached Sun Crypto Accelerator 4000 board.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><filename>ike/config</filename> file</para>
</entry><entry><para>Configuration file for the IKE policy in the <filename class="directory">/etc/inet</filename> directory. Contains the site's rules
for matching inbound IKE requests and preparing outbound IKE requests. If
this file exists, the <command>in.iked</command> daemon starts automatically
at boot time.</para>
</entry><entry><para><olink targetdoc="refman4" targetptr="ike.config-4" remap="external"><citerefentry><refentrytitle>ike.config</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><filename>ike.preshared</filename> file</para>
</entry><entry><para>Preshared keys file in the <filename class="directory">/etc/inet/secret</filename> directory. Contains secret keying material for authentication
in the Phase 1 exchange. Used when configuring IKE with preshared keys.</para>
</entry><entry><para><olink targetdoc="refman4" targetptr="ike.preshared-4" remap="external"><citerefentry><refentrytitle>ike.preshared</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><filename class="directory">ike.privatekeys</filename> directory</para>
</entry><entry><para>Private keys directory in the <filename class="directory">/etc/inet/secret</filename> directory. Contains the private keys that are part of a public-private
key pair.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><filename class="directory">publickeys</filename> directory</para>
</entry><entry><para>Directory in the <filename class="directory">/etc/inet/ike</filename> directory
that holds public keys and certificate files. Contains the public key part
of a public-private key pair.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><filename class="directory">crls</filename> directory</para>
</entry><entry><para>Directory in the <filename class="directory">/etc/inet/ike</filename> directory
that holds revocation lists for public keys and certificate files.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para>Sun Crypto Accelerator 1000 board</para>
</entry><entry><para>Hardware that accelerates public key operations by offloading the operations
from the operating system.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para>Sun Crypto Accelerator 4000 board</para>
</entry><entry><para>Hardware that accelerates public key operations by offloading the operations
from the operating system. The board also stores public keys, private keys,
and public key certificates.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="ike-10"><title>Changes to IKE for the Solaris 10 Release</title><para>Since the Solaris 9 release, IKE includes the following functionality:</para><itemizedlist><listitem><para>IKE can be used to automate key exchange for IPsec over IPv6
networks. For more information, see <olink targetptr="ike-2" remap="internal">Key Management
With IKE</olink>.</para><note><para>IKE cannot be used to manage keys for IPsec in a non-global zone.</para>
</note>
</listitem><listitem><para>Public key operations in IKE can be accelerated by a Sun Crypto Accelerator 1000 board
or a Sun Crypto Accelerator 4000 board. The operations are offloaded to the board. The offloading
accelerates encryption, thereby reducing demands on operating system resources.
For more information, see <olink targetptr="ike-23" remap="internal">IKE and Hardware Acceleration</olink>. For procedures, see <olink targetptr="ike-task-17" remap="internal">Configuring IKE
to Find Attached Hardware (Task Map)</olink>.</para>
</listitem><listitem><para>Public key certificates, private keys, and public keys can
be stored on a Sun Crypto Accelerator 4000 board. For more information on key storage, see <olink targetptr="ike-24" remap="internal">IKE and Hardware Storage</olink>.</para>
</listitem><listitem><para>IKE can be used to automate key exchange for IPsec from behind
a NAT box. The traffic must use an IPv4 network. Also, the NAT-traversing
IPsec ESP keys cannot be accelerated by hardware. For more information, see <olink targetptr="ipsec-ov-24" remap="internal">IPsec and NAT Traversal</olink>. For procedures, see <olink targetptr="ike-task-38" remap="internal">Configuring IKE for Mobile Systems (Task Map)</olink>.</para>
</listitem><listitem><para>Retransmission parameters and packet time out parameters have
been added to the <filename>/etc/inet/ike/config</filename> file. These parameters
tune the IKE Phase 1 (Main Mode) negotiation to handle network interference,
heavy network traffic, and interoperation with platforms that have different
implementations of the IKE protocol. For details about the parameters, see
the <olink targetdoc="refman4" targetptr="ike.config-4" remap="external"><citerefentry><refentrytitle>ike.config</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page. For procedures, see <olink targetptr="ike-task-19" remap="internal">Changing IKE Transmission
Parameters (Task Map)</olink>.</para>
</listitem>
</itemizedlist>
</sect1>
</chapter>