Skip to content

Commit 483c1e2

Browse files
Revise section on key format
Signed-off-by: Vladimir Diaz <[email protected]>
1 parent c41be98 commit 483c1e2

File tree

1 file changed

+32
-28
lines changed

1 file changed

+32
-28
lines changed

tuf-spec.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -463,58 +463,62 @@ Version: **1.0 (Draft)**
463463
}
464464

465465
where: ROLE is a dictionary whose "_type" field describes the role type.
466+
466467
KEYID is the identifier of the key signing the ROLE dictionary.
468+
467469
SIGNATURE is a signature of the canonical JSON form of ROLE.
468470

469-
The current reference implementation defines two signature schemes,
470-
although TUF is not restricted to any particular signature scheme,
471-
key type, or cryptographic library:
472471

473-
"rsassa-pss-sha256" : RSA Probabilistic signature scheme with appendix.
474-
The underlying hash function is SHA256.
472+
All keys have the format:
475473

476-
"ed25519" : Elliptic curve digital signature algorithm based on Twisted
477-
Edwards curves.
474+
{ "keytype" : KEYTYPE,
475+
"scheme" : SCHEME,
476+
"keyval" : KEYVAL
477+
}
478478

479-
"ecdsa-sha2-nistp256" : Elliptic Curve Digital Signature Algorithm
480-
with NIST P-256 curve signing and SHA-256 hashing.
479+
where: KEYTYPE is a string denoting a public key signature system, such
480+
as RSA or ECDSA.
481481

482-
rsassa-pss: https://tools.ietf.org/html/rfc3447#page-29
482+
SCHEME is a string denoting a corresponding signature scheme. For
483+
example: "rsassa-pss-sha256" and "ecdsa-sha2-nistp256".
483484

484-
ed25519: https://ed25519.cr.yp.to/
485+
KEYVAL is a dictionary containing the public portion of the key.
485486

486-
ecdsa: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
487+
The reference implementation defines three signature schemes, although TUF
488+
is not restricted to any particular signature scheme, key type, or
489+
cryptographic library:
487490

488-
All keys have the format:
491+
"rsassa-pss-sha256" : RSA Probabilistic signature scheme with appendix.
492+
The underlying hash function is SHA256.
493+
https://tools.ietf.org/html/rfc3447#page-29
489494

490-
{ "keytype" : KEYTYPE,
491-
"scheme" : SCHEME,
492-
"keyval" : KEYVAL
493-
}
495+
"ed25519" : Elliptic curve digital signature algorithm based on Twisted
496+
Edwards curves.
497+
https://ed25519.cr.yp.to/
494498

495-
where KEYTYPE is a string describing the type of the key and how it's
496-
used to sign documents. The type determines the interpretation of
497-
KEYVAL.
499+
"ecdsa-sha2-nistp256" : Elliptic Curve Digital Signature Algorithm
500+
with NIST P-256 curve signing and SHA-256 hashing.
501+
https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
498502

499-
We define three keytypes below: 'rsa', 'ed25519', and 'ecdsa'. However, TUF
500-
places no restrictions on cryptographic keys. Adopters can use any
501-
particular keytype, signing scheme, and cryptographic library.
503+
We define three keytypes below: 'rsa', 'ed25519', and 'ecdsa', but adopters
504+
can define and use any particular keytype, signing scheme, and cryptographic
505+
library.
502506

503507
The 'rsa' format is:
504508

505509
{ "keytype" : "rsa",
506510
"scheme" : "rsassa-pss-sha256",
507-
"keyval" : { "public" : PUBLIC}
511+
"keyval" : {"public" : PUBLIC}
508512
}
509513

510-
where PUBLIC is in PEM format and a string. All RSA keys
511-
must be at least 2048 bits.
514+
where PUBLIC is in PEM format and a string. All RSA keys must be at least
515+
2048 bits.
512516

513517
The 'ed25519' format is:
514518

515519
{ "keytype" : "ed25519",
516520
"scheme" : "ed25519",
517-
"keyval" : { "public" : PUBLIC}
521+
"keyval" : {"public" : PUBLIC}
518522
}
519523

520524
where PUBLIC is a 32-byte string.
@@ -523,7 +527,7 @@ Version: **1.0 (Draft)**
523527

524528
{ "keytype" : "ecdsa-sha2-nistp256",
525529
"scheme" : "ecdsa-sha2-nistp256",
526-
"keyval" : { "public" : PUBLIC}
530+
"keyval" : {"public" : PUBLIC}
527531
}
528532

529533
where PUBLIC is in PEM format and a string.

0 commit comments

Comments
 (0)