Skip to content

Commit 16685f2

Browse files
committed
Use hex encoding is used for ed25519 and target hashes
According to #42, the spec should explicitly state that the ed25519 public key, and the target hash values are hex encoded values, since that is used by the majority of tuf implementations.
1 parent 6ba6352 commit 16685f2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tuf-spec.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@ repo](https://github.com/theupdateframework/specification/issues).
475475

476476
KEYID is the identifier of the key signing the ROLE dictionary.
477477

478-
SIGNATURE is a signature of the canonical JSON form of ROLE.
478+
SIGNATURE is a hex-encoded signature of the canonical JSON form of
479+
ROLE.
479480

480481

481482
All keys have the format:
@@ -532,7 +533,9 @@ repo](https://github.com/theupdateframework/specification/issues).
532533
"keyval" : {"public" : PUBLIC}
533534
}
534535

535-
where PUBLIC is a 32-byte string.
536+
where:
537+
538+
PUBLIC is a 64-byte hex encoded string.
536539

537540
The 'ecdsa' format is:
538541

@@ -770,6 +773,11 @@ repo](https://github.com/theupdateframework/specification/issues).
770773
It is allowed to have a TARGETS object with no TARGETPATH elements. This
771774
can be used to indicate that no target files are available.
772775

776+
HASHES is a dictionary that specifies one or more hashes, including
777+
the cryptographic hash function. For example: { "sha256": HASH, ... }. It
778+
is required for delegated roles, and optional for all others. HASH is the
779+
hexdigest of the cryptographic function computed on the target file.
780+
773781
If defined, the elements and values of "custom" will be made available to the
774782
client application. The information in "custom" is opaque to the framework
775783
and can include version numbers, dependencies, requirements, and any other

0 commit comments

Comments
 (0)