/freebsd-13-stable/crypto/openssl/crypto/dsa/ |
H A D | dsa_key.c | 29 BIGNUM *pub_key = NULL, *priv_key = NULL; local 34 if (dsa->priv_key == NULL) { 35 if ((priv_key = BN_secure_new()) == NULL) 38 priv_key = dsa->priv_key; 41 if (!BN_priv_rand_range(priv_key, dsa->q)) 43 while (BN_is_zero(priv_key)) ; 56 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); 62 /* We MUST free prk before any further use of priv_key */ 66 dsa->priv_key [all...] |
H A D | dsa_lib.c | 130 BN_clear_free(r->priv_key); 189 * DSA has p, q, g, optional pub_key, optional priv_key. DH has p, 190 * optional length, g, optional pub_key, optional priv_key, optional q. 194 BIGNUM *p = NULL, *q = NULL, *g = NULL, *pub_key = NULL, *priv_key = NULL; local 218 if (r->priv_key != NULL) { 219 priv_key = BN_dup(r->priv_key); 220 if (priv_key == NULL) 223 if (!DH_set0_key(ret, pub_key, priv_key)) 225 } else if (r->priv_key ! 280 DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) argument 289 DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) argument [all...] |
H A D | dsa_ameth.c | 167 if ((dsa->priv_key = BN_secure_new()) == NULL 168 || !ASN1_INTEGER_to_BN(privkey, dsa->priv_key)) { 182 BN_set_flags(dsa->priv_key, BN_FLG_CONSTTIME); 183 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) { 210 if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) { 230 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL); 333 const BIGNUM *priv_key, *pub_key; local 336 priv_key = x->priv_key; 338 priv_key [all...] |
H A D | dsa_local.h | 24 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
|
H A D | dsa_ossl.c | 75 if (dsa->priv_key == NULL) { 115 * s := k^-1 * (m + r * priv_key) mod q 119 * s := blind^-1 * k^-1 * (blind * m + blind * r * priv_key) mod q 132 /* tmp := blind * priv_key * r mod q */ 133 if (!BN_mod_mul(tmp, blind, dsa->priv_key, dsa->q, ctx)) 142 /* s : = (blind * priv_key * r) + (blind * m) mod q */ 202 if (dsa->priv_key == NULL) { 232 if (!BN_generate_dsa_nonce(k, dsa->q, dsa->priv_key, dgst,
|
H A D | dsa_asn1.c | 83 ASN1_SIMPLE(DSA, priv_key, CBIGNUM)
|
/freebsd-13-stable/crypto/openssl/crypto/dh/ |
H A D | dh_key.c | 110 BIGNUM *pub_key = NULL, *priv_key = NULL; local 121 if (dh->priv_key == NULL) { 122 priv_key = BN_secure_new(); 123 if (priv_key == NULL) 127 priv_key = dh->priv_key; 146 if (!BN_priv_rand_range(priv_key, dh->q)) 149 while (BN_is_zero(priv_key) || BN_is_one(priv_key)); 153 if (!BN_priv_rand(priv_key, [all...] |
H A D | dh_lib.c | 126 BN_clear_free(r->priv_key); 226 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) argument 230 if (priv_key != NULL) 231 *priv_key = dh->priv_key; 234 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) argument 240 if (priv_key != NULL) { 241 BN_clear_free(dh->priv_key); 242 dh->priv_key = priv_key; [all...] |
H A D | dh_local.h | 24 BIGNUM *priv_key; /* x */ member in struct:dh_st
|
H A D | dh_ameth.c | 179 if ((dh->priv_key = BN_secure_new()) == NULL 180 || !ASN1_INTEGER_to_BN(privkey, dh->priv_key)) { 224 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dh->priv_key, NULL); 271 BIGNUM *priv_key, *pub_key; local 274 priv_key = x->priv_key; 276 priv_key = NULL; 283 if (x->p == NULL || (ptype == 2 && priv_key == NULL) 301 if (!ASN1_bn_print(bp, "private-key:", priv_key, NULL, indent))
|
/freebsd-13-stable/crypto/openssl/crypto/ec/ |
H A D | ec_key.c | 69 BN_clear_free(r->priv_key); 112 if (src->priv_key != NULL) { 113 if (dest->priv_key == NULL) { 114 dest->priv_key = BN_new(); 115 if (dest->priv_key == NULL) 118 if (!BN_copy(dest->priv_key, src->priv_key)) 203 BIGNUM *priv_key = NULL; local 210 if (eckey->priv_key == NULL) { 211 priv_key 418 EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) argument [all...] |
H A D | ecdh_ossl.c | 44 const BIGNUM *priv_key; local 59 priv_key = EC_KEY_get0_private_key(ecdh); 60 if (priv_key == NULL) { 69 !BN_mul(x, x, priv_key, ctx)) { 73 priv_key = x; 81 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) {
|
H A D | ec_asn1.c | 994 EC_PRIVATEKEY *priv_key = NULL; local 997 if ((priv_key = d2i_EC_PRIVATEKEY(NULL, &p, len)) == NULL) { 1010 if (priv_key->parameters) { 1012 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters); 1014 && priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT) 1023 ret->version = priv_key->version; 1025 if (priv_key->privateKey) { 1026 ASN1_OCTET_STRING *pkey = priv_key->privateKey; 1042 if (priv_key->publicKey) { 1046 pub_oct = ASN1_STRING_get0_data(priv_key 1079 EC_PRIVATEKEY *priv_key = NULL; local [all...] |
H A D | ecdsa_ossl.c | 44 const BIGNUM *priv_key; local 50 if ((priv_key = EC_KEY_get0_private_key(eckey)) == NULL) { 91 if (!BN_generate_dsa_nonce(k, order, priv_key, 164 const BIGNUM *priv_key; local 167 priv_key = EC_KEY_get0_private_key(eckey); 173 if (priv_key == NULL) { 241 || !bn_mul_mont_fixed_top(s, s, priv_key, group->mont_data, ctx)) {
|
/freebsd-13-stable/crypto/openssh/openbsd-compat/ |
H A D | libressl-api-compat.c | 198 DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) argument 202 if (priv_key != NULL) 203 *priv_key = d->priv_key; 209 DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) argument 218 if (priv_key != NULL) { 219 BN_free(d->priv_key); 220 d->priv_key = priv_key; 485 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) argument 496 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) argument [all...] |
H A D | openssl-compat.h | 113 const BIGNUM **priv_key); 117 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); 182 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); 186 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
|
/freebsd-13-stable/crypto/openssh/regress/unittests/sshkey/ |
H A D | common.c | 156 const BIGNUM *priv_key = NULL; local 160 DSA_get0_key(k->dsa, NULL, &priv_key); 161 return priv_key;
|
/freebsd-13-stable/contrib/ntp/libntp/ |
H A D | libssl_compat.c | 305 *ppriv_key = pdsa->priv_key; 312 BIGNUM * priv_key 320 replace_bn_nn(&pdsa->priv_key, priv_key);
|
/freebsd-13-stable/contrib/bsnmp/lib/ |
H A D | snmpcrypto.c | 158 piv[i] = piv[i] ^ pdu->user.priv_key[8 + i]; 195 if (EVP_EncryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1) 228 if (EVP_DecryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1 || 308 memset(user->priv_key, 0, sizeof(user->priv_key)); 331 memcpy(user->priv_key, user->auth_key, sizeof(user->priv_key));
|
H A D | snmp.h | 149 uint8_t priv_key[SNMP_PRIV_KEY_SIZ]; member in struct:snmp_user
|
/freebsd-13-stable/contrib/bsnmp/snmp_usm/ |
H A D | usm_snmp.c | 204 memcpy(uuser->suser.priv_key, clone->suser.priv_key, 205 sizeof(uuser->suser.priv_key)); 269 memcpy(ctx->scratch->ptr1, uuser->suser.priv_key, 270 sizeof(uuser->suser.priv_key)); 271 memcpy(uuser->suser.priv_key, val->v.octetstring.octets, 367 memcpy(uuser->suser.priv_key, ctx->scratch->ptr1, 368 sizeof(uuser->suser.priv_key)); 440 return (string_get(val, (char *)uuser->suser.priv_key, 0));
|
/freebsd-13-stable/crypto/openssl/crypto/pem/ |
H A D | pvkfmt.c | 252 BIGNUM *pbn = NULL, *qbn = NULL, *gbn = NULL, *priv_key = NULL; local 274 if (!read_lebn(&p, 20, &priv_key)) 278 BN_set_flags(priv_key, BN_FLG_CONSTTIME); 287 if (!BN_mod_exp(pub_key, gbn, priv_key, pbn, ctx)) 296 if (!DSA_set0_key(dsa, pub_key, priv_key)) 298 pub_key = priv_key = NULL; 313 BN_free(priv_key); 494 const BIGNUM *pub_key = NULL, *priv_key = NULL; local 497 DSA_get0_key(dsa, &pub_key, &priv_key); 507 if (BN_num_bits(priv_key) > 16 584 const BIGNUM *pub_key = NULL, *priv_key = NULL; local [all...] |
/freebsd-13-stable/contrib/ntp/include/ |
H A D | libssl_compat.h | 78 BIGNUM *priv_key);
|
/freebsd-13-stable/contrib/ldns/ |
H A D | keys.c | 958 BIGNUM *p=NULL, *q=NULL, *g=NULL, *priv_key=NULL, *pub_key=NULL; local 1000 /* Private key, dsa->priv_key */ 1005 priv_key = BN_bin2bn((const char unsigned*)buf, i, NULL); 1006 if (!priv_key) { 1010 /* Public key, dsa->priv_key */ 1026 dsa->priv_key = priv_key; 1035 if(!DSA_set0_key(dsa, pub_key, priv_key)) 1051 BN_free(priv_key); 1752 const BIGNUM *pub_key, *priv_key; local [all...] |
/freebsd-13-stable/crypto/openssl/include/openssl/ |
H A D | dsa.h | 180 const BIGNUM **pub_key, const BIGNUM **priv_key); 181 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
|