Lines Matching refs:params
517 FFC_PARAMS *params, int mode, int type, in ossl_ffc_params_FIPS186_4_gen_verify() argument
534 unsigned int flags = verify ? params->flags : 0; in ossl_ffc_params_FIPS186_4_gen_verify()
539 if (params->mdname != NULL) { in ossl_ffc_params_FIPS186_4_gen_verify()
540 md = EVP_MD_fetch(libctx, params->mdname, params->mdprops); in ossl_ffc_params_FIPS186_4_gen_verify()
549 md = EVP_MD_fetch(libctx, def_name, params->mdprops); in ossl_ffc_params_FIPS186_4_gen_verify()
587 seedlen = params->seedlen; in ossl_ffc_params_FIPS186_4_gen_verify()
591 if (params->seed != NULL) in ossl_ffc_params_FIPS186_4_gen_verify()
592 seed = params->seed; in ossl_ffc_params_FIPS186_4_gen_verify()
596 if ((params->p == NULL) != (params->q == NULL)) { in ossl_ffc_params_FIPS186_4_gen_verify()
603 if (seed == NULL || params->pcounter < 0) { in ossl_ffc_params_FIPS186_4_gen_verify()
610 if (params->g == NULL) { in ossl_ffc_params_FIPS186_4_gen_verify()
622 if (params->p != NULL && ((flags & FFC_PARAM_FLAG_VALIDATE_PQ) == 0)) { in ossl_ffc_params_FIPS186_4_gen_verify()
624 p = params->p; in ossl_ffc_params_FIPS186_4_gen_verify()
625 q = params->q; in ossl_ffc_params_FIPS186_4_gen_verify()
667 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_4_gen_verify()
671 counter = params->pcounter; in ossl_ffc_params_FIPS186_4_gen_verify()
687 seed != params->seed, &m, res, cb)) in ossl_ffc_params_FIPS186_4_gen_verify()
690 if (verify && (BN_cmp(q, params->q) != 0)) { in ossl_ffc_params_FIPS186_4_gen_verify()
711 if (seed == params->seed) { in ossl_ffc_params_FIPS186_4_gen_verify()
722 if (verify && (pcounter != counter || (BN_cmp(p, params->p) != 0))) in ossl_ffc_params_FIPS186_4_gen_verify()
735 && !ossl_ffc_params_validate_unverifiable_g(ctx, mont, p, q, params->g, in ossl_ffc_params_FIPS186_4_gen_verify()
749 if ((seed != NULL) && (params->gindex != FFC_UNVERIFIABLE_GINDEX)) { in ossl_ffc_params_FIPS186_4_gen_verify()
752 params->gindex, seed, seedlen)) { in ossl_ffc_params_FIPS186_4_gen_verify()
757 if (verify && BN_cmp(g, params->g) != 0) { in ossl_ffc_params_FIPS186_4_gen_verify()
770 if (p != params->p) { in ossl_ffc_params_FIPS186_4_gen_verify()
771 BN_free(params->p); in ossl_ffc_params_FIPS186_4_gen_verify()
772 params->p = BN_dup(p); in ossl_ffc_params_FIPS186_4_gen_verify()
774 if (q != params->q) { in ossl_ffc_params_FIPS186_4_gen_verify()
775 BN_free(params->q); in ossl_ffc_params_FIPS186_4_gen_verify()
776 params->q = BN_dup(q); in ossl_ffc_params_FIPS186_4_gen_verify()
778 if (g != params->g) { in ossl_ffc_params_FIPS186_4_gen_verify()
779 BN_free(params->g); in ossl_ffc_params_FIPS186_4_gen_verify()
780 params->g = BN_dup(g); in ossl_ffc_params_FIPS186_4_gen_verify()
782 if (params->p == NULL || params->q == NULL || params->g == NULL) in ossl_ffc_params_FIPS186_4_gen_verify()
784 if (!ossl_ffc_params_set_validate_params(params, seed, seedlen, in ossl_ffc_params_FIPS186_4_gen_verify()
787 params->h = hret; in ossl_ffc_params_FIPS186_4_gen_verify()
796 if (seed != params->seed) in ossl_ffc_params_FIPS186_4_gen_verify()
810 FFC_PARAMS *params, int mode, int type, in ossl_ffc_params_FIPS186_2_gen_verify() argument
827 unsigned char *seed_in = params->seed; in ossl_ffc_params_FIPS186_2_gen_verify()
828 size_t seed_len = params->seedlen; in ossl_ffc_params_FIPS186_2_gen_verify()
830 unsigned int flags = verify ? params->flags : 0; in ossl_ffc_params_FIPS186_2_gen_verify()
835 if (params->mdname != NULL) { in ossl_ffc_params_FIPS186_2_gen_verify()
836 md = EVP_MD_fetch(libctx, params->mdname, params->mdprops); in ossl_ffc_params_FIPS186_2_gen_verify()
845 md = EVP_MD_fetch(libctx, def_name, params->mdprops); in ossl_ffc_params_FIPS186_2_gen_verify()
906 if ((params->p != NULL) != (params->q != NULL)) { in ossl_ffc_params_FIPS186_2_gen_verify()
913 if (seed_in == NULL || params->pcounter < 0) { in ossl_ffc_params_FIPS186_2_gen_verify()
920 if (params->g == NULL) { in ossl_ffc_params_FIPS186_2_gen_verify()
927 if (params->p != NULL && ((flags & FFC_PARAM_FLAG_VALIDATE_PQ) == 0)) { in ossl_ffc_params_FIPS186_2_gen_verify()
929 p = params->p; in ossl_ffc_params_FIPS186_2_gen_verify()
930 q = params->q; in ossl_ffc_params_FIPS186_2_gen_verify()
951 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_2_gen_verify()
955 counter = params->pcounter; in ossl_ffc_params_FIPS186_2_gen_verify()
976 if (BN_cmp(p, params->p) != 0) { in ossl_ffc_params_FIPS186_2_gen_verify()
1002 params->g, tmp, in ossl_ffc_params_FIPS186_2_gen_verify()
1011 if (p != params->p) { in ossl_ffc_params_FIPS186_2_gen_verify()
1012 BN_free(params->p); in ossl_ffc_params_FIPS186_2_gen_verify()
1013 params->p = BN_dup(p); in ossl_ffc_params_FIPS186_2_gen_verify()
1015 if (q != params->q) { in ossl_ffc_params_FIPS186_2_gen_verify()
1016 BN_free(params->q); in ossl_ffc_params_FIPS186_2_gen_verify()
1017 params->q = BN_dup(q); in ossl_ffc_params_FIPS186_2_gen_verify()
1019 if (g != params->g) { in ossl_ffc_params_FIPS186_2_gen_verify()
1020 BN_free(params->g); in ossl_ffc_params_FIPS186_2_gen_verify()
1021 params->g = BN_dup(g); in ossl_ffc_params_FIPS186_2_gen_verify()
1023 if (params->p == NULL || params->q == NULL || params->g == NULL) in ossl_ffc_params_FIPS186_2_gen_verify()
1025 if (!ossl_ffc_params_set_validate_params(params, seed, qsize, pcounter)) in ossl_ffc_params_FIPS186_2_gen_verify()
1027 params->h = hret; in ossl_ffc_params_FIPS186_2_gen_verify()
1043 int ossl_ffc_params_FIPS186_4_generate(OSSL_LIB_CTX *libctx, FFC_PARAMS *params, in ossl_ffc_params_FIPS186_4_generate() argument
1047 return ossl_ffc_params_FIPS186_4_gen_verify(libctx, params, in ossl_ffc_params_FIPS186_4_generate()
1053 int ossl_ffc_params_FIPS186_2_generate(OSSL_LIB_CTX *libctx, FFC_PARAMS *params, in ossl_ffc_params_FIPS186_2_generate() argument
1057 if (!ossl_ffc_params_FIPS186_2_gen_verify(libctx, params, in ossl_ffc_params_FIPS186_2_generate()
1062 ossl_ffc_params_enable_flags(params, FFC_PARAM_FLAG_VALIDATE_LEGACY, 1); in ossl_ffc_params_FIPS186_2_generate()