4040 https://en.wikipedia.org/wiki/PBKDF
4141 http://en.wikipedia.org/wiki/Scrypt
4242
43- TUF key files are encrypted with the AES-256-CTR-Mode symmetric key
44- algorithm. User passwords are strengthened with PBKDF2, currently set to
43+ securesystemslib key files are encrypted with the AES-256-CTR-Mode symmetric
44+ key algorithm. User passwords are strengthened with PBKDF2, currently set to
4545 100,000 passphrase iterations. The previous evpy implementation used 1,000
4646 iterations.
4747
9898# Import pyca/cryptography's Key Derivation Function (KDF) module.
9999# 'securesystemslib.keys.py' needs this module to derive a secret key according
100100# to the Password-Based Key Derivation Function 2 specification. The derived
101- # key is used as the symmetric key to encrypt TUF key information.
101+ # key is used as the symmetric key to encrypt securesystemslib key information.
102102# PKCS#5 v2.0 PBKDF2 specification: http://tools.ietf.org/html/rfc2898#section-5.2
103103from cryptography .hazmat .primitives .kdf .pbkdf2 import PBKDF2HMAC
104104
@@ -573,7 +573,7 @@ def create_rsa_public_and_private_from_pem(pem, passphrase=None):
573573 strengthened'passphrase', and 3DES with CBC mode for encryption/decryption.
574574 Alternatively, key data may be encrypted with AES-CTR-Mode and the
575575 passphrase strengthened with PBKDF2+SHA256, although this method is used
576- only with TUF encrypted key files.
576+ only with securesystemslib encrypted key files.
577577
578578 >>> public, private = generate_rsa_public_and_private(2048)
579579 >>> passphrase = 'secret'
@@ -679,16 +679,16 @@ def encrypt_key(key_object, password):
679679 Return a string containing 'key_object' in encrypted form. Encrypted
680680 strings may be safely saved to a file. The corresponding decrypt_key()
681681 function can be applied to the encrypted string to restore the original key
682- object. 'key_object' is a TUF key (e.g., RSAKEY_SCHEMA,
682+ object. 'key_object' is a securesystemslib key (e.g., RSAKEY_SCHEMA,
683683 ED25519KEY_SCHEMA). This function calls the pyca/cryptography library to
684684 perform the encryption and derive a suitable encryption key.
685685
686686 Whereas an encrypted PEM file uses the Triple Data Encryption Algorithm
687687 (3DES), the Cipher-block chaining (CBC) mode of operation, and the Password
688688 Based Key Derivation Function 1 (PBKF1) + MD5 to strengthen 'password',
689- encrypted TUF keys use AES-256-CTR-Mode and passwords strengthened with
690- PBKDF2-HMAC-SHA256 (100K iterations by default, but may be overriden in
691- 'settings.PBKDF2_ITERATIONS' by the user).
689+ encrypted securesystemslib keys use AES-256-CTR-Mode and passwords
690+ strengthened with PBKDF2-HMAC-SHA256 (100K iterations by default, but may
691+ be overriden in 'settings.PBKDF2_ITERATIONS' by the user).
692692
693693 http://en.wikipedia.org/wiki/Advanced_Encryption_Standard
694694 http://en.wikipedia.org/wiki/CTR_mode#Counter_.28CTR.29
@@ -709,8 +709,8 @@ def encrypt_key(key_object, password):
709709
710710 <Arguments>
711711 key_object:
712- The TUF key object that should contain the private portion of the ED25519
713- key.
712+ The securesystemslib key object that should contain the private portion
713+ of the ED25519 key.
714714
715715 password:
716716 The password, or passphrase, to encrypt the private part of the RSA
@@ -722,8 +722,8 @@ def encrypt_key(key_object, password):
722722 improperly formatted or 'key_object' does not contain the private portion
723723 of the key.
724724
725- securesystemslib.exceptions.CryptoError, if an Ed25519 key in encrypted TUF
726- format cannot be created.
725+ securesystemslib.exceptions.CryptoError, if an Ed25519 key in encrypted
726+ securesystemslib format cannot be created.
727727
728728 <Side Effects>
729729 pyca/Cryptography cryptographic operations called to perform the actual
@@ -774,13 +774,13 @@ def decrypt_key(encrypted_key, password):
774774 <Purpose>
775775 Return a string containing 'encrypted_key' in non-encrypted form.
776776 The decrypt_key() function can be applied to the encrypted string to restore
777- the original key object, a TUF key (e.g., RSAKEY_SCHEMA, ED25519KEY_SCHEMA).
778- This function calls the appropriate cryptography module (i.e.,
779- pyca_crypto_keys.py) to perform the decryption.
777+ the original key object, a securesystemslib key (e.g., RSAKEY_SCHEMA,
778+ ED25519KEY_SCHEMA). This function calls the appropriate cryptography module
779+ (i.e., pyca_crypto_keys.py) to perform the decryption.
780780
781- Encrypted TUF keys use AES-256-CTR-Mode and passwords strengthened with
782- PBKDF2-HMAC-SHA256 (100K iterations be default, but may be overriden in
783- 'settings.py' by the user).
781+ Encrypted securesystemslib keys use AES-256-CTR-Mode and passwords
782+ strengthened with PBKDF2-HMAC-SHA256 (100K iterations be default, but may
783+ be overriden in 'settings.py' by the user).
784784
785785 http://en.wikipedia.org/wiki/Advanced_Encryption_Standard
786786 http://en.wikipedia.org/wiki/CTR_mode#Counter_.28CTR.29
@@ -804,9 +804,9 @@ def decrypt_key(encrypted_key, password):
804804
805805 <Arguments>
806806 encrypted_key:
807- An encrypted TUF key (additional data is also included, such as salt,
808- number of password iterations used for the derived encryption key, etc)
809- of the form 'securesystemslib.formats.ENCRYPTEDKEY_SCHEMA'.
807+ An encrypted securesystemslib key (additional data is also included, such
808+ as salt, number of password iterations used for the derived encryption
809+ key, etc) of the form 'securesystemslib.formats.ENCRYPTEDKEY_SCHEMA'.
810810 'encrypted_key' should have been generated with encrypted_key().
811811
812812 password:
@@ -818,11 +818,11 @@ def decrypt_key(encrypted_key, password):
818818 securesystemslib.exceptions.FormatError, if the arguments are improperly
819819 formatted.
820820
821- securesystemslib.exceptions.CryptoError, if a TUF key cannot be decrypted
822- from 'encrypted_key'.
821+ securesystemslib.exceptions.CryptoError, if a securesystemslib key cannot
822+ be decrypted from 'encrypted_key'.
823823
824- securesystemslib.exceptions.Error, if a valid TUF key object is not found in
825- 'encrypted_key'.
824+ securesystemslib.exceptions.Error, if a valid securesystemslib key object
825+ is not found in 'encrypted_key'.
826826
827827 <Side Effects>
828828 The pyca/cryptography is library called to perform the actual decryption
0 commit comments