Independent Submission N. Mavrogiannopoulos Request for Comments: 8479 Red Hat Category: Informational September 2018 ISSN: 2070-1721
Storing Validation Parameters in PKCS#8
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.
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 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).