SecureBlackbox 2020 Python Edition

Questions / Feedback?

PGPKeyring Class

Properties   Methods   Events   Configuration Settings   Errors  

The PGPKeyring class accesses and manages PGP keyring files.

Syntax

class secureblackbox.PGPKeyring

Remarks

PGPKeyring is used to hold and access PGP keys. It contains information about both public keys and secret keys, which are usually stored in two separate files: "public keyring" and "secret keyring", respectively.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

openedIndicates if the keyring is in an opened state.
pinned_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
public_key_countThe number of records in the PublicKey arrays.
public_key_bits_in_keyIndicates the key length in bits.
public_key_can_encryptReturns True if this key can be used for encryption.
public_key_can_signReturns True if this key can be used for signing.
public_key_curveIndicates the elliptic curve associated with a EC key.
public_key_enabledEnables or disables this key for use in encryption or signing operation.
public_key_encryption_algorithmIndicates the symmetric algorithm used to encrypt the secret key.
public_key_expiresIndicates key expiration time in whole days from its generation moment.
public_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
public_key_hash_algorithmSpecifies the hash algorithm associated with the key.
public_key_is_publicReturns True if this key is a public key, and False otherwise.
public_key_is_secretReturns True if this key is a secret key, and False otherwise.
public_key_is_subkeyReturns True if this key is a subkey of another key, and False otherwise.
public_key_key_fpThe 20-byte fingerprint (hash value) of this key.
public_key_key_hash_algorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
public_key_key_idContains a 8-byte key identifier.
public_key_old_packet_formatIndicates whether legacy (PGP 2.
public_key_passphraseThe key protection password.
public_key_passphrase_validUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
public_key_primary_key_idIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
public_key_protectionSpecifies the level of protection applied to the secret key.
public_key_public_key_algorithmSpecifies the asymmetric algorithm of the key.
public_key_q_bitsThe length of the DSA Q (legitimate range: 160-512).
public_key_revokedReturns True if the key has been revoked, and False otherwise.
public_key_subkey_fpThe 20-byte fingerprint (hash value) of this key's subkey.
public_key_subkey_idContains a 8-byte subkey identifier.
public_key_timestampUse this property to check the time the key was generated.
public_key_usernameSpecifies the name of the user bound to this key.
public_key_validIndicates the validity status of the key.
public_key_versionIndicates the key version.
secret_key_countThe number of records in the SecretKey arrays.
secret_key_bits_in_keyIndicates the key length in bits.
secret_key_can_encryptReturns True if this key can be used for encryption.
secret_key_can_signReturns True if this key can be used for signing.
secret_key_curveIndicates the elliptic curve associated with a EC key.
secret_key_enabledEnables or disables this key for use in encryption or signing operation.
secret_key_encryption_algorithmIndicates the symmetric algorithm used to encrypt the secret key.
secret_key_expiresIndicates key expiration time in whole days from its generation moment.
secret_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
secret_key_hash_algorithmSpecifies the hash algorithm associated with the key.
secret_key_is_publicReturns True if this key is a public key, and False otherwise.
secret_key_is_secretReturns True if this key is a secret key, and False otherwise.
secret_key_is_subkeyReturns True if this key is a subkey of another key, and False otherwise.
secret_key_key_fpThe 20-byte fingerprint (hash value) of this key.
secret_key_key_hash_algorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
secret_key_key_idContains a 8-byte key identifier.
secret_key_old_packet_formatIndicates whether legacy (PGP 2.
secret_key_passphraseThe key protection password.
secret_key_passphrase_validUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
secret_key_primary_key_idIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
secret_key_protectionSpecifies the level of protection applied to the secret key.
secret_key_public_key_algorithmSpecifies the asymmetric algorithm of the key.
secret_key_q_bitsThe length of the DSA Q (legitimate range: 160-512).
secret_key_revokedReturns True if the key has been revoked, and False otherwise.
secret_key_subkey_fpThe 20-byte fingerprint (hash value) of this key's subkey.
secret_key_subkey_idContains a 8-byte subkey identifier.
secret_key_timestampUse this property to check the time the key was generated.
secret_key_usernameSpecifies the name of the user bound to this key.
secret_key_validIndicates the validity status of the key.
secret_key_versionIndicates the key version.
selected_public_key_countThe number of records in the SelectedPublicKey arrays.
selected_public_key_bits_in_keyIndicates the key length in bits.
selected_public_key_can_encryptReturns True if this key can be used for encryption.
selected_public_key_can_signReturns True if this key can be used for signing.
selected_public_key_curveIndicates the elliptic curve associated with a EC key.
selected_public_key_enabledEnables or disables this key for use in encryption or signing operation.
selected_public_key_encryption_algorithmIndicates the symmetric algorithm used to encrypt the secret key.
selected_public_key_expiresIndicates key expiration time in whole days from its generation moment.
selected_public_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
selected_public_key_hash_algorithmSpecifies the hash algorithm associated with the key.
selected_public_key_is_publicReturns True if this key is a public key, and False otherwise.
selected_public_key_is_secretReturns True if this key is a secret key, and False otherwise.
selected_public_key_is_subkeyReturns True if this key is a subkey of another key, and False otherwise.
selected_public_key_key_fpThe 20-byte fingerprint (hash value) of this key.
selected_public_key_key_hash_algorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
selected_public_key_key_idContains a 8-byte key identifier.
selected_public_key_old_packet_formatIndicates whether legacy (PGP 2.
selected_public_key_passphraseThe key protection password.
selected_public_key_passphrase_validUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
selected_public_key_primary_key_idIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
selected_public_key_protectionSpecifies the level of protection applied to the secret key.
selected_public_key_public_key_algorithmSpecifies the asymmetric algorithm of the key.
selected_public_key_q_bitsThe length of the DSA Q (legitimate range: 160-512).
selected_public_key_revokedReturns True if the key has been revoked, and False otherwise.
selected_public_key_subkey_fpThe 20-byte fingerprint (hash value) of this key's subkey.
selected_public_key_subkey_idContains a 8-byte subkey identifier.
selected_public_key_timestampUse this property to check the time the key was generated.
selected_public_key_usernameSpecifies the name of the user bound to this key.
selected_public_key_validIndicates the validity status of the key.
selected_public_key_versionIndicates the key version.
selected_secret_key_countThe number of records in the SelectedSecretKey arrays.
selected_secret_key_bits_in_keyIndicates the key length in bits.
selected_secret_key_can_encryptReturns True if this key can be used for encryption.
selected_secret_key_can_signReturns True if this key can be used for signing.
selected_secret_key_curveIndicates the elliptic curve associated with a EC key.
selected_secret_key_enabledEnables or disables this key for use in encryption or signing operation.
selected_secret_key_encryption_algorithmIndicates the symmetric algorithm used to encrypt the secret key.
selected_secret_key_expiresIndicates key expiration time in whole days from its generation moment.
selected_secret_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
selected_secret_key_hash_algorithmSpecifies the hash algorithm associated with the key.
selected_secret_key_is_publicReturns True if this key is a public key, and False otherwise.
selected_secret_key_is_secretReturns True if this key is a secret key, and False otherwise.
selected_secret_key_is_subkeyReturns True if this key is a subkey of another key, and False otherwise.
selected_secret_key_key_fpThe 20-byte fingerprint (hash value) of this key.
selected_secret_key_key_hash_algorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
selected_secret_key_key_idContains a 8-byte key identifier.
selected_secret_key_old_packet_formatIndicates whether legacy (PGP 2.
selected_secret_key_passphraseThe key protection password.
selected_secret_key_passphrase_validUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
selected_secret_key_primary_key_idIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
selected_secret_key_protectionSpecifies the level of protection applied to the secret key.
selected_secret_key_public_key_algorithmSpecifies the asymmetric algorithm of the key.
selected_secret_key_q_bitsThe length of the DSA Q (legitimate range: 160-512).
selected_secret_key_revokedReturns True if the key has been revoked, and False otherwise.
selected_secret_key_subkey_fpThe 20-byte fingerprint (hash value) of this key's subkey.
selected_secret_key_subkey_idContains a 8-byte subkey identifier.
selected_secret_key_timestampUse this property to check the time the key was generated.
selected_secret_key_usernameSpecifies the name of the user bound to this key.
selected_secret_key_validIndicates the validity status of the key.
selected_secret_key_versionIndicates the key version.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

add_from_fileAdds an existing key to the keyring.
add_from_filesAdds a collection of keys to the keyring.
add_pinnedAdds a pinned secret key to the keyring.
clearRemoves all the keys from the keyring.
closeCloses the keyring.
configSets or retrieves a configuration setting.
create_newCreates a new empty keyring.
loadLoads a keyring from disk.
load_from_bytesLoads a keyring from two byte arrays.
remove_by_idRemoves key by its ID.
remove_publicRemoves the specified public key from the keyring.
remove_secretRemoves the specified secret key from the keyring.
saveSaves the keyring to disk.
save_to_bytesSaves the keyring to a byte array.
selectFilters a selection of keys from the keyring using a template.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_errorInformation about errors during PGP key management.
on_notificationThis event notifies the application about an underlying control flow event.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

TempPathLocation where the temporary files are stored.
CheckKeyIntegrityBeforeUseEnables or disable private key integrity check before use.
CookieCachingSpecifies whether a cookie cache should be used for HTTP(S) transports.
CookiesGets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
LogDestinationSpecifies the debug log destination.
LogDetailsSpecifies the debug log details to dump.
LogFileSpecifies the debug log filename.
LogFiltersSpecifies the debug log filters.
LogFlushModeSpecifies the log flush mode.
LogLevelSpecifies the debug log level.
LogMaxEventCountSpecifies the maximum number of events to cache before further action is taken.
LogRotationModeSpecifies the log rotation mode.
MaxASN1BufferLengthSpecifies the maximal allowed length for ASN.1 primitive tag data.
MaxASN1TreeDepthSpecifies the maximal depth for processed ASN.1 trees.
OCSPHashAlgorithmSpecifies the hash algorithm to be used to identify certificates in OCSP requests.
UseOwnDNSResolverSpecifies whether the client classes should use own DNS resolver.
UseSharedSystemStoragesSpecifies whether the validation engine should use a global per-process copy of the system certificate stores.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Python Edition - Version 20.0 [Build 8154]