draft-ietf-lamps-cms-shakes-12.txt   draft-ietf-lamps-cms-shakes-13.txt 
LAMPS WG P. Kampanakis LAMPS WG P. Kampanakis
Internet-Draft Cisco Systems Internet-Draft Cisco Systems
Updates: 3370 (if approved) Q. Dang Updates: 3370 (if approved) Q. Dang
Intended status: Standards Track NIST Intended status: Standards Track NIST
Expires: January 1, 2020 June 30, 2019 Expires: January 22, 2020 July 21, 2019
Use of the SHAKE One-way Hash Functions in the Cryptographic Message Use of the SHAKE One-way Hash Functions in the Cryptographic Message
Syntax (CMS) Syntax (CMS)
draft-ietf-lamps-cms-shakes-12 draft-ietf-lamps-cms-shakes-13
Abstract Abstract
This document updates [RFC3370] and describes the conventions for This document updates the "Cryptographic Message Syntax Algorithms"
using the SHAKE family of hash functions with the Cryptographic (RFC3370) and describes the conventions for using the SHAKE family of
Message Syntax (CMS) as one-way hash functions with the RSA hash functions in the Cryptographic Message Syntax as one-way hash
Probabilistic signature and ECDSA signature algorithms, as message functions with the RSA Probabilistic signature and ECDSA signature
digests and message authentication codes. The conventions for the algorithms. The conventions for the associated signer public keys in
associated signer public keys in CMS are also described. CMS are also described.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 1, 2020. This Internet-Draft will expire on January 22, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 17 skipping to change at page 2, line 17
Table of Contents Table of Contents
1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5
3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 7 4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 7
4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 7 4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 7
4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 7 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 8
4.2.2. ECDSA Signatures . . . . . . . . . . . . . . . . . . 8 4.2.2. ECDSA Signatures . . . . . . . . . . . . . . . . . . 8
4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 9 4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 9
4.4. Message Authentication Codes . . . . . . . . . . . . . . 9 4.4. Message Authentication Codes . . . . . . . . . . . . . . 10
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.1. Normative References . . . . . . . . . . . . . . . . . . 11 8.1. Normative References . . . . . . . . . . . . . . . . . . 11
8.2. Informative References . . . . . . . . . . . . . . . . . 12 8.2. Informative References . . . . . . . . . . . . . . . . . 12
Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 13 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18
1. Change Log 1. Change Log
[ EDNOTE: Remove this section before publication. ] [ EDNOTE: Remove this section before publication. ]
o draft-ietf-lamps-cms-shake-13:
* Addressing comments from Dan M.'s secdir review.
* Addressing comment from Scott B.'s opsdir review about
references in the abstract.
o draft-ietf-lamps-cms-shake-12: o draft-ietf-lamps-cms-shake-12:
* Nits identified by Roman, Barry L. in ballot position review. * Nits identified by Roman, Barry L. in ballot position review.
o draft-ietf-lamps-cms-shake-11: o draft-ietf-lamps-cms-shake-11:
* Minor nits. * Minor nits.
* Nits identified by Roman in AD Review. * Nits identified by Roman in AD Review.
skipping to change at page 4, line 38 skipping to change at page 4, line 44
* Various updates to title and section names. * Various updates to title and section names.
* Content changes filling in text and references. * Content changes filling in text and references.
o draft-dang-lamps-cms-shakes-hash-00: o draft-dang-lamps-cms-shakes-hash-00:
* Initial version * Initial version
2. Introduction 2. Introduction
The Cryptographic Message Syntax (CMS) [RFC5652] is used to digitally The "Cryptographic Message Syntax (CMS)" [RFC5652] is used to
sign, digest, authenticate, or encrypt arbitrary message contents. digitally sign, digest, authenticate, or encrypt arbitrary message
This specification describes the use of the SHAKE128 and SHAKE256 contents. "Cryptographic Message Syntax (CMS) Algorithms" [RFC3370]
specified in [SHA3] as new hash functions in CMS. In addition, it defines the use of common cryptographic algorithms with CMS. This
describes the use of these functions with the RSASSA-PSS signature specification updates RFC3370 and describes the use of the SHAKE128
algorithm [RFC8017] and the Elliptic Curve Digital Signature and SHAKE256 specified in [SHA3] as new hash functions in CMS. In
Algorithm (ECDSA) [X9.62] with the CMS signed-data content type. addition, it describes the use of these functions with the RSASSA-PSS
signature algorithm [RFC8017] and the Elliptic Curve Digital
Signature Algorithm (ECDSA) [X9.62] with the CMS signed-data content
type.
In the SHA-3 family, two extendable-output functions (SHAKEs), In the SHA-3 family, two extendable-output functions (SHAKEs),
SHAKE128 and SHAKE256, are defined. Four other hash function SHAKE128 and SHAKE256, are defined. Four other hash function
instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512, are also instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512, are also
defined but are out of scope for this document. A SHAKE is a defined but are out of scope for this document. A SHAKE is a
variable length hash function defined as SHAKE(M, d) where the output variable length hash function defined as SHAKE(M, d) where the output
is a d-bits-long digest of message M. The corresponding collision is a d-bits-long digest of message M. The corresponding collision
and second-preimage-resistance strengths for SHAKE128 are and second-preimage-resistance strengths for SHAKE128 are
min(d/2,128) and min(d,128) bits, respectively (Appendix A.1 [SHA3]). min(d/2,128) and min(d,128) bits, respectively (Appendix A.1 [SHA3]).
And the corresponding collision and second-preimage-resistance And the corresponding collision and second-preimage-resistance
strengths for SHAKE256 are min(d/2,256) and min(d,256) bits, strengths for SHAKE256 are min(d/2,256) and min(d,256) bits,
respectively. respectively. In this specification we use d=256 (for SHAKE128) and
d=512 (for SHAKE256).
A SHAKE can be used in CMS as the message digest function (to hash A SHAKE can be used in CMS as the message digest function (to hash
the message to be signed) in RSASSA-PSS and ECDSA, message the message to be signed) in RSASSA-PSS and ECDSA, message
authentication code and as the mask generation function (MGF) in authentication code and as the mask generation function (MGF) in
RSASSA-PSS. This specification describes the identifiers for SHAKEs RSASSA-PSS. This specification describes the identifiers for SHAKEs
to be used in CMS and their meaning. to be used in CMS and their meaning.
2.1. Terminology 2.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
skipping to change at page 7, line 16 skipping to change at page 7, line 27
required output length for each use of SHAKE128 or SHAKE256 in required output length for each use of SHAKE128 or SHAKE256 in
message digests, RSASSA-PSS, ECDSA and KMAC. message digests, RSASSA-PSS, ECDSA and KMAC.
4. Use in CMS 4. Use in CMS
4.1. Message Digests 4.1. Message Digests
The id-shake128 and id-shake256 OIDs (Section 3) can be used as the The id-shake128 and id-shake256 OIDs (Section 3) can be used as the
digest algorithm identifiers located in the SignedData, SignerInfo, digest algorithm identifiers located in the SignedData, SignerInfo,
DigestedData, and the AuthenticatedData digestAlgorithm fields in CMS DigestedData, and the AuthenticatedData digestAlgorithm fields in CMS
[RFC5652]. The encoding MUST omit the parameters field and the [RFC5652]. The OID encoding MUST omit the parameters field and the
output size, d, for the SHAKE128 or SHAKE256 message digest MUST be output length of SHA256 or SHAKE256 as the message digest MUST be 256
256 or 512 bits, respectively. or 512 bits, respectively.
The digest values are located in the DigestedData field and the The digest values are located in the DigestedData field and the
Message Digest authenticated attribute included in the Message Digest authenticated attribute included in the
signedAttributes of the SignedData signerInfo. In addition, digest signedAttributes of the SignedData signerInfo. In addition, digest
values are input to signature algorithms. The digest algorithm MUST values are input to signature algorithms. The digest algorithm MUST
be the same as the message hash algorithms used in signatures. be the same as the message hash algorithms used in signatures.
4.2. Signatures 4.2. Signatures
In CMS, signature algorithm identifiers are located in the SignerInfo In CMS, signature algorithm identifiers are located in the SignerInfo
signatureAlgorithm field of SignedData content type and signatureAlgorithm field of SignedData content type and
countersignature attribute. Signature values are located in the countersignature attribute. Signature values are located in the
SignerInfo signature field of SignedData content type and SignerInfo signature field of SignedData content type and
countersignature attribute. countersignature attribute.
Conforming implementations that process RSASSA-PSS and ECDSA with Conforming implementations that process RSASSA-PSS and ECDSA with
SHAKE signatures when processing CMS data MUST recognize the SHAKE signatures when processing CMS data MUST recognize the
corresponding OIDs specified in Section 3. corresponding OIDs specified in Section 3.
When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus and ECDSA When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus or ECDSA
curve order SHOULD be chosen in line with the SHAKE output length. curve order SHOULD be chosen in line with the SHAKE output length.
In the context of this document SHAKE128 OIDs are RECOMMENDED for Refer to Section 6 for more details.
2048 or 3072-bit RSA modulus or curves with group order of 256-bits.
SHAKE256 OIDs are RECOMMENDED for 4096-bit RSA modulus and higher or
curves with group order of 384-bits and higher.
4.2.1. RSASSA-PSS Signatures 4.2.1. RSASSA-PSS Signatures
The RSASSA-PSS algorithm is defined in [RFC8017]. When id-RSASSA- The RSASSA-PSS algorithm is defined in [RFC8017]. When id-RSASSA-
PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 3 is PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 3 is
used, the encoding MUST omit the parameters field. That is, the used, the encoding MUST omit the parameters field. That is, the
AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA- AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA-
PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. [RFC4055] defines RSASSA- PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. [RFC4055] defines RSASSA-
PSS-params that are used to define the algorithms and inputs to the PSS-params that are used to define the algorithms and inputs to the
algorithm. This specification does not use parameters because the algorithm. This specification does not use parameters because the
skipping to change at page 8, line 50 skipping to change at page 9, line 10
The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in
[X9.62]. When the id-ecdsa-with-shake128 or id-ecdsa-with-shake256 [X9.62]. When the id-ecdsa-with-shake128 or id-ecdsa-with-shake256
(specified in Section 3) algorithm identifier appears, the respective (specified in Section 3) algorithm identifier appears, the respective
SHAKE function is used as the hash. The encoding MUST omit the SHAKE function is used as the hash. The encoding MUST omit the
parameters field. That is, the AlgorithmIdentifier SHALL be a parameters field. That is, the AlgorithmIdentifier SHALL be a
SEQUENCE of one component, the OID id-ecdsa-with-shake128 or id- SEQUENCE of one component, the OID id-ecdsa-with-shake128 or id-
ecdsa-with-shake256. ecdsa-with-shake256.
For simplicity and compliance with the ECDSA standard specification, For simplicity and compliance with the ECDSA standard specification,
the output size of the hash function must be explicitly determined. the output length of the hash function must be explicitly determined.
The output length for SHAKE128 or SHAKE256 used in ECDSA MUST be 256
The output size, d, for SHAKE128 or SHAKE256 used in ECDSA MUST be or 512 bits, respectively.
256 or 512 bits, respectively.
Conforming CA implementations that generate ECDSA with SHAKE Conforming CA implementations that generate ECDSA with SHAKE
signatures in certificates or CRLs SHOULD generate such signatures signatures in certificates or CRLs SHOULD generate such signatures
with a deterministically generated, non-random k in accordance with with a deterministically generated, non-random k in accordance with
all the requirements specified in [RFC6979]. They MAY also generate all the requirements specified in [RFC6979]. They MAY also generate
such signatures in accordance with all other recommendations in such signatures in accordance with all other recommendations in
[X9.62] or [SEC1] if they have a stated policy that requires [X9.62] or [SEC1] if they have a stated policy that requires
conformance to those standards. Those standards have not specified conformance to those standards. Those standards have not specified
SHAKE128 and SHAKE256 as hash algorithm options. However, SHAKE128 SHAKE128 and SHAKE256 as hash algorithm options. However, SHAKE128
and SHAKE256 with output length being 32 and 64 octets, respectively and SHAKE256 with output length being 32 and 64 octets, respectively
skipping to change at page 10, line 42 skipping to change at page 10, line 49
This document updates [RFC3370]. The security considerations section This document updates [RFC3370]. The security considerations section
of that document applies to this specification as well. of that document applies to this specification as well.
NIST has defined appropriate use of the hash functions in terms of NIST has defined appropriate use of the hash functions in terms of
the algorithm strengths and expected time frames for secure use in the algorithm strengths and expected time frames for secure use in
Special Publications (SPs) [SP800-78-4] and [SP800-107]. These Special Publications (SPs) [SP800-78-4] and [SP800-107]. These
documents can be used as guides to choose appropriate key sizes for documents can be used as guides to choose appropriate key sizes for
various security scenarios. various security scenarios.
SHAKE128 with output length of 256-bits offers 128-bits of collision
and 256-bits of preimage resistance. Thus, SHAKE128 OIDs in this
specification are RECOMMENDED with 2048 (112-bit security) or
3072-bit (128-bit security) RSA modulus or curves with group order of
256-bits (128-bit security). SHAKE256 with 512-bits output length
offers 256-bits of collision and 512-bits of preimage resistance.
Thus, the SHAKE256 OIDs in this specification are RECOMMENDED with
4096-bit RSA modulus or higher or curves with group order of 384-bits
(256-bit security) or higher. Note that we recommended 4096-bit RSA
because we would need 15360-bit modulus for 256-bits of security
which is impractical for today's technology.
When more than two parties share the same message-authentication key, When more than two parties share the same message-authentication key,
data origin authentication is not provided. Any party that knows the data origin authentication is not provided. Any party that knows the
message-authentication key can compute a valid MAC, therefore the message-authentication key can compute a valid MAC, therefore the
content could originate from any one of the parties. content could originate from any one of the parties.
7. Acknowledgements 7. Acknowledgements
This document is based on Russ Housley's draft This document is based on Russ Housley's draft
[I-D.housley-lamps-cms-sha3-hash]. It replaces SHA3 hash functions [I-D.housley-lamps-cms-sha3-hash]. It replaces SHA3 hash functions
by SHAKE128 and SHAKE256 as the LAMPS WG agreed. by SHAKE128 and SHAKE256 as the LAMPS WG agreed.
skipping to change at page 12, line 23 skipping to change at page 12, line 41
[I-D.housley-lamps-cms-sha3-hash] [I-D.housley-lamps-cms-sha3-hash]
Housley, R., "Use of the SHA3 One-way Hash Functions in Housley, R., "Use of the SHA3 One-way Hash Functions in
the Cryptographic Message Syntax (CMS)", draft-housley- the Cryptographic Message Syntax (CMS)", draft-housley-
lamps-cms-sha3-hash-00 (work in progress), March 2017. lamps-cms-sha3-hash-00 (work in progress), March 2017.
[I-D.ietf-lamps-pkix-shake] [I-D.ietf-lamps-pkix-shake]
Kampanakis, P. and Q. Dang, "Internet X.509 Public Key Kampanakis, P. and Q. Dang, "Internet X.509 Public Key
Infrastructure: Additional Algorithm Identifiers for Infrastructure: Additional Algorithm Identifiers for
RSASSA-PSS and ECDSA using SHAKEs", draft-ietf-lamps-pkix- RSASSA-PSS and ECDSA using SHAKEs", draft-ietf-lamps-pkix-
shake-11 (work in progress), June 2019. shake-12 (work in progress), June 2019.
[RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and
Identifiers for the Internet X.509 Public Key Identifiers for the Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April (CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April
2002, <https://www.rfc-editor.org/info/rfc3279>. 2002, <https://www.rfc-editor.org/info/rfc3279>.
[RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve [RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve
Cryptography (ECC) Algorithms in Cryptographic Message Cryptography (ECC) Algorithms in Cryptographic Message
Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January
 End of changes. 17 change blocks. 
35 lines changed or deleted 54 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/