2.13.ipv8.attestation.wallet.primitives.structs

Module Contents

Classes

Functions

2.13.ipv8.attestation.wallet.primitives.structs.ipack(num: int) bytes

Serialize an integer.

2.13.ipv8.attestation.wallet.primitives.structs.iunpack(s: bytes) tuple[int, bytes]

Unserialize an integer from a str.

2.13.ipv8.attestation.wallet.primitives.structs.pack_pair(a: int, b: int) bytes

Serialize a pair of two integers.

2.13.ipv8.attestation.wallet.primitives.structs.unpack_pair(s: bytes) tuple[int, int, bytes]

Unserialize a pair of two integers.

class 2.13.ipv8.attestation.wallet.primitives.structs.BonehPublicKey(p: int, g: 2.13.ipv8.attestation.wallet.primitives.value.FP2Value, h: 2.13.ipv8.attestation.wallet.primitives.value.FP2Value)

A public key for Boneh et al.’s cryptosystem.

FIELDS = 5
serialize() bytes

Convert this key to a bytes instance.

classmethod unserialize(s: bytes) typing_extensions.Self | None

Convert the given bytes to a BonehPublicKey.

class 2.13.ipv8.attestation.wallet.primitives.structs.BonehPrivateKey(p: int, g: 2.13.ipv8.attestation.wallet.primitives.value.FP2Value, h: 2.13.ipv8.attestation.wallet.primitives.value.FP2Value, n: int, t1: int)

Bases: BonehPublicKey

A private key for Boneh et al.’s cryptosystem.

FIELDS = 7
serialize() bytes

Add the private n and t1 values to the binary format.

public_key() BonehPublicKey

Strip out the private information.