Keyring

class nucypher.config.keyring.NucypherKeyring(account: str, keyring_root: str = None, root_key_path: str = None, pub_root_key_path: str = None, signing_key_path: str = None, pub_signing_key_path: str = None, delegating_key_path: str = None, tls_key_path: str = None, tls_certificate_path: str = None)[source]

Handles keys for a single identity, recognized by account. Warning: This class handles private keys!

  • keyring
    • .private
      • key.priv

      • key.priv.pem

    • public
      • key.pub

      • cert.pem

exception AuthenticationFailed[source]
exception KeyringError[source]
exception KeyringLocked[source]
classmethod generate(checksum_address: str, password: str, encrypting: bool, rest: bool, host: str = None, curve: cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve = None, keyring_root: str = None) → nucypher.config.keyring.NucypherKeyring[source]

Generates new encrypting, signing, and wallet keys encrypted with the password, respectively saving keyfiles on the local filesystem from default paths, returning the corresponding Keyring instance.

lock() → bool[source]

Make efforts to remove references to the cached key data

static validate_password(password: str) → List[source]

Validate a password and return True or raise an error with a failure reason.

NOTICE: Do not raise inside this function.

exception nucypher.config.keyring.PrivateKeyExistsError[source]
nucypher.config.keyring.unlock_required(func)[source]

Method decorator