-
Notifications
You must be signed in to change notification settings - Fork 57
Description
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.