1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
|
<pre>Internet Engineering Task Force (IETF) R. Housley
Request for Comments: 6318 Vigil Security
Obsoletes: <a href="./rfc5008">5008</a> J. Solinas
Category: Informational National Security Agency
ISSN: 2070-1721 June 2011
<span class="h1">Suite B in Secure/Multipurpose Internet Mail Extensions (S/MIME)</span>
Abstract
This document specifies the conventions for using the United States
National Security Agency's Suite B algorithms in Secure/Multipurpose
Internet Mail Extensions (S/MIME) as specified in <a href="./rfc5751">RFC 5751</a>. This
document obsoletes <a href="./rfc5008">RFC 5008</a>.
Status of This Memo
This document is not an Internet Standards Track specification; it is
published for informational purposes.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are a candidate for any level of Internet
Standard; see <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc6318">http://www.rfc-editor.org/info/rfc6318</a>.
<span class="grey">Housley & Solinas Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
<a href="#section-1.1">1.1</a>. Terminology ................................................<a href="#page-4">4</a>
<a href="#section-1.2">1.2</a>. ASN.1 ......................................................<a href="#page-4">4</a>
<a href="#section-1.3">1.3</a>. Suite B Security Levels ....................................<a href="#page-4">4</a>
<a href="#section-2">2</a>. SHA-256 and SHA-384 Message Digest Algorithms ...................<a href="#page-5">5</a>
<a href="#section-3">3</a>. ECDSA Signature Algorithm .......................................<a href="#page-6">6</a>
<a href="#section-4">4</a>. Key Management ..................................................<a href="#page-7">7</a>
<a href="#section-4.1">4.1</a>. ECDH Key Agreement Algorithm ...............................<a href="#page-7">7</a>
<a href="#section-4.2">4.2</a>. AES Key Wrap ...............................................<a href="#page-8">8</a>
<a href="#section-4.3">4.3</a>. Key Derivation Functions ...................................<a href="#page-9">9</a>
<a href="#section-5">5</a>. AES CBC Content Encryption .....................................<a href="#page-11">11</a>
<a href="#section-6">6</a>. Security Considerations ........................................<a href="#page-12">12</a>
<a href="#section-7">7</a>. References .....................................................<a href="#page-13">13</a>
<a href="#section-7.1">7.1</a>. Normative References ......................................<a href="#page-13">13</a>
<a href="#section-7.2">7.2</a>. Informative References ....................................<a href="#page-14">14</a>
<span class="grey">Housley & Solinas Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Fact Sheet on National Security Agency (NSA) Suite B Cryptography
[<a href="#ref-NSA" title=""Fact Sheet NSA Suite B Cryptography"">NSA</a>] states:
A Cryptographic Interoperability Strategy (CIS) was developed to
find ways to increase assured rapid sharing of information both
within the U.S. and between the U.S. and her partners through the
use of a common suite of public standards, protocols, algorithms
and modes referred to as the "Secure Sharing Suite" or S.3. The
implementation of CIS will facilitate the development of a broader
range of secure cryptographic products which will be available to
a wide customer base. The use of selected public cryptographic
standards and protocols and Suite B is the core of CIS.
In 2005, NSA announced Suite B Cryptography which built upon the
National Policy on the use of the Advanced Encryption Standard
(AES) to Protect National Security Systems and National Security
Information. In addition to the AES algorithm, Suite B includes
cryptographic algorithms for key exchanges, digital signatures and
hashing. Suite B cryptography has been selected from cryptography
that has been approved by NIST for use by the U.S. Government and
specified in NIST standards or recommendations.
This document specifies the conventions for using the United States
National Security Agency's Suite B algorithms [<a href="#ref-NSA" title=""Fact Sheet NSA Suite B Cryptography"">NSA</a>] in
Secure/Multipurpose Internet Mail Extensions (S/MIME) [<a href="#ref-MSG" title=""Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification"">MSG</a>]. S/MIME
makes use of the Cryptographic Message Syntax (CMS) [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]. In
particular, the signed-data and the enveloped-data content types are
used. This document only addresses Suite B compliance for S/MIME.
Other applications of CMS are outside the scope of this document.
Since many of the Suite B algorithms enjoy uses in other environments
as well, the majority of the conventions needed for the Suite B
algorithms are already specified in other documents. This document
references the source of these conventions, with some relevant
details repeated to aid developers that choose to support Suite B.
This specification obsoletes <a href="./rfc5008">RFC 5008</a> [<a href="#ref-SUITEBSMIME">SUITEBSMIME</a>]. The primary
reason for the publication of this document is to allow greater
flexibility in the use of the Suite B Security Levels as discussed in
<a href="#section-1.3">Section 1.3</a>. It also removes some duplication between this document
and referenced RFCs.
<span class="grey">Housley & Solinas Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Terminology</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="#ref-STDWORDS" title=""Key words for use in RFCs to Indicate Requirement Levels"">STDWORDS</a>].
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. ASN.1</span>
CMS values are generated using ASN.1 [<a href="#ref-X.208-88">X.208-88</a>], the Basic Encoding
Rules (BER) [<a href="#ref-X.209-88">X.209-88</a>], and the Distinguished Encoding Rules (DER)
[<a href="#ref-X.509-88">X.509-88</a>].
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. Suite B Security Levels</span>
Suite B offers two suites of algorithms for key agreement, key
derivation, key wrap and content encryption, and two possible
combinations of hash and signing algorithm. Suite B algorithms are
defined to support two minimum levels of cryptographic security: 128
and 192 bits.
For S/MIME signed messages, Suite B follows the direction set by
<a href="./rfc5753">RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] and <a href="./rfc5754">RFC 5754</a> [<a href="#ref-SHA2" title=""Using SHA2 Algorithms with Cryptographic Message Syntax"">SHA2</a>]. Suite B uses these
combinations of message digest (hash) and signature functions (Sig
Sets):
Sig Set 1 Sig Set 2
---------------- ----------------
Message Digest: SHA-256 SHA-384
Signature: ECDSA with P-256 ECDSA with P-384
For S/MIME encrypted messages, Suite B follows the direction set by
<a href="./rfc5753">RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] and follows the conventions set by <a href="./rfc3565">RFC 3565</a>
[<a href="#ref-CMSAES" title=""Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)"">CMSAES</a>].
Suite B uses these key establishment (KE) algorithms (KE Sets):
KE Set 1 KE Set 2
---------------- ----------------
Key Agreement: ECDH with P-256 ECDH with P-384
Key Derivation: SHA-256 SHA-384
Key Wrap: AES-128 Key Wrap AES-256 Key Wrap
Content Encryption: AES-128 CBC AES-256 CBC
<span class="grey">Housley & Solinas Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
The two elliptic curves used in Suite B are specified in [<a href="#ref-DSS" title=""Digital Signature Standard (DSS)"">DSS</a>], and
each appear in the literature under two different names. For the
sake of clarity, we list both names below:
Curve NIST Name SECG Name OID [<a href="#ref-DSS" title=""Digital Signature Standard (DSS)"">DSS</a>]
---------------------------------------------------------
nistp256 P-256 secp256r1 1.2.840.10045.3.1.7
nistp384 P-384 secp384r1 1.3.132.0.34
If configured at a minimum level of security of 128 bits, a Suite B
compliant S/MIME system performing encryption MUST use either KE
Set 1 or KE Set 2, with KE Set 1 being the preferred suite. A
digital signature, if applied, MUST use either Sig Set 1 or Sig Set
2, independent of the encryption choice.
A recipient in an S/MIME system configured at a minimum level of
security of 128 bits MUST be able to verify digital signatures from
Sig Set 1 and SHOULD be able to verify digital signatures from Sig
Set 2.
Note that for S/MIME systems configured at a minimum level of
security of 128 bits, the algorithm set used for a signed-data
content type is independent of the algorithm set used for an
enveloped-data content type.
If configured at a minimum level of security of 192 bits, a Suite B
compliant S/MIME system performing encryption MUST use KE Set 2. A
digital signature, if applied, MUST use Sig Set 2.
A recipient in an S/MIME system configured at a minimum level of
security of 192 bits MUST be able to verify digital signatures from
Sig Set 2.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. SHA-256 and SHA-384 Message Digest Algorithms</span>
SHA-256 and SHA-384 are the Suite B message digest algorithms.
<a href="./rfc5754">RFC 5754</a> [<a href="#ref-SHA2" title=""Using SHA2 Algorithms with Cryptographic Message Syntax"">SHA2</a>] specifies the conventions for using SHA-256 and
SHA-384 with the Cryptographic Message Syntax (CMS). Suite B
compliant S/MIME implementations MUST follow the conventions in
<a href="./rfc5754">RFC 5754</a>. Relevant details are repeated below.
Within the CMS signed-data content type, message digest algorithm
identifiers are located in the SignedData digestAlgorithms field and
the SignerInfo digestAlgorithm field.
The SHA-256 and SHA-384 message digest algorithms are defined in FIPS
Pub 180-3 [<a href="#ref-SHA2FIPS" title=""Secure Hash Standard (SHS)"">SHA2FIPS</a>]. The algorithm identifiers for SHA-256 and
SHA-384 are defined in [<a href="#ref-SHA2" title=""Using SHA2 Algorithms with Cryptographic Message Syntax"">SHA2</a>] and are repeated here:
<span class="grey">Housley & Solinas Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistalgorithm(4) hashalgs(2) 1 }
id-sha384 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistalgorithm(4) hashalgs(2) 2 }
For both SHA-256 and SHA-384, the AlgorithmIdentifier parameters
field is OPTIONAL, and if present, the parameters field MUST contain
a NULL. Implementations MUST accept SHA-256 and SHA-384
AlgorithmIdentifiers with absent parameters. Implementations MUST
accept SHA-256 and SHA-384 AlgorithmIdentifiers with NULL parameters.
As specified in <a href="./rfc5754">RFC 5754</a> [<a href="#ref-SHA2" title=""Using SHA2 Algorithms with Cryptographic Message Syntax"">SHA2</a>], implementations MUST generate
SHA-256 and SHA-384 AlgorithmIdentifiers with absent parameters.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. ECDSA Signature Algorithm</span>
In Suite B, public key certificates used to verify S/MIME signatures
MUST be compliant with the Suite B Certificate Profile specified in
<a href="./rfc5759">RFC 5759</a> [<a href="#ref-SUITEBCERT">SUITEBCERT</a>].
The Elliptic Curve Digital Signature Algorithm (ECDSA) is the Suite B
digital signature algorithm. <a href="./rfc5753">RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] specifies the
conventions for using ECDSA with the Cryptographic Message Syntax
(CMS). Suite B compliant S/MIME implementations MUST follow the
conventions in <a href="./rfc5753">RFC 5753</a>. Relevant details are repeated below.
Within the CMS signed-data content type, signature algorithm
identifiers are located in the SignerInfo signatureAlgorithm field of
SignedData. In addition, signature algorithm identifiers are located
in the SignerInfo signatureAlgorithm field of countersignature
attributes.
<a href="./rfc5480">RFC 5480</a> [<a href="#ref-PKI-ALG" title=""Elliptic Curve Cryptography Subject Public Key Information"">PKI-ALG</a>] defines the signature algorithm identifiers used
in CMS for ECDSA with SHA-256 and ECDSA with SHA-384. The
identifiers are repeated here:
ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-sha2(3) 2 }
ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-sha2(3) 3 }
When either the ecdsa-with-SHA256 or the ecdsa-with-SHA384 algorithm
identifier is used, the AlgorithmIdentifier parameters field MUST be
absent.
<span class="grey">Housley & Solinas Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
When signing, the ECDSA algorithm generates two values, commonly
called r and s. To transfer these two values as one signature, they
MUST be encoded using the ECDSA-Sig-Value type specified in <a href="./rfc5480">RFC 5480</a>
[<a href="#ref-PKI-ALG" title=""Elliptic Curve Cryptography Subject Public Key Information"">PKI-ALG</a>]:
ECDSA-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER }
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Key Management</span>
CMS accommodates the following general key management techniques: key
agreement, key transport, previously distributed symmetric key-
encryption keys, and passwords. In Suite B for S/MIME, ephemeral-
static key agreement MUST be used as described in <a href="#section-4.1">Section 4.1</a>.
When a key agreement algorithm is used, a key-encryption algorithm is
also needed. In Suite B for S/MIME, the Advanced Encryption Standard
(AES) Key Wrap, as specified in <a href="./rfc3394">RFC 3394</a> [<a href="#ref-SH" title=""Advanced Encryption Standard (AES) Key Wrap Algorithm"">SH</a>] and [<a href="#ref-AESWRAP" title=""AES Key Wrap Specification"">AESWRAP</a>], MUST be
used as the key-encryption algorithm. AES Key Wrap is discussed
further in <a href="#section-4.2">Section 4.2</a>. The key-encryption key used with the AES Key
Wrap algorithm is obtained from a key derivation function (KDF). In
Suite B for S/MIME, there are two KDFs -- one based on SHA-256 and
one based on SHA-384. These KDFs are discussed further in
<a href="#section-4.3">Section 4.3</a>.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. ECDH Key Agreement Algorithm</span>
Elliptic Curve Diffie-Hellman (ECDH) is the Suite B key agreement
algorithm.
S/MIME is used in store-and-forward communications, which means that
ephemeral-static ECDH is always employed. This means that the
message originator possesses an ephemeral ECDH key pair and that the
message recipient possesses a static ECDH key pair whose public key
is represented by an X.509 certificate. In Suite B, the certificate
used to obtain the recipient's public key MUST be compliant with the
Suite B Certificate Profile specified in <a href="./rfc5759">RFC 5759</a> [<a href="#ref-SUITEBCERT">SUITEBCERT</a>].
<a href="./rfc5753#section-3.1">Section 3.1 of RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] specifies the conventions for using
ECDH with the CMS. Suite B compliant S/MIME implementations MUST
follow these conventions. Relevant details are repeated below.
Within the CMS enveloped-data content type, key agreement algorithm
identifiers are located in the EnvelopedData RecipientInfos
KeyAgreeRecipientInfo keyEncryptionAlgorithm field.
<span class="grey">Housley & Solinas Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
keyEncryptionAlgorithm MUST be one of the two algorithm identifiers
listed below, and the algorithm identifier parameter field MUST be
present and identify the key wrap algorithm. The key wrap algorithm
denotes the symmetric encryption algorithm used to encrypt the
content-encryption key with the pairwise key-encryption key generated
using the ephemeral-static ECDH key agreement algorithm (see
<a href="#section-4.3">Section 4.3</a>).
When implementing KE Set 1, the keyEncryptionAlgorithm MUST be
dhSinglePass-stdDH-sha256kdf-scheme, and the keyEncryptionAlgorithm
parameter MUST be a KeyWrapAlgorithm containing id-aes128-wrap (see
<a href="#section-4.2">Section 4.2</a>). When implementing KE Set 2, the keyEncryptionAlgorithm
MUST be dhSinglePass-stdDH-sha384kdf-scheme, and the
keyEncryptionAlgorithm parameter MUST be a KeyWrapAlgorithm
containing id-aes256-wrap.
The algorithm identifiers for dhSinglePass-stdDH-sha256kdf-scheme and
dhSinglePass-stdDH-sha384kdf-scheme, repeated from Section 7.1.4 of
[<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>], are:
dhSinglePass-stdDH-sha256kdf-scheme OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) certicom(132)
schemes(1) 11 1 }
dhSinglePass-stdDH-sha384kdf-scheme OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) certicom(132)
schemes(1) 11 2 }
Both of these algorithm identifiers use KeyWrapAlgorithm as the type
for their parameter:
KeyWrapAlgorithm ::= AlgorithmIdentifier
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. AES Key Wrap</span>
The AES Key Wrap key-encryption algorithm, as specified in <a href="./rfc3394">RFC 3394</a>
[<a href="#ref-SH" title=""Advanced Encryption Standard (AES) Key Wrap Algorithm"">SH</a>] and [<a href="#ref-AESWRAP" title=""AES Key Wrap Specification"">AESWRAP</a>], is used to encrypt the content-encryption key
with a pairwise key-encryption key that is generated using ephemeral-
static ECDH. <a href="./rfc5753#section-8">Section 8 of RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] specifies the
conventions for using AES Key Wrap with the pairwise key generated
with ephemeral-static ECDH with the CMS. Suite B compliant S/MIME
implementations MUST follow these conventions. Relevant details are
repeated below.
When implementing KE Set 1, the KeyWrapAlgorithm MUST be
id-aes128-wrap. When implementing KE Set 2, the KeyWrapAlgorithm
MUST be id-aes256-wrap.
<span class="grey">Housley & Solinas Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
Within the CMS enveloped-data content type, key wrap algorithm
identifiers are located in the KeyWrapAlgorithm parameters within the
EnvelopedData RecipientInfos KeyAgreeRecipientInfo
keyEncryptionAlgorithm field.
The algorithm identifiers for AES Key Wrap are specified in <a href="./rfc3394">RFC 3394</a>
[<a href="#ref-SH" title=""Advanced Encryption Standard (AES) Key Wrap Algorithm"">SH</a>], and the ones needed for Suite B compliant S/MIME
implementations are repeated here:
id-aes128-wrap OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithm(4) aes(1) 5 }
id-aes256-wrap OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithm(4) aes(1) 45 }
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Key Derivation Functions</span>
KDFs based on SHA-256 and SHA-384 are used to derive a pairwise key-
encryption key from the shared secret produced by ephemeral-static
ECDH. Sections <a href="#section-7.1.8">7.1.8</a> and <a href="#section-7.2">7.2</a> of <a href="./rfc5753">RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] specify the
conventions for using the KDF with the shared secret generated with
ephemeral-static ECDH with the CMS. Suite B compliant S/MIME
implementations MUST follow these conventions. Relevant details are
repeated below.
When implementing KE Set 1, the KDF based on SHA-256 MUST be used.
When implementing KE Set 2, the KDF based on SHA-384 MUST be used.
As specified in <a href="./rfc5753#section-7.2">Section 7.2 of RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>], using ECDH with the
CMS enveloped-data content type, the derivation of key-encryption
keys makes use of the ECC-CMS-SharedInfo type, which is repeated
here:
ECC-CMS-SharedInfo ::= SEQUENCE {
keyInfo AlgorithmIdentifier,
entityUInfo [0] EXPLICIT OCTET STRING OPTIONAL,
suppPubInfo [2] EXPLICIT OCTET STRING }
<span class="grey">Housley & Solinas Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
In Suite B for S/MIME, the fields of ECC-CMS-SharedInfo are used as
follows:
keyInfo contains the object identifier of the key-encryption
algorithm used to wrap the content-encryption key. In Suite B
for S/MIME, if the AES-128 Key Wrap is used, then the keyInfo
will contain id-aes128-wrap, and the parameters will be absent.
In Suite B for S/MIME, if AES-256 Key Wrap is used, then the
keyInfo will contain id-aes256-wrap, and the parameters will be
absent.
entityUInfo optionally contains a random value provided by the
message originator. If the user keying material (ukm) is
present, then the entityUInfo MUST be present, and it MUST
contain the ukm value. If the ukm is not present, then the
entityUInfo MUST be absent.
suppPubInfo contains the length of the generated key-encryption
key, in bits, represented as a 32-bit unsigned number, as
described in <a href="./rfc2631">RFC 2631</a> [<a href="#ref-CMSDH" title=""Diffie-Hellman Key Agreement Method"">CMSDH</a>]. When a 128-bit AES key is used,
the length MUST be 0x00000080. When a 256-bit AES key is used,
the length MUST be 0x00000100.
ECC-CMS-SharedInfo is DER encoded and used as input to the key
derivation function, as specified in Section 3.6.1 of [<a href="#ref-SEC1" title=""SEC 1: Elliptic Curve Cryptography"">SEC1</a>]. Note
that ECC-CMS-SharedInfo differs from the OtherInfo specified in
[<a href="#ref-CMSDH" title=""Diffie-Hellman Key Agreement Method"">CMSDH</a>]. Here, a counter value is not included in the keyInfo field
because the KDF specified in [<a href="#ref-SEC1" title=""SEC 1: Elliptic Curve Cryptography"">SEC1</a>] ensures that sufficient keying
data is provided.
The KDF specified in [<a href="#ref-SEC1" title=""SEC 1: Elliptic Curve Cryptography"">SEC1</a>] provides an algorithm for generating an
essentially arbitrary amount of keying material (KM) from the shared
secret produced by ephemeral-static ECDH, which is called Z for the
remainder of this discussion. The KDF can be summarized as:
KM = Hash ( Z || Counter || ECC-CMS-SharedInfo )
To generate a key-encryption key (KEK), one or more KM blocks are
generated, incrementing Counter appropriately, until enough material
has been generated. The KM blocks are concatenated left to right:
KEK = KM ( counter=1 ) || KM ( counter=2 ) ...
The elements of the KDF are used as follows:
Hash is the one-way hash function. If KE Set 1 is used, the
SHA-256 hash MUST be used. If KE Set 2 is used, the SHA-384
hash MUST be used.
<span class="grey">Housley & Solinas Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
Z is the shared secret value generated by ephemeral-static ECDH.
Leading zero bits MUST be preserved. In Suite B for S/MIME, if
KE Set 1 is used, Z MUST be exactly 256 bits. In Suite B for
S/MIME, if KE Set 2 is used, Z MUST be exactly 384 bits.
Counter is a 32-bit unsigned number, represented in network byte
order. Its initial value MUST be 0x00000001 for any key
derivation operation. In Suite B for S/MIME, with both KE
Set 1 and KE Set 2, exactly one iteration is needed; the
Counter is not incremented.
ECC-CMS-SharedInfo is composed as described above. It MUST be DER
encoded.
To generate a key-encryption key, one KM block is generated, with a
Counter value of 0x00000001:
KEK = KM ( 1 ) = Hash ( Z || Counter=1 || ECC-CMS-SharedInfo )
In Suite B for S/MIME, when KE Set 1 is used, the key-encryption key
MUST be the most significant 128 bits of the SHA-256 output value.
In Suite B for S/MIME, when KE Set 2 is used, the key-encryption key
MUST be the most significant 256 bits of the SHA-384 output value.
Note that the only source of secret entropy in this computation is Z.
The effective key space of the key-encryption key is limited by the
size of Z, in addition to any security level considerations imposed
by the elliptic curve that is used. However, if entityUInfo is
different for each message, a different key-encryption key will be
generated for each message.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. AES CBC Content Encryption</span>
AES [<a href="#ref-AES" title=""Advanced Encryption Standard (AES)"">AES</a>] in Cipher Block Chaining (CBC) mode [<a href="#ref-MODES" title=""DES Modes of Operation"">MODES</a>] is the Suite B
for S/MIME content-encryption algorithm. <a href="./rfc3565">RFC 3565</a> [<a href="#ref-CMSAES" title=""Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)"">CMSAES</a>] specifies
the conventions for using AES with the CMS. Suite B compliant S/MIME
implementations MUST follow these conventions. Relevant details are
repeated below.
In Suite B for S/MIME, if KE Set 1 is used, AES-128 in CBC mode MUST
be used for content encryption. In Suite B for S/MIME, if KE Set 2
is used, AES-256 in CBC mode MUST be used.
Within the CMS enveloped-data content type, content-encryption
algorithm identifiers are located in the EnvelopedData
EncryptedContentInfo contentEncryptionAlgorithm field. The content-
encryption algorithm is used to encipher the content located in the
EnvelopedData EncryptedContentInfo encryptedContent field.
<span class="grey">Housley & Solinas Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
The AES CBC content-encryption algorithm is described in [<a href="#ref-AES" title=""Advanced Encryption Standard (AES)"">AES</a>] and
[<a href="#ref-MODES" title=""DES Modes of Operation"">MODES</a>]. The algorithm identifier for AES-128 in CBC mode is:
id-aes128-CBC OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithm(4) aes(1) 2 }
The algorithm identifier for AES-256 in CBC mode is:
id-aes256-CBC OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithm(4) aes(1) 42 }
The AlgorithmIdentifier parameters field MUST be present, and the
parameters field must contain AES-IV:
AES-IV ::= OCTET STRING (SIZE(16))
The 16-octet initialization vector is generated at random by the
originator. See [<a href="#ref-RANDOM" title=""Randomness Requirements for Security"">RANDOM</a>] for guidance on generation of random
values.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
This document specifies the conventions for using the NSA's Suite B
algorithms in S/MIME. All of the algorithms and algorithm
identifiers have been specified in previous documents.
Two minimum levels of security may be achieved using this
specification. Users must consider their risk environment to
determine which level is appropriate for their own use.
See [<a href="#ref-RANDOM" title=""Randomness Requirements for Security"">RANDOM</a>] for guidance on generation of random values.
The security considerations in <a href="./rfc5652">RFC 5652</a> [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] discuss the CMS as a
method for digitally signing data and encrypting data.
The security considerations in <a href="./rfc3370">RFC 3370</a> [<a href="#ref-CMSALG" title=""Cryptographic Message Syntax (CMS) Algorithms"">CMSALG</a>] discuss
cryptographic algorithm implementation concerns in the context of the
CMS.
The security considerations in <a href="./rfc5753">RFC 5753</a> [<a href="#ref-CMSECC" title=""Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)"">CMSECC</a>] discuss the use of
elliptic curve cryptography (ECC) in the CMS.
The security considerations in <a href="./rfc3565">RFC 3565</a> [<a href="#ref-CMSAES" title=""Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)"">CMSAES</a>] discuss the use of
AES in the CMS.
<span class="grey">Housley & Solinas Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. References</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Normative References</span>
[<a id="ref-AES">AES</a>] National Institute of Standards and Technology, "Advanced
Encryption Standard (AES)", FIPS PUB 197, November 2001.
[<a id="ref-AESWRAP">AESWRAP</a>] National Institute of Standards and Technology, "AES Key
Wrap Specification", November 2001.
[<a id="ref-DSS">DSS</a>] National Institute of Standards and Technology, "Digital
Signature Standard (DSS)", FIPS PUB 186-3, June 2009.
[<a id="ref-CMS">CMS</a>] Housley, R., "Cryptographic Message Syntax (CMS)",
STD 70, <a href="./rfc5652">RFC 5652</a>, September 2009.
[<a id="ref-CMSAES">CMSAES</a>] Schaad, J., "Use of the Advanced Encryption Standard
(AES) Encryption Algorithm in Cryptographic Message
Syntax (CMS)", <a href="./rfc3565">RFC 3565</a>, July 2003.
[<a id="ref-CMSALG">CMSALG</a>] Housley, R., "Cryptographic Message Syntax (CMS)
Algorithms", <a href="./rfc3370">RFC 3370</a>, August 2002.
[<a id="ref-CMSDH">CMSDH</a>] Rescorla, E., "Diffie-Hellman Key Agreement Method",
<a href="./rfc2631">RFC 2631</a>, June 1999.
[<a id="ref-CMSECC">CMSECC</a>] Turner, S. and D. Brown, "Use of Elliptic Curve
Cryptography (ECC) Algorithms in Cryptographic Message
Syntax (CMS)", <a href="./rfc5753">RFC 5753</a>, January 2010.
[<a id="ref-MODES">MODES</a>] National Institute of Standards and Technology, "DES
Modes of Operation", FIPS Pub 81, December 1980.
[<a id="ref-MSG">MSG</a>] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet
Mail Extensions (S/MIME) Version 3.2 Message
Specification", <a href="./rfc5751">RFC 5751</a>, January 2010.
[<a id="ref-PKI-ALG">PKI-ALG</a>] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk,
"Elliptic Curve Cryptography Subject Public Key
Information", <a href="./rfc5480">RFC 5480</a>, March 2009.
[<a id="ref-SEC1">SEC1</a>] Standards for Efficient Cryptography Group, "SEC 1:
Elliptic Curve Cryptography", September 2000.
<<a href="http://www.secg.org/collateral/sec1_final.pdf">http://www.secg.org/collateral/sec1_final.pdf</a>>.
[<a id="ref-SH">SH</a>] Schaad, J. and R. Housley, "Advanced Encryption Standard
(AES) Key Wrap Algorithm", <a href="./rfc3394">RFC 3394</a>, September 2002.
<span class="grey">Housley & Solinas Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
[<a id="ref-SHA2">SHA2</a>] Turner, S., "Using SHA2 Algorithms with Cryptographic
Message Syntax", <a href="./rfc5754">RFC 5754</a>, January 2010.
[<a id="ref-SHA2FIPS">SHA2FIPS</a>] National Institute of Standards and Technology, "Secure
Hash Standard (SHS)", FIPS 180-3, October 2008.
[<a id="ref-STDWORDS">STDWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-SUITEBCERT">SUITEBCERT</a>]
Solinas, J. and L. Zieglar, "Suite B Certificate and
Certificate Revocation List (CRL) Profile", <a href="./rfc5759">RFC 5759</a>,
January 2010.
[<a id="ref-SUITEBSMIME">SUITEBSMIME</a>]
Housley, R. and J. Solinas, "Suite B in
Secure/Multipurpose Internet Mail Extensions (S/MIME)",
<a href="./rfc5008">RFC 5008</a>, September 2007.
[<a id="ref-X.208-88">X.208-88</a>] CCITT. Recommendation X.208: Specification of Abstract
Syntax Notation One (ASN.1). 1988.
[<a id="ref-X.209-88">X.209-88</a>] CCITT. Recommendation X.209: Specification of Basic
Encoding Rules for Abstract Syntax Notation One (ASN.1).
1988.
[<a id="ref-X.509-88">X.509-88</a>] CCITT. Recommendation X.509: The Directory -
Authentication Framework. 1988.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Informative References</span>
[<a id="ref-RANDOM">RANDOM</a>] Eastlake 3rd, D., Schiller, J., and S. Crocker,
"Randomness Requirements for Security", <a href="https://www.rfc-editor.org/bcp/bcp106">BCP 106</a>,
<a href="./rfc4086">RFC 4086</a>, June 2005.
[<a id="ref-NSA">NSA</a>] U.S. National Security Agency, "Fact Sheet NSA Suite B
Cryptography", January 2009.
<<a href="http://www.nsa.gov/ia/programs/suiteb_cryptography">http://www.nsa.gov/ia/programs/suiteb_cryptography</a>>.
<span class="grey">Housley & Solinas Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc6318">RFC 6318</a> Suite B in S/MIME June 2011</span>
Authors' Addresses
Russell Housley
Vigil Security, LLC
918 Spring Knoll Drive
Herndon, VA 20170
USA
EMail: housley@vigilsec.com
Jerome A. Solinas
National Information Assurance Laboratory
National Security Agency
9800 Savage Road
Fort George G. Meade, MD 20755
USA
EMail: jasolin@orion.ncsc.mil
Housley & Solinas Informational [Page 15]
</pre>
|