Skip to content

Commit 0af7906

Browse files
Update README.md
1 parent 22f7b50 commit 0af7906

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

tuf/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- [Consistent Snapshots](#consistent-snapshots)
2121

2222

23-
## How to Create and Modify a TUF Repository ##
23+
## How to Create and Modify a Basic TUF Repository ##
2424

2525

2626
### Overview ###
@@ -30,8 +30,8 @@ The [tuf.client.updater](client/README.md) module and
3030
[tuf.interposition](interposition/README.md) package assist in integrating
3131
TUF on the client side. Second, the repository on the server side must
3232
be modified to include a minimum of four metadata files. No additional software
33-
is required to convert a repository to a TUF one. The tool to assist in generating
34-
the required metadata files of the repository is the focus of this document.
33+
is required to convert a repository to a TUF one. The tool to generate the
34+
required metadata files of the repository is the focus of this document.
3535

3636

3737
The [repository tool](repository_tool.py) contains functions to generate all the
@@ -73,7 +73,7 @@ covering keys, the four required top-level roles are introduced. Examples are
7373
given demonstrating the expected work flow, where the metadata roles are created
7474
in a specific order, keys imported and loaded, and the metadata objects signed and
7575
written to disk. Lastly, target files are added to the repository, included in
76-
metadata, and custom delegations performed to extend the default roles in the
76+
metadata, and custom delegations performed to extend the default roles of the
7777
repository. By the end, a fully populated TUF repository is generated that can be
7878
tested.
7979

@@ -282,7 +282,7 @@ TUF verifies target files by including their length, hash(es),
282282
and filepath in metadata. The filepaths are relative to a `targets/` directory
283283
on the repository. A TUF client can download a target file by first updating
284284
the latest copy of metadata (and thus available targets), verifying that their
285-
length and hashes are valid, and then saving them locally to complete the
285+
length and hashes are valid, and then saving them locally to complete the update
286286
process.
287287

288288
In this section, the target files intended for clients are added to a repository
@@ -292,8 +292,8 @@ and listed in `targets.json` metadata.
292292

293293
The repository maintainer adds target files to roles (e.g., `targets`,
294294
`targets/unclaimed`) by specifying target paths. Files at these target paths
295-
must exist before the repository tool can generate and add their (hashes,
296-
lengths, filepath) to metadata.
295+
must exist before the repository tool can generate and add their (hash(es),
296+
length, filepath) to metadata.
297297

298298
The actual target files are added first to the `targets/` directory of the
299299
repository.
@@ -418,19 +418,19 @@ and generate signed metadata, according to the keys and paths allowed by the par
418418
>>> private_unclaimed_key = import_rsa_privatekey_from_file("/path/to/unclaimed_key")
419419
Enter a password for the encrypted RSA key:
420420

421-
>>> repository.targets(unclaimed).load_signing_key(private_unclaimed_key)
421+
>>> repository.targets("unclaimed").load_signing_key(private_unclaimed_key)
422422

423423
# Update an attribute of the unclaimed role.
424-
>>> repository.targets('unclaimed').version = 2
424+
>>> repository.targets("unclaimed").version = 2
425425

426426
# Delegations may also be nested. Create the delegated role "targets/unclaimed/django",
427427
# where it initially contains zero targets and future targets are restricted to a
428428
# particular directory.
429-
>>> repository.targets('unclaimed').delegate("django", [public_unclaimed_key], [],
429+
>>> repository.targets("unclaimed").delegate("django", [public_unclaimed_key], [],
430430
restricted_paths=["/path/to/repository/targets/django/"])
431-
>>> repository.targets('unclaimed')('django').load_signing_key(private_unclaimed_key)
432-
>>> repository.targets('unclaimed')('django').add_target("/path/to/repository/targets/django/file4.txt")
433-
>>> repository.targets('unclaimed')('django').compressions = ["gz"]
431+
>>> repository.targets("unclaimed")("django").load_signing_key(private_unclaimed_key)
432+
>>> repository.targets("unclaimed")("django").add_target("/path/to/repository/targets/django/file4.txt")
433+
>>> repository.targets("unclaimed")("django").compressions = ["gz"]
434434

435435
# Write the metadata of "targets/unclaimed", "targets/unclaimed/django", root, targets, snapshot,
436436
# and timestamp.
@@ -482,7 +482,7 @@ questions.
482482
A large number of target files may be distributed to multiple hashed bins with
483483
`delegate_hashed_bins()`. The metadata files of delegated roles will be nearly equal in size
484484
(i.e., target file paths are uniformly distributed by calculating the target filepath's
485-
digest and determining which bin it should reside in. The updater client will use
485+
digest and determining which bin it should reside in.) The updater client will use
486486
"lazy bin walk" to find a target file's hashed bin destination. This method is intended
487487
for repositories with a large number of target files, a way of easily distributing and
488488
managing the metadata that lists the targets, and minimizing the number of metadata files

0 commit comments

Comments
 (0)