Independent Submission N. Mavrogiannopoulos Request for Comments: 8479 Red Hat Category: Informational September 2018 ISSN: 2070-1721
Storing Validation Parameters in PKCS#8
Abstract
This memo describes a method of storing parameters needed for private-key validation in the Private-Key Information Syntax Specification as defined in PKCS#8 format (RFC 5208). It is equally applicable to the alternative implementation of the Private-Key Information Syntax Specification as defined in RFC 5958.
The approach described in this document encodes the parameters under a private enterprise extension and does not form part of a formal standard.
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.
This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor has chosen to publish this document at its discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard; see Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8479.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) 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.
Mavrogiannopoulos Informational [Page 1]
RFC 8479 Storing Validation Parameters in PKCS#8 September 2018
RSA or DSA private keys generated using the Shawe-Taylor prime generation algorithm described in [FIPS186-4] allow for parameter validation, i.e., they verify whether the primes are actually prime and were correctly generated. That is done by generating the parameters from a known seed and a selected hash algorithm.
Storing these parameters in a private-key format such as the RSA Private-Key Syntax from PKCS#1 [RFC8017] or common representations for DSA private keys does not allow information needed for validation to be attached to the parameters. The purpose of this document is to describe such a method using the Private-Key Information Syntax Specification as defined in [RFC5208] and the alternative specification described in [RFC5958].
The approach described in this document encodes the parameters under a private enterprise extension and does not form part of a formal standard. The encoding can be used as is or as the basis for a standard at a later time.
The information related to the validation parameters is stored as an attribute in the PrivateKeyInfo structure. The attribute is identified by the id-attr-validation-parameters object identifier and contains as AttributeValue a single ValidationParams structure.
The algorithm identifier in ValidationParams should be a hash algorithm identifier for the methods described in [FIPS186-4]. The ValidationParams sequence must be DER encoded [ITU-T-X690].
Mavrogiannopoulos Informational [Page 3]
RFC 8479 Storing Validation Parameters in PKCS#8 September 2018
The following structure contains an RSA key generated using the algorithm from Section B.3.3 of [FIPS186-4], with SHA2-384 hash. The seed used is 8af4328c87bebcec31e303b8f5537effcb6a91d947084d99a369823b36f01462 (hex encoded).
For compatibility, it is recommended that implementations following this document support generation and validation using the SHA2-384 hash algorithm.
The extension defined in this document is applicable both to the Private-Key Information Syntax Specification (PKCS#8) [RFC5208] and to Asymmetric Key Packages [RFC5958].
Mavrogiannopoulos Informational [Page 4]
RFC 8479 Storing Validation Parameters in PKCS#8 September 2018
[FIPS186-4] National Institute of Standards and Technology, "Digital Signature Standard (DSS)", FIPS PUB 186-4, DOI 10.6028/NIST.FIPS.186-4, July 2013.
[ITU-T-X680] International Telecommunication Union, "Abstract Syntax Notation One (ASN.1): Specification of basic notation", ITU-T Recommendation X.680, July 2002, <https://www.itu.int/ITU-T/studygroups/com17/languages/ X.680-0207.pdf>.
[ITU-T-X690] International Telecommunication Union, "ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ITU-T Recommendation X.690, July 2002, <https://www.itu.int/ITU-T/studygroups/com17/languages/ X.690-0207.pdf>.
This appendix provides non-normative ASN.1 definitions for the structures described in this specification using ASN.1 as defined in [ITU-T-X680] and [RFC5912].