aries_cloudagent.vc.ld_proofs.crypto package

Submodules

aries_cloudagent.vc.ld_proofs.crypto.key_pair module

Base key pair class.

class aries_cloudagent.vc.ld_proofs.crypto.key_pair.KeyPair[source]

Bases: abc.ABC

Base key pair class.

abstract from_verification_method(verification_method: dict) aries_cloudagent.vc.ld_proofs.crypto.key_pair.KeyPair[source]

Create new key pair class based on the passed verification method.

abstract property has_public_key: bool

Whether key pair has a public key.

Public key is required for verification, but can be set dynamically in the verification process.

abstract property public_key: Optional[bytes]

Getter for the public key bytes.

Returns

The public key

Return type

bytes

abstract async sign(message: Union[List[bytes], bytes]) bytes[source]

Sign message(s) using key pair.

abstract async verify(message: Union[List[bytes], bytes], signature: bytes) bool[source]

Verify message(s) against signature using key pair.

aries_cloudagent.vc.ld_proofs.crypto.wallet_key_pair module

Key pair based on base wallet interface.

class aries_cloudagent.vc.ld_proofs.crypto.wallet_key_pair.WalletKeyPair(*, wallet: aries_cloudagent.wallet.base.BaseWallet, key_type: aries_cloudagent.wallet.key_type.KeyType, public_key_base58: Optional[str] = None)[source]

Bases: aries_cloudagent.vc.ld_proofs.crypto.key_pair.KeyPair

Base wallet key pair.

from_verification_method(verification_method: dict) aries_cloudagent.vc.ld_proofs.crypto.wallet_key_pair.WalletKeyPair[source]

Create new WalletKeyPair from public key in verification method.

property has_public_key: bool

Whether key pair has public key.

property public_key: Optional[bytes]

Getter for public key.

async sign(message: Union[List[bytes], bytes]) bytes[source]

Sign message using wallet.

async verify(message: Union[List[bytes], bytes], signature: bytes) bool[source]

Verify message against signature using wallet.