Searched refs:privkey (Results 1 - 24 of 24) sorted by relevance

/freebsd-13-stable/contrib/wpa/src/crypto/
H A Dcrypto_internal-modexp.c16 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
21 if (os_get_random(privkey, prime_len) < 0)
23 if (os_memcmp(privkey, prime, prime_len) > 0) {
25 privkey[0] = 0;
29 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len,
44 const u8 *privkey, size_t privkey_len,
81 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len,
42 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
H A Dcrypto_nettle.c307 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
312 if (os_get_random(privkey, prime_len) < 0)
314 if (os_memcmp(privkey, prime, prime_len) > 0) {
316 privkey[0] = 0;
320 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len,
335 const u8 *privkey, size_t privkey_len,
367 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len,
333 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
H A Dcrypto_gnutls.c286 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
291 if (os_get_random(privkey, prime_len) < 0)
293 if (os_memcmp(privkey, prime, prime_len) > 0) {
295 privkey[0] = 0;
299 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len,
314 const u8 *privkey, size_t privkey_len,
353 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len,
312 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
H A Dcrypto_libtomcrypt.c700 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
705 if (os_get_random(privkey, prime_len) < 0)
707 if (os_memcmp(privkey, prime, prime_len) > 0) {
709 privkey[0] = 0;
713 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len,
728 const u8 *privkey, size_t privkey_len,
733 return crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len,
726 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
H A Dcrypto_wolfssl.c645 struct wpabuf *privkey = NULL; local
663 privkey = wpabuf_alloc(RFC3526_LEN);
665 if (!privkey || !pubkey)
673 if (wc_DhGenerateKeyPair(dh, &rng, wpabuf_mhead(privkey), &priv_sz,
677 wpabuf_put(privkey, priv_sz);
681 *priv = privkey;
684 privkey = NULL;
688 wpabuf_clear_free(privkey);
778 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
802 if (wc_DhGenerateKeyPair(dh, &rng, privkey,
828 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
[all...]
H A Dcrypto_openssl.c520 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, argument
525 if (os_get_random(privkey, prime_len) < 0)
527 if (os_memcmp(privkey, prime, prime_len) > 0) {
529 privkey[0] = 0;
533 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len,
548 const u8 *privkey, size_t privkey_len,
580 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len,
753 struct wpabuf *pubkey = NULL, *privkey = NULL; local
784 privkey = wpabuf_alloc(privlen);
785 if (privkey
546 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
[all...]
H A Dcrypto.h420 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey,
424 const u8 *privkey, size_t privkey_len,
/freebsd-13-stable/crypto/openssl/crypto/ec/
H A Decx_meth.c50 unsigned char *privkey, *pubkey; local
80 privkey = key->privkey = OPENSSL_secure_malloc(KEYLENID(id));
81 if (privkey == NULL) {
86 if (RAND_priv_bytes(privkey, KEYLENID(id)) <= 0) {
87 OPENSSL_secure_free(privkey);
88 key->privkey = NULL;
92 privkey[0] &= 248;
93 privkey[X25519_KEYLEN - 1] &= 127;
94 privkey[X25519_KEYLE
657 validate_ecx_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen, const unsigned char **privkey, const unsigned char **pubkey) argument
687 const unsigned char *privkey, *pubkey; local
700 const unsigned char *privkey, *pubkey; local
[all...]
/freebsd-13-stable/crypto/openssl/crypto/ec/curve448/
H A Ded448.h38 * privkey (in): The private key.
42 const uint8_t privkey [EDDSA_448_PRIVATE_BYTES]);
48 * privkey (in): The private key.
63 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
73 * privkey (in): The private key.
87 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
H A Deddsa.c90 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES])
98 if (!oneshot_hash(secret_scalar_ser, sizeof(secret_scalar_ser), privkey,
132 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
156 if (!oneshot_hash(expanded, sizeof(expanded), privkey,
237 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
242 return c448_ed448_sign(signature, privkey, pubkey, hash, 64, 1, context,
88 c448_ed448_derive_public_key( uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], const uint8_t privkey[EDDSA_448_PRIVATE_BYTES]) argument
130 c448_ed448_sign( uint8_t signature[EDDSA_448_SIGNATURE_BYTES], const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], const uint8_t *message, size_t message_len, uint8_t prehashed, const uint8_t *context, size_t context_len) argument
235 c448_ed448_sign_prehash( uint8_t signature[EDDSA_448_SIGNATURE_BYTES], const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], const uint8_t hash[64], const uint8_t *context, size_t context_len) argument
/freebsd-13-stable/sbin/decryptcore/
H A Ddecryptcore.c128 RSA *privkey; local
139 privkey = NULL;
192 privkey = RSA_new();
193 if (privkey == NULL) {
207 privkey = PEM_read_RSAPrivateKey(fp, &privkey, NULL, NULL);
209 if (privkey == NULL) {
214 privkeysize = RSA_size(privkey);
234 kdk->kdk_encryptedkey, key, privkey,
238 kdk->kdk_encryptedkey, key, privkey,
[all...]
/freebsd-13-stable/crypto/openssl/crypto/dsa/
H A Ddsa_ameth.c145 ASN1_INTEGER *privkey = NULL; local
156 if ((privkey = d2i_ASN1_INTEGER(NULL, &p, pklen)) == NULL)
158 if (privkey->type == V_ASN1_NEG_INTEGER || ptype != V_ASN1_SEQUENCE)
168 || !ASN1_INTEGER_to_BN(privkey, dsa->priv_key)) {
199 ASN1_STRING_clear_free(privkey);
/freebsd-13-stable/contrib/wpa/src/wps/
H A Dwps_common.c646 int wps_nfc_gen_dh(struct wpabuf **pubkey, struct wpabuf **privkey) argument
665 wpabuf_clear_free(*privkey);
666 *privkey = priv;
673 struct wpabuf **privkey,
690 if (wps_nfc_gen_dh(pubkey, privkey) < 0) {
672 wps_nfc_token_gen(int ndef, int *id, struct wpabuf **pubkey, struct wpabuf **privkey, struct wpabuf **dev_pw) argument
H A Dwps.h921 int wps_nfc_gen_dh(struct wpabuf **pubkey, struct wpabuf **privkey);
923 struct wpabuf **privkey,
/freebsd-13-stable/crypto/openssl/crypto/dh/
H A Ddh_ameth.c158 ASN1_INTEGER *privkey = NULL; local
169 if ((privkey = d2i_ASN1_INTEGER(NULL, &p, pklen)) == NULL)
180 || !ASN1_INTEGER_to_BN(privkey, dh->priv_key)) {
190 ASN1_STRING_clear_free(privkey);
198 ASN1_STRING_clear_free(privkey);
/freebsd-13-stable/libexec/rc/rc.d/
H A Dsendmail100 default_keyfile = privkey.pem
/freebsd-13-stable/contrib/wpa/src/common/
H A Ddpp.h396 const u8 *privkey, size_t privkey_len);
452 dpp_keygen_configurator(const char *curve, const u8 *privkey,
H A Ddpp.c1301 const u8 *privkey, size_t privkey_len)
1311 eckey = d2i_ECPrivateKey(NULL, &privkey, privkey_len);
1455 const u8 *privkey, size_t privkey_len)
1474 if (privkey)
1475 bi->pubkey = dpp_set_keypair(&bi->curve, privkey, privkey_len);
6187 dpp_keygen_configurator(const char *curve, const u8 *privkey, argument
6211 if (privkey)
6212 conf->csign = dpp_set_keypair(&conf->curve, privkey,
8405 u8 *privkey = NULL; local
8433 privkey
1300 dpp_set_keypair(const struct dpp_curve_params **curve, const u8 *privkey, size_t privkey_len) argument
1454 dpp_keygen(struct dpp_bootstrap_info *bi, const char *curve, const u8 *privkey, size_t privkey_len) argument
8635 u8 *privkey = NULL; local
[all...]
/freebsd-13-stable/crypto/openssh/
H A Dssh_api.c535 _ssh_host_key_sign(struct sshkey *privkey, struct sshkey *pubkey, argument
539 return sshkey_sign(privkey, signature, slen, data, dlen, alg, compat);
H A Dsshd.c2310 sshd_hostkey_sign(struct sshkey *privkey, struct sshkey *pubkey, argument
2316 if (privkey) {
2317 if (PRIVSEP(sshkey_sign(privkey, signature, slenp, data, dlen,
/freebsd-13-stable/contrib/openbsm/bin/auditdistd/
H A Dproto_tls.c650 tls_exec_server(const char *user, int startfd, const char *privkey, argument
679 if (SSL_use_RSAPrivateKey_file(ssl, privkey, SSL_FILETYPE_PEM) != 1) {
682 "SSL_use_RSAPrivateKey_file(%s) failed.", privkey);
/freebsd-13-stable/crypto/openssl/include/crypto/
H A Devp.h386 unsigned char *privkey; member in struct:__anon7245
/freebsd-13-stable/crypto/openssl/ssl/
H A Ds3_lib.c4777 int ssl_derive(SSL *s, EVP_PKEY *privkey, EVP_PKEY *pubkey, int gensecret) argument
4784 if (privkey == NULL || pubkey == NULL) {
4790 pctx = EVP_PKEY_CTX_new(privkey, NULL);
H A Dssl_local.h2332 __owur int ssl_derive(SSL *s, EVP_PKEY *privkey, EVP_PKEY *pubkey,

Completed in 134 milliseconds