<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
    <!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY rfc3207 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3207.xml'>
    <!ENTITY rfc4033 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4033.xml'>
    <!ENTITY rfc4406 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4406.xml'>
    <!ENTITY rfc4407 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4407.xml'>
    <!ENTITY rfc4408 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4408.xml'>
    <!ENTITY rfc4409 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4409.xml'>
    <!ENTITY rfc4871 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4871.xml'>
]>
<!--
  ==
  ==
  -->
<rfc category="info" ipr="full3978" docName="draft-pearson-securemail-02">
    <front>
        <title abbrev="SECMX">Applicability Statement for SecureMail: A
            framework for increasing email security</title>
        <author initials="M." surname="Pearson" fullname="Michael
            Pearson">
            <organization>State Services Commission</organization>
            <address>
                <postal>
                    <street>100 Molesworth Street</street>
                    <city>Wellington</city>
                    <country>New Zealand</country>
                </postal>
                <email>mike.pearson@ssc.govt.nz</email>
            </address>
        </author>
        <author initials="F." surname="Hendrikx" fullname="Ferry
            Hendrikx">
            <organization>Independent</organization>
            <address>
                <postal>
                    <street />
                    <city>Wellington</city>
                    <country>New Zealand</country>
                </postal>
                <email>ferry.hendrikx@gmail.com</email>
            </address>
        </author>
        <author initials="M." surname="Hunt" fullname="Matthew Hunt">
            <organization>Catalyst IT Limited</organization>
            <address>
                <postal>
                    <street>Level 6</street>
                    <street>150 Willis Street</street>
                    <city>Wellington</city>
                    <country>New Zealand</country>
                </postal>
                <email>matt@catalyst.net.nz</email>
                <uri>http://www.catalyst.net.nz/</uri>
            </address>
        </author>

        <date day="30" month="April" year="2008" />

        <abstract>
            <t>This document provides an Applicability Statement for
                Securemail, a framework proposal for secure transmission
                and better authentication of email based on current
                Internet standards.  The SecureMail framework proposes
                the use of Transaction Layer Security (TLS), the Sender
                Policy Framework (SPF) and Sender ID to support secure
                email communication between internet servers with some
                assurance of the authenticity of the message sender.</t>
            <t>Comments are solicited and should be addressed to the
                mailing list at securemail-discuss@googlegroups.com
                and/or the authors.</t>
        </abstract>
    </front>
    <middle>
        <section anchor="introduction" title="Introduction">
            <t>This document provides an Applicability Statement for
                Securemail, a pragmatic framework to increase email
                security based on current internet standards.
                SecureMail secures the transport of email in a way
                analagous to the postal system and paper mail.</t>
            <t>The SecureMail framework is being proposed as a
                replacement for the New Zealand Government's existing
                proprietary secure email system, SEEMail.  It is
                expected to provide a useful framework for secure
                transmission of email generally and makes use of common
                technologies to achieve a greater degree of transmission
                security and authentication than standard internet
                email.</t>
            <section title="Terminology">
                <t>The key words "MUST", "MUST NOT", "REQUIRED",
                    "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
                    "RECOMMENDED", "MAY", and "OPTIONAL" in this
                    document are to be interpreted as described in <xref
                        target="RFC2119">RFC 2119</xref>.</t>
            </section>
        </section>
        <section title="Background">
            <t>The New Zealand government has been using secure email
                since 1999.</t>
            <t>An initial pilot used secure email clients with
                individual users being issued Public Key Infrastructure
                (PKI) digital certificates on smart cards.  This worked,
                but had a number of issues:
                <list style="hanging">
                    <t hangText="Content:">All content was encrypted to
                        individuals; therefore agencies were unable to
                        enforce inappropriate content policies</t>
                    <t hangText="Accessibility:">Vendors could not
                        guarantee a continued long-term technical
                        ability to decrypt material; therefore agencies
                        were unable to maintain the material in
                        encrypted form for long-term access</t>
                    <t hangText="Client software variability:">The four
                        trial agencies between them had seven different
                        email clients; therefore users found email
                        clients behaved differently, creating user
                        support issues</t>
                    <t hangText="Inconvenience:">Users found it
                        inconvenient to unlock the smartcard with a PIN
                        after a 30 second timeout.</t>
                </list>
            </t>
            <t>The project then successfully piloted server-to-server
                PKI-based secure email, with each server being issued a
                domain-based digital certificate and securing all
                messages to other participating servers.</t>
            <t>This infrastructure, called SEEMail, is currently used by
                more than 60 government agencies to securely exchange
                email (and attachments) over the Internet.  However, the
                agencies have some issues with the infrastructure:
                <list style="hanging">
                    <t hangText="Cost:">Commercial secure email software
                        is licensed on a per mailbox basis, making it
                        prohibitively expensive for larger agencies,
                        wanting to use commercial software, where not
                        all staff need secure email.  In addition, the
                        software often has management intensive
                        processes associated with setting up secure
                        accounts.</t>
                    <t hangText="Experience:">Running a PKI application
                        is technically challenging.  As staff change,
                        there is a loss of experience associated with
                        PKI implementation and maintenance.</t>
                    <t hangText="Robustness:">When a PKI-based secure
                        email system goes wrong, it can disrupt
                        communication.  For instance, whenever the
                        Certificate Revocation List (CRL) is
                        unavailable, email applications may halt email
                        delivery until the information is available
                        again - and yet, email is about speedy delivery.
                        In addition, the behaviour of email applications
                        in the event of conditions such as certificate
                        expiry is not always well understood.  Very few
                        commercial certificate authorities offer a
                        service to generate broken, corrupt, or expired
                        certificates, to test the behaviour of vendor
                        products.</t>
                </list>
            </t>
        </section>

        <section title="Motivation">
            <t>Government agencies and other organisations want to be
                able to communicate securely with their customers using
                an email system that is equivalent, in terms of
                security, to postal mail.</t>
            <t>In the ideal situation - where government customers' ISPs
                supported SEEmail - the government agencies would
                utilise the existing SEEMail infrastructure to conduct
                secure communications with their customers.</t>
            <t>However, the ISPs providing email infrastructure for
                agency clients are concerned with:
                <list style="hanging">
                    <t hangText="Cost:"> Who will pay for the
                        software?</t>
                    <t hangText="Experience:"> Who will implement and
                        maintain it?</t>
                    <t hangText="Robustness:"> Will it cause problems
                        and will it scale?</t>
                </list>
            </t>
            <t>Clearly, SEEMail is not going to be easily scalable to
                the Internet as a whole.</t>
        </section>

        <section anchor="sec-4" title="SecureMail">
            <t>The NZ Government's experience with server-to-server
                secure email is that it can work exceedingly well.
                SecureMail is an application of existing standards to
                achieve secure email without the limitations of
                SEEMail.</t>
            <t>It uses Transport Layer Security (TLS) for
                confidentiality and integrity of the message during
                transport, and <xref target="RFC4406">Sender ID</xref>
                and the <xref target="RFC4408">Sender Policy Framework
                    (SPF) </xref> to authenticate the sender.</t>
            <t>It is intended to secure IN-CONFIDENCE email
                communications between government, business and
                citizens.</t>

            <section anchor="sec-4.1" title="Confidentiality - TLS">
                <t>SecureMail uses TLS to create an encrypted connection
                    that plaintext messages are passed through.
                    SecureMail connections are negotiated
                    server-to-server using anonymous key exchange.  The
                    connections are set up as required using anonymous
                    Diffie-Hellman key exchange, rather than through a
                    pre-arranged agreement or approval list.</t>

                <section anchor="sec-4.1.1" title="Why TLS?">
                    <t>TLS is a gateway based model, operating between
                        SMTP servers.  It has been chosen for use in the
                        SecureMail framework for a number of reasons:
                        <list style="hanging">
                            <t hangText="Cost:">There are no significant
                                capital costs.  TLS is available with most
                                email systems</t>
                            <t hangText="Experience:">It is already active
                                (slightly more than 10% of 4000 New Zealand
                                domains tested already had TLS enabled on
                                their SMTP servers)</t>
                            <t hangText="Robustness:">TLS is a mature
                                standard and operates transparently to
                                secure transport protocols</t>
                        </list>
                    </t>
                </section>

                <section anchor="sec-4.1.2" title="Why Anonymous Key Exchange?">
                    <t>This removes the need for any centralised Public
                        Key Infrastructure, and resolves several of the
                        issues discovered using SEEMail.</t>
                </section>
            </section>

            <section anchor="sec-4.2" title="Authentication - SPF And Sender ID">
                <t>The SecureMail framework uses two sender
                    authentication standards: SPF and Sender ID.</t>
                <t>SPF operates at the session layer rather than on the
                    email's content.  The advantage of this is that it
                    can validate the address before the message is
                    accepted for delivery by the receiving server.
                    However, this also means that the "From:"
                    address that the recipient user sees is not
                    necessarily that which was authenticated.</t>
                <t>SenderID mitigates this risk as, in its <xref
                        target="RFC4407">PRA</xref> mode, it checks the
                    sender information contained in the content of the
                    email message against the published information for
                    the domain.</t>
            </section>
        </section>

        <section anchor="sec-5" title="Implementation Standards For All
            Mail Servers">
            <t>For sending:
                <list style="symbols">
                    <t>Mail server domain MUST have an SPF record so
                        that the server can be authenticated as an
                        approved sender of the message</t>
                    <t>Mail server SHOULD try to send messages securely
                        using a TLS connection</t>
                </list>
            </t>
            <t>For receiving:
                <list style="symbols">
                    <t>Servers with &quot;securemail&quot; as the
                        left-most part of their hostname SHALL only
                        accept email if a TLS connection is established
                        </t>
                    <t>Other servers, SHOULD attempt to accept messages
                        securely via a TLS connection, but otherwise
                        allow an insecure connection</t>
                    <t>Server SHALL enforce the mail sending policy
                        specified by a sending domain's SPF record (if
                        any)</t>
                    <t>Server SHALL enforce the mail sending policy
                        specified by a sending domain's Sender ID record
                        (if any)</t>
                </list>
            </t>
        </section>

        <section anchor="sec-6" title="Implementation Standards For
            SecureMail Servers">
            <section anchor="sec-6.1" title="Discovery mechanisms">
                <t>Given that a SecureMail server will only ever receive
                    email securely, it cannot be considered a genuine
                    MTA (according to <xref target="RFC3207">RFC
                        3207</xref>).  This RFC clearly states that
                    publicly-referenced MTAs must not require TLS
                    connections.</t>
                <t>A SecureMail server cannot therefore be listed in the
                    MX records for a domain.  Instead, we propose a
                    standard naming convention for servers that
                    implement the SecureMail framework.</t>
                <t>For receiving:
                    <list style="symbols">
                        <t>SecureMail servers have a standard naming
                            convention, with &quot;securemail&quot; as
                            the leftmost part of the domain name, for
                            example, securemail.example.com</t>

                        <t>SecureMail servers MUST refuse to accept
                            email from senders under any of the
                            following conditions:
                            <list style="symbols">
                                <t>the sender's SPF record
                                    <list style="symbols">
                                        <t>does not exist; or</t>
                                        <t>does not prohibit all other
                                            senders &quot;-all&quot;;
                                            or</t>
                                        <t>upon evaluation, returns any
                                            result other than
                                            &quot;Pass&quot;</t>
                                    </list>
                                </t>
                                <t>the sender's Sender ID record
                                    <list style="symbols">
                                        <t>does not exist; or</t>
                                        <t>does not prohibit all other
                                            senders &quot;-all&quot;;
                                            or</t>
                                        <t>upon evaluation, returns any
                                            result other than
                                            &quot;Pass&quot;</t>
                                    </list>
                                </t>
                                <t>the sender's TLS connection
                                    <list style="symbols">
                                        <t>does not exist; or</t>
                                        <t>does not meet the minimum
                                            cryptography standards</t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </list>
                </t>
                <t>For sending:
                    <list style="symbols">
                        <t>SecureMail servers MUST have a valid Sender
                            ID record specifying valid senders and
                            prohibiting all other senders
                            (&quot;-all&quot;), so that the message
                            envelope and sender information in the
                            content can be authenticated.</t>
                        <t>SecureMail servers MUST refuse to send email
                            (and return it to the sender) under any of
                            the following conditions:
                            <list style="symbols">
                                <t>the receiver's TLS connection does
                                    not exist</t>
                                <t>the receiver's TLS connection does
                                    not meet the minimum cryptography
                                    standards.</t>
                            </list>
                        </t>
                    </list>
                </t>
            </section>

            <section anchor="sec-6.2" title="Cryptography Standard">
                <t>The minimum cryptography standards are defined by the
                    commonly available implementations of TLS.
                    SecureMail servers MUST support Diffie-Helman key
                    exchange, 256-bit AES encryption and SHA1 message
                    digest.  In future these requirements are expected
                    to require ECDSA key exchange and SHA-256 message
                    digest.  This move is dependent on the work in
                    progress on <xref
                        target="I-D.ietf-tls-rfc4346-bis">TLS Version
                        1.2</xref> and support for Elliptic Curve
                    Cryptography and alternate MAC algorithms described
                    in <xref target="I-D.ietf-tls-ecc-new-mac">TLS
                        Elliptic Curve Cipher Suites with SHA-256/384
                        and AES Galois Counter Mode</xref>.</t>
                <t>Server crypto modules SHOULD be evaluated to
                    FIPS140-2 and SHOULD be combined with a Common
                    Criteria evaluation of the product to EAL3, or
                    higher, by the Australasian Information Security
                    Evaluation Programme (AISEP), or equivalent.</t>
            </section>
        </section>

        <section anchor="sec-7" title="Security Considerations">
            <section anchor="sec-7.1" title="TLS">
                <t>Although TLS is provided as a library (e.g.,
                    OpenSSL), the MTA still needs to be able to use it
                    correctly.  Administrators need to ensure they use
                    an implementation that has been tested.</t>
            </section>
            <section anchor="sec-7.2" title="Man In The Middle">
                <t>Before the TLS session is established, the SecureMail
                    approach is vulnerable to a man-in-the-middle (MITM)
                    attack.  The MITM sets up secure TLS sessions with
                    the sending and receiving servers, who believe they
                    are communicating with each other.  Both links could
                    appear to be fully authenticated if the DNS records
                    are modified or if the attacker can force packets
                    between the two servers' IP addresses to pass
                    through the attacker's device (alternatively, the
                    attacker might not bother setting up the attacker to
                    recipient link).</t>
                <t><xref target="RFC4033">DNSSEC</xref> or the use of
                    mutually authenticated TLS (instead of anonymous
                    TLS) would mitigate the risk.  It would require PKI
                    certificates for each mail server but, unlike
                    S/MIME, the certificates would not need to be
                    pre-positioned as they can be passed in the
                    handshaking phase.  A directory would still be
                    required, but only to publish CRLs (Certificate
                    Revocation Lists).</t>
                <t>In situations requiring higher levels of assurance,
                    it is recommended that PKI certificates be exchanged
                    between the two parties.</t>
            </section>

            <section anchor="sec-7.3" title="DNS Attack">
                <t>If the sending domain's DNS record is compromised and
                    the SPF record is modified to include an attacker's
                    address, that device would appear to be authorised
                    to send mail on the domain's behalf.  This type of
                    attack is unlikely as the types of threat agents
                    (spammers, phishers, etc.) are unlikely to want the
                    additional effort and risk of modifying DNS servers
                    to pretend to originate from a SecureMail address.
                    As with the example above, the vulnerability could
                    be minimised by the use of mutually authenticated
                    TLS (i.e., the attacker would also have to get a
                    legitimate key pair and certificate, and the attack
                    would be traceable through that certificate).</t>
            </section>
        </section>

        <section anchor="sec-8" title="Other Considerations">
            <t>SecureMail is intended to provide better security during
                transmission for email sent over the Internet between
                two mail servers.  It is not intended to specify how the
                sender or receiver manages their own email security.</t>
            <section anchor="sec-8.1" title="Store And Forward">
                <t>Organisations that use an intermediate mail server
                    between the sending and recipient servers (e.g.,
                    store and forwarded through an ISP or an
                    application-level firewall) can break security.  The
                    configuration to make this work could make the SPF
                    look-up process ineffectual and the mail may be
                    transmitted in plaintext at this point.</t>
            </section>
            <section anchor="sec-8.2" title="Mixing Secure And Insecure
                Receiving">
                <t>It is recommended that received SecureMail messages
                    be kept separate from other messages.  Otherwise it
                    will be difficult to determine whether the message
                    was authenticated (via SecureMail), or arrived
                    unauthenticated via the normal mail system.</t>
                <t>The method proposed to mitigate this risk is to have
                    alternative accounts or inboxes for SecureMail
                    versus other mail.  Based on the &quot;To:&quot;
                    address and the mailbox a message is in, the user
                    knows whether the sender has been validated.</t>
                <t>Alternatively or additionally, the receiving mail
                    server could mark incoming messages with their
                    authentication level in a similar way to junk mail
                    marking employed in some systems (the normal mail
                    system would have to check/remove similar markings
                    in email that arrived through 'normal'
                    channels).</t>
            </section>
            <section anchor="sec-8.3" title="Mixing Secure And Insecure
                Sending">
                <t>When a user sends a message securely, they have no
                    control or knowledge of how the message will be
                    delivered.  Their own system may not be configured
                    to correctly secure the message.</t>
                <t>A user can assume that a SecureMail server,
                    identified by &quot;securemail&quot; as the leftmost
                    part of the hostname, will fail-safe and refuse to
                    accept insecure messages sent from the user's
                    domain.</t>
                <t>The user can test this, using the free testing tool
                    service at <eref
                        target="http://tools.secmx.org/">http://tools.secmx.org/</eref>.</t>
            </section>
        </section>

        <section anchor="sec-9" title="Email Distribution">
            <t>Users who access a SecureMail server should connect to
                the server using a secure connection (e.g., using
                POP3/SSL or a secure internal network).  Remote users
                should only connect to such a mail server utilising
                equipment which has been appropriately certified and
                accredited for that purpose.</t>
        </section>

        <section anchor="sec-10" title="Timekeeping Requirements">
            <t>SecureMail servers should maintain time synchronisation
                using Network Time Protocol (NTP).</t>
        </section>

        <section anchor="sec-11" title="Future Development">
            <t>In the future, thought will be given to improving the
                security, through public key technology or other
                technologies not involving digital certificates, such as
                Kerberos.  Support for <xref target="RFC4871">DomainKeys
                    Identified Mail (DKIM) Signatures</xref> may be
                recommended in a future version of this applicability
                statement.</t>
            <t>The implications of the <xref target="RFC4409">SUBMIT
                    protocol</xref> will be considered in a future
                version of this applicability statement.</t>
        </section>

        <section title="IANA Considerations">
            <t>This document has no actions for IANA.</t>
        </section>
    </middle>

    <back>
        <references title="Normative References">
            &rfc2119;
            &rfc3207;
            &rfc4406;
            &rfc4407;
            &rfc4408;
        </references>
        <references title="Informative References">
            &rfc4033;
            &rfc4409;
            &rfc4871;
            <reference anchor='I-D.ietf-tls-rfc4346-bis'>
                <front>
                    <title>The TLS Protocol</title>
                    <author initials='T' surname='Dierks' fullname='Tim
                        Dierks'>
                        <organization>Independent</organization>
                    </author>
                    <author initials='E' surname='Rescorla'
                        fullname='Eric Rescorla'>
                        <organization>Network Resonance, Inc.</organization>
                    </author>
                    <date month="March" year="2008" />
                </front>
                <seriesInfo name='Internet-Draft'
                    value='draft-ietf-tls-rfc4346-bis-10' />
            </reference>
            <reference anchor='I-D.ietf-tls-ecc-new-mac'>
                <front>
                    <title>TLS Elliptic Curve Cipher Suites with
                        SHA-256/384 and AES Galois Counter Mode</title>
                    <author initials='E' surname='Rescorla'
                        fullname='Eric Rescorla'>
                        <organization>RTFM, Inc.</organization>
                    </author>
                    <date day="30" month="April" year="2008" />
                </front>
                <seriesInfo name='Internet-Draft'
                    value='draft-ietf-tls-ecc-new-mac-06' />
            </reference>
        </references>

        <section title="Acknowledgements">
            <t>The authors would like to acknowledge contributions from Geoff Cant and Hector Santos.</t>
        </section>
    </back>
</rfc>
