Network Working Group S. Josefsson
Internet-Draft SJD AB
Intended status: Informational N. Mavrogiannopoulos
Expires: March 26, 2016 Red Hat, Inc.
September 23, 2015

Using EdDSA in the Internet X.509 Public Key Infrastructure


This document specify algorithm identifiers and ASN.1 encoding formats for EdDSA digital signatures and subject public keys used in the Internet X.509 Public Key Infrastructure (PKIX) for Certificates and CRLs. Parameters for Ed25519 are defined.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on March 26, 2016.

Copyright Notice

Copyright (c) 2015 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 ( 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. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction

In [Ed25519], an elliptic curve signature system EdDSA was introduced, and a recommended choice of curve Ed25519 is chosen. EdDSA and Ed25519 was designed with performance and security in mind. Specification, test vectors and a sample implementation is available in [I-D.josefsson-eddsa-ed25519].

This RFC defines ASN.1 object identifiers for EdDSA for use in the Internet X.509 PKI [RFC5280], and parameters for Ed25519. This document serves a similar role as [RFC3279] does for RSA (and more), [RFC4055] for RSA-OAEP/PSS, and [RFC5758] for SHA2-based (EC)DSA.

2. Requirements Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

3. Subject Public Key Information Fields

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

The fields in SubjectPublicKeyInfo have the following meanings:

The AlgorithmIdentifier type, which is included for convenience, is defined as follows:

      AlgorithmIdentifier  ::=  SEQUENCE  {
        algorithm   OBJECT IDENTIFIER,
        parameters  ANY DEFINED BY algorithm OPTIONAL

The fields in AlgorithmIdentifier have the following meanings:

4. EdDSA Public Keys

Certificates conforming to [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.

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.

The id-EdDSAPublicKey OID is used for identifying EdDSA public keys.

       id-EdDSAPublicKey OBJECT IDENTIFIER ::= { }

The id-EdDSAPublicKey OID is intended to be used in the algorithm field of a value of type AlgorithmIdentifier.

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.

	EdDSAParameters ::= ENUMERATED { ed25519 (1),
	                                 sha512-ed25519 (2) }

The EdDSAParameters enumeration may be extended in the future.

The value 'ed25519' means the set of "pure" EdDSA parameters associated with Ed25519, including internal hash function (SHA512) and curve. The value 'sha512-ed25519' means that the SHA512 algorithm will be used as the prehash parameter and the hash function for the signature. For the definitions see [EdDSA-prehash].

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.

5. Key Usage Bits

The intended application for the key MAY be indicated in the keyUsage certificate extension.

If the keyUsage extension is present in an end-entity certificate that conveys an EdDSA public key with the id-EdDSAPublicKey object identifier, then the keyUsage extension MUST contain one or both of the following values:

       nonRepudiation; and

If the keyUsage extension is present in a certification authority certificate that conveys an EdDSA public key with the id-EdDSAPublicKey object identifier, then the keyUsage extension MUST contain one or more of the following values:

       keyCertSign; and

6. EdDSA Signatures

Certificates and CRLs conforming to [RFC5280] may be signed with any public key signature algorithm. The certificate or CRL indicates the algorithm through an algorithm identifier which appears in the signatureAlgorithm field within the Certificate or CertificateList. This algorithm identifier is an OID and has optionally associated parameters. For illustration the Certificate structure is reproduced here:

   Certificate  ::=  SEQUENCE  {
        tbsCertificate       TBSCertificate,
        signatureAlgorithm   AlgorithmIdentifier,
        signatureValue       BIT STRING  }

Recall the definition of the AlgorithmIdentifier type:

      AlgorithmIdentifier  ::=  SEQUENCE  {
        algorithm   OBJECT IDENTIFIER,
        parameters  ANY DEFINED BY algorithm OPTIONAL

This document identify an AlgorithmIdentifier OID for EdDSA signatures. No parameters are defined. The EdDSA parameters follow from the public-key parameters.

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 4.3 of [I-D.josefsson-eddsa-ed25519]. This signature value is then ASN.1 encoded as a BIT STRING and included in the Certificate or CertificateList in the signatureValue field.

The id-EdDSASignature OID is used for identifying EdDSA signatures.

       id-EdDSASignature OBJECT IDENTIFIER ::= { }

The id-EdDSASignature OID is intended to be used in the algorithm field of a value of type AlgorithmIdentifier. The parameters field MUST be absent. To further clarify how to encode the parameters field, due to historical misunderstandings in this area, it MUST NOT have an ASN.1 type NULL.

7. Human Readable Algorithm Names

For the purpose of consistent cross-implementation naming this section establish 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 example, if a naming convention is to not use hyphen ("-") then instead of "SHA512-Ed25519" the string "SHA512Ed25519" could be used.

Use the string "EdDSA" when referring to a public key or signature when the parameter set is not known or relevant.

When the EdDSAParameters value is known, use a more specific string. For the ed25519(1) value use the string "Ed25519". For the sha512-ed25519(2) value use the string "SHA512-Ed25519".

8. Examples

This section contains illustrations of EdDSA public keys and certificates, illustrating parameter choices.

8.1. Example SHA512-Ed25519 Public Key

An example of a SHA512-Ed25519 public key:

      Public Key Information:
          Public Key Algorithm: EdDSA
          Algorithm Security Level: High (256 bits)
          Parameters: SHA512-Ed25519

      Public Key Usage:
      Public Key ID: 9b1f5eeded043385e4f7bc623c5975b90bc8bb3b
      -----BEGIN PUBLIC KEY-----
      -----END PUBLIC KEY-----

8.2. Example SHA512-Ed25519 Certificate

An example of a PKIX certificate using SHA512-Ed25519 would be:

      X.509 Certificate Information:
          Version: 3
          Serial Number (hex): 5601474a2a8dc326
          Issuer: CN=Test Ed25519-SHA512 certificate
              Not Before: Tue Sep 22 12:19:24 UTC 2015
              Not After: Fri Dec 31 23:59:59 UTC 9999
          Subject: CN=Test Ed25519-SHA512 certificate
          Subject Public Key Algorithm: SHA512-EdDSA
          Algorithm Security Level: High (256 bits)
              Basic Constraints (critical):
                  Certificate Authority (CA): FALSE
              Key Usage (critical):
                  Digital signature.
              Subject Key Identifier (not critical):
          Signature Algorithm: SHA512-Ed25519
      Other Information:
          SHA1 fingerprint:
          SHA256 fingerprint:
          Public Key ID:
          Public key's random art:
              |              .  |
              |             o ..|
              |              o.=|
              |          . .  +=|
              |        S  o .+oo|
              |         o  o.++o|
              |        o ...*.o.|
              |         o Eo.oo |
              |          ooo ..o|
      -----BEGIN CERTIFICATE-----
      -----END CERTIFICATE-----

8.3. Example SHA512-Ed25519 Private Key

An example of a SHA512-Ed25519 private key:

      Public Key Info:
          Public Key Algorithm: EdDSA
          Key Security Level: High (256 bits)
      parameters:    SHA512-Ed25519
      private key:
      Public Key ID: 9B:1F:5E:ED:ED:04:33:85:E4:F7:BC:62:3C:59:75:B9:0B:C8:BB:3B
      Public key's random art:
      |              .  |
      |             o ..|
      |              o.=|
      |          . .  +=|
      |        S  o .+oo|
      |         o  o.++o|
      |        o ...*.o.|
      |         o Eo.oo |
      |          ooo ..o|
      -----END EdDSA PRIVATE KEY-----

9. Acknowledgements

Text and/or inspiration were drawn from [RFC5280], [RFC3279], [RFC4055], [RFC5480], and [RFC5639].

The following people discussed the document and provided feedback: Klaus Hartke, Ilari Liusvaara, Erwann Abalea, Rick Andrews, Rob Stradling.

A big thank you to Symantec for kindly donating the OIDs used in this draft.

10. IANA Considerations


11. Security Considerations

The security considerations of [RFC5280] and [I-D.josefsson-eddsa-ed25519] apply accordingly.

A common misconception may be that a Ed25519 public key can be used to create SHA512-Ed25519 signatures, or vice versa. This leads to cross-key attacks, and is not permitted.

12. References

12.1. Normative References

[I-D.josefsson-eddsa-ed25519] Josefsson, S. and N. Moller, "EdDSA and Ed25519", Internet-Draft draft-josefsson-eddsa-ed25519-03, May 2015.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R. and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008.

12.2. Informative References

[RFC3279] Bassham, L., Polk, W. and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April 2002.
[RFC4055] Schaad, J., Kaliski, B. and R. Housley, "Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 4055, DOI 10.17487/RFC4055, June 2005.
[RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R. and T. Polk, "Elliptic Curve Cryptography Subject Public Key Information", RFC 5480, DOI 10.17487/RFC5480, March 2009.
[RFC5639] Lochter, M. and J. Merkle, "Elliptic Curve Cryptography (ECC) Brainpool Standard Curves and Curve Generation", RFC 5639, DOI 10.17487/RFC5639, March 2010.
[RFC5758] Dang, Q., Santesson, S., Moriarty, K., Brown, D. and T. Polk, "Internet X.509 Public Key Infrastructure: Additional Algorithms and Identifiers for DSA and ECDSA", RFC 5758, DOI 10.17487/RFC5758, January 2010.
[Ed25519] Bernstein, J., Duif, , Lange, , Schwabe, and Yang, "Ed25519: High-speed high-security signatures", WWW, September 2011.
[EdDSA-prehash] Bernstein, J., Josefsson, , Lange, , Schwabe, and Yang, "EdDSA for more curves", WWW, July 2015.

Authors' Addresses

Simon Josefsson SJD AB EMail:
Nikos Mavrogiannopoulos Red Hat, Inc. EMail: