Exemplo n.º 1
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(TestEccPoint_NIST)
    tests += list_test_cases(TestEccPoint_PAI)
    tests += list_test_cases(TestEccKey)
    tests += list_test_cases(TestEccModule)
    return tests
def get_tests(config={}):
    tests = []
    tests += list_test_cases(OfbTests)
    if config.get('slow_tests'):
        tests += list_test_cases(NistOfbVectors)
    tests += list_test_cases(SP800TestVectors)
    return tests
def get_tests(config={}):
    wycheproof_warnings = config.get('wycheproof_warnings')

    tests = []
    tests += list_test_cases(SivTests)
    tests += list_test_cases(SivFSMTests)
    tests += [ TestVectors() ]
    tests += [ TestVectorsWycheproof() ]
    return tests
Exemplo n.º 4
0
def get_tests(config={}):
    wycheproof_warnings = config.get('wycheproof_warnings')

    tests = []
    tests += list_test_cases(EaxTests)
    tests += list_test_cases(EaxFSMTests)
    tests += [TestVectorsPaper()]
    tests += [TestVectorsWycheproof(wycheproof_warnings)]
    tests += list_test_cases(TestOtherCiphers)
    return tests
def get_tests(config={}):
    tests = []

    tests += list_test_cases(Blake2bTest)
    tests.append(Blake2bOfficialTestVector())
    tests.append(Blake2bTestVector1())
    tests.append(Blake2bTestVector2())

    tests += list_test_cases(Blake2sTest)
    tests.append(Blake2sOfficialTestVector())
    tests.append(Blake2sTestVector1())
    tests.append(Blake2sTestVector2())

    return tests
def get_tests(config={}):

    if not config.get('slow_tests'):
        PBKDF2_Tests._testData = PBKDF2_Tests._testData[:3]
        scrypt_Tests.data = scrypt_Tests.data[:3]

    tests = []
    tests += list_test_cases(PBKDF1_Tests)
    tests += list_test_cases(PBKDF2_Tests)
    tests += list_test_cases(S2V_Tests)
    tests += list_test_cases(HKDF_Tests)
    tests += list_test_cases(scrypt_Tests)

    return tests
Exemplo n.º 7
0
def get_tests(config={}):
    from .common import make_block_tests

    tests = []
    tests = make_block_tests(DES3, "DES3", test_data)
    tests.append(DegenerateToDESTest())
    tests += list_test_cases(CheckParity)
    return tests
def get_tests(config={}):
    from crypto.SelfTest.st_common import list_test_cases
    listTests = []
    listTests += list_test_cases(DerObjectTests)
    listTests += list_test_cases(DerIntegerTests)
    listTests += list_test_cases(DerSequenceTests)
    listTests += list_test_cases(DerOctetStringTests)
    listTests += list_test_cases(DerNullTests)
    listTests += list_test_cases(DerObjectIdTests)
    listTests += list_test_cases(DerBitStringTests)
    listTests += list_test_cases(DerSetOfTests)
    return listTests
Exemplo n.º 9
0
def get_tests(config={}):
    tests = make_stream_tests(Salsa20, "Salsa20", test_data)
    tests.append(KeyLength())
    tests += list_test_cases(NonceTests)
    tests.append(ByteArrayTest())

    import types
    if _memoryview != type(None):
        tests.append(MemoryviewTest())

    return tests
def get_tests(config={}):
    tests = []
    tests += list_test_cases(ChaCha20Test)
    tests.append(ChaCha20_AGL_NIR())
    tests.append(ByteArrayTest())

    import types
    if _memoryview != type(None):
        tests.append(MemoryviewTest())

    return tests
Exemplo n.º 11
0
def get_tests(config={}):
    from crypto.Util import _cpu_features

    wycheproof_warnings = config.get('wycheproof_warnings')

    tests = []
    tests += list_test_cases(GcmTests)
    tests += list_test_cases(GcmFSMTests)
    tests += [ TestVectors() ]
    tests += [ TestVectorsWycheproof(wycheproof_warnings) ]
    tests += list_test_cases(TestVectorsGueronKrasnov)
    tests += [ TestVariableLength() ]
    if config.get('slow_tests'):
        tests += list_test_cases(NISTTestVectorsGCM)

    if _cpu_features.have_clmul():
        tests += [ TestVectorsWycheproof(wycheproof_warnings, use_clmul=False) ]
        tests += [ TestVariableLength(use_clmul = False) ]
        if config.get('slow_tests'):
            tests += list_test_cases(NISTTestVectorsGCM_no_clmul)
    else:
        print("Skipping test of PCLMULDQD in AES GCM")

    return tests
Exemplo n.º 12
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(FIPS_PKCS1_Verify_Tests)
    tests += list_test_cases(FIPS_PKCS1_Sign_Tests)
    tests += list_test_cases(PKCS1_Legacy_Module_Tests)
    tests += list_test_cases(PKCS1_All_Hashes_Tests)

    if config.get('slow_tests'):
        tests += list_test_cases(FIPS_PKCS1_Verify_Tests_KAT)
        tests += list_test_cases(FIPS_PKCS1_Sign_Tests_KAT)

    return tests
Exemplo n.º 13
0
def get_tests(config={}):
    wycheproof_warnings = config.get('wycheproof_warnings')

    tests = []
    tests += list_test_cases(FIPS_PKCS1_Verify_Tests)
    tests += list_test_cases(FIPS_PKCS1_Sign_Tests)
    tests += list_test_cases(PKCS1_15_NoParams)
    tests += list_test_cases(PKCS1_Legacy_Module_Tests)
    tests += list_test_cases(PKCS1_All_Hashes_Tests)
    tests += [ TestVectorsWycheproof(wycheproof_warnings) ]

    if config.get('slow_tests'):
        tests += list_test_cases(FIPS_PKCS1_Verify_Tests_KAT)
        tests += list_test_cases(FIPS_PKCS1_Sign_Tests_KAT)

    return tests
def get_tests(config={}):
    from .common import make_hash_tests

    tests = []

    test_vectors = load_tests(("Crypto", "SelfTest", "Hash", "test_vectors", "SHA3"),
                                "ShortMsgKAT_SHA3-512.txt",
                                "KAT SHA-3 512",
                                { "len" : lambda x: int(x) } )

    test_data = []
    for tv in test_vectors:
        if tv.len == 0:
            tv.msg = b("")
        test_data.append((hexlify(tv.md), tv.msg, tv.desc))

    tests += make_hash_tests(SHA3, "SHA3_512", test_data,
                             digest_size=SHA3.digest_size,
                             oid="2.16.840.1.101.3.4.2.10")
    tests += list_test_cases(APITest)
    return tests
Exemplo n.º 15
0
def get_tests(config={}):
    wycheproof_warnings = config.get('wycheproof_warnings')

    tests = []
    tests += list_test_cases(FIPS_DSA_Tests)
    tests += list_test_cases(FIPS_ECDSA_Tests)
    tests += list_test_cases(Det_DSA_Tests)
    tests += list_test_cases(Det_ECDSA_Tests)

    if config.get('slow_tests'):
        tests += list_test_cases(FIPS_DSA_Tests_KAT)
        tests += list_test_cases(FIPS_ECDSA_Tests_KAT)

    tests += [TestVectorsDSAWycheproof(wycheproof_warnings)]
    tests += [TestVectorsECDSAWycheproof(wycheproof_warnings)]

    return tests
Exemplo n.º 16
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(RSATest)
    return tests
Exemplo n.º 17
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PKCS1_15_Tests)
    return tests
Exemplo n.º 18
0
def get_tests(config={}):
    from crypto.SelfTest.st_common import list_test_cases
    return list_test_cases(CounterTests)
Exemplo n.º 19
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(ElGamalTest)
    return tests
def get_tests(config={}):
    tests = []
    tests += list_test_cases(GF2_Tests)
    tests += list_test_cases(Element_Tests)
    tests += list_test_cases(Shamir_Tests)
    return tests
Exemplo n.º 21
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PKCS7_Tests)
    tests += list_test_cases(X923_Tests)
    tests += list_test_cases(ISO7816_Tests)
    return tests
def get_tests(config={}):
    from crypto.SelfTest.st_common import list_test_cases
    listTests = []
    listTests += list_test_cases(TestPBES2)
    return listTests
Exemplo n.º 23
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(TestModExp)
    return tests
def get_tests(config={}):
    from crypto.SelfTest.st_common import list_test_cases
    tests = list_test_cases(MiscTests)
    return tests
Exemplo n.º 25
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(TestPrimality)
    return tests
def get_tests(config={}):
    tests = []
    tests += list_test_cases(SHAKE128Test)
    tests += list_test_cases(SHAKE256Test)
    tests += list_test_cases(SHAKEVectors)
    return tests
Exemplo n.º 27
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(OcbTests)
    tests += list_test_cases(OcbFSMTests)
    tests += list_test_cases(OcbRfc7253Test)
    return tests
Exemplo n.º 28
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(CtrTests)
    tests += list_test_cases(SP800TestVectors)
    tests += [RFC3686TestVectors()]
    return tests
Exemplo n.º 29
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(StrxorTests)
    tests += list_test_cases(Strxor_cTests)
    return tests
Exemplo n.º 30
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(OpenPGPTests)
    tests += list_test_cases(TestVectors)
    return tests