<?xml version="1.0" encoding="UTF-8"?>
<!-- 
people to talk with:

deployment:
	wes hardiger





Subject: Re: [ietf-dkim] Re: reductio ad hominem
Date: Fri, 7 Dec 2007 10:17:49 -0800
From: Steve Atkins <steve@blighty.com>
To: DKIM WG <ietf-dkim@mipassoc.org>
References: <20071207170019.63530.qmail@simone.iecc.com> <200712071220.58928.ietf-dkim@kitterman.com> <CDA4A036-6E6B-4D1E-B712-88D8F0BBA2FB@blighty.com>    <475989DA.3020002@cisco.com>


On Dec 7, 2007, at 9:58 AM, Jim Fenton wrote:

> Steve Atkins wrote:
>>
>> On Dec 7, 2007, at 9:20 AM, Scott Kitterman wrote:
>>>
>>> If they do, then Mike's point stands.
>>>
>>> If they don't, then phishing is inherently OK.  There really is no
>>> middle
>>> ground.
>>
>> Fallacy of the excluded middle.
>>
>> Just because it's OK for people to use some variant on a webmail
>> interface to send mail "from" their email address does not make it
>> OK to criminally steal passwords or credit card details.
>
> Some domains don't sanction the use of outside services to send mail
> "from" their domain, and have terms of use requiring the use of their
> domain's own mail servers to send mail. This is becoming increasingly
> commonplace in the corporate world.  If you want to forward a news
> article, you're welcome to do so using your personal email address.

That's quite true, though not relevant to the comment you're replying
to.

> Domains lacking "terms of use" requiring the use of their own mail
> servers (which presumably would sign outgoing mail), should not  publish
> SSP other than "unknown", because it is perfectly within a user's  rights
> to send mail using means that wouldn't get it signed.  It would be
> helpful to have this expressed in the Development/Deployment/ Operations
> document.

Yes. That sounds like a good thing to have recorded somewhere.

It wouldn't be just "their own mail servers", it would also be those
they'd authorized to send dkim-signed mail on their behalf by one
or other of the usual methods.

Cheers,
  Steve








-->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
      <!ENTITY ar	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.kucherawy-sender-auth-header.xml'>
      <!ENTITY rfc2440bis PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-openpgp-rfc2440bis.xml'>
      <!ENTITY adsp	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dkim-ssp-09.xml'>
      <!ENTITY overview	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dkim-overview-10.xml'>
      <!ENTITY pem	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.0989.xml'>
      <!ENTITY rfc1034	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml'>
      <!ENTITY moss	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1848.xml'>
      <!ENTITY pgp1	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1991.xml'>
      <!ENTITY rfc2440	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2440.xml'>
      <!ENTITY rfc3156	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3156.xml'>
      <!ENTITY syslog	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3164.xml'>
      <!ENTITY rfc3851	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3851.xml'>
      <!ENTITY dnssec	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4034.xml'>
      <!ENTITY dkimta	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4686.xml'>
      <!ENTITY dkimbase	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4871.xml'>
      <!ENTITY dk	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4870.xml'>
      <!ENTITY rfc5155	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5155.xml'>
      <!ENTITY rfc5321	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5321.xml'>
      <!ENTITY rfc5322	PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5322.xml'>
      ]>

<!-- 3 levels is messy --> <?rfc tocdepth="2" ?>

<!-- may be omitted for very short documents --> <?rfc toc="yes"?>
<!-- strict ID-nits compliance --> <?rfc strict="no"?>
<!-- these two save paper: start new paragraphs from the same page etc. -->
	<?rfc compact="yes"?> <?rfc subcompact="no"?>
<!-- use symbolic cross references instead of [1], and sort them -->
<?rfc symrefs="yes"?> <?rfc sortrefs="yes"?>

<?rfc comments="yes"?>
<?rfc inline="yes"?>

<!-- other categories: bcp, exp, historic, std -->
<rfc category="info" ipr="trust200902">
	<front>
	  <title abbrev="DKIM Development/Deployment/Operations">DomainKeys
	    Identified Mail (DKIM) Development, Deployment and Operations</title>
	  <!-- add 'role="editor"' below for the editors if the requiring designation -->
	  <author fullname="Tony Hansen" initials="T." surname="Hansen">
	    <organization>AT&amp;T Laboratories</organization>
	    <address>
	      <postal>
		<street>200 Laurel Ave. South</street>
		<city>Middletown</city>
		<region>NJ</region>
		<code>07748</code>
		<country>USA</country>
	      </postal>
	      <email>tony+dkimov@maillennium.att.com </email>
	    </address>
	  </author>
	  <author fullname="Ellen Siegel" initials="E." surname="Siegel">
	    <organization>Constant Contact, Inc.</organization>
	    <address>
	      <postal>
		<street>1601 Trapelo Rd, Ste 329</street>
		<city>Waltham</city>
		<region>MA</region>
		<code>02451</code>
		<country>USA</country>
	      </postal>
	      <email>esiegel@constantcontact.com</email>
	    </address>
	  </author>
	  <author fullname="Phillip Hallam-Baker" initials="P." surname="Hallam-Baker">
	    <organization>VeriSign Inc.</organization>
	    <address>
	      <email>pbaker@verisign.com</email>
	    </address>
	  </author>
	  <author fullname="Dave Crocker" initials="D." surname="Crocker">
	    <organization>Brandenburg InternetWorking</organization>
	    <address>
	      <postal>
		<street>675 Spruce Dr.</street>
		<city>Sunnyvale</city>
		<region>CA</region>
		<code>94086</code>
		<country>USA</country>
	      </postal>
	      <email>dcrocker@bbiw.net</email>
	    </address>
	  </author>
	  <date year="2009" />
	  <area>Security</area>
		<!-- WG name at the upperleft corner of the doc, IETF fine for individual submissions -->
		<workgroup>DomainKeys Identified Mail</workgroup>
		<keyword>Email</keyword>
		<keyword>Electronic Mail</keyword>
		<keyword>Internet Mail</keyword>
		<keyword>Message Verification</keyword>
		<abstract>
			<t>
				DomainKeys Identified Mail (DKIM) allows an organization to claim
				responsibility for transmitting a message, in a way that can
				be validated by a recipient. The organization can be the
				author's, the originating sending site, an intermediary, or
				one of their agents. A message can contain multiple
				signatures, from the same or different organizations involved
				with the message. DKIM defines a domain-level digital
				signature authentication framework for email, using public key
				cryptography, using the domain name service as its key server
				technology <xref target="RFC4871" />. This permits verification of a
				responsible organization, as well as the integrity of the
				message contents. DKIM will also provide a mechanism that
				permits potential email signers to publish information about
				their email signing practices; this will permit email
				receivers to make additional assessments about messages.
				DKIM's authentication of email identity can assist in the
				global control of "spam" and "phishing". This document provides
				implementation, deployment, operational and migration
				considerations for DKIM. </t>


			<!-- notes periodically that an important piece is to say that registrars and
			service providers need to make   
			-->
		</abstract>
	</front>
	<middle>
<section title="Introduction">
      <t>
      	DomainKeys Identified Mail (DKIM) allows an
      	organization to claim responsibility for transmitting a message, in a way that can be validated by a recipient.
	This document provides practical tips for: those who are developing DKIM software, mailing list managers,
	filtering strategies based on the output from DKIM verification, and DNS servers;
	those who are deploying DKIM software, keys, mailing list software, and migrating from DomainKeys;
	and those who are responsible for the on-going operations of an email infrastructure that has deployed DKIM.
      </t>
      <t>   The document is organized around the key concepts related to DKIM. Within each section, additional considerations 
              specific to development, deployment, or ongoing operations are highlighted where appropriate.
              
      </t>
      <t><vspace  blankLines='1' />
    		<cref>
    			MSK: maybe this is a good place to mention the possibility of collecting
    			verification history for selectors domains as a means of observing over time
    			behaviour of signers for the purpose of asserting local reputation
    		</cref>
     </t>
      
    	
    </section>

		<section title="Using DKIM as Part of Trust Assessment ">
			<section anchor="system" title="A Systems View of Email Trust Assessment">
				<t>DKIM participates in a trust-oriented enhancement to the
				  Internet's email service, to facilitate message handling
				  decisions, such as for delivery and for content display.
				  Trust-oriented message handling has substantial
				  differences from approaches that consider messages in
				  terms of risk and abuse.
				  With trust, there is a collaborative exchange between a willing
				  participant along the sending path and a willing participant at the
				  recipient site.
				  In contrast, the risk model entails independent action by the recipient
				  site, in the face of a potentially unknown, hostile and deceptive sender.
				  This translates into a very basic technical difference:
				  In the face of unilateral action by the recipient and even
				  antagonistic efforts by the sender, risk-oriented
				  mechanisms will be based on heuristics, that is, on
				  guessing.
				  Guessing produces statistical results with some
				  false negatives and some false positives. For trust-based
				  exchanges, the goal is the deterministic exchange of
				  information. For DKIM, that information is the one
				  identifier that represents a stream of mail for which an
				  independent assessment is sought (by the signer.)
				</t>

				<t>A trust-based service is built upon a validated Responsible
					Identifier that labels a stream of mail and is controlled
					by an identity (role, person or organization.) The
					identity is acknowledging some degree of responsibility
					for the message stream. Given a basis for believing that
					an identifier is being used in an authorized manner, the
					recipient site can make and use an assessment of the
					associated identity. An identity can use different
					identifiers, on the assumption that the different streams
					might produce different assessments. For example, even the
					best-run marketing campaigns will tend to produce some
					complaints that can affect the reputation of the
					associated identifier. Whereas a stream of transactional
					messages is likely to have a more pristine reputation.</t>

				<t>Determining that the identifier's use is valid is quite
					different from determining that the content of a message
					is valid. The former means only that the identifier for
					the responsible role, person or organization has been
					legitimately associated with a message. The latter means
					that the content of the message can be believed and,
					typically, that the claimed author of the content is
					correct. DKIM validates only the presence of the
					identifier used to sign the message. Even when this
					identifier is validated, DKIM carries no implication that
					any of the message content, including the RFC5322.From
					field, is valid. Surprisingly, this limit to the semantics
					of a DKIM signature applies even when the validated
					signing identifier is the same domain name as is used in
					the From: field! DKIM's only claim about message content
					is that the content cited in the DKIM-Signature: field's
					h&equals; tag have been delivered without
					modification. That is, it asserts message content
					integrity, not message content validity.</t>

				<t>As shown in <xref
						target="trustseq" />, this enhancement is a
					communication between a responsible role, person or
					organization that signs the message and a recipient
					organization that assesses its trust in the signer and
					then makes handling decisions based on a collection of
					assessments, of which the DKIM mechanism is only a part.
					In this model, validation is an intermediary step, having
					the sole task of passing a validated Responsible
					Identifier to the Identity Assessor. The communication is
					of a single Responsible Identifier that the Responsible
					Identity wishes to have used by the Identity Assessor. The
					Identifier is the sole, formal input and output value of
					DKIM signing. The Identity Assessor uses this single,
					provided Identifier for consulting whatever assessment
					data bases are deemed appropriate by the assessing entity.
					In turn, output from the Identity Assessor is fed into a
					Handling Filter engine that considers a range of factors,
					along with this single output value; the range of factors
					can include ancillary information from the DKIM
					validation.</t>
				<t>Identity Assessment covers a range of possible functions.
					It can be as simple as determining whether the identifier
					is a member of some list, such as authorized operators or
					participants in a group that might be of interest for
					recipient assessment. Equally, it can indicate a degree of
					trust (reputation) that is to be afforded the actor using
					that identifier. The extent to which the assessment
					affects handling of the message is, of course, determined
					later, by the Handling Filter.</t>

				<figure
					align="center"
					anchor="trustseq"
					title="Actors in a Trust Sequence using DKIM">
					<artwork
						align="center"><![CDATA[
  +------+------+                            +------+------+
  |   Author    |                            |  Recipient  |
  +------+------+                            +------+------+
         |                                          ^
         |                                          |
         |                                   +------+------+
         |                                -->|  Handling   |<--
         |                                -->|   Filter    |<--
         |                                   +-------------+
         |                                          ^
         V                  Responsible             |
  +-------------+           Identifier       +------+------+
  | Responsible |. .       . . . . . . . . .>|  Identity   |
  |  Identity   |  .       .                 |  Assessor   |
  +------+------+  .       .                 +-------------+
         |         .       .                       ^ ^
         V         .       .                       | |
+------------------.-------.--------------------+  | |
| +------+------+  . . . . .   +-------------+  |  | |  +-------------+
| | Identifier  |              |  Identifier +--|--+ +--+ Assessment  |
| |   Signer    +------------->|  Validator  |  |       | Databases   |
| +-------------+              +-------------+  |       +-------------+
|                 DKIM Service                  |
+-----------------------------------------------+ 
]]></artwork>
				</figure>
			</section>

			<section
				anchor="tagchoice"
				title="Choosing a DKIM Tag for the Assessment Identifier">
				<t>The signer of a message needs to be able to provide precise
					data and know what that data will mean upon delivery to
					the Assessor. If there is ambiguity in the choice that
					will be made on the receive side, then the sender cannot
					know what basis for assessment will be used. DKIM has
					three values that specify identification information and
					it is easy to confuse their use, although only one defines
					the formal input and output of DKIM, with the other two
					being used for internal protocol functioning and adjunct
					purposes, such as auditing and debugging. </t>

				<t>The salient values include the s&equals;, d&equals;
					and i&equals; parameters in the DKIM-Signature: header
					field. In order to achieve the end-to-end determinism
					needed for this collaborative exchange from the signer to
					the assessor, the core model needs to specify that the
					signer MUST provide the assessor with a single, opaque
					value that the signer wishes to have used for assessment.
					This value MUST be the basis for DKIM-based assessment.
					The signer MAY provide the assessor with a second, opaque
					value that MAY be used when reporting problems with the
					end-to-end DKIM process and MAY be used for additional
					analysis, such as by the higher-level Handling Filter.
					These values are opaque, in that any internal semantics
					are known only to the signer and MUST NOT be assumed by
					the Assessor, within the confines of DKIM's formal signing
					specification. Assessment MUST use a value as a single,
					complete and uninterpreted string.</t>

				<t>The single, mandatory value that DKIM supplies as its
					output is:<list>
						<t>
							<list
								style="hanging">
								<t
									hangText="d&equals;  ">This specifies
									the "domain of the signing entity." It is
									a domain name and is combined with the
									Selector to form a DNS query.</t>
							</list>
						</t>


					</list>
				</t>

				<t>The adjunct values are:<list>
						<t>
							<list
								style="hanging">
								<t
									hangText="s&equals;  ">This tag
									specifies the Selector. It is used to
									discriminate among different keys that can
									be used for the same d&equals; domain
									name. As discussed in Section 4.3 of <xref
									target="I-D.ietf-dkim-overview" />: 
									"If verifiers
									were to employ the selector as part of a
									name assessment mechanism, then there
									would be no remaining mechanism for making
									a transition from an old, or compromised,
									key to a new one." Consequently, the
									Selector is not appropriate for use as
									part or all of the identifier used to make
									assessments.</t>

								<t
									anchor="iequal"
									hangText="i&equals;  ">This tag is
									optional and provides the "[i]dentity of
									the user or agent (e.g., a mailing list
									manager) on behalf of which this message
									is signed." The identity can be in the
									syntax of an entire email address or only
									a domain name. The domain name can be the
									same as for d= or it can be a sub-name of
									the d&equals; name.</t>
								<t>NOTE: Although the i&equals; identity
									has the syntax of an email address, it is
									not required to have that semantics. That
									is, "the identity of the user" need not be
									the same as the user's mailbox. For
									example the signer might wish to use
									i&equals; to encode user-related audit
									information, such as how they were
									accessing the service at the time of
									message posting. Therefore it is not
									possible to conclude anything from the
									i&equals; string's (dis)similarity to
									email addresses elsewhere in the
								header</t>
							</list>
						</t>


					</list>
				</t>

				<t>So, i&equals; can have any of these properties: <list>
						<t>
							<list
								style="symbols">
								<t>Be a valid domain when it is the same as
									d&equals;</t>
								<t>Appear to be a sub-domain of d&equals;
									but might not even exist</t>
								<t>Look like a mailbox address but might have
									different semantics and therefore not
									function as a valid email address</t>
								<t>Be unique for each message, such as
									indicating access details of the user for
									the specific posting</t>
							</list>
						</t>
					</list> This underscores why the tag needs to be treated
					as being opaque, since it can represent any semantics,
					known only to the signer.</t>

				<t>Hence, i&equals; serves well as a token that is usable
					like an Web cookie, for return to the signing ADMD -- such
					as for auditing and debugging. Of course in some scenarios
					the i&equals; string might provide a useful adjunct
					value for additional (heuristic) processing by the
					Handling Filter.</t>
			</section>

			<section
				anchor="signname"
				title="Choosing the Signing Domain Name">

				<t>A DKIM signing entity can serve different roles, such as
					author of content, versus operator of the mail service,
					versus operator of a reputation service. In these
					different roles, the basis for distinguishing among
					portions of email traffic can vary. For an entity creating
					DKIM signatures it is likely that different portions of
					their mail will warrant different levels of trust. For
					example: <list>
						<t>
							<list
								style="symbols">
								<t>Mail is sent for different purposes, such
									as marketing vs. transactional, and
									recipients demonstrate different patterns
									of acceptance between these.</t>
								<t>For an operator of an email service, there
									often are distinct sub-populations of
									users warranting different levels of trust
									or privilege, such as paid vs. free users,
									or users engaged in direct correspondence
									vs. users sending bulk mail.</t>
								<t>Mail originating outside an operator's
									system, such as when it is redistributed
									by a mailing list service run by the
									operator, will warrant a different
									reputation from mail submitted by users
									authenticated with the operator.</t>
							</list>
						</t>
					</list>It is therefore likely to be useful for a signer to
					use different d&equals; sub-domain names, for
					different message traffic streams, so that receivers can
					make differential assessments. However, too much
					differentiation -- that is, too fine a granularity of
					signing domains -- makes it difficult for the receiver to
					discern a sufficiently stable pattern of traffic for
					developing an accurate and reliable assessment. So the
					differentiation needs to achieve a balance. Generally in a
					trust system, legitimate signers have an incentive to pick
					a small stable set of identities, so that recipients and
					others can attribute reputations to them. The set of these
					identities a receiver trusts is likely to be quite a bit
					smaller than the set it views as risky. </t>

				<t>The challenge in using additional layers of sub-domains is
					whether the extra granularity will be useful for the
					assessor. In fact, potentially excessive levels invites
					ambiguity: if the assessor does not take advantage of the
					added granularity, then what granularity will it use? That
					ambiguity would move the use of DKIM back to the realm of
					heuristics, rather than the deterministic processing that
					is its goal. </t>

				<t>Hence the challenge is to determine a useful scheme for
					labeling different traffic streams. The most obvious
					choices are among different types of content and/or
					different types of authors. Although stability is
					essential, it is likely that the choices will change, over
					time, so the scheme needs to be flexible. </t>
				<t>For those originating message content, the most likely
					choice of sub-domain naming scheme will by based upon type
					of content, which can use content-oriented labels or
					service-oriented labels. For example:<list>
						<t>
							<figure>
								<artwork
									type="example"><![CDATA[transaction.example.com
newsletter.example.com
bugreport.example.com
support.example.com
sales.example.com
marketing.example.com]]></artwork>
							</figure>
						</t>
					</list> where the choices are best dictated by whether
					they provide the Identity Assessor with the ability to
					discriminate usefully among streams of mail that
					demonstrate significantly different degrees of recipient
					acceptance or safety. Again, the danger in providing too
					fine a granularity is that related message streams that
					are labeled separately will not benefit from an aggregate
					reputation. </t>
				<t>For those operating messaging services on behalf of a
					variety of customers, an obvious scheme to use has a
					different sub-domain label for each customer. For example:<list>
						<t>
							<figure
								align="center">
								<artwork
									type="example"><![CDATA[widgetco.example.net
moviestudio.example.net
bigbank.example.net]]></artwork>

							</figure>
						</t>
					</list> However it can also be appropriate to label by the
					class of service or class of customer, such as:<list>
						<t>
							<figure>
								<artwork
									type="example"><![CDATA[premier.example.net
free.example.net
certified.example.net]]></artwork>
							</figure>
						</t>
					</list>
				</t>
				<t>Prior to using domain names for distinguishing among
					sources of data, IP Addresses have been the basis for
					distinction. Service operators typically have done this by
					dedicating specific outbound IP Addresses to specific mail
					streams -- typically to specific customers. For example, a
					university might want to distinguish mail from the
					Administration, versus mail from the student dorms. In
					order to make adoption of a DKIM-based service easier, it
					can be reasonable to translate the same partitioning of
					traffic, using domain names in place of the different IP
					Addresses. </t>
			</section>


			<section
				title="Recipient-based Assessments">
				<t>DKIM gives the recipient site's Identity Assessor a
					verifiable identifier to use for analysis. Although the
					mechanism does not make claims that the signer is a Good
					Actor or a Bad Actor, it does make it possible to know
					that use of the identifier is valid. This is in marked
					contrast with schemes that do not have authentication.
					Without verification, it is not possible to know whether
					the identifier -- whether taken from the RFC5322.From
					field, RFC5321.MailFrom command, or the like -- is being
					used by an authorized agent. DKIM solves this problem.
					Hence with DKIM, the Assessor can know that two messages
					with the same DKIM d&equals; identifier are, in fact,
					signed by the same person or organization. This permits a
					far more stable and accurate assessment of mail traffic
					using that identifier.</t>
				<t>DKIM is distinctive, in that it provides an identifier
					which is not necessarily related to any other identifier
					in the message. Hence, the signer might be the author's
					ADMD, one of the operators along the transit path, or a
					reputation service being used by one of those handling
					services. In fact, a message can have multiple signatures,
					possibly by different of these actors. </t>
				<t>As discussed above, the choice of identifiers needs to be
					based on differences that the signer thinks will be useful
					for the recipient Assessor. Over time, industry practices
					establish norms for these choices. <list>
						<t>Absent such norms, it is best for signers to
							distinguish among streams that have significant
							differences, while consuming the smallest number
							of identifiers possible. This will limit the
							burden on recipient Assessors.</t>
					</list></t>
				<t>A common view about a DKIM signature is that it carries a
					degree of assurance about some or all of the message
					contents, and in particular that the RFC5322.From field is
					likely to be valid. In fact, DKIM makes assurances only
					about the integrity of the data and not about its
					validity. Still, presumptions of From: field validity
					remain a concern. Hence a signer using a domain name that
					is unrelated to the domain name in the From: field can
					reasonably expect that the disparity will warrant some
					curiosity, at least until signing by independent operators
					has produced some established practice among recipient
					Assessors. </t>


			</section>


			<section
				title="Filtering">
				<t>After assessing the signer of a message, each receiving
					site creates and tunes its own Handling Filter according
					to criteria specific for that site. Still, there are
					commonalities across sites, and this section offers a
					discussion, rather than a specification, of some types of
					input to that process and how they can be used. </t>
				<t>The discussion focuses on variations in Organizational
					Trust versus Message Risk. That is, the degree of positive
					assessment of a DKIM-signing organization, and the
					potential danger present in the message stream signed by
					that organization. While it might seem that higher trust
					automatically means lower risk, the experience with
					real-world operations provides examples of every
					combination of the two factors, as shown in <xref
						target="trustrisk" />. Only 3 levels of granularity
					are listed, in order to keep discussion manageable. This
					also ensures extensive flexibility for each site's
					detailed choices.</t>

				<texttable
					align="center"
					anchor="trustrisk"
					style="full"
					title="Organizational Trust vs. Message Risk">
					<preamble> </preamble>
					<ttcol>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ORG&nbsp;TRUST&nbsp;
						MSG&nbsp;RISK&nbsp;&nbsp;&nbsp;\</ttcol>
					<ttcol
						width="33%">Low</ttcol>
					<ttcol
						width="33%">Medium</ttcol>
					<ttcol
						width="33%">High</ttcol>

					<c>
						<spanx
							style="strong">Low</spanx>
					</c>
					<c>Unknown&nbsp;org, Few&nbsp;msgs:&nbsp; <spanx
							style="emph">Mild&nbsp;filtering</spanx></c>
					<c>Registered&nbsp;org,
						New&nbsp;Identifier:&nbsp; <spanx
							style="emph">Medium&nbsp;filtering</spanx></c>
					<c>Good&nbsp;Org, Good&nbsp;msgs:&nbsp; <spanx
							style="emph">Avoid&nbsp;FP(!)</spanx></c>

					<c>
						<spanx
							style="strong">Medium</spanx>
					</c>
					<c>Unknown&nbsp;org,
						New&nbsp;Identifier:&nbsp; <spanx
							style="emph">Default&nbsp;filtering</spanx></c>
					<c>Registered&nbsp;org, Mixed&nbsp;msgs:&nbsp; <spanx
							style="emph">Medium&nbsp;filtering</spanx></c>
					<c>Good&nbsp;org, Bad&nbsp;msg burst:&nbsp; <spanx
							style="emph">Accept&nbsp;&amp;&nbsp;Contact</spanx></c>

					<c>
						<spanx
							style="strong">High</spanx>
					</c>
					<c>Black&nbhy;Listed&nbsp;org,
						Bad&nbsp;msgs:&nbsp; <spanx
							style="emph">Avoid&nbsp;FN(!)</spanx></c>
					<c>Registered&nbsp;org, Bad&nbsp;msgs:&nbsp; <spanx
							style="emph">Strong&nbsp;filtering</spanx></c>
					<c>Good&nbsp;org, Compromised:&nbsp; <spanx
							style="emph">Fully&nbsp;blocked</spanx></c>
				</texttable>


				<t>The table indicates preferences for different handling of
					different combinations, such as tuning filtering to avoid
					False Positives (FP) or avoiding False Negatives (FN).
					Perhaps unexpectedly, it also lists a case in which the
					receiving site might wish to deliver problematic mail,
					rather than redirecting it, but also of course contacting
					the signing organization, seeking resolution of the
					problem.</t>


			</section>

		</section>

<section title="DKIM Key Generation, Storage, and Management ">
  <t>
    By itself, verification of a digital signature only allows the verifier to conclude with a very high degree of certainty that the signature was created by a party with access to the corresponding private signing key. It follows that a verifier requires means to (1) obtain the public key for the purpose of verification and (2) infer useful attributes of the key holder.
  </t>
  <t>
    In a traditional Public Key Infrastructure (PKI), the functions of key distribution and key accreditation are separated. In DKIM, these functions are both performed through the DNS [RFC4871] (Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, J., and M. Thomas, “DomainKeys Identified Mail (DKIM) Signatures,” May 2007.).
  </t>
  <t>
    In either case, the ability to infer semantics from a digital signature depends on the assumption that the corresponding private key is only accessible to a party with a particular set of attributes. In traditional PKI a Trusted Third Party (TTP) vouches that the key holder has been validated with respect to a specified set of attributes. The range of attributes that may be attested in such a scheme is thus limited only to the type of attributes that a TTP can establish effective processes for validating.
  </t>
  <t>
    In DKIM, TTPs are not employed and the functions of key distribution and accreditation are combined. Consequently there are only two types of inference that a signer may make from a key published in a DKIM Key Record:
  </t>
  <t>
    <list style="numbers">
      <t>That a party with the ability to control DNS records within a DNS zone intends to claim responsibility for messages signed using the corresponding private signature key.</t>
      <t>That use of a specific key is restricted to a particular subset of messages.</t>
    </list>
  </t>


  <t>
    The ability to draw any useful conclusion from verification of a digital signature relies on the assumption that the corresponding private key is only accessible to a party with a particular set of attributes. In the case of DKIM, this means that the party that created the corresponding DKIM key record in the specific zone intended to claim responsibility for the signed message.
  </t>

  <t>
    Ideally we would like to draw a stronger conclusion, that if we obtain a DKIM key record from the DNS zone example.com, that the legitimate holder of the DNS zone example.com claims responsibility for the signed message. In order for this conclusion to be drawn it is necessary for the verifier to assume that the operational security of the DNS zone and corresponding private key are adequate.
  </t>



  <section title="Private Key Management: Deployment and Ongoing Operations">
    <t>
      Access to signing keys MUST be carefully managed to prevent use by unauthorized parties and to minimize the consequences if a compromise were to occur.
    </t>
    <t>
      While a DKIM signing key is used to sign messages on behalf of many mail users,
      the signing key itself SHOULD be under direct control of as few key-holders as possible.
      If a key-holder were to leave the organization, all signing keys held by that key holder
      SHOULD be withdrawn from service and if appropriate, replaced.
    </t>

    <t>
      If key management hardware support is available, it SHOULD be used.
      If keys are stored in software, appropriate file control protections MUST be employed,
      and any location in which the private key is stored in plaintext form SHOULD be excluded
      from regular backup processes and SHOULD not be accessible through any form of network
      including private local area networks.
      Auditing software SHOULD be used periodically to verify that the permissions on the private key files remain secure.
    </t>

    <t>
      Wherever possible a signature key SHOULD exist in exactly one location and be erased when no longer used.
      Ideally a signature key pair SHOULD be generated as close to the signing point as possible and only the public key component transferred to another party.
      If this is not possible, the private key MUST be transported in an encrypted format that protects the confidentiality of the signing key.
      A shared directory on a local file system does not provide adequate security for distribution of signing keys in plaintext form.
    </t>

    <t>
      Key escrow schemes are not necessary and SHOULD NOT be used.
      In the unlikely event of a signing key becomming lost, a new signature key pair may be generated as easily as recovery from a key escrow scheme.
    </t>

    <t>
      Responsibility for the security of a signing key SHOULD ultimately vest in a single named individual.
      Where multiple parties are authorized to sign messages, each signer SHOULD use a different key to enable accountability and auditing.
    </t>

    <t>
      Best practices for management of cryptographic keying material require keying material to be refreshed at regular intervals, particular where key management is achieved through software. While this practice is highly desirable it is of considerably less importance than the requirement to maintain the secrecy of the corresponding private key. An operational practice in which the private key is stored in tamper proof hardware and changed once a year is considerably more desirable than one in which the signature key is changed on an hourly basis but maintained in software.
    </t>

  </section>

  <section title="Storing Public Keys: DNS Server Software Considerations">
    <t>
      In order to use DKIM a DNS domain holder requires (1) the ability to create the necessary DKIM DNS records and (2) sufficient operational security controls to prevent insertion of spurious DNS records by an attacker.
    </t>
    <t>
      DNS record management is usually operated by an administrative staff that is different from those who operate an organization's email service. In order to ensure that DKIM DNS records are accurate, this imposes a requirement for careful coordination between the two operations groups. If the best practices for private key management described above are observed, such deployment is not a one time event, DNS DKIM selectors will be changed over time signing keys are terminated and replaced.
    </t>
    <t>
      At a minimum, a DNS server that handles queries for DKIM key records MUST allow the server administrators to add free-form TXT records.
      It would be better if the the DKIM records could be entered using a structured form, supporting the DKIM-specific fields.
    </t>
    <t>
      Ideally DNSSEC <xref target='RFC4034'/> SHOULD be employed in a configuration that provides protection against record insertion attacks and zone enumeration.
      In the case that NSEC3 <xref target='RFC5155'/> records are employed to prevent insertion attack, the OPT-OUT flag MUST be set clear.
    </t>


    <section title="Assignment of Selectors">
      <t>
        Selectors are assigned according to the administrative needs of the signing domain, such as for rolling over to a new key or for delegating of the right to authenticate a portion of the namespace to a trusted third party. Examples include:
      </t>
      <t>
        jun2005.eng._domainkey.example.com
      </t>
      <t>
        widget.promotion._domainkey.example.com
      </t>
      <t>
        It is intended that assessments of DKIM identities be based on the domain name, and not include the selector. While past practice of a signer may permit a verifier to infer additional properties of particular messages from the structure DKIM key selector, unannounced administrative changes such as a change of signing softeware may cause such heuristics to fail at any time.
      </t>

    </section>
  </section>

  <section title="Per User Signing Key Management Issues">
    <t>
      While a signer may establish business rules, such as issue of individual signature keys for each end-user, DKIM makes no provision for communicating these to other parties. Out of band distribution of such business rules is outside the scope of DKIM. Consequently there is no means by which external parties may make use of such keys to attribute messages with any greater granularity than a DNS domain.
    </t>
    <t>
      If per-user signing keys are assigned for internal purposes (e.g. authenticating messages sent to an MTA for distribution), the following issues need to be considered before using such signatures as an alternative to traditional edge signing at the outbound MTA:
    </t>
    <t>
      <list>
        <t>External verifiers will be unable to make use of the additional signature granularity without access to additional information passed out of band with respect to DKIM-base.</t>
        <t>If the number of user keys is large, the efficiency of local caching of key records by verifiers will be lower.</t>
        <t>A large number of end users may be less likely to be able to manage private key data securely on their personal computer than an administrator running an edge MTA.</t>
      </list>
    </t>

  </section>

  <section title="Third Party Signer Key Management and Selector Administration">
    <t>
      A DKIM key record only asserts that the holder of the corresponding domain name makes a claim of responsibility for messages signed under the corresponding key. In some applications, such as bulk mail delivery it is desirable to delegate the ability to make a claim of responsibility to another party. In this case the trust relationship is established between the domain holder and the verifier but the private signature key is held by a third party.
    </t>
    <t>
      Signature keys used by a third party signer SHOULD be kept entirely separate from those used by the domain holder and other third party signers.
      As with any other private key, the signature key pair SHOULD be generated by the third party signer and the public component of the key transmitted to the domain holder rather than have the domain holder generate the key pair and transmit the private component to the third party signer.
    </t>
    <t>
      Domain holders SHOULD adopt a least privilege approach and grant third party signers the minimum access necessary to perform the desired function.
      Limiting the access granted to Third Party Signers serves to protect the interests of both parties.
      The domain holder minimizes their security risk and the Trusted Third Party Signer avoids unnecessary liability.
    </t>
    <t>
      In the most restrictive case a domain holder maintains full control over the creation of key records and employ appropriate key record restrictions to enforce restrictions on the messages for which the third party signer is able to sign.
      If such restrictions are impractical, the domain holder SHOULD delegate a DNS subzone for publishing key records to the third party signer.
      The domain holder SHOULD not allow a third party signer unrestricted access to their DNS service for the purpose of publishing key records.
    </t>
  </section>

  <section title="Key Pair / Selector Lifecycle Management">
    <t>
      Deployments SHOULD establish, document and observe processes for managing the entire lifecycle of a public key pair.
    </t>

    <section title="Example Key Deployment Process">
      <t>
        When it is determined that a new key pair is required:
      </t>
      <t>
        <list style="numbers">
          <t>
            A Key Pair is generated by the signing device
          </t>
          <t>
            A proposed key selector record is generated and transmitted to the DNS administration infrasrtructure.
          </t>
          <t>
            The DNS administration infrastructure verifies the authenticity of the key selector registration request. If accepted
            <list style="numbers">
              <t>
                A key selector is assigned.
              </t>
              <t>
                The corresponding key record published in the DNS.
              </t>
              <t>
                Wait for DNS updates to propagate (if necessary).
              </t>
              <t>
                Report assigned key selector to signing device.
              </t>
            </list>
          </t>
          <t>
            Signer verifies correct registration of the key record.
          </t>
          <t>
            Signer begins generating signatures using the new key pair.
          </t>
          <t>
            Signer terminates any private keys that are no longer required due to issue of replacement.
          </t>
        </list>
      </t>
    </section>
    <section title="Example Key Termination Process">
      <t>
        When it is determined that a private signature key is no longer required:
      </t>
      <t>
        <list style="numbers">
          <t>
            Signer stops using the private key for signature operations.
          </t>
          <t>
            Signer deletes all records of the private key, including in-memory copies at the signing device.
          </t>
          <t>
            Signer notifies the DNS administration infrasrtructure that the signing key is withdrawn from
            service and that the corresponding key records may be withdrawn from service at a specified future date.
          </t>
          <t>
            The DNS administration infrastructure verifies the authenticity of the key selector termination request. If accepted
            <list style="numbers">
              <t>
                The key selector is scheduled for deletion at a future time determined by site policy.
              </t>
              <t>
                Wait for deletion time to arrive
              </t>
              <t>
                The key selector is deleted
              </t>
            </list>
          </t>
        </list>
      </t>
    </section>
  </section>
</section>

		<section title="Signing">
			<t>Creating messages that have one or more DKIM signatures,
			  requires support in only two outbound email service
			  components: <list
					 style="symbols">
			    <t>A DNS Administrative interface that can create and
			      maintain the relevant DNS
			      names&nbsp;&nbhy;&nbhy; including names
			      with underscores&nbsp;&nbhy;&nbhy; and
			      resource records (RR).</t>
			    <t>A trusted module, called the Signing Module, which is
			      within the organization's outbound email handling
			      service and which creates and adds the DKIM-Signature:
			      header field(s) to the message.</t>
			  </list> If the module creates more than one signature, there
			  needs to be the appropriate means of telling it which one(s)
			  to use. If a large number of names is used for signing, it
			  will help to have the administrative tool support a batch
			  processing mode.
			</t>

			<section title="DNS Records">
			  <t>A receiver attempting to verify a DKIM signature obtains
			    the public key that is associated with the signature for
			    that message. The DKIM-Signature: header in the message
			    contains the d&equals; tag with the basic domain name
			    doing the signing and serving as output to the Identity
			    Assessor, and the s&equals; tag with the selector that
			    is added to the name, for finding the specific public key.
			    Hence, the relevant
			    &lt;selector&gt;._domainkey.&lt;domain-name&gt;
			    DNS record needs to contain a DKIM-related RR that
			    provides the public key information. </t>
			  <t>The administrator of the zone containing the relevant
			    domain name adds this information. Initial DKIM DNS
			    information is contained within TXT RRs. DNS
			    administrative software varies considerably in its
			    abilities to support DKIM names, such as with underscores,
			    and to add new types of DNS information. </t>
			</section>

			<section title="Signing Module">
			  <t>The module doing signing can be placed anywhere within an
			    organization's trusted Administrative Management Domain
			    (ADMD); obvious choices include department-level posting
			    agents, as well as outbound boundary MTAs to the open
			    Internet. However any other module, including the author's
			    MUA, is potentially acceptable, as long as the signature
			    survives any remaining handling within the ADMD. Hence the
			    choice among the modules depends upon software
			    development, administrative overhead, security exposures
			    and transit handling tradeoffs. One perspective that helps
			    to resolve this choice is the difference between the
			    increased flexibility, from placement at (or close to) the
			    MUA, versus the streamlined administration and operation,
			    that is more easily obtained by implementing the mechanism
			    "deeper" into the organization's email infrastructure,
			    such as at its boundary MTA. </t>
			  <t>Note the discussion in <xref target="tagchoice" />, concerning use of the
			    i&equals; tag.</t>
			  
			  <t>The signing module uses the appropriate private key to
			    create one or more signatures. The means by which the
			    signing module obtains the private key(s) is not specified
			    by DKIM. Given that DKIM is intended for use during email
			    transit, rather than for long-term storage, it is expected
			    that keys will be changed regularly. For administrative
			    convenience, key information SHOULD NOT be hard-coded into
			    software.
			  </t>
			</section>
			
			<section title="Signing Policies and Practices">
			  <t>Every organization (ADMD) will have its own policies and
			    practices for deciding when to sign messages (message
			    stream) and with what domain name, selector and key.
			    Examples of particular message streams include all mail
			    sent from the ADMD, versus mail from particular types of
			    user accounts, versus mail having particular types of
			    content. Given this variability, and the likelihood that
			    signing practices will change over time, it will be useful
			    to have these decisions represented through run-time
			    configuration information, rather than being hard-coded
			    into the signing software.</t>
			  <t>As noted in <xref
					    target="signname" />, the choice of signing name
			    granularity requires balancing administrative convenience
			    and utility for recipients. Too much granularity is higher
			    administrative overhead and well might attempt to impose
			    more differential analysis on the recipient than they wish
			    to support. In such cases, they are likely to use only a
			    super-name -- right-hand substring -- of the signing name.
			    When this occurs, the signer will not know what portion is
			    being used; this then moves DKIM back to the
			    non-deterministic world of heuristics, rather than the
			    mechanistic world of signer/recipient collaboration that
			    DKIM seeks.</t>
			</section>
			
		</section>
<section title="Verifying">

    <t>
        A message recipient may verify a DKIM signature to determine if a claim of
        responsibility has been made for the message by a trusted domain.
    </t>

    <t>
        Access control requires two components: authentication and authorization.
	By design, verification of a DKIM signature only provides the authentication component of
        an access control decision and MUST be combined with additional sources of 
        information such as reputation data to arrive at an access control decision.
    </t>

    <section title="Intended Scope of Use">

        <t>
            DKIM requires that a message with a signature that is found to be invalid is to be
            treated as if the message had not been signed at all.
        </t>

        <t>
            If a DKIM signature fails to verify, it is entirely possible that the
            message is valid and that either there is a configuration error in the signer's
            system (e.g. a missing key record) or that the message was inadvertently modified
            in transit.
	    It is thus undesirable for mail infrastructure to treat messages with
            invalid signatures less favorably than those with no signatures whatsoever.
	    Contrariwise, creation of an invalid signature requires a trivial amount of effort on the part
            of an attacker.
	    If messages with invalid signatures were to be treated preferentially to
            messages with no signatures whatsoever, attackers will simply add invalid signature
            blocks to gain the preferential treatment.
	    It follows that messages with invalid
            signatures SHOULD be treated no better and no worse than those with no signature at all.
        </t>
    </section>
    <section title="Signature Scope">
        <t>
        As with any other digital signature scheme, verifiers MUST only consider the part
        of the message that is inside the scope of the message as being authenticated 
        by the signature.
        </t>
        <t>
        For example, if the l= option is employed to specify a content length for the
        scope of the signature, only the part of the message that is within the scope of 
        the content signature would be considered authentic. 
        </t>
        <t>
        </t>
    </section>
    <section title="Design Scope of Use">

        <t>
            Public Key cryptography provides an exceptionally high degree of assurance bordering
            on absolute certainty, that the party that created a valid digital signature had
            access to the private key corresponding to the public key indicated in the signature.
        </t>

        <t>
            In order to make useful conclusions from the verification of a valid digital signature,
            the verifier is obliged to make assumptions that fall far short of absolute certainty.
            Consequently, mere validation of a DKIM signature does not represent proof positive
            that a valid claim of responsibility was made for it by the indicated party, that the
            message is authentic or that the message is not abusive. In particular:
        </t>

        <t>
            <list style="symbols">
                <t>The legitimate private key holder may have lost control of their private key.</t>
                <t>
                    The legitimate domain holder may have lost control of the DNS server for the
                    zone from which the key record was retrieved.
                </t>
                <t>
                    The key record may not have been delivered from the legitimate DNS server for
                    the zone from which the key record was retrieved.
                </t>
                <t>Ownership of the DNS zone may have changed.</t>
            </list>
        </t>

        <t>
            In practice these limitations have little or no impact on the field of use for
            which DKIM is designed but may have a bearing if use is made of the DKIM message
            signature format or key retrieval mechanism in other specifications.
        </t>
        <t>
            In particular the DKIM key retrieval mechanism is designed for ease of use and 
            deployment rather than to provide a high assurance public Key Infrastructure
            suitable for purposes that require robust non-repudiation such as establishing 
            legally binding contracts. Developers seeking to extend DKIM beyond its design
            application SHOULD consider replacing or supplementing the DNS key retreival 
            mechanism with one that is designed to meet the intended purposes.
        </t>
    </section>

    <section title="Inbound Mail Filtering">
        <t>
            DKIM is frequently employed in a mail filtering strategy to avoid the need to 
            perform content analysis on email originating from trusted sources. Messages
            that carry a valid DKIM signature from a trusted source may be whitelisted, 
            avoiding the need to perform computation and hence energy intensive content
            analysis to determine the disposition of the message.
            
        </t>
        <t>
            Mail sources may be determined to be trusted by means of previously observed 
            behavior and/or reference to external reputation or accreditation services.
            The precise means by which this is acomplished is outside the scope of DKIM.
        </t>
        
        <section title="Non-Verifying Adaptive Spam Filtering Systems">
            <t>
                Adaptive (or learning) spam filtering mechanisms that are not capable of 
                verifying DKIM signatures SHOULD at minimum be configured to ignore DKIM 
                header data entirely. 
            </t>
        </section>
    </section>

    <section title="Messages sent through Mailing Lists and other Intermediaries">
        <!-- 
            A mailing list provides an email abuser with an opportunity to amplify the
            effect of their attack. A single message sent to the mailing list may reach tens,
            hundreds or even thousands of recipients. Many mailing lists mitigate abuse by
            restricting posting privileges to registered subscribers, a security 
            control that some attackers circumvent by forging the 'from' address of
            a known subscriber discovered by examining mailing list archives.
            
            DKIM is particularly well suited to combatting this particular form
            of abuse as all the information required to implement the standard authorization 
            policy (only subscribers may post) is available to the mailing list
            server by necessity of its function and no information from external sources 
            is required.
        -->
        <t>
            Intermediaries such as mailing lists pose a particular challenge for
            DKIM implementations as the message processing steps performed by
            the intermediary may cause the message content to change in ways that 
            prevent the signature passing verification.
        </t>
        <t>
            Such intermediaries are strongly encouraged to deploy DKIM signing 
            so that a verifiable claim of responsibility remains available to 
            parties attempting to verify the modified message.
        </t>

<!-- What to do if the intermediary can't take responsbility?? Add a results header and sign that?-->


    </section>

    <section title="Generation, Transmission and Use of Results Headers">
        <t>
            In many deployments it is desirable to separate signature verification from the 
            application relying on the verification.
	    For example, if:
        </t>
        <t>
            <list style="symbols">
                <t>The relying application is not capable of performing DKIM signature verification.</t>
                <t>The message may be modified after the signature verification is performed.  </t>
                <t>The signature key may not be available by the time that the message is read.</t>
            </list>
        </t>
        <t>
        In such cases it is important that the communication link between the signature verifier and 
        the relying application be sufficiently secure to prevent insertion of a message that carries
        a bogus results header.
        </t>
        <t>
        An intermediary that generates results headers SHOULD ensure that relying applications are
        able to distinguish valid results headers issued by the intermediary from those introduced 
        by an attacker.
	For example, this can be accomplished by signing the results header.
	At a minimum, results headers on incoming messages SHOULD be removed if they purport to have
	been issued by the intermediary but cannot be verified as authentic.
        </t>
    </section>
</section>
<section title="Taxonomy of Signatures">
  <t> A DKIM signature tells the signature verifier that the owner
    of a particular domain name accepts some responsibility for
    the message. It does not, in and of itself, provide any
    information about the trustworthiness or behavior of that
    identity. What it does provide is a
    verified identity to which such behavioral information can be
    associated, so that those who collect and use such information
    can be assured that it truly pertains to the identity in
    question. </t>
  <t> This section lays out a taxonomy of some of the different
    identities, or combinations of identities, that might usefully
    be represented by a DKIM signature. </t>
  
  
  
  <section  anchor="singledomainsig" title="Single Domain Signature">
    <t>Perhaps the simplest case is when an organization signs its own
      outbound email using its own domain in the d= tag of the signature. For 
      example, Company A would sign the outbound mail from its employees
      with d=companyA.example. 
    </t>
    <t>
      In the most straightforward configuration, the addresses in the RFC 5322 From
      would also be in the companyA.example domain, but that direct correlation is 
      not required. 
    </t>
    <t>A special case of the Single Domain Signature is an Author Signature as
      defined by the Author Domain Signing Practices specification.
      Author signatures are signatures from an
      author's organization that have an i= value that matches the From: address of
      the message. Under the 
      ADSP specification, an i= value matches a RFC 5322 From address when
      the domains of the two match exactly, and if the i= value
      contains a local part it also matches the local part of
      the From: address exactly.</t>
    <!-- <t>DKIM validates only the signature on the message. Even when
	 this signature is validated, DKIM carries no implication
	 that any of the message content, including the
	 RFC5322 From field, is valid. The Author Domain Signing
	 Practices specification extends the DKIM base semantics to
	 give special weight to an author signature. This position
	 is based on the assumption that the correspondence between
	 the identifier in the signature and the email address in
	 the RFC 5322 From field ensures that the use of the From:
	 email address is being directly authorized (i.e. that the
	 From: address of the message cannot have been spoofed or
	 otherwise used improperly if the signature is verified).
	 For example if domain "domain.example" publishes an ADSP
	 record with dkim=all and sends email with a From: address
	 of bob@domain.example, then a DKIM signature with either
	 i=domain.example or i=bob@domain.example would be considered an
	 author signature. A signature with i=sales.domain.example or
	 i=alice@domain.example would fail an ADSP check. </t> 
      -->
    <t>Although an author signature might in some cases be proof against domain
      name spoofing the RFC 5322 From address, it is important to note
      that the DKIM and ADSP validation apply only to the exact address
      string and not to look-alike addresses nor to the
      human-friendly "display-name" or names and addresses used
      within the body of the message. That is, it protects only
      against the misuse of a precise address string within the
      RFC5322 From field and nothing else. For example, a
      message from bob@domain.example with a valid signature where
      i=d0main.example would fail an ADSP check because the
      signature domain, however similar, is distinct; however a
      message from bob@d0main.example with a valid signature where
      i=d0main.example would pass an ADSP check, even though to a
      human it might be obvious that d0main.example is likely a
      malicious attempt to spoof the domain domain.example. This
      example highlights that ADSP, like DKIM, is only able to
      validate a signing identifier: it still requires some
      external process to attach a meaningful reputation to that
      identifier. </t>
    
  </section>
  
  <section title="Parent Domain Signature">
    <t>Another approach that might be taken by an organization
      with multiple active subdomains is to apply the same
      (single) signature to mail from all subdomains. In this
      case, the signature chosen would usually be the signature
      of a parent domain common to all subdomains. For example,
      mail from marketing.domain.example,
      sales.domain.example, and engineering.domain.example might
      all use a signature with d=domain.example.</t>
    <t>This approach has the virtue of simplicity, but it is
      important to consider the implications of such a choice.
      As discussed in <xref target ="signname" />,
      if the type of mail sent from the different subdomains is
      significantly different or if there is reason to believe
      that the reputation of the subdomains would differ, then
      it may be a good idea to acknowledge this and provide
      distinct signatures for each of the subdomains
      (d=marketing.domain.example, sales.domain.example, etc.).
      However, if the mail and reputations are likely to be
      similar, then the simpler approach of using a single
      common parent domain in the signature may work well. </t>
    <t> Another approach to distinguishing the streams using a
      single DKIM key would be to leverage the i= tag in the DKIM
      signature to differentiate the mail streams. For example,
      marketing email would be signed with
      i=marketing.domain.example and d=domain.example. 
    </t>
    <t>
      It's important to remember, however, that under core DKIM semantics the 
      i= identifer is opaque to receivers. That means that it will only be an effective
      differentiator if there is an out of band agreement about the i= semantics (e.g.,
      the semantics specified in ADSP).
    </t>
  </section>
  
  <section anchor ="thirdpartysig"
	   title="Third Party Signature">
    <t>A signature whose domain does not match the domain of the
      RFC 5322 From address is sometimes referred to as a third party
      signature. In certain cases even the parent domain
      signature described above would be considered a third
      party signature because it would not be an exact match for
      the domain in the From: address. </t>
    <t>Although there is often heated debate about the value of
      third-party signatures, it is important to note that the
      DKIM specification attaches no particular significance to
      the identity in a DKIM signature. The identity specified
      within the signature is the identity that is taking
      responsibility for the message, and it is only the
      interpretation of a given receiver that gives one identity
      more or less significance than another. In particular,
      most independent reputation services assign trust based on
      the specific identifier string, not its "role": in general
      they make no distinction between, for example, an author
      signature and a third party signature. </t>
    <t> For some, a signature unrelated to the author (identity in
      the RFC 5322 From address) is less valuable because there
      is an assumption that the presence of an author signature
      guarantees that the use of the address in the From: header
      is authorized. </t>
    <t> For others, that relevance is tied strictly to the
      recorded behavioral data assigned to the identity in
      question, i.e. its trust assessment or reputation. The
      reasoning here is that an identity with a good reputation
      is unlikely to maintain that good reputation if it is in
      the habit of vouching for messages that are unwanted or
      abusive; in fact, doing so will rapidly degrade its
      reputation so that future messages will no longer benefit
      from it. It is therefore low risk to facilitate the
      delivery of messages that contain a valid signature of a
      domain with a strong positive reputation, independent of
      whether or not that domain is associated with the address
      in the RFC5322 From header field of the message. </t>
    <t> Third party signatures encompass a wide range of
      identities. Some of the more common are: <list
						  style="hanging">
	<t
	   hangText="Service Provider:"> In cases where email
	  is outsourced to an Email Service Provider (ESP),
	  Internet Service Provider (ISP), or other type of
	  service provider, that service provider may choose
	  to DKIM sign outbound mail with either its own
	  identifier -- relying on its own, aggregate
	  reptutation -- or with a subdomain of the provider
	  that is unique to the message author but still
	  part of the provider's aggregate reputation. Such
	  service providers may also encompass delegated
	  business functions such as benefit management,
	  although these will more often be treated as
	  trusted third party senders (see below). </t>
	<t
	   hangText="Parent Domain."> As discussed above,
	  organizations choosing to sign for mail
	  originating from subdomains with a parent domain
	  signature may also considered to be using 3rd
	  party signatures in some configurations, depending
	  on whether or not the "t=s" tag is used to
	  constrain the parent signature to apply to only
	  its own specific domain. The default is that a
	  parent domain signature is considered valid for
	  its subdomains.</t>
	<t
	   hangText="Reputation Provider:"> Another possible
	  category of third party signature would be the
	  identity of a 3rd party reputation provider. Such
	  a signature would indicate to receivers that the
	  message was being vouched for by that 3rd party.
	</t>
      </list>
    </t>
    
  </section>
  
  <section anchor ="trustedthirdparty"
	   title="Using Trusted 3rd Party Senders">
    <t>For most of the cases described so far, there has been an
      assumption that the identity doing the signing was
      responsible for creating and maintaining their own DKIM
      signing infrastructure, including their own keys, and
      signing with their own identity. </t>
    <t> A different model arises when an organization uses a
      trusted third party sender for certain key business
      functions, but still wants that email to benefit from the
      organization's own identity and reputation: in other
      words, the mail would come out of the trusted 3rd party's
      mail servers, but the signature applied would be that of
      the controlling organization. </t>
    <t> This can be done by having the 3rd party generate a key pair that is
      designated uniquely for use by that trusted 3rd party and publishing
      the public key in the controlling organization's DNS
      domain, thus enabling the third party  to sign mail using the signature 
      of the controlling organization. For example, if Company A
      outsources its employee benefits to a 3rd party, they can
      use a special keypair that enables the benefits company
      to sign mail as "companyA.example". Because the keypair is
      unique to that trusted 3rd party, it is easy for Company A
      to revoke the authorization if necessary by simply
      removing the public key from the companyA.example DNS. </t>
    <t>In this scenario, it is usually a good idea to limit the
      specific identities that can be used by even trusted third
      parties.
      The DKIM g= tag enables a key record to specify
      one particular From: address local part that must be
      specified in the i= tag of the signature: for example,
      "g=benefits" would require a signature header tag of
      "i=benefits@companyA.example".
      It is important to note that
      although this distinction will be clear to the verifier it
      may be invisible to the recipient: there is no constraint
      within the DKIM verification process that constrains that
      specific i= value to correspond to any of the other
      message headers.</t>
    <t>
      A more reliable way of distinguishing the third part mail stream would 
      be to create a dedicated subdomain (e.g. benefits.companyA.example) and 
      publish the public key there; the signature would then use d=benefits.companyA.example.
    </t>
    <section
       title="DNS Delegation">
      <t> Another possbility for configuring trusted third party
	access is to have Company A use DNS delegation and
	have the designated subdomain managed directly
	by the trusted third party. In this case, Company A
	would create a subdomain benefits.companya.example, and
	delegate the DNS management of that subdomain to the
	benefits company so it could maintain its own key
	records. Should revocation become necessary, Company A
	could simply remove the DNS delegation record.</t>
    </section>
  </section>
  
  <section
     title="Multiple Signatures">
    
    <t>A simple configuration for DKIM-signed mail is to have a single
      signature on a given message. This works well for domains that
      manage and send all of their own email from a single source,
      or for cases where multiple email streams exist but each has
      its own unique key pair. It also represents the case in which
      only one of the participants in an email sequence is able to
      sign, no matter whether they represent the author or one of
      the operators. </t>
    
    <t> The examples thus far have considered the implications of
      using different identities in DKIM signatures, but have
      used only one such identity for any given message. In some
      cases, it may make sense to have more than one identity
      claiming responsiblity for the same message. </t>
    <t>One important caveat to the use of multiple signatures is
      that there is currently no clear consensus amoung
      receivers on how they plan to handle them. The opinions
      range from ignoring all but one signature (and the
      specification of which of them is verified differs from
      receiver to receiver), to verifying all signatures present
      and applying a weighted blend of the trust assessments for
      those identifiers, to verifying all signatures present and
      simply using the identfier that represents the most
      positive trust assessment. It is likely that the industry
      will evolve to accept multiple signatures using either
      option two or three, but it may take some time before that
      approach becomes pervasive. </t>
    <t> There are a number of situations where applying more than
      one DKIM signature to the same message might make sense. A
      few examples are: <list
			   style="hanging">
	<t
	   hangText="Companies with multiple subdomain
		     identities:"> A company that has multiple
	  subdomain sending distinct categories of mail
	  might choose to sign with distinct subdomain
	  identities to enable each subdomain to manage its
	  own identity. However, it might also want to
	  provide a common identity that cuts across all of
	  the distinct subdomains. For example, Company A
	  may sign mail for its sales department with a
	  signature where d=marketing.companya.example, and
	  a second signature where d=companya.example</t>
	<t
	   hangText="Service Providers:"> Service providers
	  may, as described above, choose to sign outbound
	  messages with either their own identity or with an
	  identity unique to each of their clients (possibly
	  delegated). However, they may also do both: sign
	  each outbound message with their own identity as
	  well as the identity of each individual client.
	  For example, ESP A might sign mail for their
	  client Company B with their service provider
	  signature d=espa.example, and a second
	  client-specific signature where d= either
	  companyb.example, or companyb.espa.example. The
	  existence of the service provider signature could,
	  for example, help cover a new client while they
	  establish their own reputation, or help a very
	  small volume client who might never reach a volume
	  threshold sufficient to establish an individual
	  reputation. </t>
	<t
	   hangText="Forwarders"> Forwarded mail poses a
	  number of challenges to email authentication. DKIM
	  is relatively robust in the presence of forwarders
	  as long as the signature is designed to avoid
	  message parts that are likely to be modified,
	  although some forwarders do make modifications
	  that can invalidate a DKIM signature. </t>
	<t> However, some forwarders such as mailing lists or
	  forward article to a friend services, might choose
	  to add their own signature to outbound messages to
	  vouch for it having legitimately originated from
	  the designated service. In this case, the
	  signature would be added even in the presence of a
	  pre-existing signature, and both signatures would
	  be relevant to the verifier. </t>
	<t>Any forwarder that modifies messages in ways that
	  will break pre-existing DKIM signatures SHOULD
	  always sign its forwarded messages. </t>
	<t
	   hangText="Reputation Providers:"> Although third
	  party reputation providers today use a variety of
	  protocols to communicate their information to
	  receivers, it is possible that they, or other
	  organizations willing to put their "seal of
	  approval" on an email stream might choose to use a
	  DKIM signature to do it. In nearly all cases, this
	  "reputation" signature would be in addition to the
	  author or originator signature. </t>
      </list>
    </t>
  </section>
</section>
<section title="Example Usage Scenarios">
  <t>Signatures are created by different types of email actors,
    based on different criteria, such as where the actor operates
    in the sequence from author to recipient, whether they want
    different messages to be evaluated under the same reputation
    or different, and so on. This section provides some examples of
    usage scenarios for DKIM deployments; the selection is not intended
    to be exhaustive, but to illustrate a set of key deployment considerations. </t>
  
  <section title="Author's Organization - Simple">
    
    <t>The simplest DKIM configuration is to have some mail from a given organization (Company A)
      be signed with the same d= value (e.g. d=companya.example).
      If there is a desire to associate a user identity or some other related information,
      the i= value can become uniqueID@companya.example, or @uniqueID.companya.example.
    </t>
    <t> In this scenario, Company A need only generate a single signing key and publish it under
      their top level domain (companya.example); the signing module would then tailor the i=
      value as needed at signing time. </t>
  </section>
  
  <section title="Author's Organization - Differentiated Types of Mail">
    <t> A slight variation of the one signature case is where Company A signs some of its mail,
      but it wants to differentiate different categories of its outbound mail by using
      different identifiers. For example, it might choose to distinguish marketing mail,
      billing or transactional mail, and individual corporate email into
      marketing.companya.example, billing.companya.example, and companya.example, where each
      category is assigned a unique subdomain and unique signing keys. </t>
  </section>
  
  <section title="Author Signature">
    <t> As discussed in <xref target="singledomainsig"/>, author signatures are a special case
      of signatures from an author's organization where at least one signature on the message
      has an i= value that matches the From: address of the message.
    </t>
    <t>
      Signers wishing to publish an ADSP record describing their signing practices will want
      to include an author signature on their outbound mail to avoid ADSP verification
      failures. For example, if the address in the RFC 5322 From is bob@company.example, the
      d= value of the author signature would be company.example, and the i= value would be
      either company.example or bob@company.example.
    </t>
  </section>
  <section title="Author Domain Signing Practices">
    <section title="Introduction">
      <t>DomainKeys Identified Mail (DKIM) defines a mechanism by which email
	messages can be cryptographically signed, permitting a signing domain
	to claim responsibility for the introduction of a message into the
	mail stream.</t>
      
      <t>However, the legacy of the Internet is such that not all messages
	will be signed, and the absence of a signature on a message is not an
	a priori indication of forgery.  In fact, during early phases of
	deployment it is very likely that most messages will remain unsigned.

	However, some domains might decide to sign all of their outgoing mail, for 
	example, to assist in protecting their brand names:  If all of the legitimate 
	mail for that brand is signed, recipients can by more aggressive in their 
	filtering of mail that uses the brand but is not signed by the domain name 
	associated with the brand.
	It might be desirable for such domains to be able to advertise that fact to other
	hosts: this is the topic of Author Domain Signing Practices (ADSP).
      </t>
      <t>
	Note that ADSP is not for everyone. Sending domains that do not have complete control
	of all legitimate outbound mail purporting to be from their domain (i.e., with a 
	From address in their domain) are likely to experience delivery problems with some 
	percentage of that mail.
	Administrators evaluating ADSP for their domains SHOULD 
	carefully weigh the risk of phishing attacks against the likelihood of undelivered mail. 
      </t>
      <t>This section covers some examples of ADSP usage: for the complete specification,
	see <xref target="I-D.ietf-dkim-ssp"/></t>
    </section>
    <section title="A Few Definitions">
      <t>In the ADSP specification, an &lt;addr-spec&gt; in the From header field of a message
	<xref target="RFC5322"/> is defined as an "Author Address", and an "Author Domain" is
	defined as anything to the right of the '@' in an Author Address. </t>
      
      <t>An "Author Signature" is thus any Valid Signature where the identity of the user or
	agent on behalf of which the message is signed (listed in the "i=" tag or its
	default value from the "d=" tag) matches an Author Address in the message. (When the
	identity of the user or agent includes a Local-part, the identities match if the
	Local-parts are the same string, and the domains are the same string.
	Otherwise, the identities match if the domains are the same string.
	Following <xref target="RFC5321"/>, Local-part comparisons are case sensitive,
	but domain comparisons are case insensitive.)</t>
      
      <t>It is important to note that unlike the DKIM specification which makes no correlation
	between the signature domain and any message headers, the ADSP specification applies
	only to the author domain. In essence, under ADSP, any non-author signatures are
	ignored (treated as if they are not present). </t>
    </section>
    <section title="Some ADSP Examples">
      <t>An organization (Company A) may specify its signing practices by publishing an ADSP
	record with "dkim=all" or "dkim=discardable".
	In order to avoid misdelivery of its mail at receivers
	that are validating ADSP, Company A MUST first have done an exhaustive analysis to
	determine all sources of outbound mail from its domain (companyA.example) and ensure
	that they all have valid author signatures from that domain.
      </t>
      <t> For example, email with an RFC 5322 From &lt;addr-spec&gt; of bob@companyA.example MUST have an author
	signature where the i= value is either "@companyA.example" or "bob@companyA.example",
	or it will fail an ADSP validation. </t>
      <t> Note that once an organization publishes an ADSP record using dkim=all or
	dkim=discardable, any email with a RFC 5322 From address that uses the domain where the ADSP
	record is published that does not have a valid author signature is at risk of being
	mis-delivered or discarded. For example, if a message with an RFC 5322 From &lt;addr-spec&gt; of
	newsletter@companyA.example has a signature with i=@marketing.companyA.example or
	i=jsmith@companyA.example, that message will fail the ADSP check because the
	signature would not be considered a valid author signature. </t>
      <t>Because the semantics of an ADSP author signature are more constrained than the semantics of a
	"pure" DKIM signature, it is important to make sure you understand the nuances
	before deploying an ADSP record.
	The ADSP specification <xref target="I-D.ietf-dkim-ssp"/> provides some fairly extensive
	lookup examples (in Appendix A) and usage examples (in Appendix B).
      </t>
      <t>In particular, in order to prevent mail from being negatively impacted or even discarded at the
	receiver, it is essential to perform a thorough survey of outbound mail from a
	domain before publishing an ADSP policy of anything stronger than "unknown". This
	includes mail that might be sent from external sources that may not be authorized to
	use your domain signature, as well as mail that risks modification in transit that
	might invalidate an otherwise valid author signature (e.g. mailing lists, courtesy
	forwarders, and other paths that could add or modify headers, or modify the message
	body). </t>
      
    </section>
  </section>
  
  <section title="Delegated Signing">
    <t> An organization may choose to outsource certain key services to an independent company.
      For example, Company A might outsource its benefits management, or Organization B might
      outsource its marketing email. </t>
    <t> If Company A wants to ensure that all of the mail sent on its behalf through the
      benefits providers email servers shares the Company A reputation, as discussed in
      <xref target="trustedthirdparty"/> it can either
      publish keys designated for the use of
      the benefits provider under companyA.example (preferably under a designated subdomain of
      companyA.example), or they can delegate a subdomain (e.g. benefits.companyA.example) to
      the provider and enable the provider to generate the keys and manage the DNS for the
      designated subdomain. </t>
    <t> In both of these cases, mail would be physically going out of the benefit provider's
      mail servers with a signature of e.g. d=benefits.companya.example. Note that the From:
      address is not constrained: it could either be affiliated with the benefits company
      (e.g. benefits-admin@benefitprovider.example, or
      benefits-provider@benefits.companya.example). </t>
    <t> Note that in both of the above scenarios, security concerns dictate that the keys be
      generated by the organization that plans to do the signing so that there is no need to
      transfer the private key. In other words, the benefits provider would generate keys for
      both of the above scenarios. </t>
  </section>
  
  <section title="Independent Third Party Service Providers">
    <t> Another way to manage the service provider configuration would be to have the service
      provider sign the outgoing mail on behalf of its client Company A with its own
      (provider) identifier. For example, an Email Service Provider (ESP A) might want to
      share its own mailing reputation with its clients, and may sign all outgoing mail from
      its clients with its own d= domain (e.g. d=espa.example). </t>
    <t> Should the ESP want to distinguish among its clients, it has two options: <list
			style="hanging">
	<t hangText="Share the d= domain"> and use the i= value to distinguish among the
	  clients: e.g. a signature on behalf of client A would have d=espa.example and
	  i=clienta.espa.example (or i=clienta@espa.example) </t>
	<t hangText="Extend the d= domain"> so there is a unique value (and subdomain) for
	  each client: e.g. a signature on behalf of client A would have
	  d=clienta.espa.example. </t>
      </list>
    </t>
    <t> Note that this scenario and the delegation scenario are not mutually exclusive: in some
      cases, it may be desirable to sign the same message with both the ESP and the ESP client
      identities. </t>
  </section>
  
  <section title="Mail Streams Based on Behavioral Assessment">
    <t> An ISP (ISP A) might want to assign signatures to outbound mail from their users
      according to each user's past sending behavior (reputation).
      In other words, the ISP would segment its outbound traffic according to 
      its own assessment of message quality, to aid recipients in deciding to process 
      these different streams differently.
      Since the semantics of behavioral assessments aren't allowed as i= values, ISP A
      (ispa.example) may configure subdomains corresponding to the assessment categories
      (e.g. good.ispa.example, neutral.ispa.example, bad.ispa.example), and use these subdomains in
      the d= value of the signature.
    </t>
    <t> The signing module can also optionally set the i= value to have a unique user id
      (distinct from the users email address local part), for example
      user3456@neutral.domain.example.
      Using a userid that is distinct from a given email
      alias is useful in environments where a single user might register multiple email
      aliases.
    </t>
    <t> Note that in this case the i= values are only partially stable. They are stable in the
      sense that a given i= value will always represent the same identity, but they are
      unstable in the sense that a given user can migrate among the assessment subdomains
      depending on their sending behavior (i.e., the same user might have multiple i= values
      over the lifetime of their account).
    </t>
    <t> In this scenario, ISP A may generate as many keys as there are assessment
      subdomains (d= values), so that each assessment subdomain has its own key.
      The signing module would then choose its signing key based on the assessment of the user
      whose mail was being signed, and if desired include the user id in the i= tag of the signature.
    </t>
  </section>

  <section title="Agent or Mediator Signatures">
    <t>Another scenario is that of an agent, usually a re-mailer of some kind, that signs on
      behalf of the service or organization that it represents. Some examples of agents might
      be a mailing list manager, or the "forward article to a friend" service that many online
      publications offer. In most of these cases, the signature is asserting that the message
      originated with, or was relayed by, the service asserting responsibility. </t>
  </section>
</section>
<section title="Usage Considerations">
  <section title="Non-standard Submission and Delivery Scenarios">
    <t>The robustness of DKIM's verification mechanism is based on the fact
      that only authorized signing modules have access to the designated private
      key. This has the side effect that email submission and delivery scenarios
      that originate or relay messages from outside the domain of the authorized 
      signing
      module will not have access to that protected private key, and thus will be
      unable to attach the expected domain signature to those messages.  Such
      scenarios include mailing
      lists, courtesy forwarders, MTAs at hotels, hotspot
      networks used by travelling users, and other paths that
      could add or modify headers, or modify the message body.
    </t>
    <t> For example, assume Joe works for Company A and has an
      email address joe@companya.example. Joe also has a GMail
      account joe@gmail.com, and he uses GMails multiple address
      feature to attach his work email joe@companya.example to
      his GMail account. When Joe sends email from his GMail
      account and uses joe@companya.example as his designated From:
      address, that email cannot have a signature with
      d=companya.example because the GMail servers have no
      access to Company A's private key. In GMail's case it will
      have a GMail signature, but for some other mail clients
      offering the same multiple address feature there may be no
      signature at all on the message.</t>
    <t> Another example might be the use of a forward article to a
      friend service. Most instances of these services today
      allow someone to send an article with their email address
      in the RFC 5322 From to their designated recipient. If Joe
      used either of his two addresses (joe@companya.example or
      joe@gmail.com), the forwarder would be equally unable to
      sign with a corresponding domain . As in the mail client
      case, the forwarder may either sign as its own domain, or
      may put no signature on the message. </t>
    <t> A third example is the use of privately configured
      forwarding. Assume that Joe has another account at Yahoo,
      joe@yahoo.com, but he'd prefer to read his Yahoo mail from
      his GMail account. He sets up his Yahoo account to forward
      all incoming mail to joe@gmail.com. Assume
      alice@companyb.example sends joe@yahoo.com an email.
      Depending on how companyb.example configured its signature,
      and depending on whether or not Yahoo modifies messages
      that it forwards, it is possible that when Alice's message
      is received in Joe's gmail account the original signature
      fails verification. </t>
  </section>
  
  <section title="Protection of Internal Mail">
    <t>One identity is particularly amenable to easy and accurate
      assessment: the organization's own identity. Members of an
      organization tend to trust messages that purport to be
      from within that organization. However Internet Mail does
      not provide a straightforward means of determining whether
      such mail is, in fact, from within the organization. DKIM
      can be used to remedy this exposure. If the organization
      signs all of its mail, then its boundary MTAs can look for
      mail purporting to be from the organization that does not
      contain a verifiable signature. </t>
    
    <t>Such mail can in most cases be presumed to be spurious.
      However, domain managers are advised to consider the ways
      that mail processing can modify messages in ways that will
      invalidate an existing DKIM signature: mailing lists,
      courtesy forwarders, and other paths that could add or
      modify headers or modify the message body (e.g. MTAs at
      hotels, hotspot networks used by travelling users, and
      other scenarios described in the previous section). Such
      breakage is particularly relevant in the presence of
      Author Domain Signing Practices.
    </t>
  </section>
  <section title="Signature Granularity">
    <t> Although DKIM's use of domain names is optimized for a
      scope of organization-level signing, it is possible to
      administer sub-domains or otherwise adjust signatures in a way that
      supports per-user identification.  This user level granularity
      can be specified in two ways: either by sharing the signing
      identity and specifying an extension to
      the i= value that has a per-user granularity, or by creating and
      signing with unique per-user keys.
    </t>
    <t>
      A subdomain or local part in the i= tag SHOULD be treated as an opaque identifier and thus need
      not correspond directly to a DNS subdomain or be a specific user address.
    </t>
    <t> The primary way to sign with per-user keys require that each user
      have a distinct DNS (sub)domain, where each distinct d= value
      has a key published (it is possible, although not
      recommended, to publish the same key in more than one
      distinct domain). 
    </t>
    <t>It is technically possible, to publish
      per-user keys within a single domain or subdomain by
      utilizing different selector values. This is not recommended and is 
      unlikely to be treated uniquely by Identity Assessors: the primary purpose of
      selectors is to facilitate key management, and the DKIM specification 
      recommends against using them in determining or assessing identies.
    </t>
    <t>In most cases,  it would be impractical to sign
      email on a per-user granularity.
      Such an approach would be 
      <list style="hanging">
	<t hangText="likely to be ignored: "> In most cases
	  today, if receivers are verifying DKIM signatures
	  they are in general taking the simplest possible
	  approach. In many cases maintaining reputation
	  information at a per user granularity is not
	  interesting to them, in large part because the per
	  user volume is too small to be useful or
	  interesting. So even if senders take on the
	  complexity necessary to support per user
	  signatures, receivers are unlikely to retain
	  anything more than the base domain reputation.
	</t>
	
	<t hangText="difficult to manage: "> Any scheme that
	  involves maintenance of a significant number of
	  public keys may  require infrastructure
	  enhancements or extensive administrative
	  expertise. For domains of any size, maintaining
	  a valid per-user keypair, knowing when keys need
	  to be revoked or added due to user attrition or
	  onboarding, and the overhead of having the
	  signing engine constantly swapping keys can create
	  significant and often unnecessary managment
	  complexity. It is also important to note that there is no
	  way within the scope of the DKIM specification for a receiver
	  to infer that a sender intends a per-user granularity. 
	</t>
      </list>
    </t>
    
    <t>What may make sense, however, is to use the infrastructure
      that enables finer granularity in signatures to identify
      segments smaller than a domain but much larger than a
      per-user segmentation. For example, a university might
      want to segment student, staff, and faculty mail into
      three distinct streams with differing reputations. This
      can be done by creating seperate sub-domains for the
      desired segments, and either specifying the subdomains in
      the i= tag of the DKIM Signature or by adding subdomains
      to the d= tag and assigning and signing with different
      keys for each subdomain. </t>
    <t>For those who choose to represent user level granularity in
      signatures, the performance and management considerations
      above suggest that it would be more effective to do it by
      specifying a local part or subdomain extension in the i=
      tag rather than by extending the d= domain and publishing
      individual keys. </t>
    
  </section>

  <section title="Email Infrastructure Agents">
    <t>It is expected that the most common venue for a DKIM
      implementation will be within the infrastructure of an
      organization's email service, such as a department or a
      boundary MTA.
      What follows are some general recommendations for the Email Infrastructure.
      <list>
	<t>
	  <list style="hanging">
	    <t hangText="Outbound:  ">
	      An MSA or an Outbound MTA used for mail submission SHOULD ensure that the
	      message sent is in compliance with the advertised email sending policy.
	      It SHOULD also be able to generate an operator alert
	      if it determines that the email messages do not comply with the published DKIM sending policy.
	    </t>
	    <t>An MSA SHOULD be aware that some MUAs may add their own signatures.
	      If the MSA needs to perform operations on a message to make it comply with its email sending
	      policy, if at all possible, it SHOULD do so in a way that would not break those signatures.
	      <vspace blankLines='1' />
	      <cref>MSK: MUAs being able to sign is a security consideration; MUAs are more
		prone to vulnerabilities, so an MUA having direct access to signing keys
		is a security concern; general MUA vulnerability came up during the IETF
		Security Directorate review of draft-kucherawy-sender-auth-header
	      </cref>
	    </t>
	    
	    <t hangText="Inbound:  ">
	      When an organization deploys DKIM, it needs to make sure that it email infrastructure
	      components that do not have primary roles in DKIM handling do not modify message in ways
	      that prevent subsequent verification. 
	    </t>
	    <t>An inbound MTA or an MDA may incorporate an indication
	      of the verification
	      results into the message, such as using an
	      Authentication-Results header field.
	      <xref target="I-D.kucherawy-sender-auth-header" />
	    </t>
	    <t hangText="Intermediaries:  "> An email intermediary
	      is both an inbound and outbound MTA.
	      Each of the requirements outlined in the sections relating to MTAs apply.
	      If the intermediary modifies a message
	      in a way that breaks the signature, the
	      intermediary
	      <list style="symbols">
		<t> SHOULD deploy abuse filtering measures on the inbound mail, and </t>
		<t> MAY remove all signatures that will be broken</t>
	    </list></t>
	    <t>In addition the intermediary MAY: <list style="symbols">
		<t>Verify the message signature prior to modification.</t>
		<t>Incorporate an indication of the verification
		  results into the message, such as using an
		  Authentication-Results header field. <xref target="I-D.kucherawy-sender-auth-header" /></t>
		<t>Sign the modified message including the
		  verification results (e.g., the
		  Authentication-Results header field).</t>
	      </list>
	    </t>
	  </list>
	</t>
    </list></t>
  </section>

  <section title="Mail User Agent">
    <t>
      The DKIM specification is expected to be used primarily
      between Boundary MTAs, or other infrastructure components
      of the originating and receiving ADMDs.
      However there is nothing in DKIM that is specific to those venues.
      In particular, MUAs MAY also support DKIM signing and verifying directly.
      <list>
	<t>
	  <list style="hanging">
	    <t hangText="Outbound:  ">
	      An MUA MAY support signing even if mail is to be relayed through an outbound MSA.
	      In this case the signature applied by the MUA will be in addition to any
	      signature added by the MSA.
	    </t>
	    <t>
	      Some user software goes beyond simple user functionality and also perform MSA and MTA functions.
	      When this is employed for sending directly to a receiving ADMD, the user software SHOULD be considered an outbound MTA.
	    </t>
	    <t hangText="Inbound:  ">
	      An MUA MAY rely on a report of a DKIM signature verification that
	      took place at some point in the inbound MTA/MDA path
	      (e.g., an Authentication-Results header field), or an
	      MUA MAY perform DKIM signature verification directly.
	      A verifying MUA SHOULD allow for the case where mail has modified in the inbound MTA path;
	      if a signature fails, the message SHOULD NOT be treated any different than if it did not have a signature.
	    </t>
	    <t>
	      An MUA that looks for an Authentication-Results header field
	      MUST be configurable to choose which Authentication-Results
	      are considered trustable.
	    </t>
	    <t>
	      DKIM requires that all verifiers treat messages with
	      signatures that do not verify as if they are unsigned.
	    </t>
	    <t>
	      If verification in the client is to be acceptable to users,
	      it is essential that successful verification of a
	      signature not result in a less than satisfactory user
	      experience compared to leaving the message unsigned.
	      The mere presence of a verified DKIM signature MUST NOT by itself be used by an
	      MUA to indicate that a message is to be treated better than a message without a
	      verified DKIM signature.
	      However, the fact that a DKIM signature was verified MAY be
	      used as input into a reputation system (i.e., a whitelist
	      of domains and users) for presentation of such indicators.
	    </t>
	  </list>
	</t>
    </list></t>
    <t>
      It is common for components of an ADMD's email
      infrastructure to do violence to a message, such that a
      DKIM signature might be rendered invalid.
      Hence, users of MUAs that support
      DKIM signing and/or verifying need a basis for knowing that
      their associated email infrastructure will not break a
      signature. </t>
  </section>
</section>
<section title="Other Considerations">
  <section title="Security Considerations">
    <t> The security considerations of the DKIM protocol are described
      in the DKIM base specification <xref target="RFC4871" />. 
    </t>
  </section>
  <section title="IANA Considerations">
    <t> This document has no considerations for IANA. </t>
  </section>
</section>
<section title="Acknowledgements">
      <t> TBD </t>
    </section>

    </middle>
    <back>
	<!-- references split to informative and normative -->
	<!-- references title="Normative References">  </references -->
	<references title="Informative References">
	    &dkimbase; &dkimta;
	    &rfc5322; &dk; &pem; &moss; &pgp1;
	    &rfc5321; &rfc2440; &rfc3156; &rfc2440bis;
	    &dnssec; &rfc5155; &syslog; &rfc3851; &ar; &adsp; &overview;
	    &nsec; &rfc1034; 
	</references>
		<section title="Migrating from DomainKeys">
			<t>
				As with any migration, the steps required will be determined by who is doing the migration and their assessment of
				<list style="symbols">
					<t>the users of what they are generating, or
					</t><t>
						the providers of what they are consuming.
					</t></list>
			</t>
			<section title="Signers">
				<t>
					A signer that currently signs with DomainKeys (DK) will go through various stages as they migrate to using DKIM,
					not all of which are required for all signers.
					The real questions that a signer must ask are:
					<list style="numbers">
					  <t>how many receivers or what types of receivers are *only* looking at the DK signatures and not the DKIM signatures,
					    </t>
					  <t>and how much does the signer care about those receivers?
					    </t>
					  </list>
					If no one is looking at the DK signature any more, then it's no longer necessary to sign with DK.
					Or if there are no more "large players" looking only at the DK signatures, a signer may choose to stop signing with DK.
				</t>
				<t>
					With respect to signing policies, a reasonable, initial approach is to use DKIM signatures in the same way as DomainKeys signatures are already being used.
					In particular, the same selectors and DNS Key Records may be used for both, after verifying that they are compatible as discussed below.
				</t>
				<t>
					Each secondary step in all of the following scenarios is to be prefaced with the gating factor "test, then when comfortable with the previous step's results, continue".
				</t>
				<t>
					One migration strategy is to:
					<list style="symbols">
						<t>ensure that the current selector DNS key record is compatible with both DK and DKIM</t>
						<t>sign messages with both DK and DKIM signatures</t>
						<t>when it's decided that DK signatures are no longer necessary, stop signing with DK</t>
					</list>
				</t>
				<t>
					Another migration strategy is to:
					<list style="symbols">
						<t>add a new selector DNS key record only for DKIM signatures</t>
						<t>sign messages with both DK (using the old DNS key record) and DKIM signatures (using the new DNS key record) </t>
						<t>when it's decided that DK signatures are no longer necessary, stop signing with DK</t>
						<t>eventually remove the old DK selector DNS record</t>
					</list>
				</t>
				<t>
					A combined migration strategy is to:
					<list style="symbols">
						
						<t>ensure that the current selector DNS key record is compatible with both DK and DKIM</t>
						<t>start signing messages with both DK and DKIM signatures</t>
						<t>add a new selector DNS key record for DKIM signatures</t>
						<t>switch the DKIM signatures to use the new selector</t>
						<t>when it's decided that DK signatures are no longer necessary, stop signing with DK</t>
						<t>eventually remove the old DK selector DNS record</t>
					</list>
				</t>
				<t>
					Another migration strategy is to:
					<list style="symbols">
						<t>add a new selector DNS key record for DKIM signatures</t>
						<t>do a flash cut and replace the DK signatures with DKIM signatures</t>
						<t>eventually remove the old DK selector DNS record</t>
					</list>
				</t>
				<t>
					Another migration strategy is to:
					<list style="symbols">
						<t>ensure that the current selector DNS key record is compatible with both DK and DKIM</t>
						<t>do a flash cut and replace the DK signatures with DKIM signatures</t>
					</list>
				</t>
				<t>
					Note that when you have separate key records for DK and DKIM, you can use the same public key for both.
				</t>
				<section title="DNS Selector Key Records">
					<t>
						The first step in some of the above scenarios is ensuring that the selector DNS key records are compatible for both DK and DKIM.
						The format of the DNS key record was intentionally meant to be backwardly compatible between the two systems, but not necessarily upwardly compatible.
						DKIM has enhanced the DK DNS key record format by adding several optional parameters, which DK must ignore.
						However, there is one critical difference between DK and DKIM DNS key records: the definitions of the g fields:
					</t>
					<t>
						<list style="hanging">
							<t hangText="g= granularity of the key">
								In both DK and DKIM, this is an optional field that is used to constrain which sending address(es)
								can legitimately use this selector. Unfortunately, the treatment of an empty field ("g=;")
								is different. DKIM allows wildcards where DK does not. For DK, an empty field is the 
								same as a missing value, and is treated as allowing any sending address. For DKIM, an empty field only
								matches an empty local part. In DKIM, both a missing value and "g=*;" mean to allow any sending
								address.
							</t>
							<t>
								If your DK DNS key record has an empty g= field in it ("g=;"), your best course of action
								is to modify the record to remove the empty field. In that way, the DK semantics will remain the same,
								and the DKIM semantics will match.
							</t>
						</list>
					</t>
					<t>
						If your DNS key record does not have an empty g= field in it ("g=;"), it's probable that the record can be left alone.
						But your best course of action would still be to make sure it has a v= field.
						When the decision is made to stop supporting DomainKeys and to only support DKIM, 
						you MUST verify that the "g" field is compatible with DKIM, and it SHOULD have "v=DKIM1;" in it.
						It is highly RECOMMENDED that if you want to use an empty g= field in your DKIM selector, you also include the v= field.
					</t>
				</section>
				<section title="Removing DomainKeys Signatures">
					<t>
						The principal use of DomainKeys is at Boundary MTAs.
						Because no operational transition is ever instantaneous,
						it is advisable to continue performing DomainKeys signing until it is determined that DomainKeys receive-side support is no longer used,
						or is sufficiently reduced.
						That is, a signer SHOULD add a DKIM signature to a message that also has a DomainKeys signature and keep it there until you decide it can go away.
						The signer may do its transitions in a straightforward manner, or more gradually.
						Note that because digital signatures are not free, there is a cost to performing both signing algorithms, so you don't want to be signing with
						both algorithms for too long a period.
					</t>
					<t>
						The tricky part is deciding when DK signatures are no longer necessary.
						The real questions are:
						how many DomainKeys verifiers are there that do *not* also do DKIM verification,
						which ones of them do you care about,
						and how can you track their usage?
						Most of the early adopters of DK verification have added DKIM verification, but not all yet.
						If a verifier finds a message with both DK and DKIM, it may choose to verify both signatures, or just one or the other.
					</t>
					<t>
						Many DNS services offer tracking statistics so you can find out how often a DNS record has been accessed.
						By using separate DNS selector key records for your signatures, you can chart the usage of your records over time,
						and watch the trends.
						An additional distinguishing factor to track would take into account the verifiers that verify both the DK and DKIM signatures,
						and discount those from your counts of DK selector usage.
						When the number for DK selector access reaches a low-enough level, that's the time to consider stopping your DK signing.
					</t>
					<t>
						Note, this level of rigor is not required.
						It is perfectly reasonable for a DK signer to decide to follow the "flash cut" scenario described above.
					</t>
				</section>
			</section>
			<section title="Verifiers">
				<t>
					As a verifier, you are faced with several issues:
					<section title="Do you verify DK signatures?">
						<t>
							At the time of writing, there is still a significant number of sites that are only producing DK signatures.
							Over time, it is expected that this number will go to zero, but it may take several years.
							So it would be prudent for the foreseeable future for a verifier to look for and verify both DKIM and DK signatures.
						</t>
					</section>
					<section title="Do you verify both DK and DKIM signatures within a single message?">
						<t>
							For a period of time, there will be sites that sign with both DK and DKIM.
							A verifier receiving a message that has both types of signatures may verify both signatures, or just one.
							One disadvantage of verifying both signatures is that signers will have a more difficult time deciding
							how many verifiers are still using their DK selectors.
							One transition strategy is to verify the DKIM signature, then only verify the DK signature if the DKIM verification fails.
						</t>
					</section>
					<section title="DNS Selector Key Records">
						<t>
							The format of the DNS key record was intentionally meant to be backwardly compatible between DK and DKIM, but not necessarily upwardly compatible.
							DKIM has enhanced the DK DNS key record format by adding several optional parameters, which DK must ignore.
							However, there is one key difference between DK and DKIM DNS key records: the definitions of the g fields:
						</t>
						<t>
							<list style="hanging">
								<t hangText="g= granularity of the key">
									In both DK and DKIM, this is an optional field that is used to constrain which sending address(es)
									can legitimately use this selector. Unfortunately, the treatment of an empty field ("g=;") is different.
									For DK, an empty field is the same as a missing value, and is treated as allowing any sending address.
									For DKIM, an empty field only matches an empty local part.
								</t>
								<t hangText="v= version of the selector">
									It is recommended that a DKIM selector have v=DKIM1; at its beginning, but it is not required.
								</t>
							</list>
						</t>
						<t>
							If a DKIM verifier finds a selector record that has an empty g= field ("g=;") and it does not have a v= field ("v=DKIM1;") at its beginning,
							it is faced with deciding if this record was
							<list style="numbers">
								<t>
									from a DK signer that transitioned to supporting DKIM but forgot to remove the g= field
									(so that it could be used by both DK and DKIM verifiers), or
								</t>
								<t>
									from a DKIM signer that truly meant to use the empty g= field but forgot to put in the v= field.
									It is RECOMMENDED that you treat such records using the first interpretation, and treat such records as if the signer did not have a g= field in the record.
								</t>
							</list>
						</t>
					</section>
				</t>
			</section>
		</section>
		
		<section
			title="General Coding Criteria for Cryptographic Applications">
			<t> NOTE: This section could possibly be changed into a reference
				to something else, such as another rfc. </t>
			<t>Correct implementation of a cryptographic algorithm is a
				necessary but not a sufficient condition for the coding of
				cryptographic applications. Coding of cryptographic libraries
				requires close attention to security considerations that are
				unique to cryptographic applications. </t>
			<t>In addition to the usual security coding considerations, such
				as avoiding buffer or integer overflow and underflow,
				implementers should pay close attention to management of
				cryptographic private keys and session keys, ensuring that
				these are correctly initialized and disposed of. </t>
			<t>Operating system mechanisms that permit the confidentiality of
				private keys to be protected against other processes should be
				used when available. In particular, great care must be taken
				when releasing memory pages to the operating system to ensure
				that private key information is not disclosed to other
				processes. </t>
			<t>Certain implementations of public key algorithms such as RSA
				may be vulnerable to a timing analysis attack. </t>
			<t>Support for cryptographic hardware providing key management
				capabilities is strongly encouraged. In addition to offering
				performance benefits, many cryptographic hardware devices
				provide robust and verifiable management of private keys. </t>
			<t>Fortunately appropriately designed and coded cryptographic
				libraries are available for most operating system platforms
				under license terms compatible with commercial, open source
				and free software license terms. Use of standard cryptographic
				libraries is strongly encouraged. These have been extensively
				tested, reduce development time and support a wide range of
				cryptographic hardware. </t>
		</section>
	</back>
</rfc>
