latest.ipv8.attestation.wallet.bonehexact.attestation

Module Contents

Functions

generate_modular_additive_inverse(→ list[int])

Generate a group of size n which is its own modular additive inverse modulo p + 1.

attest(...)

Create an attestation for a public key's value lying within a certain bitspace.

attest_sha512(...)

Create an attestation for a value using a SHA512 hash.

binary_relativity_sha512(→ dict[int, int])

Create the inter-bitpair relativity map of a value using the SHA512 hash.

attest_sha256(...)

Create an attestation for a value using a SHA256 hash.

binary_relativity_sha256(→ dict[int, int])

Create the inter-bitpair relativity map of a value using the SHA256 hash.

attest_sha256_4(...)

Create an attestation for a value using a SHA256 4 byte hash.

binary_relativity_sha256_4(→ dict[int, int])

Create the inter-bitpair relativity map of a value using the SHA256 4 byte hash.

create_empty_relativity_map(→ dict[int, int])

Construct a map of possible challenge responses.

binary_relativity(→ dict[int, int])

Create the inter-bitpair relativity map of a value.

binary_relativity_match(→ float)

Get the matching percentage between relativity maps.

binary_relativity_certainty(→ float)

Give the chance of a current relativity map being the expected one.

create_challenge(...)

Create a challenge for a bitpair attestation of a certain public key.

create_honesty_check(...)

Create a honesty check challenge.

create_challenge_response_from_pair(→ int)

Respond to a bitpair challenge.

create_challenge_response(→ int)

Respond to a bitpair challenge.

process_challenge_response(→ None)

Process a challenge response in a relativity map.

Attributes

multithread_update_lock

latest.ipv8.attestation.wallet.bonehexact.attestation.multithread_update_lock
latest.ipv8.attestation.wallet.bonehexact.attestation.generate_modular_additive_inverse(p: int, n: int) list[int]

Generate a group of size n which is its own modular additive inverse modulo p + 1.

latest.ipv8.attestation.wallet.bonehexact.attestation.attest(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, value: int, bitspace: int) latest.ipv8.attestation.wallet.bonehexact.structs.BonehAttestation

Create an attestation for a public key’s value lying within a certain bitspace.

latest.ipv8.attestation.wallet.bonehexact.attestation.attest_sha512(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, value: bytes) latest.ipv8.attestation.wallet.bonehexact.structs.BonehAttestation

Create an attestation for a value using a SHA512 hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity_sha512(value: bytes) dict[int, int]

Create the inter-bitpair relativity map of a value using the SHA512 hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.attest_sha256(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, value: bytes) latest.ipv8.attestation.wallet.bonehexact.structs.BonehAttestation

Create an attestation for a value using a SHA256 hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity_sha256(value: bytes) dict[int, int]

Create the inter-bitpair relativity map of a value using the SHA256 hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.attest_sha256_4(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, value: bytes) latest.ipv8.attestation.wallet.bonehexact.structs.BonehAttestation

Create an attestation for a value using a SHA256 4 byte hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity_sha256_4(value: bytes) dict[int, int]

Create the inter-bitpair relativity map of a value using the SHA256 4 byte hash.

latest.ipv8.attestation.wallet.bonehexact.attestation.create_empty_relativity_map() dict[int, int]

Construct a map of possible challenge responses.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity(value: int, bitspace: int) dict[int, int]

Create the inter-bitpair relativity map of a value.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity_match(expected: dict[int, int], value: dict[int, int]) float

Get the matching percentage between relativity maps. Mismatches result in 0.0.

latest.ipv8.attestation.wallet.bonehexact.attestation.binary_relativity_certainty(expected: dict[int, int], value: dict[int, int]) float

Give the chance of a current relativity map being the expected one.

latest.ipv8.attestation.wallet.bonehexact.attestation.create_challenge(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, bitpair: latest.ipv8.attestation.wallet.bonehexact.structs.BitPairAttestation) latest.ipv8.attestation.wallet.primitives.value.FP2Value

Create a challenge for a bitpair attestation of a certain public key.

latest.ipv8.attestation.wallet.bonehexact.attestation.create_honesty_check(PK: latest.ipv8.attestation.wallet.primitives.structs.BonehPublicKey, value: int) latest.ipv8.attestation.wallet.primitives.value.FP2Value

Create a honesty check challenge.

latest.ipv8.attestation.wallet.bonehexact.attestation.create_challenge_response_from_pair(SK: latest.ipv8.attestation.wallet.primitives.structs.BonehPrivateKey, pair: tuple[int, int] | tuple[int, int, bytes]) int

Respond to a bitpair challenge.

latest.ipv8.attestation.wallet.bonehexact.attestation.create_challenge_response(SK: latest.ipv8.attestation.wallet.primitives.structs.BonehPrivateKey, challenge: latest.ipv8.attestation.wallet.primitives.value.FP2Value) int

Respond to a bitpair challenge.

latest.ipv8.attestation.wallet.bonehexact.attestation.process_challenge_response(relativity_map: dict[int, int], response: int) None

Process a challenge response in a relativity map.