Lines Matching refs:ffc
12 #include "internal/ffc.h"
212 int ossl_ffc_params_todata(const FFC_PARAMS *ffc, OSSL_PARAM_BLD *bld,
217 if (ffc == NULL)
220 if (ffc->p != NULL
221 && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_P, ffc->p))
223 if (ffc->q != NULL
224 && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_Q, ffc->q))
226 if (ffc->g != NULL
227 && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_FFC_G, ffc->g))
229 if (ffc->j != NULL
231 ffc->j))
234 ffc->gindex))
237 ffc->pcounter))
239 if (!ossl_param_build_set_int(bld, params, OSSL_PKEY_PARAM_FFC_H, ffc->h))
241 if (ffc->seed != NULL
244 ffc->seed, ffc->seedlen))
246 if (ffc->nid != NID_undef) {
247 const DH_NAMED_GROUP *group = ossl_ffc_uid_to_dh_named_group(ffc->nid);
256 test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_PQ) != 0);
260 test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_G) != 0);
264 test_flags = ((ffc->flags & FFC_PARAM_FLAG_VALIDATE_LEGACY) != 0);
270 if (ffc->mdname != NULL
273 ffc->mdname))
275 if (ffc->mdprops != NULL
278 ffc->mdprops))
284 int ossl_ffc_params_print(BIO *bp, const FFC_PARAMS *ffc, int indent)
286 if (!ASN1_bn_print(bp, "prime P:", ffc->p, NULL, indent))
288 if (!ASN1_bn_print(bp, "generator G:", ffc->g, NULL, indent))
290 if (ffc->q != NULL
291 && !ASN1_bn_print(bp, "subgroup order Q:", ffc->q, NULL, indent))
293 if (ffc->j != NULL
294 && !ASN1_bn_print(bp, "subgroup factor:", ffc->j, NULL, indent))
296 if (ffc->seed != NULL) {
302 for (i = 0; i < ffc->seedlen; i++) {
308 if (BIO_printf(bp, "%02x%s", ffc->seed[i],
309 ((i + 1) == ffc->seedlen) ? "" : ":") <= 0)
315 if (ffc->pcounter != -1) {
317 || BIO_printf(bp, "counter: %d\n", ffc->pcounter) <= 0)