/optee_os/core/lib/libtomcrypt/src/hashes/ |
A D | sha3_test.c | 413 if(compare_testvector(hash, 28, in keccak_224_test() 425 if(compare_testvector(hash, 28, in keccak_224_test() 439 if(compare_testvector(hash, 28, in keccak_224_test() 464 if(compare_testvector(hash, 28, in keccak_224_test() 488 if(compare_testvector(hash, 32, in keccak_256_test() 500 if(compare_testvector(hash, 32, in keccak_256_test() 514 if(compare_testvector(hash, 32, in keccak_256_test() 539 if(compare_testvector(hash, 32, in keccak_256_test() 563 if(compare_testvector(hash, 48, in keccak_384_test() 577 if(compare_testvector(hash, 48, in keccak_384_test() [all …]
|
A D | blake2b.c | 486 …if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_512", i)) { in blake2b_512_test() 533 …if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_384", i)) { in blake2b_384_test() 586 …if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_256", i)) { in blake2b_256_test() 627 …if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_160", i)) { in blake2b_160_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/ |
A D | chacha20poly1305_test.c | 57 …if (compare_testvector(ct, mlen, enc, sizeof(enc), "ENC-CT", 1) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 58 …if (compare_testvector(emac, len, tag, sizeof(tag), "ENC-TAG", 2) != 0) return CRYPT_FAIL_TESTVECT… in chacha20poly1305_test() 69 if (compare_testvector(pt, mlen, m, mlen, "DEC-PT", 3) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 70 …if (compare_testvector(dmac, len, tag, sizeof(tag), "DEC-TAG", 4) != 0) return CRYPT_FAIL_TESTVECT… in chacha20poly1305_test() 76 …if (compare_testvector(ct, mlen, enc, sizeof(enc), "ENC-CT2", 1) != 0) return CRYPT_FAIL_TESTVECTO… in chacha20poly1305_test() 84 if (compare_testvector(pt, mlen, m, mlen, "DEC-PT2", 3) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 94 if (compare_testvector(ct, 16, rfc7905_enc, 16, "ENC-CT3", 1) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 95 …if (compare_testvector(emac, len, rfc7905_tag, 16, "ENC-TAG3", 2) != 0) return CRYPT_FAIL_TESTVECT… in chacha20poly1305_test() 105 if (compare_testvector(pt, 16, rfc7905_pt, 16, "DEC-CT3", 1) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 124 if (compare_testvector(pt, mlen, m, mlen, "DEC-PT4", 1) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() [all …]
|
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/ |
A D | ocb3_test.c | 230 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB3 Tag", x) || in ocb3_test() 231 … compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB3 CT", x)) { in ocb3_test() 243 …if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x… in ocb3_test() 263 if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag", x) || in ocb3_test() 264 compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x)) { in ocb3_test() 276 if ((res != 1) || compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3", x)) { in ocb3_test() 291 …if (compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x)) return CRYPT_FAIL_T… in ocb3_test() 292 …if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.enc", x)) return CRYPT_FAIL_T… in ocb3_test() 299 …if (compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3 PT", x)) return CRYPT_FAIL_T… in ocb3_test() 300 …if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.dec", x)) return CRYPT_FAIL_T… in ocb3_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/chacha/ |
A D | chacha_test.c | 53 …if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV1", 1)) return CRY… in chacha_test() 59 …if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV2", 1)) return CRY… in chacha_test() 65 …if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV3", 1)) return CRY… in chacha_test() 70 …if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV4", 1)) return CRY… in chacha_test() 75 …if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV5", 1)) return CRY… in chacha_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/sosemanuk/ |
A D | sosemanuk_test.c | 40 …if (compare_testvector(out, len, ct, sizeof(ct), "SOSEMANUK-TV1", 1)) return … in sosemanuk_test() 46 …if (compare_testvector(out, len, ct, sizeof(ct), "SOSEMANUK-TV2", 1)) return CRYPT_FAIL_TEST… in sosemanuk_test() 51 …if (compare_testvector(out, len, ct, sizeof(ct), "SOSEMANUK-TV3", 1)) return CRYPT_FAIL_TEST… in sosemanuk_test() 79 …if (compare_testvector(out, 64, ct3, sizeof(ct3), "SOSEMANUK-TV4", 1)) return CRYPT_FAIL_TESTVECTO… in sosemanuk_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/ |
A D | salsa20_test.c | 53 …if (compare_testvector(out, len, ct, sizeof(ct), "SALSA20-TV1", 1)) return CRYPT_FAIL_TESTV… in salsa20_test() 61 …if (compare_testvector(out, len, ct2, sizeof(ct2), "SALSA20-TV2", 1)) return CRYPT_FAIL_TESTV… in salsa20_test() 66 …if (compare_testvector(out, len, ct2, sizeof(ct2), "SALSA20-TV3", 1)) return CRYPT_FAIL_TESTV… in salsa20_test() 86 …if (compare_testvector(out, 64, ct3, sizeof(ct3), "SALSA20-TV4", 1)) return CRYPT_FAIL_TEST… in salsa20_test()
|
A D | xsalsa20_test.c | 60 …if (compare_testvector(msg, msglen, msg2, msglen, "XSALSA20-TV1", 1)) return CRYPT_FAIL_TESTVECTO… in xsalsa20_test() 66 …if (compare_testvector(msg, msglen, msg2, msglen, "XSALSA20-TV2", 1)) return CRYPT_FAIL_TESTVECTO… in xsalsa20_test() 88 …if (compare_testvector(hash, sizeof(hash), expecthash, sizeof(expecthash), "XSALSA20-TV3", 1)) … in xsalsa20_test()
|
/optee_os/core/lib/libtomcrypt/src/modes/lrw/ |
A D | lrw_test.c | 90 if (compare_testvector(tests[x].expected_tweak, 16, lrw.pad, 16, "LRW Tweak", x)) { in lrw_test() 101 if (compare_testvector(buf[0], 16, tests[x].C, 16, "LRW Encrypt", x)) { in lrw_test() 117 if (compare_testvector(buf[1], 16, tests[x].P, 16, "LRW Decrypt", x)) { in lrw_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/ |
A D | gcm_test.c | 346 …if (compare_testvector(T[0], y, tests[0].T, 16, "GCM Encrypt Tag-special", 0)) return CRYPT_F… in gcm_test() 358 if (compare_testvector(out[0], tests[x].ptlen, tests[x].C, tests[x].ptlen, "GCM CT", x)) { in gcm_test() 362 if (compare_testvector(T[0], y, tests[x].T, 16, "GCM Encrypt Tag", x)) { in gcm_test() 376 if (compare_testvector(out[1], tests[x].ptlen, tests[x].P, tests[x].ptlen, "GCM PT", x)) { in gcm_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/ |
A D | ocb_test.c | 184 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB Tag", x) || in ocb_test() 185 compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB CT", x)) { in ocb_test() 193 …if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)… in ocb_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/eax/ |
A D | eax_test.c | 233 if (compare_testvector(outtag, len, tests[x].tag, len, "EAX Tag", x) || in eax_test() 234 … compare_testvector(outct, tests[x].msglen, tests[x].ciphertext, tests[x].msglen, "EAX CT", x)) { in eax_test() 244 …if ((res != 1) || compare_testvector(outct, tests[x].msglen, tests[x].plaintext, tests[x].msglen, … in eax_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_test.c | 178 … if (compare_testvector(buf, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "CCM encrypt data", x)) { in ccm_test() 181 if (compare_testvector(tag, taglen, tests[x].tag, tests[x].taglen, "CCM encrypt tag", x)) { in ccm_test() 217 …if (compare_testvector(buf2, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "CCM decrypt data", x)) { in ccm_test() 235 … if (compare_testvector(buf2, tests[x].ptlen, zero, tests[x].ptlen, "CCM decrypt wrong tag", x)) { in ccm_test() 239 … if (compare_testvector(tag2, taglen, tests[x].tag, tests[x].taglen, "CCM decrypt tag", x)) { in ccm_test()
|
/optee_os/core/lib/libtomcrypt/src/misc/pkcs5/ |
A D | pkcs_5_test.c | 184 … else if (compare_testvector(DK, dkLen, cases_5_2[i].DK, cases_5_2[i].dkLen, "PKCS#5_2", i)) { in pkcs_5_test() 201 … else if (compare_testvector(DK, dkLen, cases_5_1[i].DK, cases_5_1[i].dkLen, "PKCS#5_1", i)) { in pkcs_5_test() 218 … else if (compare_testvector(DK, dkLen, cases_5_1o[i].DK, cases_5_1o[i].dkLen, "PKCS#5_1o", i)) { in pkcs_5_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/rc4/ |
A D | rc4_test.c | 29 …if (compare_testvector(buf, sizeof(ct), ct, sizeof(ct), "RC4-TV1", 0)) return CRYPT_FAIL_TESTVECT… in rc4_stream_test() 34 …if (compare_testvector(buf, sizeof(ct), ct, sizeof(ct), "RC4-TV2", 0)) return CRYPT_FAIL_TESTVECT… in rc4_stream_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/sober128/ |
A D | sober128_test.c | 35 if (compare_testvector(dst, len, out, len, "SOBER-128-TV1", 0)) { in sober128_stream_test() 42 if (compare_testvector(dst, len, out, len, "SOBER-128-TV2", 0)) { in sober128_stream_test()
|
/optee_os/core/lib/libtomcrypt/src/mac/blake2/ |
A D | blake2bmac_test.c | 299 …if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", ilen) != 0) return CRYPT_FAIL_TE… in blake2bmac_test() 305 …if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", ilen) != 0) return CRYPT_FAIL_T… in blake2bmac_test()
|
A D | blake2smac_test.c | 299 …if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", ilen) != 0) return CRYPT_FAIL_TE… in blake2smac_test() 305 …if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", ilen) != 0) return CRYPT_FAIL_T… in blake2smac_test()
|
/optee_os/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305_test.c | 43 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV1", 1) != 0) return CRYPT_FAI… in poly1305_test() 48 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV2", 1) != 0) return CRYPT_FAI… in poly1305_test()
|
/optee_os/core/lib/libtomcrypt/src/stream/rabbit/ |
A D | rabbit.c | 374 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV1", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test() 399 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV2", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test() 424 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV3", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test() 430 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV4", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test() 438 … if (compare_testvector(out2, ptlen, pt, ptlen, "RABBIT-TV5", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test() 443 …if (compare_testvector(&st, sizeof(st), nulls, sizeof(st), "RABBIT-TV6", 1)) return CRYPT_FAIL_TE… in rabbit_test()
|
/optee_os/core/lib/libtomcrypt/src/prngs/ |
A D | sober128.c | 206 … if (compare_testvector(out, 10, t1, sizeof(t1), "SOBER128-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; in sober128_test() 214 … if (compare_testvector(out, 10, t2, sizeof(t2), "SOBER128-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in sober128_test() 220 … if (compare_testvector(out, 10, t3, sizeof(t3), "SOBER128-PRNG", 3)) return CRYPT_FAIL_TESTVECTOR; in sober128_test()
|
A D | chacha20.c | 204 …if (compare_testvector(out, 10, t1, sizeof(t1), "CHACHA-PRNG", 1)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test() 212 …if (compare_testvector(out, 10, t2, sizeof(t2), "CHACHA-PRNG", 2)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test() 218 …if (compare_testvector(out, 10, t3, sizeof(t3), "CHACHA-PRNG", 3)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test()
|
A D | rc4.c | 207 if (compare_testvector(out, 10, t1, sizeof(t1), "RC4-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; in rc4_test() 215 if (compare_testvector(out, 10, t2, sizeof(t2), "RC4-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in rc4_test() 221 if (compare_testvector(out, 10, t3, sizeof(t3), "RC4-PRNG", 3)) return CRYPT_FAIL_TESTVECTOR; in rc4_test()
|
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | safer.c | 398 if (compare_testvector(buf[0], 8, k64_ct, 8, "Safer K64 Encrypt", 0) != 0 || in safer_k64_test() 399 compare_testvector(buf[1], 8, k64_pt, 8, "Safer K64 Decrypt", 0) != 0) { in safer_k64_test() 429 if (compare_testvector(buf[0], 8, sk64_ct, 8, "Safer SK64 Encrypt", 0) != 0 || in safer_sk64_test() 430 compare_testvector(buf[1], 8, sk64_pt, 8, "Safer SK64 Decrypt", 0) != 0) { in safer_sk64_test() 473 if (compare_testvector(buf[0], 8, sk128_ct, 8, "Safer SK128 Encrypt", 0) != 0 || in safer_sk128_test() 474 compare_testvector(buf[1], 8, sk128_pt, 8, "Safer SK128 Decrypt", 0) != 0) { in safer_sk128_test()
|
/optee_os/core/lib/libtomcrypt/src/ciphers/ |
A D | multi2.c | 260 if (compare_testvector(buf, 8, tests[x].ct, 8, "Multi2 Encrypt", x)) { in multi2_test() 267 if (compare_testvector(buf, 8, tests[x].pt, 8, "Multi2 Decrypt", x)) { in multi2_test() 284 if (compare_testvector(buf, 8, tests[0].pt, 8, "Multi2 Rounds", x)) { in multi2_test()
|