Skip to content

Commit 5d16f91

Browse files
authored
Merge pull request #1054 from jku/update-docs-on-crypto-details
Update docs on crypto details
2 parents 017a5ff + dc78d89 commit 5d16f91

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

docs/TUTORIAL.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,25 @@ updates.
6565
The repository tool supports multiple public-key algorithms, such as
6666
[RSA](https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29) and
6767
[Ed25519](https://ed25519.cr.yp.to/), and multiple cryptography libraries.
68-
Which cryptography library to use is determined by the default, or user modified,
69-
settings in [settings.py](../tuf/settings.py).
70-
71-
The [PyCrypto](https://www.dlitz.net/software/pycrypto/) library may be
72-
selected to generate RSA keys and
73-
[RSA-PSS](https://en.wikipedia.org/wiki/RSA-PSS) signatures. If generation of
74-
Ed25519 signatures is needed, the [PyNaCl](https://github.com/pyca/pynacl)
75-
library setting should be enabled. PyNaCl is a Python binding to the
76-
Networking and Cryptography Library. For key storage, RSA keys may be stored
77-
in PEM or JSON format, and Ed25519 keys in JSON format. Private keys, for both
78-
RSA and Ed25519, are encrypted and passphrase-protected (strengthened with
68+
69+
Using [RSA-PSS](https://tools.ietf.org/html/rfc8017#section-8.1) or
70+
[ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm)
71+
signatures requires the [cryptography](https://cryptography.io/) library. If
72+
generation of Ed25519 signatures is needed
73+
[PyNaCl](https://github.com/pyca/pynacl) library should be installed. This
74+
tutorial assumes both dependencies are installed: refer to
75+
[Installation Instructions](INSTALLATION.rst#install-with-more-cryptographic-flexibility)
76+
for details.
77+
78+
The Ed25519 and ECDSA keys are stored in JSON format and RSA keys are stored in PEM
79+
format. Private keys are encrypted and passphrase-protected (strengthened with
7980
PBKDF2-HMAC-SHA256.) Generating, importing, and loading cryptographic key
8081
files can be done with functions available in the repository tool.
8182

8283
To start, a public and private RSA key pair is generated with the
8384
`generate_and_write_rsa_keypair()` function. The keys generated next are
8485
needed to sign the repository metadata files created in upcoming sub-sections.
8586

86-
8787
Note: In the instructions below, lines that start with `>>>` denote commands
8888
that should be entered by the reader, `#` begins the start of a comment, and
8989
text without prepended symbols is the output of a command.

setup.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@
4040
$ pip install .
4141
4242
# Installing optional requirements (i.e., after installing tuf).
43-
# The 'tools' optional requirement is currently supported, which enables
44-
# fast and secure ed25519 key generation, and signature verification
45-
# computations with PyNaCl+libsodium. General-purpose cryptography is also
46-
# provided. 'tools' is needed by the TUF repository tools. Clients that
47-
# require verification of RSASSA-PSS signatures must also install tuf[tools].
48-
$ pip install tuf[tools]
43+
# Support for creation of Ed25519 signatures and support for RSA and ECDSA
44+
# signatures in general requires optional dependencies:
45+
$ pip install securesystemslib[crypto,pynacl]
4946
5047
5148
Alternate installation options:

0 commit comments

Comments
 (0)