<section title="17.8. Internet Protocol Security (IPSec)"><subsection title="Objective"><paragraph
    title="17.8.1."


><![CDATA[<p>Internet Protocol Security (IPSec) is correctly implemented.</p>]]></paragraph>
 </subsection>
<subsection title="Context"> <block title="Scope"><paragraph
    title="17.8.2."


><![CDATA[<p>This section covers information on the conditions under which IPSec can be used as an Approved Cryptographic Protocol.</p>]]></paragraph>
<paragraph
    title="17.8.3."


><![CDATA[<p>When using a product that implements IPSec, requirements for using approved cryptographic protocols will also need to be referenced from <a href="http://nzism.gcsb.govt.nz/ism-document#Section-15924">Section 17.3 Approved Cryptographic Protocols</a>.</p>]]></paragraph>
</block>
<block title="Modes of operation"><paragraph
    title="17.8.4."


><![CDATA[<p>IPSec can be operated in two modes: transport mode or tunnel mode.</p>]]></paragraph>
</block>
<block title="Cryptographic algorithms"><paragraph
    title="17.8.5."


><![CDATA[<p>Most IPSec implementations can accommodate a number of cryptographic algorithms for encrypting data when the Encapsulating Security Payload (ESP) protocol is used.  These include 3DES and AES.</p>]]></paragraph>
</block>
<block title="Key exchange"><paragraph
    title="17.8.6."


><![CDATA[<p>Most IPSec implementations facilitate a number of methods for sharing keying material used in hashing and encryption processes.  Two common methods are manual keying and IKE using the ISAKMP.  Both methods are considered suitable for use.</p>]]></paragraph>
</block>
<block title="ISAKMP authentication"><paragraph
    title="17.8.7."


><![CDATA[<p>Most IPSec implementations can select from a number of methods for authentication as part of ISAKMP.  These can include digital certificates, encrypted nonces or pre-shared keys.  All these methods are considered suitable for use.</p>]]></paragraph>
</block>
<block title="ISAKMP modes"><paragraph
    title="17.8.8."


><![CDATA[<p>ISAKMP uses two modes to exchange information as part of IKE.  These are main mode and aggressive mode.</p>]]></paragraph>
</block>
</subsection>
<subsection title="References"><paragraph
    title="17.8.9."


><![CDATA[<p>Further information on IPSec can be found at:</p><table class="table-main">
<tbody>
<tr>
<td><strong>Reference</strong></td>
<td><strong>Title</strong></td>
<td><strong>Publisher</strong></td>
<td><strong>Source</strong></td>
</tr>
<tr>
<td>
<p><strong>RFC 2401</strong></p>
</td>
<td>
<p><strong>Security Architecture for the IP overview</strong></p>
</td>
<td style="text-align: center;">IETF</td>
<td><a title="Security Architecture for the Internet Protocol" rel="noopener noreferrer" href="https://datatracker.ietf.org/doc/html/rfc2401" target="_blank">https://datatracker.ietf.org/doc/html/rfc2401</a></td>
</tr>
<tr>
<td>
<p><strong>NIST 800-77 Rev. 1</strong></p>
</td>
<td>
<p><strong>Guide to IPSec VPNs, June 2020</strong></p>
</td>
<td style="text-align: center;">NIST</td>
<td><a title="Guide to IPsec VPNs" rel="noopener noreferrer" href="https://csrc.nist.gov/publications/detail/sp/800-77/rev-1/final" target="_blank">https://csrc.nist.gov/publications/detail/sp/800-77/rev-1/final</a></td>
</tr>
</tbody>
</table>]]></paragraph>
 </subsection>
<subsection title="Rationale &amp; Controls"> <block title="Mode of operation"><paragraph
    title="17.8.10.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>The tunnel mode of operation provides full encapsulation of IP packets whilst the transport mode of operation only encapsulates the payload of the IP packet.</p>]]></paragraph>
<paragraph
    title="17.8.10.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2842"
><![CDATA[<p>Agencies SHOULD use tunnel mode for IPSec connections.</p>]]></paragraph>
<paragraph
    title="17.8.10.C.02."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2843"
><![CDATA[<p>Agencies choosing to use transport mode SHOULD additionally use an IP tunnel for IPSec connections.</p>]]></paragraph>
</block>
<block title="Protocol"><paragraph
    title="17.8.11.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>In order to provide a secure VPN style connection both authentication and encryption are needed.  ESP is the only way of providing encryption yet Authentication Header (AH) and ESP can provide authentication for the entire IP packet and the payload respectively.  ESP is generally preferred for authentication though as AH has inherent network address translation limitations.</p>]]></paragraph>
<paragraph
    title="17.8.11.R.02."

    tags="Cryptography,Technical"


><![CDATA[<p>If however, maximum security is desired at the expense of network address translation functionality, then ESP can be wrapped inside of AH which will then authenticate the entire IP packet and not just the encrypted payload.</p>]]></paragraph>
<paragraph
    title="17.8.11.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2847"
><![CDATA[<p>Agencies SHOULD use the ESP protocol for IPSec connections.</p>]]></paragraph>
</block>
<block title="ISAKMP modes"><paragraph
    title="17.8.12.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>Using main mode instead of aggressive mode provides greater security since all exchanges are protected.</p>]]></paragraph>
<paragraph
    title="17.8.12.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2850"
><![CDATA[<p>Agencies using ISAKMP SHOULD disable aggressive mode for IKE.</p>]]></paragraph>
</block>
<block title="Security association lifetimes"><paragraph
    title="17.8.13.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>Using a secure association lifetime of four hours or 14400 seconds provides a balance between security and usability.</p>]]></paragraph>
<paragraph
    title="17.8.13.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2853"
><![CDATA[<p>Agencies SHOULD use a security association lifetime of four hours or 14400 seconds, or less.</p>]]></paragraph>
</block>
<block title="HMAC algorithms"><paragraph
    title="17.8.14.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>MD5 and SHA-1 are no longer approved Cryptographic Protocols.  The approved algorithms that can be used with HMAC are HMAC-SHA256, HMAC-SHA384 and HMAC-SHA512.</p>]]></paragraph>
<paragraph
    title="17.8.14.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2856"
><![CDATA[<p>Agencies SHOULD use HMAC-SHA256, HMAC-SHA384 or HMAC-SHA512 as the HMAC algorithm.</p>]]></paragraph>
</block>
<block title="DH groups"><paragraph
    title="17.8.15.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>Using a larger DH group provides more entropy for the key exchange.</p>]]></paragraph>
<paragraph
    title="17.8.15.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2859"
><![CDATA[<p>Agencies SHOULD use the largest modulus size available for the DH exchange.</p>]]></paragraph>
</block>
<block title="Perfect Forward Secrecy"><paragraph
    title="17.8.16.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>Using Perfect Forward Secrecy reduces the impact of the compromise of a security association.</p>]]></paragraph>
<paragraph
    title="17.8.16.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2862"
><![CDATA[<p>Agencies SHOULD use Perfect Forward Secrecy for IPSec connections.</p>]]></paragraph>
</block>
<block title="IKE Extended Authentication"><paragraph
    title="17.8.17.R.01."

    tags="Cryptography,Technical"


><![CDATA[<p>XAUTH using IKEv1 has documented vulnerabilities associated with its use.</p>]]></paragraph>
<paragraph
    title="17.8.17.C.01."

    tags="Cryptography,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="2865"
><![CDATA[<p>Agencies SHOULD disable the use of XAUTH for IPSec connections using IKEv1.</p>]]></paragraph>
</block>
</subsection>
</section>
