Searched refs:priv_key (Results 1 - 25 of 63) sorted by relevance

123

/freebsd-current/crypto/openssl/crypto/dsa/
H A Ddsa_key.c44 const BIGNUM *priv_key, BIGNUM *pub_key)
51 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
53 /* pub_key = g ^ priv_key mod p */
66 BIGNUM *pub_key = NULL, *priv_key = NULL; local
71 if (dsa->priv_key == NULL) {
72 if ((priv_key = BN_secure_new()) == NULL)
75 priv_key = dsa->priv_key;
90 MIN_STRENGTH, priv_key))
100 if (!ossl_dsa_generate_public_key(ctx, dsa, priv_key, pub_ke
43 ossl_dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa, const BIGNUM *priv_key, BIGNUM *pub_key) argument
[all...]
H A Ddsa_check.c57 int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) argument
62 && ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret));
77 || dsa->priv_key == NULL
89 if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key))
H A Ddsa_lib.c44 * DSA has p, q, g, optional pub_key, optional priv_key.
46 * optional priv_key, optional q.
49 BIGNUM *pub_key = NULL, *priv_key = NULL; local
64 if (r->priv_key != NULL) {
65 priv_key = BN_dup(r->priv_key);
66 if (priv_key == NULL)
69 if (!DH_set0_key(ret, pub_key, priv_key))
71 } else if (r->priv_key != NULL) {
80 BN_free(priv_key);
305 DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) argument
314 DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) argument
[all...]
H A Ddsa_backend.c34 BIGNUM *priv_key = NULL, *pub_key = NULL; local
52 if (param_priv_key != NULL && !OSSL_PARAM_get_BN(param_priv_key, &priv_key))
55 if (!DSA_set0_key(dsa, pub_key, priv_key))
61 BN_clear_free(priv_key);
106 || !dsa_bn_dup_check(&dupkey->priv_key, dsa->priv_key)))
H A Ddsa_ameth.c170 if (pkey->pkey.dsa == NULL|| pkey->pkey.dsa->priv_key == NULL) {
190 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL);
276 const BIGNUM *priv_key, *pub_key; local
283 priv_key = x->priv_key;
285 priv_key = NULL;
299 if (priv_key != NULL) {
309 if (!ASN1_bn_print(bp, "priv:", priv_key, NULL, off))
437 const BIGNUM *priv_key = DSA_get0_priv_key(dsa); local
460 if (priv_key !
[all...]
H A Ddsa_local.h23 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
/freebsd-current/crypto/openssl/crypto/sm2/
H A Dsm2_key.c27 const BIGNUM *priv_key = NULL, *order = NULL; local
31 || (priv_key = EC_KEY_get0_private_key(eckey)) == NULL
41 if (BN_cmp(priv_key, BN_value_one()) < 0
42 || BN_cmp(priv_key, max) >= 0) {
/freebsd-current/crypto/openssl/providers/implementations/include/prov/
H A Dmacsignature.h19 unsigned char *priv_key; member in struct:mac_key_st
/freebsd-current/crypto/openssl/providers/implementations/keymgmt/
H A Dmac_legacy_kmgmt.c59 unsigned char *priv_key; member in struct:mac_gen_ctx
98 OPENSSL_secure_clear_free(mackey->priv_key, mackey->priv_key_len);
152 ok = key->priv_key != NULL;
167 if ((key1->priv_key == NULL && key2->priv_key != NULL)
168 || (key1->priv_key != NULL && key2->priv_key == NULL)
174 ok = ok && (key1->priv_key == NULL /* implies key2->privkey == NULL */
175 || CRYPTO_memcmp(key1->priv_key, key2->priv_key,
[all...]
/freebsd-current/crypto/openssl/crypto/ec/
H A Decdh_ossl.c55 const BIGNUM *priv_key; local
70 priv_key = EC_KEY_get0_private_key(ecdh);
71 if (priv_key == NULL) {
84 !BN_mul(x, x, priv_key, ctx)) {
88 priv_key = x;
96 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) {
H A Dec_key.c99 BN_clear_free(r->priv_key);
144 if (src->priv_key != NULL) {
145 if (dest->priv_key == NULL) {
146 dest->priv_key = BN_new();
147 if (dest->priv_key == NULL)
150 if (!BN_copy(dest->priv_key, src->priv_key))
254 BIGNUM *priv_key = NULL; local
265 if (eckey->priv_key == NULL) {
266 priv_key
695 EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) argument
[all...]
H A Dec_backend.c400 BIGNUM *priv_key = NULL; local
471 if ((priv_key = BN_secure_new()) == NULL)
473 if (bn_wexpand(priv_key, fixed_words) == NULL)
475 BN_set_flags(priv_key, BN_FLG_CONSTTIME);
477 if (!OSSL_PARAM_get_BN(param_priv_key, &priv_key))
481 if (priv_key != NULL
482 && !EC_KEY_set_private_key(ec, priv_key))
493 BN_clear_free(priv_key);
642 if (src->priv_key != NULL
647 ret->priv_key
[all...]
H A Dec_asn1.c940 EC_PRIVATEKEY *priv_key = NULL; local
943 if ((priv_key = d2i_EC_PRIVATEKEY(NULL, &p, len)) == NULL)
954 if (priv_key->parameters) {
956 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters);
958 && priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT)
967 ret->version = priv_key->version;
969 if (priv_key->privateKey) {
970 ASN1_OCTET_STRING *pkey = priv_key->privateKey;
989 if (priv_key->publicKey) {
993 pub_oct = ASN1_STRING_get0_data(priv_key
1027 EC_PRIVATEKEY *priv_key = NULL; local
[all...]
/freebsd-current/crypto/openssl/crypto/dh/
H A Ddh_key.c72 if (dh->priv_key == NULL) {
80 BN_set_flags(dh->priv_key, BN_FLG_CONSTTIME);
85 /* (Step 1) Z = pub_key^priv_key mod p */
86 if (!dh->meth->bn_mod_exp(dh, z, pub_key, dh->priv_key, dh->params.p, ctx,
226 const BIGNUM *priv_key, BIGNUM *pub_key)
249 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
251 /* pub_key = g^priv_key mod p */
269 BIGNUM *pub_key = NULL, *priv_key = NULL; local
291 if (dh->priv_key == NULL) {
292 priv_key
225 ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, const BIGNUM *priv_key, BIGNUM *pub_key) argument
[all...]
H A Ddh_lib.c159 BN_clear_free(r->priv_key);
255 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) argument
259 if (priv_key != NULL)
260 *priv_key = dh->priv_key;
263 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) argument
269 if (priv_key != NULL) {
270 BN_clear_free(dh->priv_key);
271 dh->priv_key = priv_key;
[all...]
H A Ddh_local.h27 BIGNUM *priv_key; /* x */ member in struct:dh_st
H A Ddh_backend.c69 BIGNUM *priv_key = NULL, *pub_key = NULL; local
79 && !OSSL_PARAM_get_BN(param_priv_key, &priv_key))
86 if (!DH_set0_key(dh, pub_key, priv_key))
92 BN_clear_free(priv_key);
170 || !dh_bn_dup_check(&dupkey->priv_key, dh->priv_key)))
H A Ddh_check.c278 int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) argument
300 if (BN_num_bits(priv_key) <= length
301 && BN_num_bits(priv_key) > 1)
303 } else if (BN_num_bits(priv_key) == length) {
319 if (!ossl_ffc_validate_private_key(upper, priv_key, ret))
340 || dh->priv_key == NULL
352 if (!ossl_dh_generate_public_key(ctx, dh, dh->priv_key, pub_key))
/freebsd-current/crypto/openssl/include/crypto/
H A Ddsa.h39 const BIGNUM *priv_key, BIGNUM *pub_key);
44 int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret);
H A Ddh.h25 const BIGNUM *priv_key, BIGNUM *pub_key);
44 int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret);
/freebsd-current/crypto/openssl/demos/signature/
H A DEVP_Signature_demo.c41 * For demo_sign, load EC private key priv_key from priv_key_der[].
78 EVP_PKEY *priv_key = NULL; local
81 priv_key = get_key(libctx, propq, public);
82 if (priv_key == NULL) {
100 libctx, NULL, priv_key, NULL)) {
145 EVP_PKEY_free(priv_key);
/freebsd-current/crypto/openssh/regress/unittests/sshkey/
H A Dcommon.c155 const BIGNUM *priv_key = NULL; local
159 DSA_get0_key(k->dsa, NULL, &priv_key);
160 return priv_key;
/freebsd-current/crypto/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c220 const BIGNUM *priv_key = NULL, *pub_key = NULL; local
238 priv_key = DH_get0_priv_key(dh);
239 if (priv_key == NULL) {
267 if (priv_key != NULL
268 && !print_labeled_bignum(out, "private-key:", priv_key))
296 const BIGNUM *priv_key = NULL, *pub_key = NULL; local
313 priv_key = DSA_get0_priv_key(dsa);
314 if (priv_key == NULL) {
342 if (priv_key != NULL
343 && !print_labeled_bignum(out, "priv:", priv_key))
518 const BIGNUM *priv_key = EC_KEY_get0_private_key(ec); local
[all...]
/freebsd-current/contrib/ntp/libntp/
H A Dlibssl_compat.c305 *ppriv_key = pdsa->priv_key;
312 BIGNUM * priv_key
320 replace_bn_nn(&pdsa->priv_key, priv_key);
/freebsd-current/contrib/bsnmp/lib/
H A Dsnmpcrypto.c157 piv[i] = piv[i] ^ pdu->user.priv_key[8 + i];
194 if (EVP_EncryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1)
227 if (EVP_DecryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1 ||
307 memset(user->priv_key, 0, sizeof(user->priv_key));
330 memcpy(user->priv_key, user->auth_key, sizeof(user->priv_key));

Completed in 127 milliseconds

123