Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 609) sorted by relevance

12345678910>>...25

/src/crypto/openssl/crypto/evp/
H A Dcmeth_lib.c25 EVP_CIPHER *cipher = evp_cipher_new(); in EVP_CIPHER_meth_new() local
27 if (cipher != NULL) { in EVP_CIPHER_meth_new()
28 cipher->nid = cipher_type; in EVP_CIPHER_meth_new()
29 cipher->block_size = block_size; in EVP_CIPHER_meth_new()
30 cipher->key_len = key_len; in EVP_CIPHER_meth_new()
31 cipher->origin = EVP_ORIG_METH; in EVP_CIPHER_meth_new()
33 return cipher; in EVP_CIPHER_meth_new()
36 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) in EVP_CIPHER_meth_dup() argument
44 if (cipher->prov != NULL) in EVP_CIPHER_meth_dup()
47 if ((to = EVP_CIPHER_meth_new(cipher->nid, cipher->block_size, in EVP_CIPHER_meth_dup()
[all …]
H A Devp_enc.c38 if (ctx->cipher == NULL || ctx->cipher->prov == NULL) in OSSL_SAFE_MATH_SIGNED()
42 if (ctx->cipher->freectx != NULL) in OSSL_SAFE_MATH_SIGNED()
43 ctx->cipher->freectx(ctx->algctx); in OSSL_SAFE_MATH_SIGNED()
56 if (ctx->cipher != NULL) { in OSSL_SAFE_MATH_SIGNED()
57 if (ctx->cipher->cleanup && !ctx->cipher->cleanup(ctx)) in OSSL_SAFE_MATH_SIGNED()
60 if (ctx->cipher_data && ctx->cipher->ctx_size) in OSSL_SAFE_MATH_SIGNED()
61 OPENSSL_cleanse(ctx->cipher_data, ctx->cipher->ctx_size); in OSSL_SAFE_MATH_SIGNED()
93 const EVP_CIPHER *cipher, in evp_cipher_init_internal() argument
117 if (cipher == NULL && ctx->cipher == NULL) { in evp_cipher_init_internal()
133 if (ctx->engine && ctx->cipher in evp_cipher_init_internal()
[all …]
H A Dasymcipher.c35 EVP_ASYM_CIPHER *cipher = NULL; in evp_pkey_asym_cipher_init() local
104 EVP_ASYM_CIPHER_free(cipher); in evp_pkey_asym_cipher_init()
109 cipher = EVP_ASYM_CIPHER_fetch(ctx->libctx, supported_ciph, in evp_pkey_asym_cipher_init()
111 if (cipher != NULL) in evp_pkey_asym_cipher_init()
112 tmp_prov = EVP_ASYM_CIPHER_get0_provider(cipher); in evp_pkey_asym_cipher_init()
116 cipher = evp_asym_cipher_fetch_from_prov((OSSL_PROVIDER *)tmp_prov, in evp_pkey_asym_cipher_init()
118 if (cipher == NULL) in evp_pkey_asym_cipher_init()
122 if (cipher == NULL) in evp_pkey_asym_cipher_init()
146 EVP_ASYM_CIPHER_free(cipher); in evp_pkey_asym_cipher_init()
154 ctx->op.ciph.cipher = cipher; in evp_pkey_asym_cipher_init()
[all …]
H A Devp_lib.c85 const EVP_CIPHER *cipher; in evp_cipher_param_to_asn1_ex() local
87 if (c == NULL || c->cipher == NULL) in evp_cipher_param_to_asn1_ex()
90 cipher = c->cipher; in evp_cipher_param_to_asn1_ex()
107 if (cipher->set_asn1_parameters != NULL) { in evp_cipher_param_to_asn1_ex()
108 ret = cipher->set_asn1_parameters(c, type); in evp_cipher_param_to_asn1_ex()
109 } else if ((EVP_CIPHER_get_flags(cipher) & EVP_CIPH_FLAG_CUSTOM_ASN1) == 0) { in evp_cipher_param_to_asn1_ex()
110 switch (EVP_CIPHER_get_mode(cipher)) { in evp_cipher_param_to_asn1_ex()
112 if (EVP_CIPHER_is_a(cipher, SN_id_smime_alg_CMS3DESwrap)) in evp_cipher_param_to_asn1_ex()
130 } else if (cipher->prov != NULL) { in evp_cipher_param_to_asn1_ex()
156 const EVP_CIPHER *cipher; in evp_cipher_asn1_to_param_ex() local
[all …]
/src/crypto/openssl/test/ssl-tests/
H A D25-cipher.cnf5 test-0 = 0-cipher-server-1
6 test-1 = 1-cipher-server-2
7 test-2 = 2-cipher-server-client-list
8 test-3 = 3-cipher-server-pref-1
9 test-4 = 4-cipher-server-pref-2
10 test-5 = 5-cipher-server-pref-client-list
11 test-6 = 6-cipher-server-pref-not-mobile
12 test-7 = 7-cipher-server-pref-mobile
13 test-8 = 8-cipher-server-pref-mobile2
16 [0-cipher-server-1]
[all …]
/src/crypto/openssl/test/recipes/30-test_evp_data/
H A Devpkdf_krb5.txt18 Ctrl.cipher = cipher:DES-EDE3-CBC
24 Ctrl.cipher = cipher:DES-EDE3-CBC
30 Ctrl.cipher = cipher:DES-EDE3-CBC
36 Ctrl.cipher = cipher:DES-EDE3-CBC
42 Ctrl.cipher = cipher:DES-EDE3-CBC
48 Ctrl.cipher = cipher:DES-EDE3-CBC
54 Ctrl.cipher = cipher:DES-EDE3-CBC
60 Ctrl.cipher = cipher:DES-EDE3-CBC
66 Ctrl.cipher = cipher:DES-EDE3-CBC
73 Ctrl.cipher = cipher:DES-EDE3-CBC
[all …]
/src/sys/crypto/rijndael/
H A Drijndael-api-fst.c67 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { in rijndael_cipherInit() argument
69 cipher->mode = mode; in rijndael_cipherInit()
74 memcpy(cipher->IV, IV, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit()
76 memset(cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit()
81 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument
86 if (cipher == NULL || in rijndael_blockEncrypt()
97 switch (cipher->mode) { in rijndael_blockEncrypt()
108 memcpy(block, cipher->IV, 16); in rijndael_blockEncrypt()
115 ((uint32_t*)block)[0] = ((uint32_t*)cipher->IV)[0] ^ ((uint32_t*)input)[0]; in rijndael_blockEncrypt()
116 ((uint32_t*)block)[1] = ((uint32_t*)cipher->IV)[1] ^ ((uint32_t*)input)[1]; in rijndael_blockEncrypt()
[all …]
/src/crypto/openssl/doc/man3/
H A DEVP_CIPHER_meth_new.pod25 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
26 void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
28 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len);
29 int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
30 int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
31 int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
36 int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
41 int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
43 int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
46 int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
[all …]
H A DSSL_CIPHER_get_name.pod26 const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher);
27 const char *SSL_CIPHER_standard_name(const SSL_CIPHER *cipher);
29 int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits);
30 const char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher);
31 char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size);
44 SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the
45 B<cipher> is NULL, it returns "(NONE)".
48 B<cipher>. If the B<cipher> is NULL, it returns "(NONE)". If the B<cipher>
49 has no standard name, it returns B<NULL>. If B<cipher> was defined in both
57 SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>.
[all …]
H A DEVP_ASYM_CIPHER_free.pod18 void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
19 int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
20 const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher);
21 int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
22 OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher);
24 void (*fn)(EVP_ASYM_CIPHER *cipher,
27 int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
30 const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher);
40 asymmetric cipher related tasks such as asymmetric encryption and decryption.
53 EVP_ASYM_CIPHER_is_a() returns 1 if I<cipher> is an implementation of an
[all …]
/src/crypto/openssh/
H A Dcipher.c64 const struct sshcipher *cipher; member
239 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message()
246 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, in cipher_init() argument
261 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; in cipher_init()
264 if (keylen < cipher->key_len || in cipher_init()
265 (iv != NULL && ivlen < cipher_ivlen(cipher))) { in cipher_init()
270 cc->cipher = cipher; in cipher_init()
271 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init()
276 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_init()
281 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_init()
[all …]
/src/crypto/openssl/crypto/engine/
H A Deng_openssl.c67 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
234 EVP_CIPHER *cipher; in test_r4_cipher() local
236 if ((cipher = EVP_CIPHER_meth_new(NID_rc4, 1, TEST_RC4_KEY_SIZE)) == NULL in test_r4_cipher()
237 || !EVP_CIPHER_meth_set_iv_length(cipher, 0) in test_r4_cipher()
238 || !EVP_CIPHER_meth_set_flags(cipher, EVP_CIPH_VARIABLE_LENGTH) in test_r4_cipher()
239 || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key) in test_r4_cipher()
240 || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher) in test_r4_cipher()
241 || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeof(TEST_RC4_KEY))) { in test_r4_cipher()
242 EVP_CIPHER_meth_free(cipher); in test_r4_cipher()
243 cipher = NULL; in test_r4_cipher()
[all …]
/src/crypto/openssl/providers/implementations/macs/
H A Dcmac_prov.c52 PROV_CIPHER cipher; member
81 ossl_prov_cipher_reset(&macctx->cipher); in cmac_free()
98 || !ossl_prov_cipher_copy(&dst->cipher, &src->cipher)) { in cmac_dup()
134 const EVP_CIPHER *cipher = ossl_prov_cipher_cipher(&macctx->cipher); in tdes_check_param() local
137 if (EVP_CIPHER_is_a(cipher, "DES-EDE3-CBC")) { in tdes_check_param()
164 ossl_prov_cipher_cipher(&macctx->cipher), in cmac_setkey()
165 ossl_prov_cipher_engine(&macctx->cipher), p); in cmac_setkey()
166 ossl_prov_cipher_reset(&macctx->cipher); in cmac_setkey()
262 if (!ossl_prov_cipher_load_from_params(&macctx->cipher, params, ctx)) in cmac_set_ctx_params()
265 if (EVP_CIPHER_get_mode(ossl_prov_cipher_cipher(&macctx->cipher)) in cmac_set_ctx_params()
[all …]
/src/crypto/openssl/providers/implementations/keymgmt/
H A Dmac_legacy_kmgmt.c61 PROV_CIPHER cipher; member
98 ossl_prov_cipher_reset(&mackey->cipher); in ossl_mac_key_free()
168 || (key1->cipher.cipher == NULL && key2->cipher.cipher != NULL) in mac_match()
169 || (key1->cipher.cipher != NULL && key2->cipher.cipher == NULL)) in mac_match()
174 if (key1->cipher.cipher != NULL) in mac_match()
175 … ok = ok && EVP_CIPHER_is_a(key1->cipher.cipher, EVP_CIPHER_get0_name(key2->cipher.cipher)); in mac_match()
211 if (key->cmac && !ossl_prov_cipher_load_from_params(&key->cipher, params, key->libctx)) { in mac_key_fromdata()
247 if (key->cipher.cipher != NULL in key_to_params()
250 EVP_CIPHER_get0_name(key->cipher.cipher))) in key_to_params()
254 if (key->cipher.engine != NULL in key_to_params()
[all …]
/src/sys/crypto/openssl/
H A Dossl.c252 struct ossl_cipher *cipher; in ossl_newsession_cipher() local
255 cipher = ossl_lookup_cipher(csp); in ossl_newsession_cipher()
256 if (cipher == NULL) in ossl_newsession_cipher()
259 s->cipher.cipher = cipher; in ossl_newsession_cipher()
265 if (cipher->set_encrypt_key != NULL) { in ossl_newsession_cipher()
266 error = cipher->set_encrypt_key(csp->csp_cipher_key, in ossl_newsession_cipher()
267 8 * csp->csp_cipher_klen, &s->cipher.enc_ctx); in ossl_newsession_cipher()
273 if (cipher->set_decrypt_key != NULL) in ossl_newsession_cipher()
274 error = cipher->set_decrypt_key(csp->csp_cipher_key, in ossl_newsession_cipher()
275 8 * csp->csp_cipher_klen, &s->cipher.dec_ctx); in ossl_newsession_cipher()
[all …]
/src/crypto/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c46 static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine,
53 PROV_CIPHER cipher; member
88 ossl_prov_cipher_reset(&ctx->cipher); in krb5kdf_reset()
115 || !ossl_prov_cipher_copy(&dest->cipher, &src->cipher)) in krb5kdf_dup()
129 const EVP_CIPHER *cipher; in krb5kdf_derive() local
135 cipher = ossl_prov_cipher_cipher(&ctx->cipher); in krb5kdf_derive()
136 if (cipher == NULL) { in krb5kdf_derive()
148 engine = ossl_prov_cipher_engine(&ctx->cipher); in krb5kdf_derive()
149 return KRB5KDF(cipher, engine, ctx->key, ctx->key_len, in krb5kdf_derive()
163 if (!ossl_prov_cipher_load_from_params(&ctx->cipher, params, provctx)) in krb5kdf_set_ctx_params()
[all …]
/src/crypto/openssl/test/
H A Dafalgtest.c31 const EVP_CIPHER *cipher; in test_afalg_aes_cbc() local
62 cipher = EVP_aes_128_cbc(); in test_afalg_aes_cbc()
66 cipher = EVP_aes_192_cbc(); in test_afalg_aes_cbc()
70 cipher = EVP_aes_256_cbc(); in test_afalg_aes_cbc()
74 cipher = NULL; in test_afalg_aes_cbc()
79 if (!TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1)) in test_afalg_aes_cbc()
89 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 0)) in test_afalg_aes_cbc()
109 const EVP_CIPHER *cipher; in test_pr16743() local
114 cipher = ENGINE_get_cipher(e, NID_aes_128_cbc); in test_pr16743()
116 if (cipher != NULL && ctx != NULL) in test_pr16743()
[all …]
/src/crypto/openssl/crypto/cms/
H A Dcms_enc.c31 const EVP_CIPHER *cipher = NULL; in ossl_cms_EncryptedContent_init_bio() local
44 enc = ec->cipher ? 1 : 0; in ossl_cms_EncryptedContent_init_bio()
56 cipher = ec->cipher; in ossl_cms_EncryptedContent_init_bio()
61 ec->cipher = NULL; in ossl_cms_EncryptedContent_init_bio()
63 cipher = EVP_get_cipherbyobj(calg->algorithm); in ossl_cms_EncryptedContent_init_bio()
65 if (cipher != NULL) { in ossl_cms_EncryptedContent_init_bio()
66 fetched_ciph = EVP_CIPHER_fetch(libctx, EVP_CIPHER_get0_name(cipher), in ossl_cms_EncryptedContent_init_bio()
69 cipher = fetched_ciph; in ossl_cms_EncryptedContent_init_bio()
71 if (cipher == NULL) { in ossl_cms_EncryptedContent_init_bio()
78 if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc) <= 0) { in ossl_cms_EncryptedContent_init_bio()
[all …]
/src/crypto/openssl/doc/man1/
H A Dopenssl-ciphers.pod.in6 openssl-ciphers - SSL cipher display and cipher list command
30 This command converts textual OpenSSL cipher lists into
31 ordered SSL cipher preference lists. It can be used to
47 minimum and maximum protocol version. This is closer to the actual cipher list
63 When combined with B<-s> includes cipher suites which require PSK.
67 When combined with B<-s> includes cipher suites which require SRP. This option
72 Verbose output: For each cipher suite, list details as provided by
77 Like B<-v>, but include the official cipher suite values in hex.
88 Precede each cipher suite by its standard name.
92 Convert a standard cipher I<name> to its OpenSSL name.
[all …]
/src/contrib/wpa/src/common/
H A Dptksa_cache.c138 const u8 *addr, u32 cipher) in ptksa_cache_get() argument
147 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) in ptksa_cache_get()
191 wpa_cipher_txt(e->cipher), in ptksa_cache_list()
233 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) in ptksa_cache_flush() argument
244 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) { in ptksa_cache_flush()
278 const u8 *addr, u32 cipher, in ptksa_cache_add() argument
289 if (!ptksa || !ptk || !addr || !life_time || cipher == WPA_CIPHER_NONE) in ptksa_cache_add()
293 ptksa_cache_flush(ptksa, addr, cipher); in ptksa_cache_add()
305 entry->cipher = cipher; in ptksa_cache_add()
340 MAC2STR(addr), cipher); in ptksa_cache_add()
[all …]
/src/crypto/krb5/src/lib/krb5/krb/
H A Denc_keyhelper.c34 const krb5_data *plain, krb5_enc_data *cipher) in k5_encrypt_keyhelper() argument
45 cipher->ciphertext.length = enclen; in k5_encrypt_keyhelper()
46 cipher->ciphertext.data = malloc(enclen); in k5_encrypt_keyhelper()
47 if (cipher->ciphertext.data == NULL) in k5_encrypt_keyhelper()
49 ret = krb5_k_encrypt(context, key, usage, 0, plain, cipher); in k5_encrypt_keyhelper()
51 free(cipher->ciphertext.data); in k5_encrypt_keyhelper()
52 cipher->ciphertext.data = NULL; in k5_encrypt_keyhelper()
/src/tools/tools/crypto/
H A Dcryptocheck.c166 int cipher; member
212 { .name = "aes-cbc128", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER,
214 { .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER,
216 { .name = "aes-cbc256", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER,
218 { .name = "aes-ctr128", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER,
220 { .name = "aes-ctr192", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER,
222 { .name = "aes-ctr256", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER,
224 { .name = "aes-xts128", .cipher = CRYPTO_AES_XTS, .type = T_CIPHER,
226 { .name = "aes-xts256", .cipher = CRYPTO_AES_XTS, .type = T_CIPHER,
228 { .name = "camellia-cbc128", .cipher = CRYPTO_CAMELLIA_CBC,
[all …]
/src/crypto/openssl/apps/
H A Denc.c151 EVP_CIPHER *cipher = NULL; in enc_main() local
346 cipher = NULL; in enc_main()
377 if (!opt_cipher(ciphername, &cipher)) in enc_main()
379 if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_WRAP_MODE)) { in enc_main()
438 if ((str == NULL) && (cipher != NULL) && (hkey == NULL) && (skeyopts == NULL)) { in enc_main()
445 EVP_CIPHER_get0_name(cipher), in enc_main()
541 if (cipher != NULL) { in enc_main()
608 int iklen = EVP_CIPHER_get_key_length(cipher); in enc_main()
609 int ivlen = EVP_CIPHER_get_iv_length(cipher); in enc_main()
626 if (!EVP_BytesToKey(cipher, dgst, sptr, in enc_main()
[all …]
/src/lib/libutil/
H A Dlogin_crypt.c38 const char *cipher; in login_setcryptfmt() local
40 cipher = login_getcapstr(lc, "passwd_format", def, NULL); in login_setcryptfmt()
43 "passwd_format = %s\n", cipher); in login_setcryptfmt()
44 if (cipher == NULL) in login_setcryptfmt()
46 if (!crypt_set_format(cipher)) in login_setcryptfmt()
48 return (cipher); in login_setcryptfmt()
/src/crypto/openssl/crypto/pkcs12/
H A Dp12_crpt.c24 ASN1_TYPE *param, const EVP_CIPHER *cipher, in PKCS12_PBE_keyivgen_ex() argument
34 if (cipher == NULL) in PKCS12_PBE_keyivgen_ex()
52 iter, EVP_CIPHER_get_key_length(cipher), in PKCS12_PBE_keyivgen_ex()
59 if (EVP_CIPHER_get_iv_length(cipher) > 0) { in PKCS12_PBE_keyivgen_ex()
61 iter, EVP_CIPHER_get_iv_length(cipher), in PKCS12_PBE_keyivgen_ex()
72 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, piv, en_de); in PKCS12_PBE_keyivgen_ex()
79 ASN1_TYPE *param, const EVP_CIPHER *cipher, in PKCS12_PBE_keyivgen() argument
82 return PKCS12_PBE_keyivgen_ex(ctx, pass, passlen, param, cipher, md, en_de, in PKCS12_PBE_keyivgen()

12345678910>>...25