<title abbrev="Safe curves for X.509" abbrev="Safe Curves for X.509">
<-- Remove PH
Algorithm Identifiers for Ed25519, Ed25519ph, Ed448, Ed448ph, X25519 and X448 for use in the Internet X.509 Public Key Infrastructure
-->
Algorithm Identifiers for Ed25519, Ed448, X25519 and X448 for use in the Internet X.509 Public Key Infrastructure
Algorithm Identifiers for Ed25519, Ed448, X25519, and X448 for Use in the Internet X.509 Public Key Infrastructure
This document specifies algorithm identifiers and ASN.1 encoding formats for Elliptic Curve constructs using the curve25519 and curve448 curves.
<-- Remove ph
The signature algorithms covered are Ed25519, Ed25519ph, Ed448 and Ed448ph.
-->
The signature algorithms covered are Ed25519 and Ed448.
The key agreement algorithm covered are X25519 and X448.
The encoding for Public Key, Private Key and EdDSA digital signature structures is provided.
This document specifies algorithm identifiers and ASN.1 encoding formats for elliptic curve constructs using the curve25519 and curve448 curves. The signature algorithms covered are Ed25519 and Ed448. The key agreement algorithms covered are X25519 and X448. The encoding for public key, private key, and Edwards-curve Digital Signature Algorithm (EdDSA) structures is provided.
, the elliptic curves curve25519 and curve448 are described. They are designed with performance and security in mind. The curves may be used for Diffie-Hellman and digital signature operations.
, the elliptic curves curve25519 and curve448 are described. They are designed with performance and security in mind. The curves may be used for Diffie-Hellman and Digital Signature operations.
describes the operations on these curves for the Diffie-Hellman operation. A convention has developed that when these two curves are used with the Diffie-Hellman operation, they are referred to as X25519 and X448. This RFC defines the ASN.1 Object Identifiers (OIDs) for the operations X25519 and X448 along with the associated parameters. The use of these OIDs is described for public and private keys.
the elliptic curve signature system Edwards-curve Digital Signature Algorithm (EdDSA) is described along with a recommendation for the use of the curve25519 and curve448. EdDSA has defined two modes: the PureEdDSA mode without prehashing and the HashEdDSA mode with prehashing. The convention used for identifying the algorithm/curve combinations is to use "Ed25519" and "Ed448" for the PureEdDSA mode. This document does not provide the conventions needed for the prehash versions of the signature algorithm. The use of the OIDs is described for public keys, private keys and signatures.
the elliptic curve signature system Edwards-curve Digital Signature Algorithm (EdDSA) is described along with a recommendation for the use of the curve25519 and curve448. EdDSA has defined two modes, the PureEdDSA mode without pre-hashing, and the HashEdDSA mode with pre-hashing.
<-- Remove pre-hash
The Ed25519ph and Ed448ph algorithm definitions specify the one-way hash function that is used for pre-hashing.
The convention used for identifying the algorithm/curve combinations are to use the Ed25519 and Ed448 for the PureEdDSA mode, with Ed25519ph and Ed448ph for the HashEdDSA mode.
-->
The convention used for identifying the algorithm/curve combinations is to use "Ed25519" and "Ed448" for the PureEdDSA mode.
The document does not provide the conventions needed for the pre-hash versions of the signature algorithm.
The use of the OIDs is described for public keys, private keys and signatures.
additionally defines the concept of a context. Contexts can be used to differentiate signatures generated for different purposes with the same key. The use of contexts is not defined in this document for the following reasons:
additionally defined the concept of a context. Contexts can be used to differentiate signatures generated for different purposes with the same key. The use of contexts is not defined in this document for the following reasons:
<list style="symbols">
<t>
The current implementations of Ed25519 do not support the use of contexts, thus if specified it will potentially delay the use of these algorithms further.
The current implementations of Ed25519 do not support the use of contexts; thus, if specified, it will potentially delay the use of these algorithms further.
</t>
<t>
The EdDSA algorithms are the only IETF algorithms that currently support the use of contexts, however there is a possibility that there will be confusion between which algorithms need to have separate keys and which do not. This may result in a decrease of security for those other algorithms.
EdDSA is the only IETF algorithm that currently supports the use of contexts; however, there is a possibility that there will be confusion between which algorithms need to have separate keys and which do not. This may result in a decrease of security for those other algorithms.
</t>
<t>
There are still ongoing discussions among the cryptographic community about how effective the use of contexts is for preventing attacks.
</t>
<t>
There needs to be discussions about the correct way to identify when context strings are to be used. It is not clear if different OIDs should be used for different contexts, or the OID should merely note that a context string needs to be provided.
There needs to be discussions about the correct way to identify when context strings are to be used. It is not clear if different OIDs should be used for different contexts or the OID should merely note that a context string needs to be provided.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14
can convey a public key for any public key algorithm. The certificate indicates the algorithm through an algorithm identifier. An algorithm identifier consists of an OID and optional parameters.
can convey a public key for any public key algorithm. The certificate indicates the algorithm through an algorithm identifier. This algorithm identifier is an OID and optionally associated parameters.
</t>
<t>
The AlgorithmIdentifier type, which is included for convenience, is defined as follows:
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
</artwork>
</figure>
<t>
The fields in AlgorithmIdentifier have the following meanings:
</t>
<t>
<list style="symbols">
<t>
algorithm identifies the cryptographic algorithm with an object identifier. Four such OIDs are defined below.
</t>
<t>
parameters, which are optional, are the associated parameters for the algorithm identifier in the algorithm field.
</t>
</list>
</t>
<t>
<-- RFC Editor: I have been told that the following three sentences should be joined together, I tend to think
that they are correct as separate items but it is something that a copy editor should look at -->
In this document we define four new OIDs for identifying the different curve/algorithm pairs.
The curves being curve25519 and curve448.
The algorithms being ECDH and EdDSA in pure mode.
<-- and EdDSA in pre-hash mode. -->
For all of the OIDs, the parameters MUST be absent.
In this document, we define four new OIDs for identifying the different curve/algorithm pairs: the curves being curve25519 and curve448 and the algorithms being ECDH and EdDSA in pure mode. For all of the OIDs, the parameters MUST be absent.
</t>
<t>
It is possible to find systems that require the parameters to be present. This can be either due to a defect in the original 1997 syntax or a programming error where developers never got input where this was not true. The optimal solution is to fix these systems, where this is not possible the problem needs to be restricted to that subsystem and not propigated to the internet.
It is possible to find systems that require the parameters to be present. This can be due to either a defect in the original 1997 syntax or a programming error where developers never got input where this was not true. The optimal solution is to fix these systems; where this is not possible, the problem needs to be restricted to that subsystem and not propagated to the Internet.
</t>
<t>
The same algorithm identifiers are used for identifying a public key, identifying a private key and identifying a signature (for the two EdDSA related OIDs). Additional encoding information is provided below for each of these locations.
The same algorithm identifiers are used for identifying a public key, a private key, and a signature (for the two EdDSA related OIDs). Additional encoding information is provided below for each of these locations.
<--
<t>The OID id-Curve25519 refers to Curve25519. The OID
id-Curve448 refers to Curve448. Both curves are described in
<xref target="RFC7748"/>. The OIDs id-Curve25519ph and
id-Curve448ph refers to Curve25519 and Curve448 when used with
pre-hashing as Ed25519ph and Ed448ph described in <xref
target="RFC8032"/>.</t>
<t>The public key value encoded into the ECPoint value is the
raw binary values described in <xref target="RFC7748"/>.</t>
-->
</section>
<section title="Subject Public Key Fields" numbered="true" toc="default">
<t>
In the X.509 certificate, the subjectPublicKeyInfo field has the SubjectPublicKeyInfo type, which has the following ASN.1 syntax:
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING
}
</artwork>
</figure>
<t>
The fields in SubjectPublicKeyInfo have the following meanings:
</t>
<t>
<list style="symbols">
<t>
algorithm is the algorithm identifier and parameters for the public key (see above).
</t>
<t>
subjectPublicKey contains the byte stream of the public key. The algorithms defined in this document always encode the public key as an exact multiple of 8-bits.
subjectPublicKey contains the byte stream of the public key. The algorithms defined in this document always encode the public key as an exact multiple of 8 bits.
define the public key value as being a byte string. It should be noted that the public key is computed differently for each of these documents; thus, the same private key will not produce the same public key.
define the public key value as being a byte string. It should be noted that the public key is computed differently for each of these documents, thus the same private key will not produce the same public key.
</t>
<t>
The following is an example of a public key encoded using the textual encoding defined in
The following is an example of a public key encoded using the textual encoding defined in
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE=
-----END PUBLIC KEY-----
</artwork>
</figure>
</section>
<--
<section title="EdDSA Public Keys">
<t>Certificates conforming to <xref target="RFC5280"/> may
convey a public key for any public key algorithm. The
certificate indicates the algorithm through an algorithm
identifier. This algorithm identifier is an OID and optionally
associated parameters.</t>
<t>This section identify the OID and parameters for the EdDSA
algorithm. Conforming CAs MUST use the identified OIDs when
issuing certificates containing EdDSA public keys. Conforming
applications supporting EdDSA MUST, at a minimum, recognize the
OID identified in this section.</t>
<t>The id-EdDSAPublicKey OID is used for identifying EdDSA
public keys.</t>
<t>The id-EdDSAPublicKey OID is intended to be used in the
algorithm field of a value of type AlgorithmIdentifier.</t>
<t>EdDSA public keys use the parameter field to specify the
particular instantiation of EdDSA parameters. The parameters
field have the ASN.1 type EdDSAParameters as follows.</t>
<t>The EdDSAParameters enumeration may be extended in the
future.</t>
<t>The "ed25519" and "ed448" values correspond to the PureEdDSA
variants, and the "ed25519ph" and "ed448ph" values correspond to
the HashEdDSA variants, as discussed in <xref
target="RFC8032"/>.</t>
<t>The raw binary EdDSA public key is encoded directly in the
subjectPublicKey BIT STRING object. Note that unlike some other
schemes, there is no additional OCTET STRING encoding step.</t>
If the keyUsage extension is present in an end-entity
<-- Remove pre-hash
certificate that indicates id-EdDSA25519, id-EdDSA25519ph, id-EdDSA448 or id-EdDSA448ph
-->
certificate that indicates id-Ed25519 or id-Ed448, then the keyUsage extension
MUST contain one or both of the following values:
If the keyUsage extension is present in an end-entity certificate that indicates id-Ed25519 or id-Ed448, then the keyUsage extension MUST contain one or both of the following values:
If the keyUsage extension is present in a certification authority certificate that indicates id-Ed25519 or id-Ed448, then the keyUsage extension MUST contain one or more of the following values:
nonRepudiation;
digitalSignature;
keyCertSign; and
cRLSign.
</artwork>
</figure>
<-- Remove pre-hash
<t>
CAs MUST NOT use the pre-hash versions of the EdDSA algorithms for the creation of certificates or CRLs.
This is implied by the fact that those algorithms are not listed in the previous paragraph.
Additionally OCSP responders SHOULD NOT use the pre-hash versions of the EdDSA algorithms when generating OCSP responses.
No restriction is placed on generation of OCSP requests.
</t>
<t>
AAs MUST NOT use the pre-hash versions of the EdDSA algorithms for the creation of attribute certificates or attribute CRLs <xref target="RFC5755"/>.
</t>
<t>
The decision to require the use of pure mode balances the higher security of having a single failure point against the possibility that constrained devices, such as Hardware Security Modules (HSMs), may be unable to check signatures on CRLs due to the amount of memory required to hold the entire CRL in memory at one time.
This concern can be addressed by CAs using CRL distribution points, combined with segmenting the certificates issued so that the length of any segmented CRL is not "too long" even if a large percentage of the certificates are revoked.
The definition of "too long" is going to be highly dependent on what constrained device is being used, it can be on the order of single or low double digit kilobytes.
</t>
-->
Signatures can be placed in a number of different ASN.1 structures. The top level structure for a certificate is given below as being illustrative of how signatures are frequently encoded with an algorithm identifier and a location for the signature.
The same algorithm identifiers are used for signatures as are used for public keys. When used to identify signature algorithms, the parameters MUST be absent.
</t>
<t>
The data to be signed is prepared for EdDSA. Then, a private key operation is performed to generate the signature value. This value is the opaque value ENC(R) || ENC(S) described in section 3.3 of
The data to be signed is prepared for EdDSA. Then, a private key operation is performed to generate the signature value. This value is the opaque value ENC(R) || ENC(S) described in Section 3.3 of
. The octet string representing the signature is encoded directly in the BIT STRING without adding any additional ASN.1 wrapping. For the Certificate structure, the signature value is wrapped in the "signatureValue" BIT STRING field.
</t>
<-- Remove Prehash
<t>
When the pre-hash versions of the EdDSA signature algorithms are used, the hash function used for the pre-hash is defined by the algorithm.
This means that the pre-hash function is implicitly included in the algorithm identifier rather than being explicit as done in <xref target="RFC3279"/>.
</t>
-->
describes how to encode a private key in a structure that both identifies what algorithm the private key is for and allows for the public key and additional attributes about the key to be included as well. For illustration, the ASN.1 structure OneAsymmetricKey is replicated below. The algorithm-specific details of how a private key is encoded are left for the document describing the algorithm itself.
describes how to encode a private key in a structure that both identifies what algorithm the private key is for, but allows for the public key and additional attributes about the key to be included as well. For illustration, the ASN.1 structure OneAsymmetricKey is replicated below. The algorithm specific details of how a private key is encoded is left for the document describing the algorithm itself.
For the keys defined in this document, the private key is always an opaque byte sequence. The ASN.1 type CurvePrivateKey is defined in this document to hold the byte sequence. Thus when encoding a OneAsymmetricKey object, the private key is wrapped in an CurvePrivateKey object and wrapped by the OCTET STRING of the "privateKey" field.
For the keys defined in this document, the private key is always an opaque byte sequence. The ASN.1 type CurvePrivateKey is defined in this document to hold the byte sequence. Thus, when encoding a OneAsymmetricKey object, the private key is wrapped in a CurvePrivateKey object and wrapped by the OCTET STRING of the "privateKey" field.
To encode a EdDSA, X25519 or X448 private key, the "privateKey" field will hold the encoded private key. The "privateKeyAlgorithm" field uses the AlgorithmIdentifier structure. The structure is encoded as defined above. If present, the "publicKey" field will hold the encoded key as defined in
To encode an EdDSA, X25519, or X448 private key, the "privateKey" field will hold the encoded private key. The "privateKeyAlgorithm" field uses the AlgorithmIdentifier structure. The structure is encoded as defined above. If present, the "publicKey" field will hold the encoded key as defined in
The following example, in addition to encoding the private key, additionally has an attribute included as well as the public key. As with the prior example, the textual encoding defined in
The following example, in addition to encoding the private key, has an attribute included as well as the public key. As with the prior example, the textual encoding defined in
. This means that they will not accept a private key structure that contains the public key field. This means a balancing act needs to be done between being able to do a consistency check on the key pair and widest ability to import the key.
. This means that they will not accept a private key structure which contains the public key field. This means a balancing act needs to be done between being able to do a consistency check on the key pair and widest ability to import the key.
For the purpose of consistent cross-implementation naming, this section establishes human readable names for the algorithms specified in this document. Implementations SHOULD use these names when referring to the algorithms. If there is a strong reason to deviate from these names -- for example, if the implementation has a different naming convention and wants to maintain internal consistency -- it is encouraged to deviate as little as possible from the names given here.
For the purpose of consistent cross-implementation naming, this section establishes human-readable names for the algorithms specified in this document. Implementations SHOULD use these names when referring to the algorithms. If there is a strong reason to deviate from these names -- for example, if the implementation has a different naming convention and wants to maintain internal consistency -- it is encouraged to deviate as little as possible from the names given here.
</t>
<t>
Use the string "ECDH" when referring to a public key of type "X25519" or "X448" when the curve is not known or relevant.
</t>
<t>
When the curve is known, use the more specific string of "X25519" or "X448".
</t>
<t>
Use the string "EdDSA" when referring to a signing public key or signature when the curve is not known or relevant.
</t>
<t>
When the curve is known, use a more specific string. For the id-Ed25519 value use the string "Ed25519".
<-- Remove pre-hash
For
the id-EdDSA25519ph value use the string "Ed25519ph". -->
For id-Ed448
use "Ed448".
<-- Remvoe prehash For id-EdDSA448ph use "Ed448ph". -->
When the curve is known, use a more specific string. For the id-Ed25519 value use the string "Ed25519". For id-Ed448, use "Ed448".
Public Key Information:
Public Key Algorithm: Ed25519
Algorithm Security Level: High
Public Key Usage:
Public Key ID: 9b1f5eeded043385e4f7bc623c5975b90bc8bb3b
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE=
-----END PUBLIC KEY-----
The following people discussed the document and provided feedback: Klaus Hartke, Ilari Liusvaara, Erwann Abalea, Rick Andrews, Rob Stradling, James Manger, Nikos Mavrogiannopoulos, Russ Housley, David Benjamin, Brian Smith, and Alex Wilson.
</t>
<t>
A big thank you to Symantec for kindly donating the OIDs used in this draft.
The procedures for going from a private key to a public key are different for when used with Diffie-Hellman and when used with Edwards Signatures. This means that the same public key cannot be used for both ECDH and EdDSA.
The procedures for going from a private key to a public key are different when used with Diffie-Hellman versus when used with Edwards Signatures. This means that the same public key cannot be used for both ECDH and EdDSA.
</t>
<--
<t>
In the original design of Ed25519 signatures, there was a known attack between the pure and the pre-hash version of the signatures.
This has since been corrected in the final version of the design.
The initial problem meant that there was a known attack, and therefore a known reason to forbid the use of Ed25519 keys with the Ed25519ph signature scheme and visa versa.
With the change in the design this attack has been prevented.
This does not mean that the same Ed25519 key should be used with both schemes, there still may be attacks where collisions can be found.
For this reason, the same keys are not to be used for the pure and pre-hash versions of the scheme.
This applies to both curve 25519 and curve 448.
</t>
-->
In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.
This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]
This document specifies the syntax and semantics for the Subject Public Key Information field in certificates that support Elliptic Curve Cryptography. This document updates Sections 2.3.5 and 5, and the ASN.1 module of "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279. [STANDARDS-TRACK]
This memo specifies two elliptic curves over prime fields that offer a high level of practical security in cryptographic applications, including Transport Layer Security (TLS). These curves are intended to operate at the ~128-bit and ~224-bit security level, respectively, and are generated deterministically based on a list of required properties.
This document describes elliptic curve signature scheme Edwards-curve Digital Signature Algorithm (EdDSA). The algorithm is instantiated with recommended parameters for the edwards25519 and edwards448 curves. An example implementation and test vectors are provided.
This document defines the syntax for private-key information and a content type for it. Private-key information includes a private key for a specified public-key algorithm and a set of attributes. The Cryptographic Message Syntax (CMS), as defined in RFC 5652, can be used to digitally sign, digest, authenticate, or encrypt the asymmetric key format content type. This document obsoletes RFC 5208. [STANDARDS-TRACK]
RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.
This document specifies algorithm identifiers and ASN.1 encoding formats for digital signatures and subject public keys used in the Internet X.509 Public Key Infrastructure (PKI). Digital signatures are used to sign certificates and certificate revocation list (CRLs). Certificates include the public key of the named subject. [STANDARDS-TRACK]
Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
This document supplements RFC 3279. It describes the conventions for using the RSA Probabilistic Signature Scheme (RSASSA-PSS) signature algorithm, the RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP) key transport algorithm and additional one-way hash functions with the Public-Key Cryptography Standards (PKCS) #1 version 1.5 signature algorithm in the Internet X.509 Public Key Infrastructure (PKI). Encoding formats, algorithm identifiers, and parameter formats are specified. [STANDARDS-TRACK]
This memo proposes several elliptic curve domain parameters over finite prime fields for use in cryptographic applications. The domain parameters are consistent with the relevant international standards, and can be used in X.509 certificates and certificate revocation lists (CRLs), for Internet Key Exchange (IKE), Transport Layer Security (TLS), XML signatures, and all applications or protocols based on the cryptographic message syntax (CMS). This document is not an Internet Standards Track specification; it is published for informational purposes.
This document describes and discusses the textual encodings of the Public-Key Infrastructure X.509 (PKIX), Public-Key Cryptography Standards (PKCS), and Cryptographic Message Syntax (CMS). The textual encodings are well-known, are implemented by several applications and libraries, and are widely deployed. This document articulates the de facto rules by which existing implementations operate and defines them so that future implementations can interoperate.
</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7468"/>
<seriesInfo name="DOI" value="10.17487/RFC7468"/>
</reference>
<-- &iana;draft-schaad-curdle-oid-registry-03; in AUTH48 as RFC8411 -->
When the Curdle Security Working Group was chartered, a range of object identifiers was donated by DigiCert, Inc. for the purpose of registering the Edwards Elliptic Curve key agreement and signature algorithms. This donated set of OIDs allowed for shorter values than would be possible using the existing S/MIME or PKIX arcs. This document describes the range of identifiers that were assigned in that donated range, transfers control of that range to IANA, and establishes IANA allocation policies for any future assignments within that range.
There are a number of things that need to be dealt with when a new key part is decoded and imported into the system. A partial list of these includes:
<list style="symbols">
<-- [rfced] Please clarify this sentence. Does it mean the following or otherwise?
Current:
This was an incorrect copy of the structure from [RFC5958],
which was corrected before publication.
Perhaps:
This was a copy of an incorrect structure that was in
the Internet-Draft; the structure is correct in [RFC5958].
Or:
This was a copy of incorrect structure that was in a draft
of the document that later became [RFC5958]; the structure is
correct in the RFC.
-->
<t>
ASN.1 encoding errors: Two items are highlighted here. First, the use of an OCTET STRING rather than a BIT STRING for the public key. This was an incorrect copy of the structure from
ASN.1 encoding errors: Two items are highlighted here. First, the use of an OCTET STRING rather than a BIT STRING for the public key. The use of OCTET STRING was a copy error that existed in a previous draft version of this document; the structure is correct in
. However, any early implementation may have this wrong. Second, the value of the version field is required to be 0 if the publicKey is absent and 1 if present. This is called out in
which was corrected before publication. However, any early implementation may have this wrong. Second, the value of the version field is required to be 0 if the publicKey is absent and 1 if present. This is called out in
have formatting requirements for keys that need to be enforced. In some cases, the enforcement is done at the time of importing, for example, doing masking or a mod p operation. In other cases, the enforcement is done by rejecting the keys and having an import failure.
have formatting requirements for keys that need to be enforced. In some cases the enforcement is done at the time of importing, for example doing masking or a mod p operation. In other cases the enforcement is done by rejecting the keys and having an import failure.
</t>
<t>
Key mismatch errors: If a public key is provided, it may not agree with the private key either because it is wrong or the wrong algorithm was used.
Key mismatch errors: If a public key is provided, it may not agree with the private key because either it is wrong or the wrong algorithm was used.
</t>
</list>
</t>
<t>
Some systems are also going to be stricter on what they accept. As stated in
, BER decoding of OneAsymmetricKey objects is a requirement for compliance. Despite this requirement, some acceptors will only decode DER formats. The following is a BER encoding of a private key; it is valid, but it may not be accepted by many systems.
, BER decoding of OneAsymmetricKey objects is a requirement for compliance. Despite this requirement, some acceptors will only decode DER formats. The following is a BER encoding of a private key, as such is is valid, but it may not be accepted by many systems.
What follows here is a brief sampling of some incorrect keys.
</t>
<t>
In the following example, the private key does not match the masking requirements for X25519. For this example the top bits are set to zero and the bottom three bits are set to 001.
In the following example, the private key does not match the masking requirements for X25519. For this example, the top bits are set to zero and the bottom three bits are set to 001.
In the following examples, the key is the wrong length because an all zero byte has been removed. In one case the first byte has been removed, in the other case the last byte has been removed.
In the following examples, the key is the wrong length because an all-zero byte has been removed. In one case, the first byte has been removed; in the other case, the last byte has been removed.
The following people discussed the document and provided feedback: Klaus Hartke, Ilari Liusvaara, Erwann Abalea, Rick Andrews, Rob Stradling, James Manger, Nikos Mavrogiannopoulos, Russ Housley, David Benjamin, Brian Smith, and Alex Wilson.
</t>
<t>
A big thank you to Symantec for kindly donating the OIDs used in this document.