Skip to content

Clarify key format #201

@flavio

Description

@flavio

Preamble

I'm filing this issue as suggested by @trishankkarthik inside of this conversation. The comments relevant to this issue are this one and this one.

The issue

The TUF specification states that ecdsa-sha2-nistp256 keys should be PEM encoded (see here):

The "ecdsa-sha2-nistp256" format is:

{
  "keytype" : "ecdsa-sha2-nistp256",
  "scheme" : "ecdsa-sha2-nistp256",
  "keyval" : {
    "public" : PUBLIC
  }
}

PUBLIC
PEM format and a string.

However, the specification also states:

We define three keytypes below: "rsa", "ed25519", and "ecdsa-sha2-nistp256", but adopters can define and use any particular keytype, signing scheme, and cryptographic library.

The question is: are ecdsa-sha2-nistp256 expected to be encoded only with PEM, or can they be encoded with another format (like hex)?

Personally I agree with what @webern wrote on the linked issue, ecdsa-sha2-nistp256 should be encoded only with PEM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions