Searched refs:cipher (Results 1 - 25 of 335) sorted by relevance

1234567891011>>

/freebsd-current/crypto/openssl/crypto/evp/
H A Dcmeth_lib.c25 EVP_CIPHER *cipher = evp_cipher_new(); local
27 if (cipher != NULL) {
28 cipher->nid = cipher_type;
29 cipher->block_size = block_size;
30 cipher->key_len = key_len;
31 cipher->origin = EVP_ORIG_METH;
33 return cipher;
36 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) argument
44 if (cipher->prov != NULL)
47 if ((to = EVP_CIPHER_meth_new(cipher
58 EVP_CIPHER_meth_free(EVP_CIPHER *cipher) argument
66 EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) argument
75 EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) argument
84 EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) argument
93 EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc)) argument
106 EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)) argument
119 EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, int (*cleanup) (EVP_CIPHER_CTX *)) argument
129 EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *)) argument
140 EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *)) argument
151 EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr)) argument
163 EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher) argument
170 EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher) argument
178 EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher) argument
183 EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher) argument
189 EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher) argument
195 EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher) argument
[all...]
H A Devp_enc.c35 if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
39 if (ctx->cipher->freectx != NULL)
40 ctx->cipher->freectx(ctx->algctx);
53 if (ctx->cipher != NULL) {
54 if (ctx->cipher->cleanup && !ctx->cipher->cleanup(ctx))
56 /* Cleanse cipher context data */
57 if (ctx->cipher_data && ctx->cipher->ctx_size)
58 OPENSSL_cleanse(ctx->cipher_data, ctx->cipher
82 evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc, const OSSL_PARAM params[]) argument
434 EVP_CipherInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv, int enc, const OSSL_PARAM params[]) argument
441 EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv, int enc) argument
449 EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc) argument
481 EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv) argument
487 EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv) argument
494 EVP_EncryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv, const OSSL_PARAM params[]) argument
501 EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv) argument
507 EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv) argument
514 EVP_DecryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv, const OSSL_PARAM params[]) argument
1300 EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]) argument
1323 EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher) argument
1331 EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher) argument
1342 EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher) argument
1378 const EVP_CIPHER *cipher = ctx->cipher; local
1477 EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER)); local
1526 EVP_CIPHER *cipher = NULL; local
1659 evp_cipher_up_ref(void *cipher) argument
1664 evp_cipher_free(void *cipher) argument
1672 EVP_CIPHER *cipher = local
1680 EVP_CIPHER_up_ref(EVP_CIPHER *cipher) argument
1689 evp_cipher_free_int(EVP_CIPHER *cipher) argument
1697 EVP_CIPHER_free(EVP_CIPHER *cipher) argument
[all...]
H A Dasymcipher.c25 EVP_ASYM_CIPHER *cipher = NULL; local
51 * Try to derive the supported asym cipher from |ctx->keymgmt|.
71 * 1. Do the normal asym cipher fetch, using the fetching data given by
73 * 2. Do the provider specific asym cipher fetch, from the same provider
77 * asym cipher, and try to export |ctx->pkey| to that keymgmt (when
93 EVP_ASYM_CIPHER_free(cipher);
98 cipher = EVP_ASYM_CIPHER_fetch(ctx->libctx, supported_ciph,
100 if (cipher != NULL)
101 tmp_prov = EVP_ASYM_CIPHER_get0_provider(cipher);
105 cipher
304 EVP_ASYM_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_ASYM_CIPHER)); local
329 EVP_ASYM_CIPHER *cipher = NULL; local
441 EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher) argument
456 EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher) argument
464 EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher) argument
489 EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name) argument
494 evp_asym_cipher_get_number(const EVP_ASYM_CIPHER *cipher) argument
499 EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher) argument
504 EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher) argument
509 EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx, void (*fn)(EVP_ASYM_CIPHER *cipher, void *arg), void *arg) argument
522 EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher, void (*fn)(const char *name, void *data), void *data) argument
[all...]
H A Devp_lib.c84 const EVP_CIPHER *cipher = c->cipher; local
89 * cipher->set_asn1_parameters is set. We know that this pointer
102 if (cipher->set_asn1_parameters != NULL) {
103 ret = cipher->set_asn1_parameters(c, type);
104 } else if ((EVP_CIPHER_get_flags(cipher) & EVP_CIPH_FLAG_CUSTOM_ASN1) == 0) {
105 switch (EVP_CIPHER_get_mode(cipher)) {
107 if (EVP_CIPHER_is_a(cipher, SN_id_smime_alg_CMS3DESwrap))
125 } else if (cipher->prov != NULL) {
175 const EVP_CIPHER *cipher local
276 EVP_CIPHER_get_type(const EVP_CIPHER *cipher) argument
341 evp_cipher_cache_constants(EVP_CIPHER *cipher) argument
388 EVP_CIPHER_get_block_size(const EVP_CIPHER *cipher) argument
455 EVP_CIPHER *cipher; local
470 EVP_CIPHER_get_flags(const EVP_CIPHER *cipher) argument
500 EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher) argument
648 EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher) argument
665 EVP_CIPHER_get_nid(const EVP_CIPHER *cipher) argument
675 EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name) argument
684 evp_cipher_get_number(const EVP_CIPHER *cipher) argument
689 EVP_CIPHER_get0_name(const EVP_CIPHER *cipher) argument
700 EVP_CIPHER_get0_description(const EVP_CIPHER *cipher) argument
711 EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher, void (*fn)(const char *name, void *data), void *data) argument
721 EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher) argument
726 EVP_CIPHER_get_mode(const EVP_CIPHER *cipher) argument
[all...]
H A Dp5_crpt.c27 ASN1_TYPE *param, const EVP_CIPHER *cipher,
57 ivl = EVP_CIPHER_get_iv_length(cipher);
62 kl = EVP_CIPHER_get_key_length(cipher);
101 if (!EVP_CipherInit_ex(cctx, cipher, NULL, key, iv, en_de))
114 ASN1_TYPE *param, const EVP_CIPHER *cipher,
117 return PKCS5_PBE_keyivgen_ex(cctx, pass, passlen, param, cipher, md, en_de,
26 PKCS5_PBE_keyivgen_ex(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de, OSSL_LIB_CTX *libctx, const char *propq) argument
113 PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) argument
/freebsd-current/lib/libutil/
H A Dlogin_crypt.c38 const char *cipher; local
40 cipher = login_getcapstr(lc, "passwd_format", def, NULL);
43 "passwd_format = %s\n", cipher);
44 if (cipher == NULL)
46 if (!crypt_set_format(cipher))
48 return (cipher);
/freebsd-current/contrib/wpa/src/common/
H A Dptksa_cache.h24 u32 cipher; member in struct:ptksa_cache_entry
35 const u8 *addr, u32 cipher);
38 const u8 *addr, u32 cipher,
41 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher);
55 ptksa_cache_get(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) argument
67 ptksa_cache_add(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher, argument
74 const u8 *addr, u32 cipher)
73 ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) argument
H A Dptksa_cache.c129 * @cipher: Specific cipher suite to search for or WPA_CIPHER_NONE for any
133 const u8 *addr, u32 cipher)
142 (cipher == WPA_CIPHER_NONE || cipher == e->cipher))
186 wpa_cipher_txt(e->cipher),
226 * @cipher: Specific cipher suite to search for or WPA_CIPHER_NONE for any
228 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) argument
132 ptksa_cache_get(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) argument
267 ptksa_cache_add(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher, u32 life_time, const struct wpa_ptk *ptk) argument
[all...]
/freebsd-current/crypto/openssh/regress/
H A Ddhgex.sh15 cipher="$1"; shift
20 echo "Ciphers=$cipher" >> $OBJ/sshd_proxy
22 opts="-oKexAlgorithms=$kex -oCiphers=$cipher"
26 verbose "$tid bits $bits $kex $cipher"
58 check 3072 `${SSH} -Q cipher | grep 128`
59 check 7680 `${SSH} -Q cipher | grep 192`
60 check 8192 `${SSH} -Q cipher | grep 256`
H A Dtry-ciphers.sh8 for c in `${SSH} -Q cipher`; do
11 trace "cipher $c mac $m"
12 verbose "test $tid: cipher $c mac $m"
18 fail "ssh failed with mac $m cipher $c"
22 if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
/freebsd-current/contrib/wpa/src/crypto/
H A Daes-wrap.c23 * @cipher: Wrapped key, (n + 1) * 64 bits
26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) argument
33 a = cipher;
34 r = cipher + 8;
52 r = cipher + 8;
71 * These are already in @cipher due to the location of temporary
H A Daes-unwrap.c22 * @cipher: Wrapped key to be unwrapped, (n + 1) * 64 bits
26 int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, argument
35 os_memcpy(a, cipher, 8);
37 os_memcpy(r, cipher + 8, 8 * n);
/freebsd-current/crypto/openssl/test/
H A Dafalgtest.c31 const EVP_CIPHER *cipher; local
68 cipher = EVP_aes_128_cbc();
72 cipher = EVP_aes_192_cbc();
76 cipher = EVP_aes_256_cbc();
80 cipher = NULL;
85 if (!TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1))
95 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 0))
115 const EVP_CIPHER * cipher; local
120 cipher = ENGINE_get_cipher(e, NID_aes_128_cbc);
122 if (cipher !
[all...]
/freebsd-current/crypto/openssl/crypto/pkcs12/
H A Dp12_crpt.c24 ASN1_TYPE *param, const EVP_CIPHER *cipher,
34 if (cipher == NULL)
52 iter, EVP_CIPHER_get_key_length(cipher),
59 if (EVP_CIPHER_get_iv_length(cipher) > 0) {
61 iter, EVP_CIPHER_get_iv_length(cipher),
72 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, piv, en_de);
79 ASN1_TYPE *param, const EVP_CIPHER *cipher,
82 return PKCS12_PBE_keyivgen_ex(ctx, pass, passlen, param, cipher, md, en_de,
23 PKCS12_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de, OSSL_LIB_CTX *libctx, const char *propq) argument
78 PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) argument
H A Dp12_p8e.c16 X509_SIG *PKCS8_encrypt_ex(int pbe_nid, const EVP_CIPHER *cipher, argument
26 if (cipher == NULL) {
30 pbe = PKCS5_pbe2_set_iv_ex(cipher, iter, salt, saltlen, NULL, -1,
36 if (cipher == NULL) {
40 pbe = PKCS5_pbe2_set_iv_ex(cipher, iter, salt, saltlen, NULL,
60 X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, argument
65 return PKCS8_encrypt_ex(pbe_nid, cipher, pass, passlen, salt, saltlen, iter,
/freebsd-current/tests/sys/geom/class/eli/
H A Dconf.sh19 # Execute `func` for each combination of cipher, sectorsize, and hmac algo
21 # func <cipher> <aalgo> <secsize>
40 for cipher in aes-xts:128 aes-xts:256 \
43 ealgo=${cipher%%:*}
44 keylen=${cipher##*:}
48 ${func} $cipher $aalgo $secsize
55 # Execute `func` for each combination of cipher, and sectorsize, with no hmac
57 # func <cipher> <secsize>
64 for cipher in aes-xts:128 aes-xts:256 \
67 ealgo=${cipher
[all...]
/freebsd-current/crypto/openssl/crypto/cms/
H A Dcms_enc.c31 const EVP_CIPHER *cipher = NULL; local
44 enc = ec->cipher ? 1 : 0;
56 cipher = ec->cipher;
58 * If not keeping key set cipher to NULL so subsequent calls decrypt.
61 ec->cipher = NULL;
63 cipher = EVP_get_cipherbyobj(calg->algorithm);
65 if (cipher != NULL) {
66 fetched_ciph = EVP_CIPHER_fetch(libctx, EVP_CIPHER_get0_name(cipher),
69 cipher
207 ossl_cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec, const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen, const CMS_CTX *cms_ctx) argument
[all...]
/freebsd-current/crypto/openssl/test/recipes/
H A D20-test_rand_config.t37 { cipher => 'AES-128-CTR',
38 expected => ["CTR-DRBG", "cipher: 'AES-128-CTR'"],
40 { expected => ["CTR-DRBG", "cipher: 'AES-256-CTR'"],
46 cipher => 'ARIA-128-CTR',
48 expected => ["CTR-DRBG", "cipher: 'ARIA-128-CTR'"],
52 cipher => 'ARIA-128-CTR',
54 expected => ["CTR-DRBG", "cipher: 'ARIA-128-CTR'"],
78 if ($_->{cipher}) {
79 print $cfg "cipher = $_->{cipher}\
[all...]
/freebsd-current/crypto/openssl/crypto/engine/
H A Deng_openssl.c67 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
193 * we're asked for a cipher we don't support (should not happen).
196 * TEST_ENG_OPENSSL_RC4_P_CIPHER - ditto for the "cipher" handler.
234 EVP_CIPHER *cipher; local
236 if ((cipher = EVP_CIPHER_meth_new(NID_rc4, 1, TEST_RC4_KEY_SIZE)) == NULL
237 || !EVP_CIPHER_meth_set_iv_length(cipher, 0)
238 || !EVP_CIPHER_meth_set_flags(cipher, EVP_CIPH_VARIABLE_LENGTH)
239 || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key)
240 || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher)
241 || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeo
259 EVP_CIPHER *cipher; local
286 const EVP_CIPHER *cipher; local
298 openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid) argument
[all...]
/freebsd-current/crypto/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c45 static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine,
52 PROV_CIPHER cipher; member in struct:__anon4164
89 ossl_prov_cipher_reset(&ctx->cipher);
109 const EVP_CIPHER *cipher; local
115 cipher = ossl_prov_cipher_cipher(&ctx->cipher);
116 if (cipher == NULL) {
128 engine = ossl_prov_cipher_engine(&ctx->cipher);
129 return KRB5KDF(cipher, engine, ctx->key, ctx->key_len,
143 if (!ossl_prov_cipher_load_from_params(&ctx->cipher, param
174 const EVP_CIPHER *cipher; local
326 cipher_init(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const unsigned char *key, size_t key_len) argument
355 KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine, const unsigned char *key, size_t key_len, const unsigned char *constant, size_t constant_len, unsigned char *okey, size_t okey_len) argument
[all...]
/freebsd-current/crypto/openssl/providers/implementations/include/prov/
H A Dmacsignature.h21 PROV_CIPHER cipher; member in struct:mac_key_st
/freebsd-current/crypto/openssl/providers/implementations/keymgmt/
H A Dmac_legacy_kmgmt.c61 PROV_CIPHER cipher; member in struct:mac_gen_ctx
100 ossl_prov_cipher_reset(&mackey->cipher);
170 || (key1->cipher.cipher == NULL && key2->cipher.cipher != NULL)
171 || (key1->cipher.cipher != NULL && key2->cipher.cipher
[all...]
/freebsd-current/crypto/openssh/
H A Dcipher.c1 /* $OpenBSD: cipher.c,v 1.120 2023/10/10 06:49:54 tb Exp $ */
46 #include "cipher.h"
64 const struct sshcipher *cipher; member in struct:sshcipher_ctx
183 * Default is cipher block size, except for chacha20+poly1305 that
239 if (cc == NULL || cc->cipher == NULL)
246 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, argument
261 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0;
264 if (keylen < cipher->key_len ||
265 (iv != NULL && ivlen < cipher_ivlen(cipher))) {
270 cc->cipher
[all...]
/freebsd-current/sys/crypto/rijndael/
H A Drijndael-api-fst.c67 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { argument
69 cipher->mode = mode;
74 memcpy(cipher->IV, IV, RIJNDAEL_MAX_IV_SIZE);
76 memset(cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE);
81 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, argument
86 if (cipher == NULL ||
97 switch (cipher->mode) {
108 memcpy(block, cipher->IV, 16);
115 ((uint32_t*)block)[0] = ((uint32_t*)cipher->IV)[0] ^ ((uint32_t*)input)[0];
116 ((uint32_t*)block)[1] = ((uint32_t*)cipher
197 rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key, const BYTE *input, int inputOctets, BYTE *outBuffer) argument
261 rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key, const BYTE *input, int inputLen, BYTE *outBuffer) argument
361 rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key, const BYTE *input, int inputOctets, BYTE *outBuffer) argument
[all...]
/freebsd-current/sys/crypto/openssl/
H A Dossl.c252 struct ossl_cipher *cipher; local
255 cipher = ossl_lookup_cipher(csp);
256 if (cipher == NULL)
259 s->cipher.cipher = cipher;
265 if (cipher->set_encrypt_key != NULL) {
266 error = cipher->set_encrypt_key(csp->csp_cipher_key,
267 8 * csp->csp_cipher_klen, &s->cipher.enc_ctx);
273 if (cipher
[all...]

Completed in 382 milliseconds

1234567891011>>