/hostap-latest/src/tls/ |
D | rsa.c | 63 struct crypto_rsa_key *key; in crypto_rsa_import_public_key() local 67 key = os_zalloc(sizeof(*key)); in crypto_rsa_import_public_key() 68 if (key == NULL) in crypto_rsa_import_public_key() 71 key->n = bignum_init(); in crypto_rsa_import_public_key() 72 key->e = bignum_init(); in crypto_rsa_import_public_key() 73 if (key->n == NULL || key->e == NULL) { in crypto_rsa_import_public_key() 74 crypto_rsa_free(key); in crypto_rsa_import_public_key() 93 pos = crypto_rsa_parse_integer(pos, end, key->n); in crypto_rsa_import_public_key() 94 pos = crypto_rsa_parse_integer(pos, end, key->e); in crypto_rsa_import_public_key() 106 return key; in crypto_rsa_import_public_key() [all …]
|
/hostap-latest/src/crypto/ |
D | crypto_internal-rsa.c | 22 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len) in crypto_public_key_import() argument 25 crypto_rsa_import_public_key(key, len); in crypto_public_key_import() 38 struct crypto_private_key * crypto_private_key_import(const u8 *key, in crypto_private_key_import() argument 45 res = pkcs8_key_import(key, len); in crypto_private_key_import() 51 res = pkcs8_enc_key_import(key, len, passwd); in crypto_private_key_import() 60 crypto_rsa_import_private_key(key, len); in crypto_private_key_import() 72 int crypto_public_key_encrypt_pkcs1_v15(struct crypto_public_key *key, in crypto_public_key_encrypt_pkcs1_v15() argument 76 return pkcs1_encrypt(2, (struct crypto_rsa_key *) key, in crypto_public_key_encrypt_pkcs1_v15() 81 int crypto_private_key_decrypt_pkcs1_v15(struct crypto_private_key *key, in crypto_private_key_decrypt_pkcs1_v15() argument 85 return pkcs1_v15_private_key_decrypt((struct crypto_rsa_key *) key, in crypto_private_key_decrypt_pkcs1_v15() [all …]
|
D | crypto_wolfssl.c | 50 static int wc_EccPublicKeyToDer_ex(ecc_key *key, byte *output, in wc_EccPublicKeyToDer_ex() argument 54 return wc_EccPublicKeyToDer(key, output, inLen, with_AlgCurve); in wc_EccPublicKeyToDer_ex() 144 static void ecc_key_deinit(ecc_key *key) in ecc_key_deinit() argument 147 wc_ecc_free(key); in ecc_key_deinit() 148 os_free(key); in ecc_key_deinit() 150 wc_ecc_key_free(key); in ecc_key_deinit() 374 static int wolfssl_hmac_vector(int type, const u8 *key, in wolfssl_hmac_vector() argument 395 err = wc_HmacSetKey(&hmac, type, key, (word32) key_len); in wolfssl_hmac_vector() 423 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 426 return wolfssl_hmac_vector(WC_MD5, key, key_len, num_elem, addr, len, in hmac_md5_vector() [all …]
|
D | aes_wrap.h | 25 int __must_check omac1_aes_vector(const u8 *key, size_t key_len, 28 int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem, 31 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, 33 int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, 35 int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out); 36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 38 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, 40 int __must_check aes_128_eax_encrypt(const u8 *key, 44 int __must_check aes_128_eax_decrypt(const u8 *key, 48 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, [all …]
|
D | crypto_libtomcrypt.c | 38 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) in des_encrypt() argument 47 tmp = key[i]; in des_encrypt() 86 void * aes_encrypt_init(const u8 *key, size_t len) in aes_encrypt_init() argument 92 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_encrypt_init() 115 void * aes_decrypt_init(const u8 *key, size_t len) in aes_decrypt_init() argument 121 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_decrypt_init() 154 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 175 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) != in crypto_hash_init() 180 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) != in crypto_hash_init() 294 u8 key[16]; member [all …]
|
D | crypto.h | 113 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher); 121 void * aes_encrypt_init(const u8 *key, size_t len); 144 void * aes_decrypt_init(const u8 *key, size_t len); 183 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, 239 const u8 *iv, const u8 *key, 300 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len); 317 struct crypto_private_key * crypto_private_key_import(const u8 *key, 352 struct crypto_public_key *key, const u8 *in, size_t inlen, 369 struct crypto_private_key *key, const u8 *in, size_t inlen, 385 int __must_check crypto_private_key_sign_pkcs1(struct crypto_private_key *key, [all …]
|
D | des-internal.c | 273 static void deskey(const u8 *key, int decrypt, u32 *keyout) in deskey() argument 282 ((key[l >> 3U] & bytebit[m]) == bytebit[m] ? 1 : 0); in deskey() 399 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) in des_encrypt() argument 408 tmp = key[i]; in des_encrypt() 428 void des_key_setup(const u8 *key, u32 *ek, u32 *dk) in des_key_setup() argument 430 deskey(key, 0, ek); in des_key_setup() 431 deskey(key, 1, dk); in des_key_setup() 457 void des3_key_setup(const u8 *key, struct des3_key_s *dkey) in des3_key_setup() argument 459 deskey(key, 0, dkey->ek[0]); in des3_key_setup() 460 deskey(key + 8, 1, dkey->ek[1]); in des3_key_setup() [all …]
|
D | crypto_nettle.c | 29 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) in des_encrypt() argument 38 tmp = key[i]; in des_encrypt() 108 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 117 hmac_md5_set_key(&ctx, key_len, key); in hmac_md5_vector() 126 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 129 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5() 133 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 142 hmac_sha1_set_key(&ctx, key_len, key); in hmac_sha1_vector() 151 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 154 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1() [all …]
|
D | crypto_gnutls.c | 48 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) in des_encrypt() argument 57 tmp = key[i]; in des_encrypt() 101 static int gnutls_hmac_vector(int algo, const u8 *key, size_t key_len, in gnutls_hmac_vector() argument 114 if (gcry_md_setkey(hd, key, key_len) != GPG_ERR_NO_ERROR) { in gnutls_hmac_vector() 128 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 131 return gnutls_hmac_vector(GCRY_MD_MD5, key, key_len, num_elem, addr, in hmac_md5_vector() 136 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 139 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5() 143 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 146 return gnutls_hmac_vector(GCRY_MD_SHA1, key, key_len, num_elem, addr, in hmac_sha1_vector() [all …]
|
D | crypto_linux.c | 57 static int linux_af_alg_hash_vector(const char *alg, const u8 *key, in linux_af_alg_hash_vector() argument 71 if (key && setsockopt(s, SOL_ALG, ALG_SET_KEY, key, key_len) < 0) { in linux_af_alg_hash_vector() 171 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 174 return linux_af_alg_hash_vector("hmac(md5)", key, key_len, num_elem, in hmac_md5_vector() 179 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 182 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5() 186 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 189 return linux_af_alg_hash_vector("hmac(sha1)", key, key_len, num_elem, in hmac_sha1_vector() 194 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 197 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1() [all …]
|
D | crypto_internal.c | 34 u8 key[64]; member 39 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init() 80 key = tk; in crypto_hash_init() 83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init() 86 os_memcpy(k_pad, key, key_len); in crypto_hash_init() 97 SHA1Update(&ctx->u.sha1, key, key_len); in crypto_hash_init() 99 key = tk; in crypto_hash_init() 102 os_memcpy(ctx->key, key, key_len); in crypto_hash_init() 105 os_memcpy(k_pad, key, key_len); in crypto_hash_init() [all …]
|
D | crypto_mbedtls_alt.c | 308 struct crypto_hash *crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, size_t key_len) in crypto_hash_init() argument 355 mbedtls_md_hmac_starts(&ctx->ctx, key, key_len); in crypto_hash_init() 389 __attribute_noinline__ static int hmac_vector(const u8 *key, in hmac_vector() argument 398 return hmac_vector_psa(key, key_len, num_elem, addr, len, mac, md_type); in hmac_vector() 410 mbedtls_md_hmac_starts(&ctx, key, key_len); in hmac_vector() 419 int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size… in hmac_sha512_vector() argument 421 return hmac_vector(key, key_len, num_elem, addr, len, mac, MBEDTLS_MD_SHA512); in hmac_sha512_vector() 424 int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) in hmac_sha512() argument 426 return hmac_vector(key, key_len, 1, &data, &data_len, mac, MBEDTLS_MD_SHA512); in hmac_sha512() 429 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size… in hmac_sha384_vector() argument [all …]
|
D | aes-eax.c | 28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_encrypt() argument 54 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac)) in aes_128_eax_encrypt() 59 if (omac1_aes_128(key, buf, 16 + hdr_len, hdr_mac)) in aes_128_eax_encrypt() 62 if (aes_128_ctr_encrypt(key, nonce_mac, data, data_len)) in aes_128_eax_encrypt() 66 if (omac1_aes_128(key, buf, 16 + data_len, data_mac)) in aes_128_eax_encrypt() 92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_decrypt() argument 118 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac)) { in aes_128_eax_decrypt() 125 if (omac1_aes_128(key, buf, 16 + hdr_len, hdr_mac)) { in aes_128_eax_decrypt() 132 if (omac1_aes_128(key, buf, 16 + data_len, data_mac)) { in aes_128_eax_decrypt() 144 return aes_128_ctr_encrypt(key, nonce_mac, data, data_len); in aes_128_eax_decrypt()
|
D | crypto_internal-cipher.c | 22 u8 key[16]; member 31 struct des3_key_s key; member 44 const u8 *iv, const u8 *key, in crypto_cipher_init() argument 57 if (key_len > sizeof(ctx->u.rc4.key)) { in crypto_cipher_init() 62 os_memcpy(ctx->u.rc4.key, key, key_len); in crypto_cipher_init() 65 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init() 70 ctx->u.aes.ctx_dec = aes_decrypt_init(key, key_len); in crypto_cipher_init() 83 des3_key_setup(key, &ctx->u.des3.key); in crypto_cipher_init() 91 des_key_setup(key, ctx->u.des.ek, ctx->u.des.dk); in crypto_cipher_init() 112 rc4_skip(ctx->u.rc4.key, ctx->u.rc4.keylen, in crypto_cipher_encrypt() [all …]
|
D | aes-siv.c | 64 static int aes_s2v(const u8 *key, size_t key_len, in aes_s2v() argument 79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 89 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], in aes_s2v() 104 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); in aes_s2v() 115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 119 int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 136 k1 = key; in aes_siv_encrypt() 137 k2 = key + key_len; in aes_siv_encrypt() 162 int aes_siv_decrypt(const u8 *key, size_t key_len, in aes_siv_decrypt() argument [all …]
|
D | sha1.c | 26 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 47 key = tk; in hmac_sha1_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 78 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 104 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 107 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
|
D | sha384.c | 26 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha384_vector() argument 44 if (sha384_vector(1, &key, &key_len, tk) < 0) in hmac_sha384_vector() 46 key = tk; in hmac_sha384_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 100 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, in hmac_sha384() argument 103 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
|
/hostap-latest/wpa_supplicant/dbus/ |
D | dbus_dict_helpers.c | 102 const char *key, const int value_type) in _wpa_dbus_add_dict_entry_start() argument 110 &key); in _wpa_dbus_add_dict_entry_start() 126 const char *key, in _wpa_dbus_add_dict_entry_basic() argument 133 if (key == NULL) in _wpa_dbus_add_dict_entry_basic() 141 key, value_type) || in _wpa_dbus_add_dict_entry_basic() 154 DBusMessageIter *iter_dict, const char *key, in _wpa_dbus_add_dict_entry_byte_array() argument 161 key, DBUS_TYPE_ARRAY) || in _wpa_dbus_add_dict_entry_byte_array() 198 const char *key, const char *value) in wpa_dbus_dict_append_string() argument 202 return _wpa_dbus_add_dict_entry_basic(iter_dict, key, DBUS_TYPE_STRING, in wpa_dbus_dict_append_string() 218 const char *key, const dbus_bool_t value) in wpa_dbus_dict_append_bool() argument [all …]
|
D | dbus_dict_helpers.h | 27 const char *key, const char *value); 30 const char *key, 34 const char *key, 38 const char *key, 42 const char *key, 46 const char *key, 50 const char *key, 54 const char *key, 58 const char *key, 63 const char *key, [all …]
|
/hostap-latest/src/common/ |
D | dpp_backup.c | 20 void dpp_free_asymmetric_key(struct dpp_asymmetric_key *key) in dpp_free_asymmetric_key() argument 22 while (key) { in dpp_free_asymmetric_key() 23 struct dpp_asymmetric_key *next = key->next; in dpp_free_asymmetric_key() 25 crypto_ec_key_deinit(key->csign); in dpp_free_asymmetric_key() 26 crypto_ec_key_deinit(key->pp_key); in dpp_free_asymmetric_key() 27 str_clear_free(key->config_template); in dpp_free_asymmetric_key() 28 str_clear_free(key->connector_template); in dpp_free_asymmetric_key() 29 os_free(key); in dpp_free_asymmetric_key() 30 key = next; in dpp_free_asymmetric_key() 153 struct wpabuf *key = NULL, *attr, *alg, *priv_key = NULL; in dpp_build_key_pkg() local [all …]
|
/hostap-latest/tests/hwsim/auth_serv/ |
D | ec2-generate.sh | 16 $OPENSSL ecparam -out ec2-ca.key -name $CURVE -genkey 17 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -x509 -new -key ec2-ca.key -out ec2-ca.pem -outfo… 30 $OPENSSL ecparam -out ec2-server.key -name $CURVE -genkey 31 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -new -nodes -key ec2-server.key -out ec2-server.r… 32 $OPENSSL ca -config ec-ca-openssl.cnf.tmp -batch -keyfile ec2-ca.key -cert ec2-ca.pem -create_seria… 43 $OPENSSL ecparam -out ec2-user.key -name $CURVE -genkey 44 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -new -nodes -key ec2-user.key -out ec2-user.req -… 45 $OPENSSL ca -config ec-ca-openssl.cnf.tmp -batch -keyfile ec2-ca.key -cert ec2-ca.pem -create_seria… 56 $OPENSSL ecparam -out ec2-user-p256.key -name prime256v1 -genkey 57 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -new -nodes -key ec2-user-p256.key -out ec2-user-… [all …]
|
D | update.sh | 21 if [ -r ca-key.pem ]; then 27 …ssl.cnf.tmp -batch -x509 -new -newkey rsa:2048 -nodes -keyout ca-incorrect-key.pem -out ca-incorre… 33 …ig ca-openssl.cnf.tmp -batch -x509 -new -newkey rsa:2048 -nodes -keyout ca-key.pem -out ca.der -ou… 39 cp ca-key.pem test-ca/private/cakey.pem 57 …$OPENSSL req -config openssl.cnf.tmp -batch -new -newkey rsa:2048 -nodes -keyout server.key -out s… 61 $OPENSSL pkcs12 -export -out server.pkcs12 -in server.pem -inkey server.key -passout pass: 62 $OPENSSL pkcs12 -export -out server-extra.pkcs12 -in server.pem -inkey server.key -descert -certfil… 68 …nssl.cnf.tmp -batch -new -newkey rsa:2048 -nodes -keyout server-no-dnsname.key -out server-no-dnsn… 76 …openssl.cnf.tmp -batch -new -newkey rsa:2048 -nodes -keyout server-expired.key -out server-expired… 84 …nssl.cnf.tmp -batch -new -newkey rsa:2048 -nodes -keyout server-eku-client.key -out server-eku-cli… [all …]
|
D | ec-generate.sh | 16 $OPENSSL ecparam -out ec-ca.key -name $CURVE -genkey 17 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -x509 -new -key ec-ca.key -out ec-ca.pem -outform… 30 $OPENSSL ecparam -out ec-server.key -name $CURVE -genkey 31 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -new -nodes -key ec-server.key -out ec-server.req… 32 $OPENSSL ca -config ec-ca-openssl.cnf.tmp -batch -keyfile ec-ca.key -cert ec-ca.pem -create_serial … 43 $OPENSSL ecparam -out ec-user.key -name $CURVE -genkey 44 $OPENSSL req -config ec-ca-openssl.cnf.tmp -batch -new -nodes -key ec-user.key -out ec-user.req -ou… 45 $OPENSSL ca -config ec-ca-openssl.cnf.tmp -batch -keyfile ec-ca.key -cert ec-ca.pem -create_serial …
|
/hostap-latest/tests/ |
D | test-rc4.c | 17 const u8 *key; member 204 static int run_test(unsigned int i, const u8 *key, size_t key_len, in run_test() argument 209 if (rc4_skip(key, key_len, offset, res, sizeof(res)) < 0 || in run_test() 226 ret += run_test(i, test->key, test->key_len, in main() 228 ret += run_test(i, test->key, test->key_len, in main() 230 ret += run_test(i, test->key, test->key_len, in main() 232 ret += run_test(i, test->key, test->key_len, in main() 234 ret += run_test(i, test->key, test->key_len, in main() 236 ret += run_test(i, test->key, test->key_len, in main() 238 ret += run_test(i, test->key, test->key_len, in main() [all …]
|
/hostap-latest/wlantest/ |
D | wep.c | 17 void wep_crypt(u8 *key, u8 *buf, size_t plen) in wep_crypt() argument 29 j = (j + S[i] + key[i & 0x0f]) & 0xff; in wep_crypt() 46 static int try_wep(const u8 *key, size_t key_len, const u8 *data, in try_wep() argument 54 k[i] = key[j]; in try_wep() 77 u8 key[16]; in wep_decrypt() local 89 os_memcpy(key, data, 3); in wep_decrypt() 90 os_memcpy(key + 3, w->key, w->key_len); in wep_decrypt() 91 if (try_wep(key, 3 + w->key_len, data + 4, data_len - 4, plain) in wep_decrypt()
|