Lines Matching refs:t

43     const TEST_ENCAPDATA *t = &ec_encapdata[tstid];  in test_dhkem_encapsulate()  local
45 TEST_note("Test %s %s Decapsulate", t->curve, in test_dhkem_encapsulate()
46 t->spriv != NULL ? "Auth" : ""); in test_dhkem_encapsulate()
48 if (!TEST_ptr(rpub = new_raw_public_key(t->curve, t->rpub, t->rpublen))) in test_dhkem_encapsulate()
51 if (t->spriv != NULL) { in test_dhkem_encapsulate()
52 if (!TEST_ptr(spriv = new_raw_private_key(t->curve, in test_dhkem_encapsulate()
53 t->spriv, t->sprivlen, in test_dhkem_encapsulate()
54 t->spub, t->spublen))) in test_dhkem_encapsulate()
57 ret = do_encap(t, rpub, spriv); in test_dhkem_encapsulate()
69 const TEST_ENCAPDATA *t = &ec_encapdata[tstid]; in test_dhkem_decapsulate() local
71 TEST_note("Test %s %s Decapsulate", t->curve, t->spub != NULL ? "Auth" : ""); in test_dhkem_decapsulate()
73 if (!TEST_ptr(rpriv = new_raw_private_key(t->curve, t->rpriv, t->rprivlen, in test_dhkem_decapsulate()
74 t->rpub, t->rpublen))) in test_dhkem_decapsulate()
76 if (t->spub != NULL) { in test_dhkem_decapsulate()
77 if (!TEST_ptr(spub = new_raw_public_key(t->curve, t->spub, t->spublen))) in test_dhkem_decapsulate()
80 ret = do_decap(t, rpriv, spub); in test_dhkem_decapsulate()
122 const TEST_DERIVEKEY_DATA *t = &ec_derivekey_data[0]; in test_ec_dhkem_derivekey_fail() local
129 (char *)t->ikm, t->ikmlen); in test_ec_dhkem_derivekey_fail()
142 (char *)t->ikm, t->ikmlen); in test_ec_dhkem_derivekey_fail()
153 (char *)t->ikm, t->ikmlen - 1); in test_ec_dhkem_derivekey_fail()
171 const TEST_ENCAPDATA *t = &ec_encapdata[tstid]; in test_no_operation_set() local
178 t->expected_enc, in test_no_operation_set()
179 t->expected_enclen), -2); in test_no_operation_set()
274 const TEST_ENCAPDATA *t = &ec_encapdata[0]; in test_ec_invalid_private_key() local
282 t->rpub, t->rpublen)) in test_ec_invalid_private_key()
301 const TEST_ENCAPDATA *t = &ec_encapdata[0]; in test_ec_public_key_infinity() local
303 ret = TEST_ptr(key = new_raw_private_key(t->curve, t->rpriv, t->rprivlen, in test_ec_public_key_infinity()
312 t->expected_enc, in test_ec_public_key_infinity()
313 t->expected_enclen), 0) in test_ec_public_key_infinity()
327 const TEST_ENCAPDATA *t = &ec_encapdata[tstid]; in test_null_params() local
335 t->expected_enc, in test_null_params()
336 t->expected_enclen), 0) in test_null_params()
400 const TEST_ENCAPDATA *t = &ec_encapdata[keytype]; in test_nopublic() local
403 TEST_note("%s %s", t->curve, encap ? "Encap" : "Decap"); in test_nopublic()
404 if (!TEST_ptr(priv = new_raw_private_key(t->curve, t->rpriv, t->rprivlen, in test_nopublic()
434 const TEST_ENCAPDATA *t = &ec_encapdata[keytype]; in test_noauthpublic() local
438 TEST_note("%s %s", t->curve, encap ? "Encap" : "Decap"); in test_noauthpublic()
439 if (!TEST_ptr(auth = new_raw_private_key(t->curve, t->rpriv, in test_noauthpublic()
440 t->rprivlen, NULL, expected))) in test_noauthpublic()
471 const TEST_DERIVEKEY_DATA *t = &ec_derivekey_data[tstid]; in test_ec_dhkem_derivekey() local
478 (char *)t->curvename, 0); in test_ec_dhkem_derivekey()
480 (char *)t->ikm, t->ikmlen); in test_ec_dhkem_derivekey()
494 && TEST_mem_eq(privkey, privkeylen, t->priv, t->privlen) in test_ec_dhkem_derivekey()
495 && TEST_mem_eq(pubkey, pubkeylen, t->pub, t->publen); in test_ec_dhkem_derivekey()
607 const TEST_ENCAPDATA *t = &ec_encapdata[0]; in test_ec_badpublic() local
609 TEST_note("%s %s", t->curve, encap ? "Encap" : "Decap"); in test_ec_badpublic()
612 if (!TEST_ptr(recippriv = new_raw_private_key(t->curve, t->rpriv, t->rprivlen, in test_ec_badpublic()
632 t->expected_enc, in test_ec_badpublic()
633 t->expected_enclen), in test_ec_badpublic()
656 const TEST_ENCAPDATA *t = &ec_encapdata[TEST_KEYTYPE_P256]; in test_ec_badauth() local
659 TEST_note("%s %s", t->curve, encap ? "Encap" : "Decap"); in test_ec_badauth()
662 if (!TEST_ptr(auth = new_raw_private_key(t->curve, t->rpriv, t->rprivlen, in test_ec_badauth()
674 t->expected_enc, in test_ec_badauth()
675 t->expected_enclen), 0)) in test_ec_badauth()
688 const TEST_ENCAPDATA *t = &ec_encapdata[TEST_KEYTYPE_P256]; in test_ec_invalid_decap_enc_buffer() local
694 memcpy(enc, t->expected_enc, t->expected_enclen); in test_ec_invalid_decap_enc_buffer()
699 enc, t->expected_enclen), 0); in test_ec_invalid_decap_enc_buffer()
716 const TEST_DERIVEKEY_DATA *t = &ecx_derivekey_data[tstid]; in test_ecx_dhkem_derivekey() local
718 memcpy(masked_priv, t->priv, t->privlen); in test_ecx_dhkem_derivekey()
719 if (OPENSSL_strcasecmp(t->curvename, "X25519") == 0) { in test_ecx_dhkem_derivekey()
725 masked_priv[t->privlen - 1] &= 127; in test_ecx_dhkem_derivekey()
726 masked_priv[t->privlen - 1] |= 64; in test_ecx_dhkem_derivekey()
729 masked_priv[t->privlen - 1] |= 128; in test_ecx_dhkem_derivekey()
733 (char *)t->ikm, t->ikmlen); in test_ecx_dhkem_derivekey()
736 ret = TEST_ptr(genctx = EVP_PKEY_CTX_new_from_name(libctx, t->curvename, NULL)) in test_ecx_dhkem_derivekey()
746 && TEST_mem_eq(t->pub, t->publen, pubkey, pubkeylen) in test_ecx_dhkem_derivekey()
747 && TEST_mem_eq(masked_priv, t->privlen, privkey, privkeylen); in test_ecx_dhkem_derivekey()