latest.ipv8.attestation.wallet.irmaexact.algorithm

Module Contents

Classes

IRMAAttestation

IPv8 wrapper for IRMA-based attestations.

KeyStub

We don't use an IPv8 key for this algorithm.

IRMAExactAlgorithm

IPv8 wrapper around the IRMA business logic.

class latest.ipv8.attestation.wallet.irmaexact.algorithm.IRMAAttestation(sign_date: int, proofd: latest.ipv8.attestation.wallet.irmaexact.gabi.proofs.ProofD, z: int | None = None)

Bases: latest.ipv8.attestation.identity_formats.Attestation

IPv8 wrapper for IRMA-based attestations.

serialize() bytes

Make this attestation transferrable.

serialize_private(PK: None) bytes

We don’t use a base key for serialization.

classmethod unserialize(s: bytes, id_format: str) IRMAAttestation

Read an attestation from its serialized form.

classmethod unserialize_private(SK: None, s: bytes, id_format: str) IRMAAttestation

Read the secret part of an attestation from its serialized form.

class latest.ipv8.attestation.wallet.irmaexact.algorithm.KeyStub

We don’t use an IPv8 key for this algorithm.

public_key() KeyStub

The public part of this key.

serialize() bytes

The serialized form of this key.

classmethod unserialize(s: bytes) KeyStub

Load the key from the given bytes.

class latest.ipv8.attestation.wallet.irmaexact.algorithm.IRMAExactAlgorithm(id_format: str, formats: dict[str, dict[str, Any]])

Bases: latest.ipv8.attestation.identity_formats.IdentityAlgorithm

IPv8 wrapper around the IRMA business logic.

generate_secret_key() KeyStub

Generate a fake secret key, we need none.

load_secret_key(serialized: bytes) KeyStub

Load a fake secret key, we need none.

load_public_key(serialized: bytes) KeyStub

Load a fake public key, we need none.

get_attestation_class() type[IRMAAttestation]

Get our class.

abstract attest(PK: KeyStub, value: bytes) bytes

Not implemented.

certainty(value: bytes, aggregate: dict) float

Get the certainty that the given value is equal to the attestation in the aggregate.

create_challenges(PK: KeyStub, attestation: IRMAAttestation) list[bytes]

Generate the raw messages to be sent over the Internet as challenges.

create_challenge_response(SK: KeyStub, attestation: IRMAAttestation, challenge: bytes) bytes

Create a response to a given challenge to our attestation.

create_certainty_aggregate(attestation: IRMAAttestation | None) dict

Create the aggregation dictionary (just one key with the attestation).

abstract create_honesty_challenge(PK: KeyStub, value: int) bytes

Not implemented.

abstract process_honesty_challenge(value: int, response: bytes) bool

Not implemented.

process_challenge_response(aggregate: dict, challenge: bytes, response: bytes) dict

Process the response to our challenge.

import_blob(blob: bytes) tuple[bytes, KeyStub]

Import raw data needed to construct an attestation for this algorithm.