draft-ietf-lamps-cms-shakes-03.txt   draft-ietf-lamps-cms-shakes-04.txt 
LAMPS WG Q. Dang LAMPS WG Q. Dang
Internet-Draft NIST Internet-Draft NIST
Intended status: Standards Track P. Kampanakis Intended status: Standards Track P. Kampanakis
Expires: May 29, 2019 Cisco Systems Expires: June 2, 2019 Cisco Systems
November 25, 2018 November 29, 2018
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-03 draft-ietf-lamps-cms-shakes-04
Abstract Abstract
This document describes the conventions for using the SHAKE family of This document describes the conventions for using the SHAKE family of
hash functions with the Cryptographic Message Syntax (CMS) as one-way hash functions with the Cryptographic Message Syntax (CMS) as one-way
hash functions with the RSA Probabilistic signature and ECDSA hash functions with the RSA Probabilistic signature and ECDSA
signature algorithms, as message digests and message authentication signature algorithms, as message digests and message authentication
codes. The conventions for the associated signer public keys in CMS codes. The conventions for the associated signer public keys in CMS
are also described. are also described.
skipping to change at page 1, line 37 skipping to change at page 1, line 37
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 May 29, 2019. This Internet-Draft will expire on June 2, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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 14 skipping to change at page 2, line 14
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 5 4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 6
4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 6 4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 6
4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 6 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 6
4.2.2. Deterministic ECDSA Signatures . . . . . . . . . . . 7 4.2.2. Deterministic ECDSA Signatures . . . . . . . . . . . 7
4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 7 4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 7
4.3.1. RSASSA-PSS Public Keys . . . . . . . . . . . . . . . 7
4.3.2. ECDSA Public Keys . . . . . . . . . . . . . . . . . . 8
4.4. Message Authentication Codes . . . . . . . . . . . . . . 8 4.4. Message Authentication Codes . . . . . . . . . . . . . . 8
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.1. Normative References . . . . . . . . . . . . . . . . . . 10 8.1. Normative References . . . . . . . . . . . . . . . . . . 9
8.2. Informative References . . . . . . . . . . . . . . . . . 10 8.2. Informative References . . . . . . . . . . . . . . . . . 10
Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 11 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14
1. Change Log 1. Change Log
[ EDNOTE: Remove this section before publication. ] [ EDNOTE: Remove this section before publication. ]
o draft-ietf-lamps-cms-shake-04:
* Added RFC8174 reference and text.
* Explicitly explained why RSASSA-PSS-params are omitted in
section 4.2.1.
* Simplified Public Keys section by removing redundand info from
RFCs.
o draft-ietf-lamps-cms-shake-03: o draft-ietf-lamps-cms-shake-03:
* Removed paragraph suggesting KMAC to be used in generating k in * Removed paragraph suggesting KMAC to be used in generating k in
Deterministric ECDSA. That should be RFC6979-bis. Deterministric ECDSA. That should be RFC6979-bis.
* Removed paragraph from Security Considerations that talks about * Removed paragraph from Security Considerations that talks about
randomness of k because we are using deterministric ECDSA. randomness of k because we are using deterministric ECDSA.
* Completed ASN.1 module and fixed KMAC ASN.1 based on Jim's * Completed ASN.1 module and fixed KMAC ASN.1 based on Jim's
feedback. feedback.
skipping to change at page 4, line 11 skipping to change at page 4, line 20
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 deterministic ECDSA, the message to be signed) in RSASSA-PSS and deterministic ECDSA,
message authentication code and as the mask generating function in message authentication code and as the mask generating function 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",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
document are to be interpreted as described in [RFC2119]. "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Identifiers 3. Identifiers
This section defines six new OIDs for using SHAKE128 and SHAKE256 in This section defines six new OIDs for using SHAKE128 and SHAKE256 in
CMS. CMS.
EDNOTE: If PKIX draft is standardized first maybe we should not say EDNOTE: If PKIX draft is standardized first maybe we should not say
the identifiers are new for the RSASSA-PSS and ECDSA. the identifiers are new for the RSASSA-PSS and ECDSA.
Two object identifiers for SHAKE128 and SHAKE256 hash functions are Two object identifiers for SHAKE128 and SHAKE256 hash functions are
skipping to change at page 6, line 24 skipping to change at page 6, line 39
Conforming implementations that process RSASSA-PSS and deterministic Conforming implementations that process RSASSA-PSS and deterministic
ECDSA with SHAKE signatures when processing CMS data MUST recognize ECDSA with SHAKE signatures when processing CMS data MUST recognize
the corresponding OIDs specified in Section 3. the corresponding OIDs specified in Section 3.
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. PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. [RFC4055] defines RSASSA-
PSS-params that are used to define the algorithms and inputs to the
algorithm. This specification does not use parameters because the
hash and mask generating algorithsm and trailer and salt are embedded
in the OID definition.
The hash algorithm to hash a message being signed and the hash and The hash algorithm to hash a message being signed and the hash and
the hash algorithm as the mask generation function used in RSASSA-PSS the hash algorithm as the mask generation function used in RSASSA-PSS
MUST be the same, SHAKE128 or SHAKE256 respectively. The output- MUST be the same, SHAKE128 or SHAKE256 respectively. The output-
length of the hash algorithm which hashes the message SHALL be 32 or length of the hash algorithm which hashes the message SHALL be 32 or
64 bytes respectively. 64 bytes respectively.
The mask generation function takes an octet string of variable length The mask generation function takes an octet string of variable length
and a desired output length as input, and outputs an octet string of and a desired output length as input, and outputs an octet string of
the desired length. In RSASSA-PSS with SHAKES, the SHAKEs MUST be the desired length. In RSASSA-PSS with SHAKES, the SHAKEs MUST be
skipping to change at page 7, line 34 skipping to change at page 7, line 50
accordance with all other recommendations in [X9.62] or [SEC1] if accordance with all other recommendations in [X9.62] or [SEC1] if
they have a stated policy that requires conformance to these they have a stated policy that requires conformance to these
standards. standards.
4.3. Public Keys 4.3. Public Keys
In CMS, the signer's public key algorithm identifiers are located in In CMS, the signer's public key algorithm identifiers are located in
the OriginatorPublicKey's algorithm attribute. the OriginatorPublicKey's algorithm attribute.
Conforming implementations MUST specify the algorithms explicitly by Conforming implementations MUST specify the algorithms explicitly by
using the OIDs specified in Section 3 when encoding RSASSA-PSS and using the OIDs specified in Section 3 when encoding RSASSA-PSS with
ECDSA with SHAKE public keys in CMS messages. The conventions for SHAKE public keys in CMS messages. The conventions and encoding for
RSASSA-PSS and ECDSA public keys algorithm identifiers are as RSASSA-PSS and ECDSA public keys algorithm identifiers are as
specified in [RFC3279], [RFC4055] and [RFC5480] , but we include them specified in Section 2.3 of [RFC3279], Section 3.1 of [RFC4055] and
below for convenience. Section 2.1 of [RFC5480].
4.3.1. RSASSA-PSS Public Keys
[RFC3279] defines the following OID for RSA AlgorithmIdentifier in
the SubjectPublicKeyInfo with NULL parameters.
rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1}
Additionally, when the RSA private key owner wishes to limit the use When the RSA private key owner wishes to limit the use of the public
of the public key exclusively to RSASSA-PSS, the AlgorithmIdentifier key exclusively to RSASSA-PSS, the AlgorithmIdentifier for RSASSA-PSS
for RSASSA-PSS defined in Section 3 can be used as the algorithm defined in Section 3 can be used as the algorithm attribute in the
attribute in the OriginatorPublicKey sequence. The identifier OriginatorPublicKey sequence. The identifier parameters, as
parameters, as explained in Section 3, MUST be absent. The RSASSA- explained in Section 3, MUST be absent. The RSASSA-PSS algorithm
PSS algorithm functions and output lengths are the same as defined in functions and output lengths are the same as defined in
Section 4.2.1. Section 4.2.1.
Regardless of what public key algorithm identifier is used, the RSA
public key, which is composed of a modulus and a public exponent,
MUST be encoded using the RSAPublicKey type [RFC4055]. The output of
this encoding is carried in the CMS publicKey bit string.
RSAPublicKey ::= SEQUENCE {
modulus INTEGER, -- n
publicExponent INTEGER -- e
}
4.3.2. ECDSA Public Keys
For ECDSA, the mandatory EC SubjectPublicKey is defined in
Section 2.1.1 and its syntax in Section 2.2 of [RFC5480]. We also
include them here for convenience:
id-ecPublicKey OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }
ECParameters ::= CHOICE {
namedCurve OBJECT IDENTIFIER
-- implicitCurve NULL
-- specifiedCurve SpecifiedECDomain
}
The ECParameters associated with the ECDSA public key in the signers
certificate SHALL apply to the verification of the signature.
4.4. Message Authentication Codes 4.4. Message Authentication Codes
KMAC message authentication code (KMAC) is specified in [SP800-185]. KMAC message authentication code (KMAC) is specified in [SP800-185].
In CMS, KMAC algorithm identifiers are located in the In CMS, KMAC algorithm identifiers are located in the
AuthenticatedData macAlgorithm field. The KMAC values are located in AuthenticatedData macAlgorithm field. The KMAC values are located in
the AuthenticatedData mac field. the AuthenticatedData mac field.
When the id-KmacWithSHAKE128 or id-KmacWithSHAKE256 algorithm When the id-KmacWithSHAKE128 or id-KmacWithSHAKE256 algorithm
identifier is used as the MAC algorithm identifier, the parameters identifier is used as the MAC algorithm identifier, the parameters
field is optional (absent or present). If absent, the SHAKE256 field is optional (absent or present). If absent, the SHAKE256
skipping to change at page 10, line 35 skipping to change at page 10, line 14
[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70,
RFC 5652, DOI 10.17487/RFC5652, September 2009, RFC 5652, DOI 10.17487/RFC5652, September 2009,
<https://www.rfc-editor.org/info/rfc5652>. <https://www.rfc-editor.org/info/rfc5652>.
[RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
"PKCS #1: RSA Cryptography Specifications Version 2.2", "PKCS #1: RSA Cryptography Specifications Version 2.2",
RFC 8017, DOI 10.17487/RFC8017, November 2016, RFC 8017, DOI 10.17487/RFC8017, November 2016,
<https://www.rfc-editor.org/info/rfc8017>. <https://www.rfc-editor.org/info/rfc8017>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[SHA3] National Institute of Standards and Technology, U.S. [SHA3] National Institute of Standards and Technology, U.S.
Department of Commerce, "SHA-3 Standard - Permutation- Department of Commerce, "SHA-3 Standard - Permutation-
Based Hash and Extendable-Output Functions", FIPS PUB 202, Based Hash and Extendable-Output Functions", FIPS PUB 202,
August 2015. August 2015.
[SP800-185] [SP800-185]
National Institute of Standards and Technology, "SHA-3 National Institute of Standards and Technology, "SHA-3
Derived Functions: cSHAKE, KMAC, TupleHash and Derived Functions: cSHAKE, KMAC, TupleHash and
ParallelHash. NIST SP 800-185", December 2016, ParallelHash. NIST SP 800-185", December 2016,
<http://nvlpubs.nist.gov/nistpubs/SpecialPublications/ <http://nvlpubs.nist.gov/nistpubs/SpecialPublications/
 End of changes. 16 change blocks. 
61 lines changed or deleted 44 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/