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 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
|
<pre>Network Working Group S. Blake-Wilson
Request for Comments: 3278 D. Brown
Category: Informational Certicom Corp
P. Lambert
Cosine Communications
April 2002
<span class="h1">Use of Elliptic Curve Cryptography (ECC) Algorithms</span>
<span class="h1">in Cryptographic Message Syntax (CMS)</span>
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract
This document describes how to use Elliptic Curve Cryptography (ECC)
public-key algorithms in the Cryptographic Message Syntax (CMS). The
ECC algorithms support the creation of digital signatures and the
exchange of keys to encrypt or authenticate content. The definition
of the algorithm processing is based on the ANSI X9.62 standard,
developed by the ANSI X9F1 working group, the IEEE 1363 standard, and
the SEC 1 standard.
The readers attention is called to the Intellectual Property Rights
section at the end of this document.
<span class="grey">Blake-Wilson, et al. Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
Table of Contents
<a href="#section-1">1</a> Introduction ................................................... <a href="#page-2">2</a>
<a href="#section-1.1">1.1</a> Requirements terminology .................................. <a href="#page-3">3</a>
<a href="#section-2">2</a> SignedData using ECC .......................................... <a href="#page-3">3</a>
<a href="#section-2.1">2.1</a> SignedData using ECDSA ................................... <a href="#page-3">3</a>
<a href="#section-2.1.1">2.1.1</a> Fields of the SignedData .......................... <a href="#page-3">3</a>
<a href="#section-2.1.2">2.1.2</a> Actions of the sending agent ...................... <a href="#page-4">4</a>
<a href="#section-2.1.3">2.1.3</a> Actions of the receiving agent .................... <a href="#page-4">4</a>
<a href="#section-3">3</a> EnvelopedData using ECC ....................................... <a href="#page-4">4</a>
<a href="#section-3.1">3.1</a> EnvelopedData using ECDH ................................. <a href="#page-5">5</a>
<a href="#section-3.1.1">3.1.1</a> Fields of KeyAgreeRecipientInfo ................... <a href="#page-5">5</a>
<a href="#section-3.1.2">3.1.2</a> Actions of the sending agent ...................... <a href="#page-5">5</a>
<a href="#section-3.1.3">3.1.3</a> Actions of the receiving agent .................... <a href="#page-6">6</a>
<a href="#section-3.2">3.2</a> EnvelopedData using 1-Pass ECMQV ......................... <a href="#page-6">6</a>
<a href="#section-3.2.1">3.2.1</a> Fields of KeyAgreeRecipientInfo ................... <a href="#page-6">6</a>
<a href="#section-3.2.2">3.2.2</a> Actions of the sending agent ...................... <a href="#page-7">7</a>
<a href="#section-3.2.3">3.2.3</a> Actions of the receiving agent .................... <a href="#page-7">7</a>
<a href="#section-4">4</a> AuthenticatedData using ECC ............ ...................... <a href="#page-8">8</a>
<a href="#section-4.1">4.1</a> AuthenticatedData using 1-pass ECMQV ..................... <a href="#page-8">8</a>
<a href="#section-4.1.1">4.1.1</a> Fields of KeyAgreeRecipientInfo ................... <a href="#page-8">8</a>
<a href="#section-4.1.2">4.1.2</a> Actions of the sending agent ...................... <a href="#page-8">8</a>
<a href="#section-4.1.3">4.1.3</a> Actions of the receiving agent .................... <a href="#page-8">8</a>
<a href="#section-5">5</a> Recommended Algorithms and Elliptic Curves .................... <a href="#page-9">9</a>
<a href="#section-6">6</a> Certificates using ECC ........................................ <a href="#page-9">9</a>
<a href="#section-7">7</a> SMIMECapabilities Attribute and ECC ........................... <a href="#page-9">9</a>
<a href="#section-8">8</a> ASN.1 Syntax .................................................. <a href="#page-10">10</a>
<a href="#section-8.1">8.1</a> Algorithm identifiers .................................... <a href="#page-10">10</a>
<a href="#section-8.2">8.2</a> Other syntax ............................................. <a href="#page-11">11</a>
<a href="#section-9">9</a> Summary ....................................................... <a href="#page-12">12</a>
References ....................................................... <a href="#page-13">13</a>
Security Considerations .......................................... <a href="#page-14">14</a>
Intellectual Property Rights ..................................... <a href="#page-14">14</a>
Acknowledgments .................................................. <a href="#page-15">15</a>
Authors' Addresses ............................................... <a href="#page-15">15</a>
Full Copyright Statement ......................................... <a href="#page-16">16</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a> Introduction</span>
The Cryptographic Message Syntax (CMS) is cryptographic algorithm
independent. This specification defines a profile for the use of
Elliptic Curve Cryptography (ECC) public key algorithms in the CMS.
The ECC algorithms are incorporated into the following CMS content
types:
- 'SignedData' to support ECC-based digital signature methods
(ECDSA) to sign content
<span class="grey">Blake-Wilson, et al. Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
- 'EnvelopedData' to support ECC-based public-key agreement
methods (ECDH and ECMQV) to generate pairwise key-encryption
keys to encrypt content-encryption keys used for content
encryption
- 'AuthenticatedData' to support ECC-based public-key agreement
methods (ECMQV) to generate pairwise key-encryption keys to
encrypt MAC keys used for content authentication and integrity
Certification of EC public keys is also described to provide public-
key distribution in support of the specified techniques.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Requirements 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="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>
[<a href="#ref-MUST" title=""Key Words for Use in RFCs to Indicate Requirement Levels"">MUST</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a> SignedData using ECC</span>
This section describes how to use ECC algorithms with the CMS
SignedData format to sign data.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> SignedData using ECDSA</span>
This section describes how to use the Elliptic Curve Digital
Signature Algorithm (ECDSA) with SignedData. ECDSA is specified in
[<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>]. The method is the elliptic curve analog of the Digital
Signature Algorithm (DSA) [FIPS 186-2].
In an implementation that uses ECDSA with CMS SignedData, the
following techniques and formats MUST be used.
<span class="h4"><a class="selflink" id="section-2.1.1" href="#section-2.1.1">2.1.1</a> Fields of the SignedData</span>
When using ECDSA with SignedData, the fields of SignerInfo are as in
[<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>], but with the following restrictions:
digestAlgorithm MUST contain the algorithm identifier sha-1 (see
<a href="#section-8.1">Section 8.1</a>) which identifies the SHA-1 hash algorithm.
signatureAlgorithm contains the algorithm identifier ecdsa-with-
SHA1 (see <a href="#section-8.1">Section 8.1</a>) which identifies the ECDSA signature
algorithm.
signature MUST contain the DER encoding (as an octet string) of a
value of the ASN.1 type ECDSA-Sig-Value (see <a href="#section-8.2">Section 8.2</a>).
<span class="grey">Blake-Wilson, et al. Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
When using ECDSA, the SignedData certificates field MAY include the
certificate(s) for the EC public key(s) used in the generation of the
ECDSA signatures in SignedData. ECC certificates are discussed in
<a href="#section-6">Section 6</a>.
<span class="h4"><a class="selflink" id="section-2.1.2" href="#section-2.1.2">2.1.2</a> Actions of the sending agent</span>
When using ECDSA with SignedData, the sending agent uses the message
digest calculation process and signature generation process for
SignedData that are specified in [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>]. To sign data, the sending
agent uses the signature method specified in [X9.62, <a href="#section-5.3">Section 5.3</a>]
with the following exceptions:
- In [X9.62, <a href="#section-5.3.1">Section 5.3.1</a>], the integer "e" is instead
determined by converting the message digest generated according
to [CMS, <a href="#section-5.4">Section 5.4</a>] to an integer using the data conversion
method in [X9.62, <a href="#section-4.3.2">Section 4.3.2</a>].
The sending agent encodes the resulting signature using the ECDSA-
Sig-Value syntax (see <a href="#section-8.2">Section 8.2</a>) and places it in the SignerInfo
signature field.
<span class="h4"><a class="selflink" id="section-2.1.3" href="#section-2.1.3">2.1.3</a> Actions of the receiving agent</span>
When using ECDSA with SignedData, the receiving agent uses the
message digest calculation process and signature verification process
for SignedData that are specified in [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>]. To verify SignedData,
the receiving agent uses the signature verification method specified
in [X9.62, <a href="#section-5.4">Section 5.4</a>] with the following exceptions:
- In [X9.62, <a href="#section-5.4.1">Section 5.4.1</a>] the integer "e'" is instead
determined by converting the message digest generated according
to [CMS, <a href="#section-5.4">Section 5.4</a>] to an integer using the data conversion
method in [X9.62, <a href="#section-4.3.2">Section 4.3.2</a>].
In order to verify the signature, the receiving agent retrieves the
integers r and s from the SignerInfo signature field of the received
message.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a> EnvelopedData using ECC Algorithms</span>
This section describes how to use ECC algorithms with the CMS
EnvelopedData format.
<span class="grey">Blake-Wilson, et al. Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> EnvelopedData using (ephemeral-static) ECDH</span>
This section describes how to use the ephemeral-static Elliptic Curve
Diffie-Hellman (ECDH) key agreement algorithm with EnvelopedData.
Ephemeral-static ECDH is specified in [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>] and [<a href="#ref-IEEE1363" title=""Standard Specifications for Public Key Cryptography"">IEEE1363</a>].
Ephemeral-static ECDH is the the elliptic curve analog of the
ephemeral-static Diffie-Hellman key agreement algorithm specified
jointly in the documents [CMS, <a href="#section-12.3.1.1">Section 12.3.1.1</a>] and [<a href="#ref-CMS-DH" title=""Diffie-Hellman Key Agreement Method"">CMS-DH</a>].
In an implementation that uses ECDH with CMS EnvelopedData with key
agreement, the following techniques and formats MUST be used.
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a> Fields of KeyAgreeRecipientInfo</span>
When using ephemeral-static ECDH with EnvelopedData, the fields of
KeyAgreeRecipientInfo are as in [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>], but with the following
restrictions:
originator MUST be the alternative originatorKey. The
originatorKey algorithm field MUST contain the id-ecPublicKey
object identifier (see <a href="#section-8.1">Section 8.1</a>) with NULL parameters. The
originatorKey publicKey field MUST contain the DER-encoding of a
value of the ASN.1 type ECPoint (see <a href="#section-8.2">Section 8.2</a>), which
represents the sending agent's ephemeral EC public key.
keyEncryptionAlgorithm MUST contain the dhSinglePass-stdDH-
sha1kdf-scheme object identifier (see <a href="#section-8.1">Section 8.1</a>) if standard
ECDH primitive is used, or the dhSinglePass-cofactorDH-sha1kdf-
scheme object identifier (see <a href="#section-8.1">Section 8.1</a>) if the cofactor ECDH
primitive is used. The parameters field contains
KeyWrapAlgorithm. The KeyWrapAlgorithm is the algorithm
identifier that indicates the symmetric encryption algorithm used
to encrypt the content-encryption key (CEK) with the key-
encryption key (KEK).
<span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a> Actions of the sending agent</span>
When using ephemeral-static ECDH with EnvelopedData, the sending
agent first obtains the recipient's EC public key and domain
parameters (e.g. from the recipient's certificate). The sending
agent then determines an integer "keydatalen", which is the
KeyWrapAlgorithm symmetric key-size in bits, and also a bit string
"SharedInfo", which is the DER encoding of ECC-CMS-SharedInfo (see
<a href="#section-8.2">Section 8.2</a>). The sending agent then performs the key deployment and
the key agreement operation of the Elliptic Curve Diffie-Hellman
Scheme specified in [SEC1, <a href="#section-6.1">Section 6.1</a>]. As a result the sending
agent obtains:
<span class="grey">Blake-Wilson, et al. Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
- an ephemeral public key, which is represented as a value of the
type ECPoint (see <a href="#section-8.2">Section 8.2</a>), encapsulated in a bit string
and placed in the KeyAgreeRecipientInfo originator field, and
- a shared secret bit string "K", which is used as the pairwise
key-encryption key for that recipient, as specified in [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>].
<span class="h4"><a class="selflink" id="section-3.1.3" href="#section-3.1.3">3.1.3</a> Actions of the receiving agent</span>
When using ephemeral-static ECDH with EnvelopedData, the receiving
agent determines the bit string "SharedInfo", which is the DER
encoding of ECC-CMS-SharedInfo (see <a href="#section-8.2">Section 8.2</a>), and the integer
"keydatalen" from the key-size, in bits, of the KeyWrapAlgorithm.
The receiving agent retrieves the ephemeral EC public key from the
bit string KeyAgreeRecipientInfo originator, with a value of the type
ECPoint (see <a href="#section-8.2">Section 8.2</a>) encapsulated as a bit string. The
receiving agent performs the key agreement operation of the Elliptic
Curve Diffie-Hellman Scheme specified in [SEC1, <a href="#section-6.1">Section 6.1</a>]. As a
result, the receiving agent obtains a shared secret bit string "K",
which is used as the pairwise key-encryption key to unwrap the CEK.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> EnvelopedData using 1-Pass ECMQV</span>
This section describes how to use the 1-Pass elliptic curve MQV
(ECMQV) key agreement algorithm with EnvelopedData. ECMQV is
specified in [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>] and [<a href="#ref-IEEE1363" title=""Standard Specifications for Public Key Cryptography"">IEEE1363</a>]. Like the KEA algorithm [CMS-
KEA], 1-Pass ECMQV uses three key pairs: an ephemeral key pair, a
static key pair of the sending agent, and a static key pair of the
receiving agent. An advantage of using 1-Pass ECMQV is that it can
be used with both EnvelopedData and AuthenticatedData.
In an implementation that uses 1-Pass ECMQV with CMS EnvelopedData
with key agreement, the following techniques and formats MUST be
used.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a> Fields of KeyAgreeRecipientInfo</span>
When using 1-Pass ECMQV with EnvelopedData, the fields of
KeyAgreeRecipientInfo are:
originator identifies the static EC public key of the sender. It
SHOULD be one of the alternatives, issuerAndSerialNumber or
subjectKeyIdentifier, and point to one of the sending agent's
certificates.
ukm MUST be present. The ukm field MUST contain an octet string
which is the DER encoding of the type MQVuserKeyingMaterial (see
<a href="#section-8.2">Section 8.2</a>). The MQVuserKeyingMaterial ephemeralPublicKey
<span class="grey">Blake-Wilson, et al. Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
algorithm field MUST contain the id-ecPublicKey object identifier
(see <a href="#section-8.1">Section 8.1</a>) with NULL parameters field. The
MQVuserKeyingMaterial ephemeralPublicKey publicKey field MUST
contain the DER-encoding of the ASN.1 type ECPoint (see <a href="#section-8.2">Section</a>
<a href="#section-8.2">8.2</a>) representing sending agent's ephemeral EC public key. The
MQVuserKeyingMaterial addedukm field, if present, SHOULD contain
an octet string of additional user keying material of the sending
agent.
keyEncryptionAlgorithm MUST be the mqvSinglePass-sha1kdf-scheme
algorithm identifier (see <a href="#section-8.1">Section 8.1</a>), with the parameters field
KeyWrapAlgorithm. The KeyWrapAlgorithm indicates the symmetric
encryption algorithm used to encrypt the CEK with the KEK
generated using the 1-Pass ECMQV algorithm.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a> Actions of the sending agent</span>
When using 1-Pass ECMQV with EnvelopedData, the sending agent first
obtains the recipient's EC public key and domain parameters, (e.g.
from the recipient's certificate) and checks that the domain
parameters are the same. The sending agent then determines an
integer "keydatalen", which is the KeyWrapAlgorithm symmetric key-
size in bits, and also a bit string "SharedInfo", which is the DER
encoding of ECC-CMS-SharedInfo (see <a href="#section-8.2">Section 8.2</a>). The sending agent
then performs the key deployment and key agreement operations of the
Elliptic Curve MQV Scheme specified in [SEC1, <a href="#section-6.2">Section 6.2</a>]. As a
result, the sending agent obtains:
- an ephemeral public key, which is represented as a value of
type ECPoint (see <a href="#section-8.2">Section 8.2</a>), encapsulated in a bit string,
placed in an MQVuserKeyingMaterial ephemeralPublicKey publicKey
field (see <a href="#section-8.2">Section 8.2</a>), and
- a shared secret bit string "K", which is used as the pairwise
key-encryption key for that recipient, as specified in [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>].
The ephemeral public key can be re-used with an AuthenticatedData for
greater efficiency.
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a> Actions of the receiving agent</span>
When using 1-Pass ECMQV with EnvelopedData, the receiving agent
determines the bit string "SharedInfo", which is the DER encoding of
ECC-CMS-SharedInfo (see <a href="#section-8.2">Section 8.2</a>), and the integer "keydatalen"
from the key-size, in bits, of the KeyWrapAlgorithm. The receiving
agent then retrieves the static and ephemeral EC public keys of the
originator, from the originator and ukm fields as described in
<a href="#section-3.2.1">Section 3.2.1</a>, and its static EC public key identified in the rid
<span class="grey">Blake-Wilson, et al. Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
field and checks that the domain parameters are the same. The
receiving agent then performs the key agreement operation of the
Elliptic Curve MQV Scheme [SEC1, <a href="#section-6.2">Section 6.2</a>]. As a result, the
receiving agent obtains a shared secret bit string "K" which is used
as the pairwise key-encryption key to unwrap the CEK.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a> AuthenticatedData using ECC</span>
This section describes how to use ECC algorithms with the CMS
AuthenticatedData format. AuthenticatedData lacks non-repudiation,
and so in some instances is preferable to SignedData. (For example,
the sending agent might not want the message to be authenticated when
forwarded.)
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a> AuthenticatedData using 1-pass ECMQV</span>
This section describes how to use the 1-Pass elliptic curve MQV
(ECMQV) key agreement algorithm with AuthenticatedData. ECMQV is
specified in [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>]. An advantage of using 1-Pass ECMQV is that it
can be used with both EnvelopedData and AuthenticatedData.
<span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a> Fields of the KeyAgreeRecipientInfo</span>
The AuthenticatedData KeyAgreeRecipientInfo fields are used in the
same manner as the fields for the corresponding EnvelopedData
KeyAgreeRecipientInfo fields of <a href="#section-3.2.1">Section 3.2.1</a> of this document.
<span class="h4"><a class="selflink" id="section-4.1.2" href="#section-4.1.2">4.1.2</a> Actions of the sending agent</span>
The sending agent uses the same actions as for EnvelopedData with 1-
Pass ECMQV, as specified in <a href="#section-3.2.2">Section 3.2.2</a> of this document.
The ephemeral public key can be re-used with an EnvelopedData for
greater efficiency.
Note: if there are multiple recipients, an attack is possible where
one recipient modifies the content without other recipients noticing
[<a href="#ref-BON" title=""The Security of Multicast MAC"">BON</a>]. A sending agent who is concerned with such an attack SHOULD
use a separate AuthenticatedData for each recipient.
<span class="h4"><a class="selflink" id="section-4.1.3" href="#section-4.1.3">4.1.3</a> Actions of the receiving agent</span>
The receiving agent uses the same actions as for EnvelopedData with
1-Pass ECMQV, as specified in <a href="#section-3.2.3">Section 3.2.3</a> of this document.
Note: see Note in <a href="#section-4.1.2">Section 4.1.2</a>.
<span class="grey">Blake-Wilson, et al. Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a> Recommended Algorithms and Elliptic Curves</span>
Implementations of this specification MUST implement either
SignedData with ECDSA or EnvelopedData with ephemeral-static ECDH.
Implementations of this specification SHOULD implement both
SignedData with ECDSA and EnvelopedData with ephemeral-static ECDH.
Implementations MAY implement the other techniques specified, such as
AuthenticatedData and 1-Pass ECMQV.
Furthermore, in order to encourage interoperability, implementations
SHOULD use the elliptic curve domain parameters specified by ANSI
[<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>], NIST [<a href="#ref-FIPS-186-2" title=""Digital Signature Standard"">FIPS-186-2</a>] and SECG [<a href="#ref-SEC2" title=""Recommended Elliptic Curve Domain Parameters"">SEC2</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a> Certificates using ECC</span>
Internet X.509 certificates [<a href="#ref-PKI" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">PKI</a>] can be used in conjunction with
this specification to distribute agents' public keys. The use of ECC
algorithms and keys within X.509 certificates is specified in [PKI-
ALG].
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a> SMIMECapabilities Attribute and ECC</span>
A sending agent MAY announce to receiving agents that it supports one
or more of the ECC algorithms in this document by using the
SMIMECapabilities signed attribute [MSG, <a href="#section-2.5.2">Section 2.5.2</a>].
The SMIMECapability value to indicate support for the ECDSA signature
algorithm is the SEQUENCE with the capabilityID field containing the
object identifier ecdsa-with-SHA1 with NULL parameters. The DER
encoding is:
30 0b 06 07 2a 86 48 ce 3d 04 01 05 00
The SMIMECapability capabilityID object identifiers for the supported
key agreement algorithms in this document are dhSinglePass-stdDH-
sha1kdf-scheme, dhSinglePass-cofactorDH-sha1kdf-scheme, and
mqvSinglePass-sha1kdf-scheme. For each of these SMIMECapability
SEQUENCEs, the parameters field is present and indicates the
supported key-encryption algorithm with the KeyWrapAlgorithm
algorithm identifier. The DER encodings that indicate capability of
the three key agreement algorithms with CMS Triple-DES key wrap are:
30 1c 06 09 2b 81 05 10 86 48 3f 00 02 30 0f 06
0b 2a 86 48 86 f7 0d 01 09 10 03 06 05 00
for ephemeral-static ECDH,
<span class="grey">Blake-Wilson, et al. Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
30 1c 06 09 2b 81 05 10 86 48 3f 00 03 30 0f 06
0b 2a 86 48 86 f7 0d 01 09 10 03 06 05 00
for ephemeral-static ECDH with cofactor method, and
30 1c 06 09 2b 81 05 10 86 48 3f 00 10 30 0f 06
0b 2a 86 48 86 f7 0d 01 09 10 03 06 05 00
for ECMQV.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a> ASN.1 Syntax</span>
The ASN.1 syntax used in this document is gathered in this section
for reference purposes.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a> Algorithm identifiers</span>
The algorithm identifiers used in this document are taken from
[<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>], [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>] and [<a href="#ref-SEC2" title=""Recommended Elliptic Curve Domain Parameters"">SEC2</a>].
The following object identifier indicates the hash algorithm used in
this document:
sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
oiw(14) secsig(3) algorithm(2) 26 }
The following object identifier is used in this document to indicate
an elliptic curve public key:
id-ecPublicKey OBJECT IDENTIFIER ::= { ansi-x9-62 keyType(2) 1 }
where
ansi-x9-62 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
10045 }
When the object identifier id-ecPublicKey is used here with an
algorithm identifier, the associated parameters contain NULL.
The following object identifier indicates the digital signature
algorithm used in this document:
ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { ansi-x9-62 signatures(4)
1 }
<span class="grey">Blake-Wilson, et al. Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
When the object identifier ecdsa-with-SHA1 is used within an
algorithm identifier, the associated parameters field contains NULL.
The following object identifiers indicate the key agreement
algorithms used in this document:
dhSinglePass-stdDH-sha1kdf-scheme OBJECT IDENTIFIER ::= {
x9-63-scheme 2}
dhSinglePass-cofactorDH-sha1kdf-scheme OBJECT IDENTIFIER ::= {
x9-63-scheme 3}
mqvSinglePass-sha1kdf-scheme OBJECT IDENTIFIER ::= {
x9-63-scheme 16}
where
x9-63-scheme OBJECT IDENTIFIER ::= { iso(1)
identified-organization(3) tc68(133) country(16) x9(840)
x9-63(63) schemes(0) }
When the object identifiers are used here within an algorithm
identifier, the associated parameters field contains the CMS
KeyWrapAlgorithm algorithm identifier.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a> Other syntax</span>
The following additional syntax is used here.
When using ECDSA with SignedData, ECDSA signatures are encoded using
the type:
ECDSA-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER }
ECDSA-Sig-Value is specified in [<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>]. Within CMS, ECDSA-Sig-Value
is DER-encoded and placed within a signature field of SignedData.
When using ECDH and ECMQV with EnvelopedData and AuthenticatedData,
ephemeral and static public keys are encoded using the type ECPoint.
ECPoint ::= OCTET STRING
When using ECMQV with EnvelopedData and AuthenticatedData, the
sending agent's ephemeral public key and additional keying material
are encoded using the type:
<span class="grey">Blake-Wilson, et al. Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
MQVuserKeyingMaterial ::= SEQUENCE {
ephemeralPublicKey OriginatorPublicKey,
addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
The ECPoint syntax in used to represent the ephemeral public key and
placed in the ephemeralPublicKey field. The additional user keying
material is placed in the addedukm field. Then the
MQVuserKeyingMaterial value is DER-encoded and placed within a ukm
field of EnvelopedData or AuthenticatedData.
When using ECDH or ECMQV with EnvelopedData or AuthenticatedData, the
key-encryption keys are derived by using the type:
ECC-CMS-SharedInfo ::= SEQUENCE {
keyInfo AlgorithmIdentifier,
entityUInfo [0] EXPLICIT OCTET STRING OPTIONAL,
suppPubInfo [2] EXPLICIT OCTET STRING }
The fields of ECC-CMS-SharedInfo are as follows:
keyInfo contains the object identifier of the key-encryption
algorithm (used to wrap the CEK) and NULL parameters.
entityUInfo optionally contains additional keying material
supplied by the sending agent. When used with ECDH and CMS, the
entityUInfo field contains the octet string ukm. When used with
ECMQV and CMS, the entityUInfo contains the octet string addedukm
(encoded in MQVuserKeyingMaterial).
suppPubInfo contains the length of the generated KEK, in bits,
represented as a 32 bit number, as in [<a href="#ref-CMS-DH" title=""Diffie-Hellman Key Agreement Method"">CMS-DH</a>]. (E.g. for 3DES it
would be 00 00 00 c0.)
Within CMS, ECC-CMS-SharedInfo is DER-encoded and used as input to
the key derivation function, as specified in [SEC1, <a href="#section-3.6.1">Section 3.6.1</a>].
Note that ECC-CMS-SharedInfo differs from the OtherInfo specified in
[<a href="#ref-CMS-DH" title=""Diffie-Hellman Key Agreement Method"">CMS-DH</a>]. Here, a counter value is not included in the keyInfo field
because the key derivation function specified in [SEC1, <a href="#section-3.6.1">Section</a>
<a href="#section-3.6.1">3.6.1</a>] ensures that sufficient keying data is provided.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a> Summary</span>
This document specifies how to use ECC algorithms with the S/MIME
CMS. Use of ECC algorithm within CMS can result in reduced
processing requirements for S/MIME agents, and reduced bandwidth for
CMS messages.
<span class="grey">Blake-Wilson, et al. Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
References
[<a id="ref-X9.62">X9.62</a>] ANSI X9.62-1998, "Public Key Cryptography For The
Financial Services Industry: The Elliptic Curve Digital
Signature Algorithm (ECDSA)", American National
Standards Institute, 1999.
[<a id="ref-PKI-ALG">PKI-ALG</a>] Bassham, L., Housley R. and W. Polk, "Algorithms and
Identifiers for the Internet X.509 Public Key
Infrastructure Certificate and CRL Profile", <a href="./rfc3279">RFC 3279</a>,
April 2002.
[<a id="ref-BON">BON</a>] D. Boneh, "The Security of Multicast MAC", Presentation
at Selected Areas of Cryptography 2000, Center for
Applied Cryptographic Research, University of Waterloo,
2000. Paper version available from
<a href="http://crypto.stanford.edu/~dabo/papers/mmac.ps">http://crypto.stanford.edu/~dabo/papers/mmac.ps</a>
[<a id="ref-MUST">MUST</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-FIPS-180">FIPS-180</a>] FIPS 180-1, "Secure Hash Standard", National Institute
of Standards and Technology, April 17, 1995.
[<a id="ref-FIPS-186-2">FIPS-186-2</a>] FIPS 186-2, "Digital Signature Standard", National
Institute of Standards and Technology, 15 February 2000.
[<a id="ref-PKI">PKI</a>] Housley, R., Polk, W., Ford, W. and D. Solo, "Internet
X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile", <a href="./rfc3280">RFC 3280</a>,
April 2002.
[<a id="ref-CMS">CMS</a>] Housley, R., "Cryptographic Message Syntax", <a href="./rfc2630">RFC 2630</a>,
June 1999.
[<a id="ref-IEEE1363">IEEE1363</a>] IEEE P1363, "Standard Specifications for Public Key
Cryptography", Institute of Electrical and Electronics
Engineers, 2000.
[<a id="ref-K">K</a>] B. Kaliski, "MQV Vulnerabilty", Posting to ANSI X9F1 and
IEEE P1363 newsgroups, 1998.
[<a id="ref-LMQSV">LMQSV</a>] L. Law, A. Menezes, M. Qu, J. Solinas and S. Vanstone,
"An efficient protocol for authenticated key agreement",
Technical report CORR 98-05, University of Waterloo,
1998.
<span class="grey">Blake-Wilson, et al. Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
[<a id="ref-CMS-KEA">CMS-KEA</a>] Pawling, J., "CMS KEA and SKIPJACK Conventions", <a href="./rfc2876">RFC</a>
<a href="./rfc2876">2876</a>, July 2000.
[<a id="ref-MSG">MSG</a>] Ramsdell, B., "S/MIME Version 3 Message Specification",
<a href="./rfc2633">RFC 2633</a>, June 1999.
[<a id="ref-CMS-DH">CMS-DH</a>] Rescorla, E., "Diffie-Hellman Key Agreement Method", <a href="./rfc2631">RFC</a>
<a href="./rfc2631">2631</a>, June 1999.
[<a id="ref-SEC1">SEC1</a>] SECG, "Elliptic Curve Cryptography", Standards for
Efficient Cryptography Group, 2000. Available from
www.secg.org/collateral/sec1.pdf.
[<a id="ref-SEC2">SEC2</a>] SECG, "Recommended Elliptic Curve Domain Parameters",
Standards for Efficient Cryptography Group, 2000.
Available from www.secg.org/collateral/sec2.pdf.
Security Considerations
This specification is based on [<a href="#ref-CMS" title=""Cryptographic Message Syntax"">CMS</a>], [<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>] and [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>] and the
appropriate security considerations of those documents apply.
In addition, implementors of AuthenticatedData should be aware of the
concerns expressed in [<a href="#ref-BON" title=""The Security of Multicast MAC"">BON</a>] when using AuthenticatedData to send
messages to more than one recipient. Also, users of MQV should be
aware of the vulnerability in [<a href="#ref-K" title=""MQV Vulnerabilty"">K</a>].
When 256, 384, and 512 bit hash functions succeed SHA-1 in future
revisions of [FIPS], [<a href="#ref-FIPS-186-2" title=""Digital Signature Standard"">FIPS-186-2</a>], [<a href="#ref-X9.62" title=""Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)"">X9.62</a>] and [<a href="#ref-SEC1" title=""Elliptic Curve Cryptography"">SEC1</a>], then they can
similarly succeed SHA-1 in a future revision of this document.
Intellectual Property Rights
The IETF has been notified of intellectual property rights claimed in
regard to the specification contained in this document. For more
information, consult the online list of claimed rights
(<a href="http://www.ietf.org/ipr.html">http://www.ietf.org/ipr.html</a>).
The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it
has made any effort to identify any such rights. Information on the
IETF's procedures with respect to rights in standards-track and
standards-related documentation can be found in <a href="https://www.rfc-editor.org/bcp/bcp11">BCP 11</a>. Copies of
claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to
<span class="grey">Blake-Wilson, et al. Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
obtain a general license or permission for the use of such
proprietary rights by implementors or users of this specification can
be obtained from the IETF Secretariat.
Acknowledgments
The methods described in this document are based on work done by the
ANSI X9F1 working group. The authors wish to extend their thanks to
ANSI X9F1 for their assistance. The authors also wish to thank Peter
de Rooij for his patient assistance. The technical comments of
Francois Rousseau were valuable contributions.
Authors' Addresses
Simon Blake-Wilson
Certicom Corp
5520 Explorer Drive #400
Mississauga, ON L4W 5L1
EMail: sblakewi@certicom.com
Daniel R. L. Brown
pCerticom Corp
5520 Explorer Drive #400
Mississauga, ON L4W 5L1
EMail: dbrown@certicom.com
Paul Lambert
EMail: plambert@sprintmail.com
<span class="grey">Blake-Wilson, et al. Informational [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc3278">RFC 3278</a> Use of ECC Algorithms in CMS April 2002</span>
Full Copyright Statement
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Blake-Wilson, et al. Informational [Page 16]
</pre>
|