nucypher.characters.control

Subpackages

Submodules

class CharacterCLIController(interface: CharacterPublicInterface, *args, **kwargs)

Bases: nucypher.control.controllers.CLIController

class CharacterPublicInterface(character: nucypher.characters.base.Character = None, *args, **kwargs)

Bases: nucypher.control.interfaces.ControlInterface

class AliceInterface(character: nucypher.characters.base.Character = None, *args, **kwargs)

Bases: nucypher.characters.control.interfaces.CharacterPublicInterface

create_policy(bob_encrypting_key: umbral.PublicKey, bob_verifying_key: umbral.PublicKey, label: bytes, threshold: int, shares: int, expiration: maya.core.MayaDT, value: int = None)dict
derive_policy_encrypting_key(label: bytes)dict
grant(bob_encrypting_key: umbral.PublicKey, bob_verifying_key: umbral.PublicKey, label: bytes, threshold: int, shares: int, expiration: maya.core.MayaDT, value: int = None, rate: int = None)dict
revoke(label: bytes, bob_verifying_key: umbral.PublicKey)dict
decrypt(label: bytes, message_kit: nucypher_core.MessageKit)dict

Character control endpoint to allow Alice to decrypt her own data.

public_keys()dict

Character control endpoint for getting Alice’s public keys.

class BobInterface(character: nucypher.characters.base.Character = None, *args, **kwargs)

Bases: nucypher.characters.control.interfaces.CharacterPublicInterface

retrieve_and_decrypt(alice_verifying_key: umbral.PublicKey, message_kits: List[nucypher_core.MessageKit], encrypted_treasure_map: nucypher_core.EncryptedTreasureMap)dict

Character control endpoint for re-encrypting and decrypting policy data.

public_keys()dict

Character control endpoint for getting Bob’s encrypting and signing public keys

class EnricoInterface(character: nucypher.characters.base.Character = None, *args, **kwargs)

Bases: nucypher.characters.control.interfaces.CharacterPublicInterface

encrypt_message(plaintext: Union[str, bytes])dict

Character control endpoint for encrypting data for a policy and receiving the messagekit (and signature) to give to Bob.