Skip to content

Commit a73c171

Browse files
committed
Update keytype for ecdsa keys and clarify references
We claim that the spec is just documenting the signature _schemes_ from the reference implementation, but that we define three _keytypes_ within the spec. This change first updates the _keytypes_ to match the reference implementation (we have defaulted to a generic "ecdsa" keytype since secure-systems-lab/securesystemslib#267). Further, we update the specification to clarify that within we are documenting the keytypes and schemes from the reference implementation, and that we recommend implementing these keytypes and schemes as specified. Signed-off-by: Joshua Lock <[email protected]>
1 parent e514e81 commit a73c171

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

tuf-spec.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ All <dfn>KEY</dfn>s have the format:
560560
::
561561
A string denoting a public key signature system, such as <a
562562
for="keytype">"rsa"</a>, <a for="keytype">"ed25519"</a>, and <a
563-
for="keytype">"ecdsa-sha2-nistp256"</a>.
563+
for="keytype">"ecdsa"</a>.
564564

565565
: <dfn>SCHEME</dfn>
566566
::
@@ -572,9 +572,21 @@ All <dfn>KEY</dfn>s have the format:
572572
::
573573
A dictionary containing the public portion of the key.
574574

575-
The reference implementation defines three signature schemes, although TUF
576-
is not restricted to any particular signature scheme, key type, or
577-
cryptographic library:
575+
The reference implementation defines three <a>KEYTYPE</a>s:
576+
<a for="keytype">"rsa"</a>, <a for="keytype">"ed25519"</a>, and
577+
<a for="keytype">"ecdsa"</a>; and three signature <a>SCHEME</a>s:
578+
<a for="scheme">"rsassa-pss-sha256"</a>, <a for="scheme">"ed25519"</a>, and
579+
<a for="scheme">"ecdsa-sha2-nistp256"</a>. These are documented below.
580+
581+
TUF is not restricted to any particular signature <a>SCHEME</a>s,
582+
<a>KEYTYPE</a>s, or cryptographic library. Adopters can define and use any
583+
particular <a>KEYTYPE</a>, signing <a>SCHEME</a>, and cryptographic library.
584+
585+
Implementing the <a>KEYTYPE</a>s and <a>SCHEME</a>s below is RECOMMENDED for
586+
all implementations, as this enables interoperability. Conversely,
587+
implementations SHOULD NOT implement the <a>KEYTYPE</a>s and <a>SCHEME</a>s
588+
that are defined in a different manner than specified, so as to avoid confusion
589+
across implementations.
578590

579591
: <dfn for="scheme">"rsassa-pss-sha256"</dfn>
580592
::
@@ -594,11 +606,6 @@ cryptographic library:
594606
[https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
595607
](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm)
596608

597-
We define three keytypes below: <a for="keytype">"rsa"</a>, <a
598-
for="keytype">"ed25519"</a>, and <a for="keytype">"ecdsa-sha2-nistp256"</a>, but adopters
599-
can define and use any particular keytype, signing scheme, and cryptographic
600-
library.
601-
602609
The <dfn for="keytype">"rsa"</dfn> format is:
603610

604611
<pre highlight="json">
@@ -631,11 +638,11 @@ The <dfn for="keytype">"ed25519"</dfn> format is:
631638
::
632639
64-byte hex encoded string.
633640

634-
The <dfn for="keytype">"ecdsa-sha2-nistp256"</dfn> format is:
641+
The <dfn for="keytype">"ecdsa"</dfn> format is:
635642

636643
<pre highlight="json">
637644
{
638-
"keytype" : <a for="keytype">"ecdsa-sha2-nistp256"</a>,
645+
"keytype" : <a for="keytype">"ecdsa"</a>,
639646
"scheme" : <a for="scheme">"ecdsa-sha2-nistp256"</a>,
640647
"keyval" : {
641648
"public" : <a for="keyval-ecdsa">PUBLIC</a>

0 commit comments

Comments
 (0)