latest.ipv8.test.attestation.wallet.primitives.test_boneh

Module Contents

Classes

TestBoneh

Tests related to boneh paper constructions.

class latest.ipv8.test.attestation.wallet.primitives.test_boneh.TestBoneh(methodName: str = 'runTest')

Bases: latest.ipv8.test.base.TestBase

Tests related to boneh paper constructions.

private_key
test_generate_prime() None

Check if the next prime (= l * n - 1 = 2 mod 3) after 10 is 29.

test_bilinear_group() None

Check if a bilinear group can be created.

test_bilinear_group_torsion_point() None

Check if a bilinear group returns 0 if there is no possible pairing.

test_is_good_weil_pairing() None

Check if is_good_wp returns True for 26 + 17x with n = 10.

test_is_bad_weil_pairing() None

Check if is_good_wp returns False for 0, 1 and x with n = 10.

test_get_good_weil_pairing() None

Check if get_good_wp returns a proper Weil pairing for n = 10, p = 29.

test_encoding_random() None

Check if the same value is encoded with a random masking.

test_decoding_same() None

Check if values are encoded with a random masking.

test_decoding_after_homomorphic_add() None

Check if values can still be decrypted after a homomorphic add.

test_decoding_out_of_space() None

Check if decode return None if the message is outside of the allowed space.

test_generate_keypair() None

Check if we can create a new keypair.