latest.ipv8.test.keyvault.test_crypto

Module Contents

Classes

TestECCrypto

Tests related to ECCrypto.

class latest.ipv8.test.keyvault.test_crypto.TestECCrypto(methodName: str = 'runTest')

Bases: latest.ipv8.test.base.TestBase

Tests related to ECCrypto.

m2crypto_key
libnacl_key
setUp() None

Create a new ECCrypto object per unit test.

test_available() None

Check if the required curves are available.

test_generate_m2crypto() None

Check if M2Crypto backend keys can be generated correctly.

test_generate_nacl() None

Check if libnacl backend keys can be generated correctly.

test_generate_bogus() None

Check if a bogus curve produces a RuntimeError.

test_key_to_bin_m2crypto() None

Check if ECCrypto correctly detects an M2Crypto key for bin.

test_key_to_bin_nacl() None

Check if ECCrypto correctly detects an libnacl key for bin.

test_key_to_hash_m2crypto() None

Check if ECCrypto correctly detects an M2Crypto key for hash.

test_key_to_hash_nacl() None

Check if ECCrypto correctly detects an libnacl key for hash.

test_is_valid_private_bin_m2crypto() None

Check if ECCrypto can detect a valid M2Crypto private key.

test_is_valid_private_bin_m2crypto_public() None

Check if ECCrypto doesn’t detect a valid public M2Crypto key as a private key.

test_is_valid_private_bin_nacl() None

Check if ECCrypto can detect a valid libnacl private key.

test_is_valid_private_bin_nacl_public() None

Check if ECCrypto doesn’t detect a valid public libnacl key as a private key.

test_is_valid_public_bin_m2crypto() None

Check if ECCrypto doesn’t detect a valid M2Crypto private key as a public key.

test_is_valid_public_bin_m2crypto_public() None

Check if ECCrypto detects a valid public M2Crypto key as a public key.

test_is_valid_public_bin_nacl() None

Check if ECCrypto doesn’t detect a valid libnacl private key as a public key.

test_is_valid_public_bin_nacl_public() None

Check if ECCrypto detects a valid public libnacl key as a public key.

test_sign_and_verify_m2crypto() None

Check if ECCrypto is able to sign a verified message using a m2crypto key.

test_sign_and_verify_libnacl() None

Check if ECCrypto is able to sign a verified message using a libnacl key.