/freebsd-10.1-release/crypto/openssl/crypto/dsa/ |
H A D | dsa_key.c | 95 BIGNUM *pub_key = NULL, *priv_key = NULL; local 100 if (dsa->priv_key == NULL) { 101 if ((priv_key = BN_new()) == NULL) 104 priv_key = dsa->priv_key; 107 if (!BN_rand_range(priv_key, dsa->q)) 109 while (BN_is_zero(priv_key)) ; 124 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); 126 prk = priv_key; 132 dsa->priv_key [all...] |
H A D | dsa_lib.c | 167 ret->priv_key = NULL; 226 if (r->priv_key != NULL) 227 BN_clear_free(r->priv_key); 293 * DSA has p, q, g, optional pub_key, optional priv_key. DH has p, 294 * optional length, g, optional pub_key, optional priv_key, optional q. 318 if (r->priv_key != NULL) 319 if ((ret->priv_key = BN_dup(r->priv_key)) == NULL)
|
H A D | dsa_ameth.c | 209 * SEQUENCE {parameters, priv_key} 210 * SEQUENCE {pub_key, priv_key} 247 if (!(dsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL))) { 261 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) { 291 if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) { 311 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL); 420 const BIGNUM *priv_key, *pub_key; local 423 priv_key = x->priv_key; 425 priv_key [all...] |
H A D | dsa_asn1.c | 116 ASN1_SIMPLE(DSA, priv_key, BIGNUM)
|
/freebsd-10.1-release/crypto/openssl/crypto/dh/ |
H A D | dh_key.c | 121 BIGNUM *pub_key = NULL, *priv_key = NULL; local 127 if (dh->priv_key == NULL) { 128 priv_key = BN_new(); 129 if (priv_key == NULL) 133 priv_key = dh->priv_key; 152 if (!BN_rand_range(priv_key, dh->q)) 155 while (BN_is_zero(priv_key) || BN_is_one(priv_key)); 159 if (!BN_rand(priv_key, [all...] |
H A D | dh_ameth.c | 210 if (!(dh->priv_key = ASN1_INTEGER_to_BN(privkey, NULL))) { 254 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dh->priv_key, NULL); 317 BIGNUM *priv_key, *pub_key; local 320 priv_key = x->priv_key; 322 priv_key = NULL; 338 update_buflen(priv_key, &buf_len); 358 if (!ASN1_bn_print(bp, "private-key:", priv_key, m, indent))
|
H A D | dhtest.c | 163 BN_print(out, a->priv_key); 171 BN_print(out, b->priv_key);
|
H A D | dh_lib.c | 160 ret->priv_key = NULL; 223 if (r->priv_key != NULL) 224 BN_clear_free(r->priv_key);
|
H A D | dh.h | 146 BIGNUM *priv_key; /* x */ member in struct:dh_st
|
/freebsd-10.1-release/crypto/openssl/crypto/ec/ |
H A D | ec_key.c | 85 ret->priv_key = NULL; 130 if (r->priv_key != NULL) 131 BN_clear_free(r->priv_key); 171 if (src->priv_key) { 172 if (dest->priv_key == NULL) { 173 dest->priv_key = BN_new(); 174 if (dest->priv_key == NULL) 177 if (!BN_copy(dest->priv_key, src->priv_key)) 234 BIGNUM *priv_key local 455 EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) argument [all...] |
H A D | ec_asn1.c | 1018 EC_PRIVATEKEY *priv_key = NULL; local 1020 if ((priv_key = d2i_EC_PRIVATEKEY(NULL, in, len)) == NULL) { 1033 if (priv_key->parameters) { 1036 ret->group = ec_asn1_pkparameters2group(priv_key->parameters); 1044 ret->version = priv_key->version; 1046 if (priv_key->privateKey) { 1047 ret->priv_key = BN_bin2bn(M_ASN1_STRING_data(priv_key->privateKey), 1048 M_ASN1_STRING_length(priv_key->privateKey), 1049 ret->priv_key); 1118 EC_PRIVATEKEY *priv_key = NULL; local [all...] |
H A D | ec_ameth.c | 253 const BIGNUM *priv_key; local 271 priv_key = EC_KEY_get0_private_key(eckey); 272 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) { 418 const BIGNUM *priv_key; local 445 priv_key = EC_KEY_get0_private_key(x); 446 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) 449 priv_key = NULL; 474 if ((priv_key != NULL) && !ASN1_bn_print(bp, "priv:", priv_key, [all...] |
/freebsd-10.1-release/crypto/openssl/crypto/ecdh/ |
H A D | ech_ossl.c | 116 const BIGNUM *priv_key; local 134 priv_key = EC_KEY_get0_private_key(ecdh); 135 if (priv_key == NULL) { 146 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) {
|
/freebsd-10.1-release/crypto/openssl/engines/ccgost/ |
H A D | gost2001_keyx.c | 23 const EC_POINT *pub_key, EC_KEY *priv_key, 28 const BIGNUM *key = EC_KEY_get0_private_key(priv_key); 29 EC_POINT *pnt = EC_POINT_new(EC_KEY_get0_group(priv_key)); 43 EC_GROUP_get_order(EC_KEY_get0_group(priv_key), order, ctx); 45 EC_POINT_mul(EC_KEY_get0_group(priv_key), pnt, NULL, pub_key, p, ctx); 46 EC_POINT_get_affine_coordinates_GFp(EC_KEY_get0_group(priv_key), 22 VKO_compute_key(unsigned char *shared_key, size_t shared_key_size, const EC_POINT *pub_key, EC_KEY *priv_key, const unsigned char *ukm) argument
|
H A D | gost2001.c | 132 const BIGNUM *priv_key; local 158 priv_key = EC_KEY_get0_private_key(eckey); 159 if(!priv_key) { 214 /* s = (r*priv_key+k*e) mod order */ 226 if(!BN_mod_mul(tmp, priv_key, r, order, ctx) 385 const BIGNUM *priv_key = NULL; local 400 if (!(priv_key = EC_KEY_get0_private_key(ec))) { 410 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) {
|
H A D | gost_sign.c | 100 BN_mod_mul(tmp, dsa->priv_key, newsig->r, dsa->q, ctx); 249 BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx); 294 dsa->priv_key = BN_new(); 295 if(!dsa->priv_key) { 299 BN_rand_range(dsa->priv_key, dsa->q);
|
H A D | gost94_keyx.c | 50 static int make_cp_exchange_key(BIGNUM *priv_key, EVP_PKEY *pubk, argument 63 dh->priv_key = BN_dup(priv_key);
|
H A D | gost_ameth.c | 161 dsa->priv_key = BN_dup(priv); 192 if (!dsa->priv_key) 194 return dsa->priv_key; 305 ASN1_INTEGER *priv_key = NULL; local 328 priv_key = d2i_ASN1_INTEGER(NULL, &p, priv_len); 329 if (!priv_key) 331 ret = ((pk_num = ASN1_INTEGER_to_BN(priv_key, NULL)) != NULL); 332 ASN1_INTEGER_free(priv_key); 539 if (dto->priv_key)
|
/freebsd-10.1-release/crypto/openssl/engines/ |
H A D | e_ubsec.c | 798 (unsigned char *)dsa->priv_key->d, 799 BN_num_bits(dsa->priv_key), 916 (unsigned char *)dh->priv_key->d, 917 BN_num_bits(dh->priv_key), 945 BIGNUM *priv_key = NULL; local 952 if (dh->priv_key == NULL) { 953 priv_key = BN_new(); 954 if (priv_key == NULL) 957 if (bn_wexpand(priv_key, dh->p->top) == NULL) 960 if (!BN_rand_range(priv_key, d [all...] |
/freebsd-10.1-release/contrib/ntp/libntp/ |
H A D | libssl_compat.c | 299 *ppriv_key = pdsa->priv_key; 306 BIGNUM * priv_key 314 replace_bn_nn(&pdsa->priv_key, priv_key);
|
/freebsd-10.1-release/contrib/bsnmp/lib/ |
H A D | snmpcrypto.c | 153 piv[i] = piv[i] ^ pdu->user.priv_key[8 + i]; 187 if (EVP_EncryptInit(&ctx, ctype, pdu->user.priv_key, iv) != 1) 215 if (EVP_DecryptInit(&ctx, ctype, pdu->user.priv_key, iv) != 1 || 283 memset(user->priv_key, 0, sizeof(user->priv_key)); 304 memcpy(user->priv_key, user->auth_key, sizeof(user->priv_key));
|
H A D | snmp.h | 146 uint8_t priv_key[SNMP_PRIV_KEY_SIZ]; member in struct:snmp_user
|
/freebsd-10.1-release/crypto/openssl/crypto/ecdsa/ |
H A D | ecs_ossl.c | 224 const BIGNUM *priv_key; local 228 priv_key = EC_KEY_get0_private_key(eckey); 230 if (group == NULL || priv_key == NULL || ecdsa == NULL) { 282 if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) {
|
/freebsd-10.1-release/contrib/ntp/include/ |
H A D | libssl_compat.h | 66 BIGNUM *priv_key);
|
/freebsd-10.1-release/contrib/bsnmp/snmp_usm/ |
H A D | usm_snmp.c | 199 memcpy(uuser->suser.priv_key, clone->suser.priv_key, 200 sizeof(uuser->suser.priv_key)); 264 memcpy(ctx->scratch->ptr1, uuser->suser.priv_key, 266 memcpy(uuser->suser.priv_key, val->v.octetstring.octets, 362 memcpy(uuser->suser.priv_key, ctx->scratch->ptr1, 435 return (string_get(val, (char *)uuser->suser.priv_key, 0));
|