Lines Matching refs:enclen
391 size_t *enclen, in hpke_expansion() argument
398 if (cipherlen == NULL || enclen == NULL) { in hpke_expansion()
407 *enclen = kem_info->Nenc; in hpke_expansion()
446 static int hpke_encap(OSSL_HPKE_CTX *ctx, unsigned char *enc, size_t *enclen, in hpke_encap() argument
456 if (ctx == NULL || enc == NULL || enclen == NULL || *enclen == 0 in hpke_encap()
510 lenclen = *enclen; in hpke_encap()
515 if (lenclen > *enclen) { in hpke_encap()
523 if (EVP_PKEY_encapsulate(pctx, enc, enclen, ctx->shared_secret, in hpke_encap()
548 const unsigned char *enc, size_t enclen, in hpke_decap() argument
557 if (ctx == NULL || enc == NULL || enclen == 0 || priv == NULL) { in hpke_decap()
610 if (EVP_PKEY_decapsulate(pctx, NULL, &lsslen, enc, enclen) != 1) { in hpke_decap()
618 enc, enclen) != 1) { in hpke_decap()
1057 unsigned char *enc, size_t *enclen, in OSSL_HPKE_encap() argument
1064 if (ctx == NULL || enc == NULL || enclen == NULL || *enclen == 0 in OSSL_HPKE_encap()
1082 if (minenc == 0 || minenc > *enclen) { in OSSL_HPKE_encap()
1091 if (hpke_encap(ctx, enc, enclen, pub, publen) != 1) { in OSSL_HPKE_encap()
1105 const unsigned char *enc, size_t enclen, in OSSL_HPKE_decap() argument
1112 if (ctx == NULL || enc == NULL || enclen == 0 || recippriv == NULL) { in OSSL_HPKE_decap()
1129 if (minenc == 0 || minenc > enclen) { in OSSL_HPKE_decap()
1138 erv = hpke_decap(ctx, enc, enclen, recippriv); in OSSL_HPKE_decap()
1365 unsigned char *enc, size_t *enclen, in OSSL_HPKE_get_grease_value() argument
1375 if (enc == NULL || enclen == 0 in OSSL_HPKE_get_grease_value()
1401 if (plen > *enclen) { in OSSL_HPKE_get_grease_value()
1412 if (OSSL_HPKE_keygen(chosen, enc, enclen, &fakepriv, NULL, 0, in OSSL_HPKE_get_grease_value()
1434 size_t enclen = 0; in OSSL_HPKE_get_ciphertext_size() local
1437 if (hpke_expansion(suite, &enclen, clearlen, &cipherlen) != 1) in OSSL_HPKE_get_ciphertext_size()
1444 size_t enclen = 0; in OSSL_HPKE_get_public_encap_size() local
1448 if (hpke_expansion(suite, &enclen, clearlen, &cipherlen) != 1) in OSSL_HPKE_get_public_encap_size()
1450 return enclen; in OSSL_HPKE_get_public_encap_size()