Home
last modified time | relevance | path

Searched refs:alg (Results 1 – 190 of 190) sorted by relevance

/linux-4.1.27/crypto/
Dapi.c37 static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg);
39 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg) in crypto_mod_get() argument
41 return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; in crypto_mod_get()
45 void crypto_mod_put(struct crypto_alg *alg) in crypto_mod_put() argument
47 struct module *module = alg->cra_module; in crypto_mod_put()
49 crypto_alg_put(alg); in crypto_mod_put()
56 return larval->alg.cra_driver_name[0]; in crypto_is_test_larval()
62 struct crypto_alg *q, *alg = NULL; in __crypto_alg_lookup() local
88 if (alg) in __crypto_alg_lookup()
89 crypto_mod_put(alg); in __crypto_alg_lookup()
[all …]
Daead.c82 static unsigned int crypto_aead_ctxsize(struct crypto_alg *alg, u32 type, in crypto_aead_ctxsize() argument
85 return alg->cra_ctxsize; in crypto_aead_ctxsize()
95 struct aead_alg *alg = &tfm->__crt_alg->cra_aead; in crypto_init_aead_ops() local
98 if (max(alg->maxauthsize, alg->ivsize) > PAGE_SIZE / 8) in crypto_init_aead_ops()
102 alg->setkey : setkey; in crypto_init_aead_ops()
103 crt->encrypt = alg->encrypt; in crypto_init_aead_ops()
104 crt->decrypt = alg->decrypt; in crypto_init_aead_ops()
105 crt->givencrypt = alg->givencrypt ?: no_givcrypt; in crypto_init_aead_ops()
106 crt->givdecrypt = alg->givdecrypt ?: no_givcrypt; in crypto_init_aead_ops()
108 crt->ivsize = alg->ivsize; in crypto_init_aead_ops()
[all …]
Dalgapi.c27 static inline int crypto_set_driver_name(struct crypto_alg *alg) in crypto_set_driver_name() argument
30 char *driver_name = alg->cra_driver_name; in crypto_set_driver_name()
36 len = strlcpy(driver_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in crypto_set_driver_name()
54 static int crypto_check_alg(struct crypto_alg *alg) in crypto_check_alg() argument
56 crypto_check_module_sig(alg->cra_module); in crypto_check_alg()
58 if (alg->cra_alignmask & (alg->cra_alignmask + 1)) in crypto_check_alg()
61 if (alg->cra_blocksize > PAGE_SIZE / 8) in crypto_check_alg()
64 if (alg->cra_priority < 0) in crypto_check_alg()
67 atomic_set(&alg->cra_refcnt, 1); in crypto_check_alg()
69 return crypto_set_driver_name(alg); in crypto_check_alg()
[all …]
Dcrypto_user.c49 struct crypto_alg *q, *alg = NULL; in crypto_alg_match() local
71 alg = q; in crypto_alg_match()
77 return alg; in crypto_alg_match()
80 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument
86 rcipher.blocksize = alg->cra_blocksize; in crypto_report_cipher()
87 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_report_cipher()
88 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_report_cipher()
99 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_comp() argument
113 static int crypto_report_one(struct crypto_alg *alg, in crypto_report_one() argument
116 strncpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); in crypto_report_one()
[all …]
Dablkcipher.c346 static unsigned int crypto_ablkcipher_ctxsize(struct crypto_alg *alg, u32 type, in crypto_ablkcipher_ctxsize() argument
349 return alg->cra_ctxsize; in crypto_ablkcipher_ctxsize()
365 struct ablkcipher_alg *alg = &tfm->__crt_alg->cra_ablkcipher; in crypto_init_ablkcipher_ops() local
368 if (alg->ivsize > PAGE_SIZE / 8) in crypto_init_ablkcipher_ops()
372 crt->encrypt = alg->encrypt; in crypto_init_ablkcipher_ops()
373 crt->decrypt = alg->decrypt; in crypto_init_ablkcipher_ops()
374 if (!alg->ivsize) { in crypto_init_ablkcipher_ops()
379 crt->ivsize = alg->ivsize; in crypto_init_ablkcipher_ops()
385 static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_ablkcipher_report() argument
390 strncpy(rblkcipher.geniv, alg->cra_ablkcipher.geniv ?: "<default>", in crypto_ablkcipher_report()
[all …]
Dinternal.h43 struct crypto_alg alg; member
63 static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg) in crypto_cipher_ctxsize() argument
65 return alg->cra_ctxsize; in crypto_cipher_ctxsize()
68 static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) in crypto_compress_ctxsize() argument
70 return alg->cra_ctxsize; in crypto_compress_ctxsize()
73 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg);
84 void crypto_larval_kill(struct crypto_alg *alg);
88 void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list,
91 void crypto_shoot_alg(struct crypto_alg *alg);
92 struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type,
[all …]
Dctr.c184 struct crypto_alg *alg; in crypto_ctr_alloc() local
191 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER, in crypto_ctr_alloc()
193 if (IS_ERR(alg)) in crypto_ctr_alloc()
194 return ERR_CAST(alg); in crypto_ctr_alloc()
198 if (alg->cra_blocksize < 4) in crypto_ctr_alloc()
202 if (alg->cra_blocksize % 4) in crypto_ctr_alloc()
205 inst = crypto_alloc_instance("ctr", alg); in crypto_ctr_alloc()
209 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_ctr_alloc()
210 inst->alg.cra_priority = alg->cra_priority; in crypto_ctr_alloc()
211 inst->alg.cra_blocksize = 1; in crypto_ctr_alloc()
[all …]
Dproc.c82 struct crypto_alg *alg = list_entry(p, struct crypto_alg, cra_list); in c_show() local
84 seq_printf(m, "name : %s\n", alg->cra_name); in c_show()
85 seq_printf(m, "driver : %s\n", alg->cra_driver_name); in c_show()
86 seq_printf(m, "module : %s\n", module_name(alg->cra_module)); in c_show()
87 seq_printf(m, "priority : %d\n", alg->cra_priority); in c_show()
88 seq_printf(m, "refcnt : %d\n", atomic_read(&alg->cra_refcnt)); in c_show()
90 (alg->cra_flags & CRYPTO_ALG_TESTED) ? in c_show()
93 (alg->cra_flags & CRYPTO_ALG_INTERNAL) ? in c_show()
96 if (alg->cra_flags & CRYPTO_ALG_LARVAL) { in c_show()
98 seq_printf(m, "flags : 0x%x\n", alg->cra_flags); in c_show()
[all …]
Decb.c121 struct crypto_alg *alg; in crypto_ecb_alloc() local
128 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in crypto_ecb_alloc()
130 if (IS_ERR(alg)) in crypto_ecb_alloc()
131 return ERR_CAST(alg); in crypto_ecb_alloc()
133 inst = crypto_alloc_instance("ecb", alg); in crypto_ecb_alloc()
137 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_ecb_alloc()
138 inst->alg.cra_priority = alg->cra_priority; in crypto_ecb_alloc()
139 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_ecb_alloc()
140 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_ecb_alloc()
141 inst->alg.cra_type = &crypto_blkcipher_type; in crypto_ecb_alloc()
[all …]
Dblkcipher.c421 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; in async_encrypt() local
429 return alg->encrypt(&desc, req->dst, req->src, req->nbytes); in async_encrypt()
435 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; in async_decrypt() local
442 return alg->decrypt(&desc, req->dst, req->src, req->nbytes); in async_decrypt()
445 static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg, u32 type, in crypto_blkcipher_ctxsize() argument
448 struct blkcipher_alg *cipher = &alg->cra_blkcipher; in crypto_blkcipher_ctxsize()
449 unsigned int len = alg->cra_ctxsize; in crypto_blkcipher_ctxsize()
453 len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1); in crypto_blkcipher_ctxsize()
463 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; in crypto_init_blkcipher_ops_async() local
468 if (!alg->ivsize) { in crypto_init_blkcipher_ops_async()
[all …]
Dcryptd.c298 static void *cryptd_alloc_instance(struct crypto_alg *alg, unsigned int head, in cryptd_alloc_instance() argument
312 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in cryptd_alloc_instance()
313 "cryptd(%s)", alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in cryptd_alloc_instance()
316 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in cryptd_alloc_instance()
318 inst->alg.cra_priority = alg->cra_priority + 50; in cryptd_alloc_instance()
319 inst->alg.cra_blocksize = alg->cra_blocksize; in cryptd_alloc_instance()
320 inst->alg.cra_alignmask = alg->cra_alignmask; in cryptd_alloc_instance()
337 struct crypto_alg *alg; in cryptd_create_blkcipher() local
344 alg = crypto_get_attr_alg(tb, type, mask); in cryptd_create_blkcipher()
345 if (IS_ERR(alg)) in cryptd_create_blkcipher()
[all …]
Dxcbc.c202 struct crypto_alg *alg; in xcbc_create() local
210 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in xcbc_create()
212 if (IS_ERR(alg)) in xcbc_create()
213 return PTR_ERR(alg); in xcbc_create()
215 switch(alg->cra_blocksize) { in xcbc_create()
222 inst = shash_alloc_instance("xcbc", alg); in xcbc_create()
227 err = crypto_init_spawn(shash_instance_ctx(inst), alg, in xcbc_create()
233 alignmask = alg->cra_alignmask | 3; in xcbc_create()
234 inst->alg.base.cra_alignmask = alignmask; in xcbc_create()
235 inst->alg.base.cra_priority = alg->cra_priority; in xcbc_create()
[all …]
Dcmac.c228 struct crypto_alg *alg; in cmac_create() local
236 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in cmac_create()
238 if (IS_ERR(alg)) in cmac_create()
239 return PTR_ERR(alg); in cmac_create()
241 switch (alg->cra_blocksize) { in cmac_create()
249 inst = shash_alloc_instance("cmac", alg); in cmac_create()
254 err = crypto_init_spawn(shash_instance_ctx(inst), alg, in cmac_create()
260 alignmask = alg->cra_alignmask | (sizeof(long) - 1); in cmac_create()
261 inst->alg.base.cra_alignmask = alignmask; in cmac_create()
262 inst->alg.base.cra_priority = alg->cra_priority; in cmac_create()
[all …]
Dcbc.c217 struct crypto_alg *alg; in crypto_cbc_alloc() local
224 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in crypto_cbc_alloc()
226 if (IS_ERR(alg)) in crypto_cbc_alloc()
227 return ERR_CAST(alg); in crypto_cbc_alloc()
230 if (!is_power_of_2(alg->cra_blocksize)) in crypto_cbc_alloc()
233 inst = crypto_alloc_instance("cbc", alg); in crypto_cbc_alloc()
237 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_cbc_alloc()
238 inst->alg.cra_priority = alg->cra_priority; in crypto_cbc_alloc()
239 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_cbc_alloc()
240 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_cbc_alloc()
[all …]
Dalgboss.c41 } alg; member
58 char alg[CRYPTO_MAX_ALG_NAME]; member
90 crypto_alg_put(&param->larval->alg); in cryptomgr_probe()
99 const char *name = larval->alg.cra_name; in cryptomgr_schedule_probe()
151 param->attrs[i].alg.attr.rta_len = in cryptomgr_schedule_probe()
152 sizeof(param->attrs[i].alg); in cryptomgr_schedule_probe()
153 param->attrs[i].alg.attr.rta_type = CRYPTOA_ALG; in cryptomgr_schedule_probe()
154 memcpy(param->attrs[i].alg.data.name, name, len); in cryptomgr_schedule_probe()
183 param->type.data.type = larval->alg.cra_flags & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe()
187 param->otype = larval->alg.cra_flags; in cryptomgr_schedule_probe()
[all …]
Dahash.c452 struct ahash_alg *alg = crypto_ahash_alg(hash); in crypto_ahash_init_tfm() local
462 hash->init = alg->init; in crypto_ahash_init_tfm()
463 hash->update = alg->update; in crypto_ahash_init_tfm()
464 hash->final = alg->final; in crypto_ahash_init_tfm()
465 hash->finup = alg->finup ?: ahash_def_finup; in crypto_ahash_init_tfm()
466 hash->digest = alg->digest; in crypto_ahash_init_tfm()
468 if (alg->setkey) { in crypto_ahash_init_tfm()
469 hash->setkey = alg->setkey; in crypto_ahash_init_tfm()
472 if (alg->export) in crypto_ahash_init_tfm()
473 hash->export = alg->export; in crypto_ahash_init_tfm()
[all …]
Dhmac.c184 struct crypto_alg *alg; in hmac_create() local
201 alg = &salg->base; in hmac_create()
202 if (ds > alg->cra_blocksize || in hmac_create()
203 ss < alg->cra_blocksize) in hmac_create()
206 inst = shash_alloc_instance("hmac", alg); in hmac_create()
216 inst->alg.base.cra_priority = alg->cra_priority; in hmac_create()
217 inst->alg.base.cra_blocksize = alg->cra_blocksize; in hmac_create()
218 inst->alg.base.cra_alignmask = alg->cra_alignmask; in hmac_create()
220 ss = ALIGN(ss, alg->cra_alignmask + 1); in hmac_create()
221 inst->alg.digestsize = ds; in hmac_create()
[all …]
Dlrw.c329 struct crypto_alg *alg; in alloc() local
336 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in alloc()
338 if (IS_ERR(alg)) in alloc()
339 return ERR_CAST(alg); in alloc()
341 inst = crypto_alloc_instance("lrw", alg); in alloc()
345 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in alloc()
346 inst->alg.cra_priority = alg->cra_priority; in alloc()
347 inst->alg.cra_blocksize = alg->cra_blocksize; in alloc()
349 if (alg->cra_alignmask < 7) inst->alg.cra_alignmask = 7; in alloc()
350 else inst->alg.cra_alignmask = alg->cra_alignmask; in alloc()
[all …]
Dpcbc.c227 struct crypto_alg *alg; in crypto_pcbc_alloc() local
234 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in crypto_pcbc_alloc()
236 if (IS_ERR(alg)) in crypto_pcbc_alloc()
237 return ERR_CAST(alg); in crypto_pcbc_alloc()
239 inst = crypto_alloc_instance("pcbc", alg); in crypto_pcbc_alloc()
243 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_pcbc_alloc()
244 inst->alg.cra_priority = alg->cra_priority; in crypto_pcbc_alloc()
245 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_pcbc_alloc()
246 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_pcbc_alloc()
247 inst->alg.cra_type = &crypto_blkcipher_type; in crypto_pcbc_alloc()
[all …]
Dcts.c277 struct crypto_alg *alg; in crypto_cts_alloc() local
284 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_BLKCIPHER, in crypto_cts_alloc()
286 if (IS_ERR(alg)) in crypto_cts_alloc()
287 return ERR_CAST(alg); in crypto_cts_alloc()
290 if (!is_power_of_2(alg->cra_blocksize)) in crypto_cts_alloc()
293 if (strncmp(alg->cra_name, "cbc(", 4)) in crypto_cts_alloc()
296 inst = crypto_alloc_instance("cts", alg); in crypto_cts_alloc()
300 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in crypto_cts_alloc()
301 inst->alg.cra_priority = alg->cra_priority; in crypto_cts_alloc()
302 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_cts_alloc()
[all …]
Dtestmgr.c37 int alg_test(const char *driver, const char *alg, u32 type, u32 mask) in alg_test() argument
118 const char *alg; member
1826 .alg = "__cbc-cast5-avx",
1829 .alg = "__cbc-cast6-avx",
1832 .alg = "__cbc-serpent-avx",
1835 .alg = "__cbc-serpent-avx2",
1838 .alg = "__cbc-serpent-sse2",
1841 .alg = "__cbc-twofish-avx",
1844 .alg = "__driver-cbc-aes-aesni",
1848 .alg = "__driver-cbc-camellia-aesni",
[all …]
Dxts.c290 struct crypto_alg *alg; in alloc() local
297 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in alloc()
299 if (IS_ERR(alg)) in alloc()
300 return ERR_CAST(alg); in alloc()
302 inst = crypto_alloc_instance("xts", alg); in alloc()
306 inst->alg.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER; in alloc()
307 inst->alg.cra_priority = alg->cra_priority; in alloc()
308 inst->alg.cra_blocksize = alg->cra_blocksize; in alloc()
310 if (alg->cra_alignmask < 7) in alloc()
311 inst->alg.cra_alignmask = 7; in alloc()
[all …]
Dshash.c335 struct shash_alg *alg = __crypto_shash_alg(calg); in crypto_init_shash_ops_async() local
359 crt->has_setkey = alg->setkey != shash_no_setkey; in crypto_init_shash_ops_async()
361 if (alg->export) in crypto_init_shash_ops_async()
363 if (alg->import) in crypto_init_shash_ops_async()
459 struct shash_alg *alg = __crypto_shash_alg(calg); in crypto_init_shash_ops_compat() local
490 crt->digestsize = alg->digestsize; in crypto_init_shash_ops_compat()
505 static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type, in crypto_shash_ctxsize() argument
524 static unsigned int crypto_shash_extsize(struct crypto_alg *alg) in crypto_shash_extsize() argument
526 return alg->cra_ctxsize; in crypto_shash_extsize()
530 static int crypto_shash_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_shash_report() argument
[all …]
Dpcompress.c41 static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg) in crypto_pcomp_extsize() argument
43 return alg->cra_ctxsize; in crypto_pcomp_extsize()
52 static int crypto_pcomp_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_pcomp_report() argument
66 static int crypto_pcomp_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_pcomp_report() argument
72 static void crypto_pcomp_show(struct seq_file *m, struct crypto_alg *alg)
74 static void crypto_pcomp_show(struct seq_file *m, struct crypto_alg *alg) in crypto_pcomp_show() argument
100 int crypto_register_pcomp(struct pcomp_alg *alg) in crypto_register_pcomp() argument
102 struct crypto_alg *base = &alg->base; in crypto_register_pcomp()
112 int crypto_unregister_pcomp(struct pcomp_alg *alg) in crypto_unregister_pcomp() argument
114 return crypto_unregister_alg(&alg->base); in crypto_unregister_pcomp()
Dpcrypt.c309 static struct crypto_instance *pcrypt_alloc_instance(struct crypto_alg *alg) in pcrypt_alloc_instance() argument
322 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in pcrypt_alloc_instance()
323 "pcrypt(%s)", alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in pcrypt_alloc_instance()
326 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in pcrypt_alloc_instance()
329 err = crypto_init_spawn(&ctx->spawn, alg, inst, in pcrypt_alloc_instance()
334 inst->alg.cra_priority = alg->cra_priority + 100; in pcrypt_alloc_instance()
335 inst->alg.cra_blocksize = alg->cra_blocksize; in pcrypt_alloc_instance()
336 inst->alg.cra_alignmask = alg->cra_alignmask; in pcrypt_alloc_instance()
351 struct crypto_alg *alg; in pcrypt_alloc_aead() local
353 alg = crypto_get_attr_alg(tb, type, (mask & CRYPTO_ALG_TYPE_MASK)); in pcrypt_alloc_aead()
[all …]
Dccm.c534 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_ccm_alloc_common()
539 memcpy(inst->alg.cra_name, full_name, CRYPTO_MAX_ALG_NAME); in crypto_ccm_alloc_common()
541 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_ccm_alloc_common()
542 inst->alg.cra_flags |= ctr->cra_flags & CRYPTO_ALG_ASYNC; in crypto_ccm_alloc_common()
543 inst->alg.cra_priority = cipher->cra_priority + ctr->cra_priority; in crypto_ccm_alloc_common()
544 inst->alg.cra_blocksize = 1; in crypto_ccm_alloc_common()
545 inst->alg.cra_alignmask = cipher->cra_alignmask | ctr->cra_alignmask | in crypto_ccm_alloc_common()
547 inst->alg.cra_type = &crypto_aead_type; in crypto_ccm_alloc_common()
548 inst->alg.cra_aead.ivsize = 16; in crypto_ccm_alloc_common()
549 inst->alg.cra_aead.maxauthsize = 16; in crypto_ccm_alloc_common()
[all …]
Drng.c54 struct rng_alg *alg = &tfm->__crt_alg->cra_rng; in crypto_init_rng_ops() local
57 ops->rng_gen_random = alg->rng_make_random; in crypto_init_rng_ops()
64 static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_rng_report() argument
70 rrng.seedsize = alg->cra_rng.seedsize; in crypto_rng_report()
81 static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_rng_report() argument
87 static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
89 static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg) in crypto_rng_show() argument
92 seq_printf(m, "seedsize : %u\n", alg->cra_rng.seedsize); in crypto_rng_show()
95 static unsigned int crypto_rng_ctxsize(struct crypto_alg *alg, u32 type, in crypto_rng_ctxsize() argument
98 return alg->cra_ctxsize; in crypto_rng_ctxsize()
Dgcm.c754 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_gcm_alloc_common()
760 memcpy(inst->alg.cra_name, full_name, CRYPTO_MAX_ALG_NAME); in crypto_gcm_alloc_common()
762 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_gcm_alloc_common()
763 inst->alg.cra_flags |= ctr->cra_flags & CRYPTO_ALG_ASYNC; in crypto_gcm_alloc_common()
764 inst->alg.cra_priority = ctr->cra_priority; in crypto_gcm_alloc_common()
765 inst->alg.cra_blocksize = 1; in crypto_gcm_alloc_common()
766 inst->alg.cra_alignmask = ctr->cra_alignmask | (__alignof__(u64) - 1); in crypto_gcm_alloc_common()
767 inst->alg.cra_type = &crypto_aead_type; in crypto_gcm_alloc_common()
768 inst->alg.cra_aead.ivsize = 16; in crypto_gcm_alloc_common()
769 inst->alg.cra_aead.maxauthsize = 16; in crypto_gcm_alloc_common()
[all …]
Dmcryptd.c33 static void *mcryptd_alloc_instance(struct crypto_alg *alg, unsigned int head,
228 static void *mcryptd_alloc_instance(struct crypto_alg *alg, unsigned int head, in mcryptd_alloc_instance() argument
242 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in mcryptd_alloc_instance()
243 "mcryptd(%s)", alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in mcryptd_alloc_instance()
246 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in mcryptd_alloc_instance()
248 inst->alg.cra_priority = alg->cra_priority + 50; in mcryptd_alloc_instance()
249 inst->alg.cra_blocksize = alg->cra_blocksize; in mcryptd_alloc_instance()
250 inst->alg.cra_alignmask = alg->cra_alignmask; in mcryptd_alloc_instance()
496 struct crypto_alg *alg; in mcryptd_create_hash() local
507 alg = &salg->base; in mcryptd_create_hash()
[all …]
Dseqiv.c270 if (inst->alg.cra_ablkcipher.ivsize < sizeof(u64)) { in seqiv_ablkcipher_alloc()
276 inst->alg.cra_ablkcipher.givencrypt = seqiv_givencrypt_first; in seqiv_ablkcipher_alloc()
278 inst->alg.cra_init = seqiv_init; in seqiv_ablkcipher_alloc()
279 inst->alg.cra_exit = skcipher_geniv_exit; in seqiv_ablkcipher_alloc()
281 inst->alg.cra_ctxsize += inst->alg.cra_ablkcipher.ivsize; in seqiv_ablkcipher_alloc()
296 if (inst->alg.cra_aead.ivsize < sizeof(u64)) { in seqiv_aead_alloc()
302 inst->alg.cra_aead.givencrypt = seqiv_aead_givencrypt_first; in seqiv_aead_alloc()
304 inst->alg.cra_init = seqiv_aead_init; in seqiv_aead_alloc()
305 inst->alg.cra_exit = aead_geniv_exit; in seqiv_aead_alloc()
307 inst->alg.cra_ctxsize = inst->alg.cra_aead.ivsize; in seqiv_aead_alloc()
[all …]
Dchainiv.c305 inst->alg.cra_ablkcipher.givencrypt = chainiv_givencrypt_first; in chainiv_alloc()
307 inst->alg.cra_init = chainiv_init; in chainiv_alloc()
308 inst->alg.cra_exit = skcipher_geniv_exit; in chainiv_alloc()
310 inst->alg.cra_ctxsize = sizeof(struct chainiv_ctx); in chainiv_alloc()
313 inst->alg.cra_flags |= CRYPTO_ALG_ASYNC; in chainiv_alloc()
315 inst->alg.cra_ablkcipher.givencrypt = in chainiv_alloc()
318 inst->alg.cra_init = async_chainiv_init; in chainiv_alloc()
319 inst->alg.cra_exit = async_chainiv_exit; in chainiv_alloc()
321 inst->alg.cra_ctxsize = sizeof(struct async_chainiv_ctx); in chainiv_alloc()
324 inst->alg.cra_ctxsize += inst->alg.cra_ablkcipher.ivsize; in chainiv_alloc()
Deseqiv.c220 if (inst->alg.cra_ablkcipher.ivsize != inst->alg.cra_blocksize) in eseqiv_alloc()
223 inst->alg.cra_ablkcipher.givencrypt = eseqiv_givencrypt_first; in eseqiv_alloc()
225 inst->alg.cra_init = eseqiv_init; in eseqiv_alloc()
226 inst->alg.cra_exit = skcipher_geniv_exit; in eseqiv_alloc()
228 inst->alg.cra_ctxsize = sizeof(struct eseqiv_ctx); in eseqiv_alloc()
229 inst->alg.cra_ctxsize += inst->alg.cra_ablkcipher.ivsize; in eseqiv_alloc()
Dvmac.c646 struct crypto_alg *alg; in vmac_create() local
653 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in vmac_create()
655 if (IS_ERR(alg)) in vmac_create()
656 return PTR_ERR(alg); in vmac_create()
658 inst = shash_alloc_instance("vmac", alg); in vmac_create()
663 err = crypto_init_spawn(shash_instance_ctx(inst), alg, in vmac_create()
669 inst->alg.base.cra_priority = alg->cra_priority; in vmac_create()
670 inst->alg.base.cra_blocksize = alg->cra_blocksize; in vmac_create()
671 inst->alg.base.cra_alignmask = alg->cra_alignmask; in vmac_create()
673 inst->alg.digestsize = sizeof(vmac_t); in vmac_create()
[all …]
Dauthenc.c647 if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_alloc()
652 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_alloc()
657 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_authenc_alloc()
658 inst->alg.cra_flags |= enc->cra_flags & CRYPTO_ALG_ASYNC; in crypto_authenc_alloc()
659 inst->alg.cra_priority = enc->cra_priority * in crypto_authenc_alloc()
661 inst->alg.cra_blocksize = enc->cra_blocksize; in crypto_authenc_alloc()
662 inst->alg.cra_alignmask = auth_base->cra_alignmask | enc->cra_alignmask; in crypto_authenc_alloc()
663 inst->alg.cra_type = &crypto_aead_type; in crypto_authenc_alloc()
665 inst->alg.cra_aead.ivsize = enc->cra_ablkcipher.ivsize; in crypto_authenc_alloc()
666 inst->alg.cra_aead.maxauthsize = auth->digestsize; in crypto_authenc_alloc()
[all …]
Dsha1_generic.c62 static struct shash_alg alg = { variable
80 return crypto_register_shash(&alg); in sha1_generic_mod_init()
85 crypto_unregister_shash(&alg); in sha1_generic_mod_fini()
Dlzo.c83 static struct crypto_alg alg = { variable
97 return crypto_register_alg(&alg); in lzo_mod_init()
102 crypto_unregister_alg(&alg); in lzo_mod_fini()
Dauthencesn.c739 if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_alloc()
744 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_alloc()
749 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_authenc_esn_alloc()
750 inst->alg.cra_flags |= enc->cra_flags & CRYPTO_ALG_ASYNC; in crypto_authenc_esn_alloc()
751 inst->alg.cra_priority = enc->cra_priority * in crypto_authenc_esn_alloc()
753 inst->alg.cra_blocksize = enc->cra_blocksize; in crypto_authenc_esn_alloc()
754 inst->alg.cra_alignmask = auth_base->cra_alignmask | enc->cra_alignmask; in crypto_authenc_esn_alloc()
755 inst->alg.cra_type = &crypto_aead_type; in crypto_authenc_esn_alloc()
757 inst->alg.cra_aead.ivsize = enc->cra_ablkcipher.ivsize; in crypto_authenc_esn_alloc()
758 inst->alg.cra_aead.maxauthsize = auth->digestsize; in crypto_authenc_esn_alloc()
[all …]
Dcrct10dif_generic.c91 static struct shash_alg alg = { variable
112 ret = crypto_register_shash(&alg); in crct10dif_mod_init()
118 crypto_unregister_shash(&alg); in crct10dif_mod_fini()
Dcrc32.c123 static struct shash_alg alg = { variable
145 return crypto_register_shash(&alg); in crc32_mod_init()
150 crypto_unregister_shash(&alg); in crc32_mod_fini()
Dcrc32c_generic.c136 static struct shash_alg alg = { variable
159 return crypto_register_shash(&alg); in crc32c_mod_init()
164 crypto_unregister_shash(&alg); in crc32c_mod_fini()
D842.c155 static struct crypto_alg alg = { variable
170 return crypto_register_alg(&alg); in nx842_mod_init()
175 crypto_unregister_alg(&alg); in nx842_mod_exit()
Dmd5.c139 static struct shash_alg alg = { variable
158 return crypto_register_shash(&alg); in md5_mod_init()
163 crypto_unregister_shash(&alg); in md5_mod_fini()
Dmichael_mic.c153 static struct shash_alg alg = { variable
171 return crypto_register_shash(&alg); in michael_mic_init()
177 crypto_unregister_shash(&alg); in michael_mic_exit()
Ddrbg.c1892 static inline void __init drbg_fill_array(struct crypto_alg *alg, in drbg_fill_array() argument
1898 memset(alg, 0, sizeof(struct crypto_alg)); in drbg_fill_array()
1899 memcpy(alg->cra_name, "stdrng", 6); in drbg_fill_array()
1901 memcpy(alg->cra_driver_name, "drbg_pr_", 8); in drbg_fill_array()
1904 memcpy(alg->cra_driver_name, "drbg_nopr_", 10); in drbg_fill_array()
1907 memcpy(alg->cra_driver_name + pos, core->cra_name, in drbg_fill_array()
1910 alg->cra_priority = priority; in drbg_fill_array()
1918 alg->cra_priority += 200; in drbg_fill_array()
1920 alg->cra_flags = CRYPTO_ALG_TYPE_RNG; in drbg_fill_array()
1921 alg->cra_ctxsize = sizeof(struct drbg_state); in drbg_fill_array()
[all …]
Dblowfish_generic.c109 static struct crypto_alg alg = { variable
128 return crypto_register_alg(&alg); in blowfish_mod_init()
133 crypto_unregister_alg(&alg); in blowfish_mod_fini()
Ddeflate.c197 static struct crypto_alg alg = { variable
211 return crypto_register_alg(&alg); in deflate_mod_init()
216 crypto_unregister_alg(&alg); in deflate_mod_fini()
Dtwofish_generic.c182 static struct crypto_alg alg = { variable
201 return crypto_register_alg(&alg); in twofish_mod_init()
206 crypto_unregister_alg(&alg); in twofish_mod_fini()
Dsalsa20_generic.c214 static struct crypto_alg alg = { variable
238 return crypto_register_alg(&alg); in salsa20_generic_mod_init()
243 crypto_unregister_alg(&alg); in salsa20_generic_mod_fini()
Dtcrypt.c60 static char *alg = NULL; variable
1220 static inline int tcrypt_test(const char *alg) in tcrypt_test() argument
1224 ret = alg_test(alg, alg, 0, 0); in tcrypt_test()
1231 static int do_test(const char *alg, u32 type, u32 mask, int m) in do_test() argument
1238 if (alg) { in do_test()
1239 if (!crypto_has_alg(alg, type, in do_test()
1765 if (alg) { in do_test()
1766 test_hash_speed(alg, sec, generic_hash_speed_template); in do_test()
1856 if (alg) { in do_test()
1857 test_ahash_speed(alg, sec, generic_hash_speed_template); in do_test()
[all …]
Dmd4.c229 static struct shash_alg alg = { variable
245 return crypto_register_shash(&alg); in md4_mod_init()
250 crypto_unregister_shash(&alg); in md4_mod_fini()
Dcast6_generic.c260 static struct crypto_alg alg = { variable
281 return crypto_register_alg(&alg); in cast6_mod_init()
286 crypto_unregister_alg(&alg); in cast6_mod_fini()
Dcast5_generic.c517 static struct crypto_alg alg = { variable
539 return crypto_register_alg(&alg); in cast5_mod_init()
544 crypto_unregister_alg(&alg); in cast5_mod_fini()
Drmd128.c300 static struct shash_alg alg = { variable
316 return crypto_register_shash(&alg); in rmd128_mod_init()
321 crypto_unregister_shash(&alg); in rmd128_mod_fini()
Drmd256.c319 static struct shash_alg alg = { variable
335 return crypto_register_shash(&alg); in rmd256_mod_init()
340 crypto_unregister_shash(&alg); in rmd256_mod_fini()
Drmd160.c344 static struct shash_alg alg = { variable
360 return crypto_register_shash(&alg); in rmd160_mod_init()
365 crypto_unregister_shash(&alg); in rmd160_mod_fini()
Drmd320.c368 static struct shash_alg alg = { variable
384 return crypto_register_shash(&alg); in rmd320_mod_init()
389 crypto_unregister_shash(&alg); in rmd320_mod_fini()
/linux-4.1.27/arch/x86/crypto/
Dfpu.c105 struct crypto_alg *alg; in crypto_fpu_alloc() local
112 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_BLKCIPHER, in crypto_fpu_alloc()
114 if (IS_ERR(alg)) in crypto_fpu_alloc()
115 return ERR_CAST(alg); in crypto_fpu_alloc()
117 inst = crypto_alloc_instance("fpu", alg); in crypto_fpu_alloc()
121 inst->alg.cra_flags = alg->cra_flags; in crypto_fpu_alloc()
122 inst->alg.cra_priority = alg->cra_priority; in crypto_fpu_alloc()
123 inst->alg.cra_blocksize = alg->cra_blocksize; in crypto_fpu_alloc()
124 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_fpu_alloc()
125 inst->alg.cra_type = alg->cra_type; in crypto_fpu_alloc()
[all …]
Dcrc32c-intel_glue.c230 static struct shash_alg alg = { variable
262 alg.update = crc32c_pcl_intel_update; in crc32c_intel_mod_init()
263 alg.finup = crc32c_pcl_intel_finup; in crc32c_intel_mod_init()
264 alg.digest = crc32c_pcl_intel_digest; in crc32c_intel_mod_init()
268 return crypto_register_shash(&alg); in crc32c_intel_mod_init()
273 crypto_unregister_shash(&alg); in crc32c_intel_mod_fini()
Dtwofish_glue.c64 static struct crypto_alg alg = { variable
86 return crypto_register_alg(&alg); in init()
91 crypto_unregister_alg(&alg); in fini()
Dsalsa20_glue.c85 static struct crypto_alg alg = { variable
109 return crypto_register_alg(&alg); in init()
114 crypto_unregister_alg(&alg); in fini()
Dcrct10dif-pclmul_glue.c107 static struct shash_alg alg = { variable
135 return crypto_register_shash(&alg); in crct10dif_intel_mod_init()
140 crypto_unregister_shash(&alg); in crct10dif_intel_mod_fini()
Dsha1_ssse3_glue.c106 static struct shash_alg alg = { variable
180 return crypto_register_shash(&alg); in sha1_ssse3_mod_init()
189 crypto_unregister_shash(&alg); in sha1_ssse3_mod_fini()
Dcrc32-pclmul_glue.c152 static struct shash_alg alg = { variable
186 return crypto_register_shash(&alg); in crc32_pclmul_mod_init()
191 crypto_unregister_shash(&alg); in crc32_pclmul_mod_fini()
/linux-4.1.27/include/crypto/internal/
Dhash.h38 struct ahash_alg alg; member
42 struct shash_alg alg; member
80 int crypto_register_ahash(struct ahash_alg *alg);
81 int crypto_unregister_ahash(struct ahash_alg *alg);
87 struct hash_alg_common *alg,
97 int crypto_register_shash(struct shash_alg *alg);
98 int crypto_unregister_shash(struct shash_alg *alg);
106 struct shash_alg *alg,
136 static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg) in __crypto_ahash_alg() argument
138 return container_of(__crypto_hash_alg_common(alg), struct ahash_alg, in __crypto_ahash_alg()
[all …]
Dcompress.h25 extern int crypto_register_pcomp(struct pcomp_alg *alg);
26 extern int crypto_unregister_pcomp(struct pcomp_alg *alg);
Dskcipher.h47 return spawn->base.alg; in crypto_skcipher_spawn_alg()
60 const char *crypto_default_geniv(const struct crypto_alg *alg);
Daead.h47 return spawn->base.alg; in crypto_aead_spawn_alg()
/linux-4.1.27/drivers/crypto/ccp/
Dccp-crypto-aes-xts.c229 struct crypto_alg *alg; in ccp_register_aes_xts_alg() local
238 alg = &ccp_alg->alg; in ccp_register_aes_xts_alg()
240 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name); in ccp_register_aes_xts_alg()
241 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in ccp_register_aes_xts_alg()
243 alg->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC | in ccp_register_aes_xts_alg()
246 alg->cra_blocksize = AES_BLOCK_SIZE; in ccp_register_aes_xts_alg()
247 alg->cra_ctxsize = sizeof(struct ccp_ctx); in ccp_register_aes_xts_alg()
248 alg->cra_priority = CCP_CRA_PRIORITY; in ccp_register_aes_xts_alg()
249 alg->cra_type = &crypto_ablkcipher_type; in ccp_register_aes_xts_alg()
250 alg->cra_ablkcipher.setkey = ccp_aes_xts_setkey; in ccp_register_aes_xts_alg()
[all …]
Dccp-crypto-sha.c152 struct ccp_crypto_ahash_alg *alg = in ccp_sha_init() local
159 rctx->type = alg->type; in ccp_sha_init()
308 struct ccp_crypto_ahash_alg *alg = ccp_crypto_ahash_alg(tfm); in ccp_hmac_sha_cra_init() local
311 hmac_tfm = crypto_alloc_shash(alg->child_alg, 0, 0); in ccp_hmac_sha_cra_init()
314 alg->child_alg); in ccp_hmac_sha_cra_init()
370 struct ahash_alg *alg; in ccp_register_hmac_alg() local
385 alg = &ccp_alg->alg; in ccp_register_hmac_alg()
386 alg->setkey = ccp_sha_setkey; in ccp_register_hmac_alg()
388 halg = &alg->halg; in ccp_register_hmac_alg()
397 ret = crypto_register_ahash(alg); in ccp_register_hmac_alg()
[all …]
Dccp-crypto.h34 struct crypto_alg alg; member
47 struct ahash_alg alg; member
53 struct crypto_alg *alg = tfm->__crt_alg; in ccp_crypto_ablkcipher_alg() local
55 return container_of(alg, struct ccp_crypto_ablkcipher_alg, alg); in ccp_crypto_ablkcipher_alg()
61 struct crypto_alg *alg = tfm->__crt_alg; in ccp_crypto_ahash_alg() local
64 ahash_alg = container_of(alg, struct ahash_alg, halg.base); in ccp_crypto_ahash_alg()
66 return container_of(ahash_alg, struct ccp_crypto_ahash_alg, alg); in ccp_crypto_ahash_alg()
Dccp-crypto-aes.c44 struct ccp_crypto_ablkcipher_alg *alg = in ccp_aes_setkey() local
61 ctx->u.aes.mode = alg->mode; in ccp_aes_setkey()
324 struct crypto_alg *alg; in ccp_register_aes_alg() local
336 alg = &ccp_alg->alg; in ccp_register_aes_alg()
337 *alg = *def->alg_defaults; in ccp_register_aes_alg()
338 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name); in ccp_register_aes_alg()
339 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in ccp_register_aes_alg()
341 alg->cra_blocksize = def->blocksize; in ccp_register_aes_alg()
342 alg->cra_ablkcipher.ivsize = def->ivsize; in ccp_register_aes_alg()
344 ret = crypto_register_alg(alg); in ccp_register_aes_alg()
[all …]
Dccp-crypto-aes-cmac.c245 struct ccp_crypto_ahash_alg *alg = in ccp_aes_cmac_setkey() local
266 ctx->u.aes.mode = alg->mode; in ccp_aes_cmac_setkey()
355 struct ahash_alg *alg; in ccp_register_aes_cmac_algs() local
367 alg = &ccp_alg->alg; in ccp_register_aes_cmac_algs()
368 alg->init = ccp_aes_cmac_init; in ccp_register_aes_cmac_algs()
369 alg->update = ccp_aes_cmac_update; in ccp_register_aes_cmac_algs()
370 alg->final = ccp_aes_cmac_final; in ccp_register_aes_cmac_algs()
371 alg->finup = ccp_aes_cmac_finup; in ccp_register_aes_cmac_algs()
372 alg->digest = ccp_aes_cmac_digest; in ccp_register_aes_cmac_algs()
373 alg->export = ccp_aes_cmac_export; in ccp_register_aes_cmac_algs()
[all …]
Dccp-crypto-main.c353 crypto_unregister_ahash(&ahash_alg->alg); in ccp_unregister_algs()
359 crypto_unregister_alg(&ablk_alg->alg); in ccp_unregister_algs()
/linux-4.1.27/drivers/staging/rtl8192e/
Drtllib_crypt.c106 struct rtllib_crypto_alg *alg; in rtllib_register_crypto_ops() local
111 alg = kzalloc(sizeof(*alg), GFP_KERNEL); in rtllib_register_crypto_ops()
112 if (alg == NULL) in rtllib_register_crypto_ops()
115 alg->ops = ops; in rtllib_register_crypto_ops()
118 list_add(&alg->list, &hcrypt->algs); in rtllib_register_crypto_ops()
139 struct rtllib_crypto_alg *alg = in rtllib_unregister_crypto_ops() local
141 if (alg->ops == ops) { in rtllib_unregister_crypto_ops()
142 list_del(&alg->list); in rtllib_unregister_crypto_ops()
143 del_alg = alg; in rtllib_unregister_crypto_ops()
171 struct rtllib_crypto_alg *alg = in rtllib_get_crypto_ops() local
[all …]
Drtllib_wx.c534 const char *alg, *module; in rtllib_wx_set_encode_ext() local
554 if (idx != 0 && ext->alg != IW_ENCODE_ALG_WEP) in rtllib_wx_set_encode_ext()
564 ext->alg == IW_ENCODE_ALG_NONE) { in rtllib_wx_set_encode_ext()
581 switch (ext->alg) { in rtllib_wx_set_encode_ext()
583 alg = "R-WEP"; in rtllib_wx_set_encode_ext()
587 alg = "R-TKIP"; in rtllib_wx_set_encode_ext()
591 alg = "R-CCMP"; in rtllib_wx_set_encode_ext()
596 dev->name, ext->alg); in rtllib_wx_set_encode_ext()
600 netdev_info(dev, "alg name:%s\n", alg); in rtllib_wx_set_encode_ext()
602 ops = lib80211_get_crypto_ops(alg); in rtllib_wx_set_encode_ext()
[all …]
Drtllib_softmac.c3367 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in rtllib_wpa_set_encryption()
3384 if (strcmp(param->u.crypt.alg, "none") == 0) { in rtllib_wpa_set_encryption()
3398 strcmp(param->u.crypt.alg, "R-TKIP")) in rtllib_wpa_set_encryption()
3401 ops = lib80211_get_crypto_ops(param->u.crypt.alg); in rtllib_wpa_set_encryption()
3402 if (ops == NULL && strcmp(param->u.crypt.alg, "R-WEP") == 0) { in rtllib_wpa_set_encryption()
3404 ops = lib80211_get_crypto_ops(param->u.crypt.alg); in rtllib_wpa_set_encryption()
3405 } else if (ops == NULL && strcmp(param->u.crypt.alg, "R-TKIP") == 0) { in rtllib_wpa_set_encryption()
3407 ops = lib80211_get_crypto_ops(param->u.crypt.alg); in rtllib_wpa_set_encryption()
3408 } else if (ops == NULL && strcmp(param->u.crypt.alg, "R-CCMP") == 0) { in rtllib_wpa_set_encryption()
3410 ops = lib80211_get_crypto_ops(param->u.crypt.alg); in rtllib_wpa_set_encryption()
[all …]
Drtllib.h487 u8 alg[IEEE_CRYPT_ALG_NAME_LEN]; member
/linux-4.1.27/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt.c105 struct ieee80211_crypto_alg *alg; in ieee80211_register_crypto_ops() local
110 alg = kzalloc(sizeof(*alg), GFP_KERNEL); in ieee80211_register_crypto_ops()
111 if (alg == NULL) in ieee80211_register_crypto_ops()
114 alg->ops = ops; in ieee80211_register_crypto_ops()
117 list_add(&alg->list, &hcrypt->algs); in ieee80211_register_crypto_ops()
137 struct ieee80211_crypto_alg *alg = in ieee80211_unregister_crypto_ops() local
139 if (alg->ops == ops) { in ieee80211_unregister_crypto_ops()
140 list_del(&alg->list); in ieee80211_unregister_crypto_ops()
141 del_alg = alg; in ieee80211_unregister_crypto_ops()
168 struct ieee80211_crypto_alg *alg = in ieee80211_get_crypto_ops() local
[all …]
Dieee80211_wx.c518 const char *alg, *module; in ieee80211_wx_set_encode_ext() local
542 if (idx != 0 && ext->alg != IW_ENCODE_ALG_WEP) in ieee80211_wx_set_encode_ext()
554 ext->alg == IW_ENCODE_ALG_NONE) { in ieee80211_wx_set_encode_ext()
576 switch (ext->alg) { in ieee80211_wx_set_encode_ext()
578 alg = "WEP"; in ieee80211_wx_set_encode_ext()
582 alg = "TKIP"; in ieee80211_wx_set_encode_ext()
586 alg = "CCMP"; in ieee80211_wx_set_encode_ext()
591 dev->name, ext->alg); in ieee80211_wx_set_encode_ext()
595 printk("alg name:%s\n",alg); in ieee80211_wx_set_encode_ext()
597 ops = ieee80211_get_crypto_ops(alg); in ieee80211_wx_set_encode_ext()
[all …]
Dieee80211_softmac.c2970 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in ieee80211_wpa_set_encryption()
2987 if (strcmp(param->u.crypt.alg, "none") == 0) { in ieee80211_wpa_set_encryption()
3005 strcmp(param->u.crypt.alg, "TKIP")) in ieee80211_wpa_set_encryption()
3008 ops = ieee80211_get_crypto_ops(param->u.crypt.alg); in ieee80211_wpa_set_encryption()
3009 if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) { in ieee80211_wpa_set_encryption()
3011 ops = ieee80211_get_crypto_ops(param->u.crypt.alg); in ieee80211_wpa_set_encryption()
3013 } else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) { in ieee80211_wpa_set_encryption()
3015 ops = ieee80211_get_crypto_ops(param->u.crypt.alg); in ieee80211_wpa_set_encryption()
3016 } else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) { in ieee80211_wpa_set_encryption()
3018 ops = ieee80211_get_crypto_ops(param->u.crypt.alg); in ieee80211_wpa_set_encryption()
[all …]
Dieee80211.h381 u8 alg[IEEE_CRYPT_ALG_NAME_LEN]; member
/linux-4.1.27/net/wireless/
Dlib80211.c167 struct lib80211_crypto_alg *alg; in lib80211_register_crypto_ops() local
169 alg = kzalloc(sizeof(*alg), GFP_KERNEL); in lib80211_register_crypto_ops()
170 if (alg == NULL) in lib80211_register_crypto_ops()
173 alg->ops = ops; in lib80211_register_crypto_ops()
176 list_add(&alg->list, &lib80211_crypto_algs); in lib80211_register_crypto_ops()
188 struct lib80211_crypto_alg *alg; in lib80211_unregister_crypto_ops() local
192 list_for_each_entry(alg, &lib80211_crypto_algs, list) { in lib80211_unregister_crypto_ops()
193 if (alg->ops == ops) in lib80211_unregister_crypto_ops()
202 list_del(&alg->list); in lib80211_unregister_crypto_ops()
204 kfree(alg); in lib80211_unregister_crypto_ops()
[all …]
Dwext-compat.c670 switch (ext->alg) { in cfg80211_wext_siwencodeext()
/linux-4.1.27/drivers/crypto/qce/
Dablkcipher.c350 struct crypto_alg *alg; in qce_ablkcipher_register_one() local
357 alg = &tmpl->alg.crypto; in qce_ablkcipher_register_one()
359 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name); in qce_ablkcipher_register_one()
360 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in qce_ablkcipher_register_one()
363 alg->cra_blocksize = def->blocksize; in qce_ablkcipher_register_one()
364 alg->cra_ablkcipher.ivsize = def->ivsize; in qce_ablkcipher_register_one()
365 alg->cra_ablkcipher.min_keysize = def->min_keysize; in qce_ablkcipher_register_one()
366 alg->cra_ablkcipher.max_keysize = def->max_keysize; in qce_ablkcipher_register_one()
367 alg->cra_ablkcipher.setkey = qce_ablkcipher_setkey; in qce_ablkcipher_register_one()
368 alg->cra_ablkcipher.encrypt = qce_ablkcipher_encrypt; in qce_ablkcipher_register_one()
[all …]
Dcipher.h62 struct crypto_alg *alg = tfm->__crt_alg; in to_cipher_tmpl() local
63 return container_of(alg, struct qce_alg_template, alg.crypto); in to_cipher_tmpl()
Dsha.c503 struct ahash_alg *alg; in qce_ahash_register_one() local
513 alg = &tmpl->alg.ahash; in qce_ahash_register_one()
514 alg->init = qce_ahash_init; in qce_ahash_register_one()
515 alg->update = qce_ahash_update; in qce_ahash_register_one()
516 alg->final = qce_ahash_final; in qce_ahash_register_one()
517 alg->digest = qce_ahash_digest; in qce_ahash_register_one()
518 alg->export = qce_ahash_export; in qce_ahash_register_one()
519 alg->import = qce_ahash_import; in qce_ahash_register_one()
521 alg->setkey = qce_ahash_hmac_setkey; in qce_ahash_register_one()
522 alg->halg.digestsize = def->digestsize; in qce_ahash_register_one()
[all …]
Dsha.h73 struct ahash_alg *alg = container_of(crypto_hash_alg_common(ahash), in to_ahash_tmpl() local
76 return container_of(alg, struct qce_alg_template, alg.ahash); in to_ahash_tmpl()
Dcommon.h92 } alg; member
/linux-4.1.27/drivers/crypto/
Dpicoxcell_crypto.c141 struct crypto_alg alg; member
182 static inline struct spacc_alg *to_spacc_alg(struct crypto_alg *alg) in to_spacc_alg() argument
184 return alg ? container_of(alg, struct spacc_alg, alg) : NULL; in to_spacc_alg()
408 struct spacc_alg *alg = to_spacc_alg(req->req->tfm->__crt_alg); in spacc_aead_free_ddts() local
411 unsigned ivsize = alg->alg.cra_aead.ivsize; in spacc_aead_free_ddts()
497 struct spacc_alg *alg = to_spacc_alg(tfm->base.__crt_alg); in spacc_aead_setkey() local
510 if ((alg->ctrl_default & SPACC_CRYPTO_ALG_MASK) == in spacc_aead_setkey()
548 struct crypto_alg *alg = req->req->tfm->__crt_alg; in spacc_aead_need_fallback() local
549 struct spacc_alg *spacc_alg = to_spacc_alg(alg); in spacc_aead_need_fallback()
599 struct crypto_alg *alg = req->req->tfm->__crt_alg; in spacc_aead_submit() local
[all …]
Dtalitos.c1914 } alg; member
1921 .alg.crypto = {
1940 .alg.crypto = {
1960 .alg.crypto = {
1979 .alg.crypto = {
1999 .alg.crypto = {
2018 .alg.crypto = {
2038 .alg.crypto = {
2057 .alg.crypto = {
2077 .alg.crypto = {
[all …]
Dn2_core.c250 struct ahash_alg alg; member
255 struct crypto_alg *alg = tfm->__crt_alg; in n2_ahash_alg() local
258 ahash_alg = container_of(alg, struct ahash_alg, halg.base); in n2_ahash_alg()
260 return container_of(ahash_alg, struct n2_ahash_alg, alg); in n2_ahash_alg()
270 struct crypto_alg *alg = tfm->__crt_alg; in n2_hmac_alg() local
273 ahash_alg = container_of(alg, struct ahash_alg, halg.base); in n2_hmac_alg()
275 return container_of(ahash_alg, struct n2_hmac_alg, derived.alg); in n2_hmac_alg()
700 struct crypto_alg alg; member
705 struct crypto_alg *alg = tfm->__crt_alg; in n2_cipher_alg() local
707 return container_of(alg, struct n2_cipher_alg, alg); in n2_cipher_alg()
[all …]
Dhifn_795x.c633 struct crypto_alg alg; member
663 #define crypto_alg_to_hifn(a) container_of(a, struct hifn_crypto_alg, alg)
2474 struct crypto_alg *alg = tfm->__crt_alg; in hifn_cra_init() local
2475 struct hifn_crypto_alg *ha = crypto_alg_to_hifn(alg); in hifn_cra_init()
2485 struct hifn_crypto_alg *alg; in hifn_alg_alloc() local
2488 alg = kzalloc(sizeof(struct hifn_crypto_alg), GFP_KERNEL); in hifn_alg_alloc()
2489 if (!alg) in hifn_alg_alloc()
2492 snprintf(alg->alg.cra_name, CRYPTO_MAX_ALG_NAME, "%s", t->name); in hifn_alg_alloc()
2493 snprintf(alg->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-%s", in hifn_alg_alloc()
2496 alg->alg.cra_priority = 300; in hifn_alg_alloc()
[all …]
Dmxs-dcp.c83 uint32_t alg; member
532 desc->control1 = actx->alg; in mxs_dcp_run_sha()
690 actx->alg = MXS_DCP_CONTROL1_HASH_SELECT_SHA1; in dcp_sha_init()
692 actx->alg = MXS_DCP_CONTROL1_HASH_SELECT_SHA256; in dcp_sha_init()
/linux-4.1.27/include/crypto/
Dalgapi.h25 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
26 unsigned int (*extsize)(struct crypto_alg *alg);
29 void (*show)(struct seq_file *m, struct crypto_alg *alg);
30 int (*report)(struct sk_buff *skb, struct crypto_alg *alg);
40 struct crypto_alg alg; member
62 struct crypto_alg *alg; member
132 void crypto_mod_put(struct crypto_alg *alg);
142 int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg,
144 int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
173 void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg,
[all …]
Dcompress.h89 static inline struct pcomp_alg *__crypto_pcomp_alg(struct crypto_alg *alg) in __crypto_pcomp_alg() argument
91 return container_of(alg, struct pcomp_alg, base); in __crypto_pcomp_alg()
Dhash.h264 struct crypto_alg *alg) in __crypto_hash_alg_common() argument
266 return container_of(alg, struct hash_alg_common, base); in __crypto_hash_alg_common()
661 static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) in __crypto_shash_alg() argument
663 return container_of(alg, struct shash_alg, base); in __crypto_shash_alg()
/linux-4.1.27/drivers/net/wireless/ipw2x00/
Dlibipw_wx.c527 const char *alg, *module; in libipw_wx_set_encodeext() local
548 if (idx != 0 && ext->alg != IW_ENCODE_ALG_WEP) in libipw_wx_set_encodeext()
558 ext->alg == IW_ENCODE_ALG_NONE) { in libipw_wx_set_encodeext()
583 switch (ext->alg) { in libipw_wx_set_encodeext()
585 alg = "WEP"; in libipw_wx_set_encodeext()
589 alg = "TKIP"; in libipw_wx_set_encodeext()
593 alg = "CCMP"; in libipw_wx_set_encodeext()
598 dev->name, ext->alg); in libipw_wx_set_encodeext()
603 ops = lib80211_get_crypto_ops(alg); in libipw_wx_set_encodeext()
606 ops = lib80211_get_crypto_ops(alg); in libipw_wx_set_encodeext()
[all …]
Dipw2200.c6779 if (ext->alg == IW_ENCODE_ALG_TKIP) { in ipw_wx_set_encodeext()
/linux-4.1.27/net/mac80211/
Drate.c34 struct rate_control_alg *alg; in ieee80211_rate_control_register() local
40 list_for_each_entry(alg, &rate_ctrl_algs, list) { in ieee80211_rate_control_register()
41 if (!strcmp(alg->ops->name, ops->name)) { in ieee80211_rate_control_register()
49 alg = kzalloc(sizeof(*alg), GFP_KERNEL); in ieee80211_rate_control_register()
50 if (alg == NULL) { in ieee80211_rate_control_register()
54 alg->ops = ops; in ieee80211_rate_control_register()
56 list_add_tail(&alg->list, &rate_ctrl_algs); in ieee80211_rate_control_register()
65 struct rate_control_alg *alg; in ieee80211_rate_control_unregister() local
68 list_for_each_entry(alg, &rate_ctrl_algs, list) { in ieee80211_rate_control_unregister()
69 if (alg->ops == ops) { in ieee80211_rate_control_unregister()
[all …]
/linux-4.1.27/sound/soc/codecs/
Dwm_adsp.c817 dsp->num, region_name, region->alg); in wm_adsp_create_control()
886 void *alg, *buf; in wm_adsp_setup_algs() local
935 region->alg = be32_to_cpu(adsp1_id.fw.id); in wm_adsp_setup_algs()
943 region->alg = be32_to_cpu(adsp1_id.fw.id); in wm_adsp_setup_algs()
976 region->alg = be32_to_cpu(adsp2_id.fw.id); in wm_adsp_setup_algs()
984 region->alg = be32_to_cpu(adsp2_id.fw.id); in wm_adsp_setup_algs()
992 region->alg = be32_to_cpu(adsp2_id.fw.id); in wm_adsp_setup_algs()
1029 alg = kzalloc((term - pos) * 2, GFP_KERNEL | GFP_DMA); in wm_adsp_setup_algs()
1030 if (!alg) in wm_adsp_setup_algs()
1033 ret = regmap_raw_read(regmap, mem->base + pos, alg, (term - pos) * 2); in wm_adsp_setup_algs()
[all …]
Dwmfw.h81 struct wmfw_alg_hdr alg; member
87 struct wmfw_alg_hdr alg; member
Dwm_adsp.h30 unsigned int alg; member
/linux-4.1.27/drivers/crypto/amcc/
Dcrypto4xx_core.c994 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_alg_init() local
995 struct crypto4xx_alg *amcc_alg = crypto_alg_to_crypto4xx_alg(alg); in crypto4xx_alg_init()
1005 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { in crypto4xx_alg_init()
1030 struct crypto4xx_alg *alg; in crypto4xx_register_alg() local
1035 alg = kzalloc(sizeof(struct crypto4xx_alg), GFP_KERNEL); in crypto4xx_register_alg()
1036 if (!alg) in crypto4xx_register_alg()
1039 alg->alg = crypto_alg[i]; in crypto4xx_register_alg()
1040 alg->dev = sec_dev; in crypto4xx_register_alg()
1042 switch (alg->alg.type) { in crypto4xx_register_alg()
1044 rc = crypto_register_ahash(&alg->alg.u.hash); in crypto4xx_register_alg()
[all …]
Dcrypto4xx_core.h153 struct crypto4xx_alg_common alg; member
163 struct crypto4xx_alg, alg.u.hash); in crypto_alg_to_crypto4xx_alg()
166 return container_of(x, struct crypto4xx_alg, alg.u.cipher); in crypto_alg_to_crypto4xx_alg()
Dcrypto4xx_alg.c185 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_hash_alg_init() local
186 struct crypto4xx_alg *my_alg = crypto_alg_to_crypto4xx_alg(alg); in crypto4xx_hash_alg_init()
/linux-4.1.27/drivers/crypto/vmx/
Daes.c40 const char *alg; in p8_aes_init() local
44 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_init()
49 fallback = crypto_alloc_cipher(alg, 0 ,CRYPTO_ALG_NEED_FALLBACK); in p8_aes_init()
52 alg, PTR_ERR(fallback)); in p8_aes_init()
Daes_ctr.c39 const char *alg; in p8_aes_ctr_init() local
43 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_ctr_init()
48 fallback = crypto_alloc_blkcipher(alg, 0 ,CRYPTO_ALG_NEED_FALLBACK); in p8_aes_ctr_init()
51 alg, PTR_ERR(fallback)); in p8_aes_ctr_init()
Daes_cbc.c41 const char *alg; in p8_aes_cbc_init() local
45 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_cbc_init()
50 fallback = crypto_alloc_blkcipher(alg, 0 ,CRYPTO_ALG_NEED_FALLBACK); in p8_aes_cbc_init()
53 alg, PTR_ERR(fallback)); in p8_aes_cbc_init()
Dghash.c58 const char *alg; in p8_ghash_init_tfm() local
63 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_ghash_init_tfm()
68 fallback = crypto_alloc_shash(alg, 0 ,CRYPTO_ALG_NEED_FALLBACK); in p8_ghash_init_tfm()
71 alg, PTR_ERR(fallback)); in p8_ghash_init_tfm()
/linux-4.1.27/arch/arm/crypto/
Dsha1_glue.c59 static struct shash_alg alg = { variable
79 return crypto_register_shash(&alg); in sha1_mod_init()
85 crypto_unregister_shash(&alg); in sha1_mod_fini()
Dsha1-ce-glue.c66 static struct shash_alg alg = { variable
87 return crypto_register_shash(&alg); in sha1_ce_mod_init()
92 crypto_unregister_shash(&alg); in sha1_ce_mod_fini()
Dsha1_neon_glue.c75 static struct shash_alg alg = { variable
97 return crypto_register_shash(&alg); in sha1_neon_mod_init()
102 crypto_unregister_shash(&alg); in sha1_neon_mod_fini()
/linux-4.1.27/net/ceph/crush/
Dcrush.c13 const char *crush_bucket_alg_name(int alg) in crush_bucket_alg_name() argument
15 switch (alg) { in crush_bucket_alg_name()
35 switch (b->alg) { in crush_get_bucket_item_weight()
93 switch (b->alg) { in crush_destroy_bucket()
Dmapper.c341 switch (in->alg) { in crush_bucket_choose()
358 dprintk("unknown bucket %d alg %d\n", in->id, in->alg); in crush_bucket_choose()
632 if (in->alg == CRUSH_BUCKET_UNIFORM && in crush_choose_indep()
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
Dcapa.c262 struct capa_hmac_alg *alg; in capa_hmac() local
271 alg = &capa_hmac_algs[capa_alg(capa)]; in capa_hmac()
273 tfm = crypto_alloc_hash(alg->ha_name, 0, 0); in capa_hmac()
278 keylen = alg->ha_keylen; in capa_hmac()
300 char alg[CRYPTO_MAX_ALG_NAME+1] = "aes"; in capa_encrypt_id() local
304 tfm = crypto_alloc_blkcipher(alg, 0, 0); in capa_encrypt_id()
353 char alg[CRYPTO_MAX_ALG_NAME+1] = "aes"; in capa_decrypt_id() local
357 tfm = crypto_alloc_blkcipher(alg, 0, 0); in capa_decrypt_id()
/linux-4.1.27/arch/s390/crypto/
Dsha1_s390.c72 static struct shash_alg alg = { variable
95 return crypto_register_shash(&alg); in sha1_s390_init()
100 crypto_unregister_shash(&alg); in sha1_s390_fini()
/linux-4.1.27/arch/arm64/crypto/
Dsha1-ce-glue.c86 static struct shash_alg alg = { variable
105 return crypto_register_shash(&alg); in sha1_ce_mod_init()
110 crypto_unregister_shash(&alg); in sha1_ce_mod_fini()
/linux-4.1.27/drivers/crypto/qat/qat_common/
Dqat_algs.c66 #define QAT_AES_HW_CONFIG_CBC_ENC(alg) \ argument
67 ICP_QAT_HW_CIPHER_CONFIG_BUILD(ICP_QAT_HW_CIPHER_CBC_MODE, alg, \
71 #define QAT_AES_HW_CONFIG_CBC_DEC(alg) \ argument
72 ICP_QAT_HW_CIPHER_CONFIG_BUILD(ICP_QAT_HW_CIPHER_CBC_MODE, alg, \
282 int alg, in qat_alg_aead_init_enc_session() argument
300 cipher->aes.cipher_config.val = QAT_AES_HW_CONFIG_CBC_ENC(alg); in qat_alg_aead_init_enc_session()
362 int alg, in qat_alg_aead_init_dec_session() argument
385 cipher->aes.cipher_config.val = QAT_AES_HW_CONFIG_CBC_DEC(alg); in qat_alg_aead_init_dec_session()
475 int alg, const uint8_t *key, in qat_alg_ablkcipher_init_enc() argument
484 enc_cd->aes.cipher_config.val = QAT_AES_HW_CONFIG_CBC_ENC(alg); in qat_alg_ablkcipher_init_enc()
[all …]
/linux-4.1.27/drivers/staging/rtl8192u/
Dr8192U_wx.c756 u8 idx = 0, alg = 0, group = 0; in r8192_wx_set_enc_ext() local
758 if ((encoding->flags & IW_ENCODE_DISABLED) || ext->alg == IW_ENCODE_ALG_NONE) in r8192_wx_set_enc_ext()
763 alg = (ext->alg == IW_ENCODE_ALG_CCMP)?KEY_TYPE_CCMP:ext->alg; in r8192_wx_set_enc_ext()
769 if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg == KEY_TYPE_WEP40)) { in r8192_wx_set_enc_ext()
770 if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40)) in r8192_wx_set_enc_ext()
771 alg = KEY_TYPE_WEP104; in r8192_wx_set_enc_ext()
772 ieee->pairwise_key_type = alg; in r8192_wx_set_enc_ext()
777 if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) { in r8192_wx_set_enc_ext()
782 alg, /* KeyType */ in r8192_wx_set_enc_ext()
787 ieee->group_key_type = alg; in r8192_wx_set_enc_ext()
[all …]
Dr8192U_core.c3479 if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) { in rtl8192_ioctl()
3481 } else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) { in rtl8192_ioctl()
3483 } else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { in rtl8192_ioctl()
3503 if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) { in rtl8192_ioctl()
3505 } else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) { in rtl8192_ioctl()
3507 } else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { in rtl8192_ioctl()
/linux-4.1.27/drivers/staging/lustre/lustre/libcfs/linux/
Dlinux-crypto-adler.c112 static struct shash_alg alg = { variable
135 return crypto_register_shash(&alg); in cfs_crypto_adler32_register()
140 crypto_unregister_shash(&alg); in cfs_crypto_adler32_unregister()
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/
Drtl_wx.c995 u8 idx = 0, alg = 0, group = 0; in r8192_wx_set_enc_ext() local
998 ext->alg == IW_ENCODE_ALG_NONE) { in r8192_wx_set_enc_ext()
1006 alg = (ext->alg == IW_ENCODE_ALG_CCMP) ? KEY_TYPE_CCMP : in r8192_wx_set_enc_ext()
1007 ext->alg; in r8192_wx_set_enc_ext()
1014 (alg == KEY_TYPE_WEP40)) { in r8192_wx_set_enc_ext()
1015 if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40)) in r8192_wx_set_enc_ext()
1016 alg = KEY_TYPE_WEP104; in r8192_wx_set_enc_ext()
1017 ieee->pairwise_key_type = alg; in r8192_wx_set_enc_ext()
1022 if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) { in r8192_wx_set_enc_ext()
1024 ieee->pairwise_key_type = alg = KEY_TYPE_WEP104; in r8192_wx_set_enc_ext()
[all …]
Drtl_crypto.h122 int crypto_register_alg(struct crypto_alg *alg);
123 int crypto_unregister_alg(struct crypto_alg *alg);
225 struct crypto_alg *alg = tfm->__crt_alg; in crypto_tfm_alg_modname() local
227 if (alg->cra_module) in crypto_tfm_alg_modname()
228 return alg->cra_module->name; in crypto_tfm_alg_modname()
Drtl_core.c2597 if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) in rtl8192_ioctl()
2599 else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) in rtl8192_ioctl()
2601 else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { in rtl8192_ioctl()
2645 if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) in rtl8192_ioctl()
2647 else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) in rtl8192_ioctl()
2649 else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { in rtl8192_ioctl()
/linux-4.1.27/arch/powerpc/crypto/
Dsha1.c123 static struct shash_alg alg = { variable
143 return crypto_register_shash(&alg); in sha1_powerpc_mod_init()
148 crypto_unregister_shash(&alg); in sha1_powerpc_mod_fini()
Dmd5-glue.c129 static struct shash_alg alg = { variable
150 return crypto_register_shash(&alg); in ppc_md5_mod_init()
155 crypto_unregister_shash(&alg); in ppc_md5_mod_fini()
Dsha1-spe-glue.c174 static struct shash_alg alg = { variable
195 return crypto_register_shash(&alg); in ppc_spe_sha1_mod_init()
200 crypto_unregister_shash(&alg); in ppc_spe_sha1_mod_fini()
/linux-4.1.27/Documentation/
Dcoccinelle.txt204 /home/user/linux/crypto/ctr.c:188:9-16: ERR_CAST can be used with alg
206 /home/user/linux/crypto/xts.c:227:9-16: ERR_CAST can be used with alg
238 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
240 if (IS_ERR(alg))
241 - return ERR_PTR(PTR_ERR(alg));
242 + return ERR_CAST(alg);
281 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
283 if (IS_ERR(alg))
284 - return ERR_PTR(PTR_ERR(alg));
322 …user/linux/crypto/ctr.c::face=ovl-face1::linb=188::colb=9::cole=16][ERR_CAST can be used with alg]]
[all …]
/linux-4.1.27/arch/sparc/crypto/
Dcrc32c_glue.c123 static struct shash_alg alg = { variable
162 return crypto_register_shash(&alg); in crc32c_sparc64_mod_init()
170 crypto_unregister_shash(&alg); in crc32c_sparc64_mod_fini()
Dmd5_glue.c134 static struct shash_alg alg = { variable
171 return crypto_register_shash(&alg); in md5_sparc64_mod_init()
179 crypto_unregister_shash(&alg); in md5_sparc64_mod_fini()
Dsha1_glue.c129 static struct shash_alg alg = { variable
166 return crypto_register_shash(&alg); in sha1_sparc64_mod_init()
174 crypto_unregister_shash(&alg); in sha1_sparc64_mod_fini()
/linux-4.1.27/arch/mips/cavium-octeon/crypto/
Docteon-md5.c172 static struct shash_alg alg = { variable
195 return crypto_register_shash(&alg); in md5_mod_init()
200 crypto_unregister_shash(&alg); in md5_mod_fini()
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/
Dlibcfs_crypto.h129 int cfs_crypto_hash_digest(unsigned char alg,
146 cfs_crypto_hash_init(unsigned char alg,
/linux-4.1.27/include/linux/crush/
Dcrush.h109 extern const char *crush_bucket_alg_name(int alg);
114 __u8 alg; /* one of CRUSH_BUCKET_* */ member
/linux-4.1.27/drivers/staging/media/davinci_vpfe/
Ddm365_ipipe.h49 enum vpfe_ipipe_otfdpc_alg alg; member
61 enum vpfe_ipipe_otfdpc_alg alg; member
Ddavinci_vpfe_user.h703 enum vpfe_ipipe_otfdpc_alg alg; member
832 enum vpfe_ipipe_cfa_alg alg; member
Ddm365_ipipe_hw.c484 val = (otfdpc->det_method << OTF_DET_METHOD_SHIFT) | otfdpc->alg; in ipipe_set_otfdpc_regs()
498 if (otfdpc->alg == VPFE_IPIPE_OTFDPC_2_0) { in ipipe_set_otfdpc_regs()
642 regw_ip(base_addr, cfa->alg, CFA_MODE); in ipipe_set_cfa_regs()
Ddm365_ipipe.c142 if (dpc_param->alg == VPFE_IPIPE_OTFDPC_2_0) { in ipipe_validate_otfdpc_params()
415 cfa->alg = VPFE_IPIPE_CFA_ALG_2DIRAC; in ipipe_set_cfa_params()
/linux-4.1.27/net/sunrpc/auth_gss/
Dgss_krb5_mech.c223 int alg; in get_key() local
225 p = simple_get_bytes(p, end, &alg, sizeof(alg)); in get_key()
229 switch (alg) { in get_key()
234 alg = ENCTYPE_DES_CBC_RAW; in get_key()
238 if (!supported_gss_krb5_enctype(alg)) { in get_key()
240 "encryption key algorithm %d\n", alg); in get_key()
/linux-4.1.27/drivers/net/wireless/orinoco/
Dwext.c31 enum orinoco_alg alg, const u8 *key, int key_len, in orinoco_set_key() argument
59 switch (alg) { in orinoco_set_key()
727 int idx, alg = ext->alg, set_key = 1; in orinoco_ioctl_set_encodeext() local
744 alg = IW_ENCODE_ALG_NONE; in orinoco_ioctl_set_encodeext()
746 if (priv->has_wpa && (alg != IW_ENCODE_ALG_TKIP)) { in orinoco_ioctl_set_encodeext()
753 set_key = ((alg == IW_ENCODE_ALG_TKIP) || in orinoco_ioctl_set_encodeext()
759 switch (alg) { in orinoco_ioctl_set_encodeext()
846 ext->alg = IW_ENCODE_ALG_NONE; in orinoco_ioctl_get_encodeext()
851 ext->alg = IW_ENCODE_ALG_WEP; in orinoco_ioctl_get_encodeext()
857 ext->alg = IW_ENCODE_ALG_TKIP; in orinoco_ioctl_get_encodeext()
/linux-4.1.27/drivers/staging/rtl8188eu/os_dep/
Dioctl_linux.c364 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in wpa_set_encryption()
383 if (strcmp(param->u.crypt.alg, "WEP") == 0) { in wpa_set_encryption()
450 if (strcmp(param->u.crypt.alg, "none") != 0) in wpa_set_encryption()
460 if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */ in wpa_set_encryption()
486 if (strcmp(param->u.crypt.alg, "none") != 0) in wpa_set_encryption()
1910 switch (pext->alg) { in rtw_wx_set_enc_ext()
1930 strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); in rtw_wx_set_enc_ext()
1938 if ((pext->alg != IW_ENCODE_ALG_WEP) && in rtw_wx_set_enc_ext()
2148 static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) in set_group_key() argument
2174 psetkeyparm->algorithm = alg; in set_group_key()
[all …]
/linux-4.1.27/drivers/net/wireless/hostap/
Dhostap_ioctl.c3212 const char *alg, *module; in prism2_ioctl_siwencodeext() local
3247 ext->alg == IW_ENCODE_ALG_NONE) { in prism2_ioctl_siwencodeext()
3253 switch (ext->alg) { in prism2_ioctl_siwencodeext()
3255 alg = "WEP"; in prism2_ioctl_siwencodeext()
3259 alg = "TKIP"; in prism2_ioctl_siwencodeext()
3263 alg = "CCMP"; in prism2_ioctl_siwencodeext()
3268 local->dev->name, ext->alg); in prism2_ioctl_siwencodeext()
3273 ops = lib80211_get_crypto_ops(alg); in prism2_ioctl_siwencodeext()
3276 ops = lib80211_get_crypto_ops(alg); in prism2_ioctl_siwencodeext()
3280 local->dev->name, alg); in prism2_ioctl_siwencodeext()
[all …]
Dhostap_common.h374 u8 alg[HOSTAP_CRYPT_ALG_NAME_LEN]; member
/linux-4.1.27/drivers/crypto/caam/
Dcaamhash.c1754 struct ahash_alg *alg = in caam_hash_cra_init() local
1757 container_of(alg, struct caam_hash_alg, ahash_alg); in caam_hash_cra_init()
1843 struct crypto_alg *alg; in caam_hash_alloc() local
1853 alg = &halg->halg.base; in caam_hash_alloc()
1856 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", in caam_hash_alloc()
1858 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in caam_hash_alloc()
1861 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", in caam_hash_alloc()
1863 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in caam_hash_alloc()
1866 alg->cra_module = THIS_MODULE; in caam_hash_alloc()
1867 alg->cra_init = caam_hash_cra_init; in caam_hash_alloc()
[all …]
Dcaamalg.c4137 struct crypto_alg *alg = tfm->__crt_alg; in caam_cra_init() local
4139 container_of(alg, struct caam_crypto_alg, crypto_alg); in caam_cra_init()
4201 struct crypto_alg *alg; in caam_alg_alloc() local
4209 alg = &t_alg->crypto_alg; in caam_alg_alloc()
4211 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", template->name); in caam_alg_alloc()
4212 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in caam_alg_alloc()
4214 alg->cra_module = THIS_MODULE; in caam_alg_alloc()
4215 alg->cra_init = caam_cra_init; in caam_alg_alloc()
4216 alg->cra_exit = caam_cra_exit; in caam_alg_alloc()
4217 alg->cra_priority = CAAM_CRA_PRIORITY; in caam_alg_alloc()
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/ptlrpc/
Dsec_bulk.c843 int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg, in sptlrpc_get_bulk_checksum() argument
852 LASSERT(alg > BULK_HASH_ALG_NULL && alg < BULK_HASH_ALG_MAX); in sptlrpc_get_bulk_checksum()
855 hdesc = cfs_crypto_hash_init(cfs_hash_alg_id[alg], NULL, 0); in sptlrpc_get_bulk_checksum()
858 cfs_crypto_hash_name(cfs_hash_alg_id[alg])); in sptlrpc_get_bulk_checksum()
862 hashsize = cfs_crypto_hash_digestsize(cfs_hash_alg_id[alg]); in sptlrpc_get_bulk_checksum()
Dsec_config.c98 char *bulk, *alg; in sptlrpc_parse_flavor() local
127 alg = strchr(bulk, ':'); in sptlrpc_parse_flavor()
128 if (alg == NULL) in sptlrpc_parse_flavor()
130 *alg++ = '\0'; in sptlrpc_parse_flavor()
135 flvr->u_bulk.hash.hash_alg = sptlrpc_get_hash_alg(alg); in sptlrpc_parse_flavor()
/linux-4.1.27/drivers/media/platform/davinci/
Disif.c79 .alg = ISIF_ALAW,
601 if (module_params->compress.alg == ISIF_ALAW) in isif_config_raw()
608 if (module_params->compress.alg == ISIF_DPCM) { in isif_config_raw()
747 if ((isif_cfg.bayer.config_params.compress.alg != in isif_set_pixel_format()
749 (isif_cfg.bayer.config_params.compress.alg != in isif_set_pixel_format()
757 isif_cfg.bayer.config_params.compress.alg = in isif_set_pixel_format()
780 if (isif_cfg.bayer.config_params.compress.alg == ISIF_ALAW || in isif_get_pixel_format()
781 isif_cfg.bayer.config_params.compress.alg == ISIF_DPCM) in isif_get_pixel_format()
/linux-4.1.27/drivers/staging/rtl8188eu/include/
Drtw_security.h35 #define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_)) argument
Dieee80211.h233 u8 alg[IEEE_CRYPT_ALG_NAME_LEN]; member
/linux-4.1.27/drivers/staging/rtl8723au/include/
Drtw_security.h23 #define is_wep_enc(alg) (alg == WLAN_CIPHER_SUITE_WEP40 || \ argument
24 alg == WLAN_CIPHER_SUITE_WEP104)
/linux-4.1.27/arch/s390/kernel/vdso64/
Dclock_gettime.S45 alg %r1,__VDSO_WTOM_NSEC(%r5)
90 alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
Dgettimeofday.S36 alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
/linux-4.1.27/arch/cris/include/arch-v32/arch/
Dcryptocop.h34 cryptocop_algorithm alg; member
/linux-4.1.27/arch/cris/arch-v32/drivers/
Dcryptocop.c452 if ((tc->tctx->init.alg == cryptocop_alg_aes) && (tc->tcfg->flags & CRYPTOCOP_DECRYPT)) { in setup_key_dl_desc()
843 switch (tctx->init.alg){ in cryptocop_setup_dma_list()
886 switch (tctx->init.alg){ in cryptocop_setup_dma_list()
903 panic("cryptocop_setup_dma_list: impossible algorithm %d\n", tctx->init.alg); in cryptocop_setup_dma_list()
918 switch (tctx->init.alg){ in cryptocop_setup_dma_list()
946 …yptocop_setup_dma_list: invalid algorithm %d specified in tfrm %d.\n", tctx->init.alg, tcfg->tid)); in cryptocop_setup_dma_list()
953 if (cipher_ctx.tcfg && (cipher_ctx.tctx->init.alg != cryptocop_alg_mem2mem)){ in cryptocop_setup_dma_list()
1450 switch (tinit->alg){ in transform_ok()
1488 DEBUG_API(printk("transform_ok: no such algorithm %d\n", tinit->alg)); in transform_ok()
1492 switch (tinit->alg){ in transform_ok()
[all …]
/linux-4.1.27/include/net/
Dxfrm.h1689 static inline int aead_len(struct xfrm_algo_aead *alg) in aead_len() argument
1691 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in aead_len()
1694 static inline int xfrm_alg_len(const struct xfrm_algo *alg) in xfrm_alg_len() argument
1696 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in xfrm_alg_len()
1699 static inline int xfrm_alg_auth_len(const struct xfrm_algo_auth *alg) in xfrm_alg_auth_len() argument
1701 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in xfrm_alg_auth_len()
/linux-4.1.27/arch/s390/kernel/
Dswsusp.S78 alg %r0,__LC_SYSTEM_TIMER
83 alg %r0,__LC_STEAL_TIMER
Dentry.S141 alg \scratch,__LC_USER_TIMER
145 alg \scratch,__LC_SYSTEM_TIMER
877 alg %r15,__LC_USER_TIMER
884 alg %r15,__LC_SYSTEM_TIMER
963 alg %r9,__CLOCK_IDLE_ENTER(%r2)
968 alg %r9,__LC_LAST_UPDATE_TIMER
/linux-4.1.27/drivers/net/ethernet/toshiba/
Dps3_gelic_wireless.c1208 __u16 alg; in gelic_wl_set_encodeext() local
1216 alg = ext->alg; in gelic_wl_set_encodeext()
1242 if (alg == IW_ENCODE_ALG_NONE || (flags & IW_ENCODE_DISABLED)) { in gelic_wl_set_encodeext()
1248 } else if (alg == IW_ENCODE_ALG_WEP) { in gelic_wl_set_encodeext()
1271 } else if (alg == IW_ENCODE_ALG_PMK) { in gelic_wl_set_encodeext()
1326 ext->alg = IW_ENCODE_ALG_WEP; in gelic_wl_get_encodeext()
1330 ext->alg = IW_ENCODE_ALG_TKIP; in gelic_wl_get_encodeext()
1334 ext->alg = IW_ENCODE_ALG_CCMP; in gelic_wl_get_encodeext()
1339 ext->alg = IW_ENCODE_ALG_NONE; in gelic_wl_get_encodeext()
/linux-4.1.27/include/linux/
Dcrypto.h567 void (*cra_destroy)(struct crypto_alg *alg);
575 int crypto_register_alg(struct crypto_alg *alg);
576 int crypto_unregister_alg(struct crypto_alg *alg);
759 int alg_test(const char *driver, const char *alg, u32 type, u32 mask);
/linux-4.1.27/net/ceph/
Dosdmap.c199 u32 alg; in crush_decode() local
202 ceph_decode_32_safe(p, end, alg, bad); in crush_decode()
203 if (alg == 0) { in crush_decode()
210 switch (alg) { in crush_decode()
238 b->alg = ceph_decode_8(p); in crush_decode()
258 switch (b->alg) { in crush_decode()
/linux-4.1.27/include/media/davinci/
Disif.h407 __u8 alg; member
/linux-4.1.27/security/keys/encrypted-keys/
Dencrypted.c324 static struct sdesc *alloc_sdesc(struct crypto_shash *alg) in alloc_sdesc() argument
329 size = sizeof(struct shash_desc) + crypto_shash_descsize(alg); in alloc_sdesc()
333 sdesc->shash.tfm = alg; in alloc_sdesc()
/linux-4.1.27/net/sctp/
DKconfig82 bool "Use no hmac alg in SCTP cookie generation"
Dsocket.c6325 char alg[32]; in sctp_listen_start() local
6329 sprintf(alg, "hmac(%s)", sp->sctp_hmac_alg); in sctp_listen_start()
6330 tfm = crypto_alloc_hash(alg, 0, CRYPTO_ALG_ASYNC); in sctp_listen_start()
/linux-4.1.27/Documentation/devicetree/bindings/crypto/
Dfsl-sec2.txt27 bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B)
/linux-4.1.27/security/keys/
Dtrusted.c45 static struct sdesc *init_sdesc(struct crypto_shash *alg) in init_sdesc() argument
50 size = sizeof(struct shash_desc) + crypto_shash_descsize(alg); in init_sdesc()
54 sdesc->shash.tfm = alg; in init_sdesc()
/linux-4.1.27/drivers/net/wireless/prism54/
Disl_ioctl.c1545 int idx, alg = ext->alg, set_key = 1; in prism54_set_encodeext() local
1566 alg = IW_ENCODE_ALG_NONE; in prism54_set_encodeext()
1578 switch (alg) { in prism54_set_encodeext()
1706 ext->alg = IW_ENCODE_ALG_NONE; in prism54_get_encodeext()
1725 ext->alg = IW_ENCODE_ALG_TKIP; in prism54_get_encodeext()
1729 ext->alg = IW_ENCODE_ALG_WEP; in prism54_get_encodeext()
/linux-4.1.27/drivers/crypto/ux500/hash/
Dhash_core.c1347 const u8 *key, unsigned int keylen, int alg) in hash_setkey() argument
1358 __func__, alg); in hash_setkey()
1498 struct crypto_alg *alg = tfm->__crt_alg; in hash_cra_init() local
1501 hash_alg = container_of(__crypto_ahash_alg(alg), in hash_cra_init()
/linux-4.1.27/drivers/infiniband/hw/qib/
Dqib_file_ops.c1430 unsigned alg) in get_a_ctxt() argument
1446 if (alg == QIB_PORT_ALG_ACROSS) { in get_a_ctxt()
1612 unsigned swmajor, swminor, alg = QIB_PORT_ALG_ACROSS; in qib_assign_ctxt() local
1630 alg = uinfo->spu_port_alg; in qib_assign_ctxt()
1660 ret = get_a_ctxt(fp, uinfo, alg); in qib_assign_ctxt()
/linux-4.1.27/include/uapi/linux/
Dwireless.h838 __u16 alg; /* IW_ENCODE_ALG_* */ member
/linux-4.1.27/drivers/staging/lustre/lustre/include/
Ddt_object.h176 __u32 alg, struct lustre_capa_key *keys);
1422 __u32 alg, struct lustre_capa_key *keys) in dt_init_capa_ctxt() argument
1428 timeout, alg, keys); in dt_init_capa_ctxt()
Dlustre_sec.h1119 int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,
/linux-4.1.27/drivers/staging/rtl8712/
Drtl871x_ioctl_linux.c128 if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */ in handle_pairwise_key()
403 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in wpa_set_encryption()
414 if (strcmp(param->u.crypt.alg, "WEP") == 0) { in wpa_set_encryption()
1795 switch (pext->alg) { in r871x_wx_set_enc_ext()
1819 strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); in r871x_wx_set_enc_ext()
Dieee80211.h110 u8 alg[IEEE_CRYPT_ALG_NAME_LEN]; member
/linux-4.1.27/drivers/net/wireless/
Datmel.c1854 int idx, key_len, alg = ext->alg, set_key = 1; in atmel_set_encodeext() local
1866 alg = IW_ENCODE_ALG_NONE; in atmel_set_encodeext()
1875 switch (alg) { in atmel_set_encodeext()
1932 ext->alg = IW_ENCODE_ALG_NONE; in atmel_get_encodeext()
1937 ext->alg = IW_ENCODE_ALG_WEP; in atmel_get_encodeext()
2719 __le16 alg; member
2883 auth.alg = cpu_to_le16(system); in send_authentication_request()
3053 u16 system = le16_to_cpu(auth->alg); in authenticate()
Drndis_wlan.c2296 int ret, alg, length, chan = -1; in rndis_join_ibss() local
2308 alg = RNDIS_WLAN_ALG_WEP; in rndis_join_ibss()
2311 alg = RNDIS_WLAN_ALG_NONE; in rndis_join_ibss()
2336 ret = set_encr_mode(usbdev, alg, RNDIS_WLAN_ALG_NONE); in rndis_join_ibss()
Dairo.c6474 int idx, key_len, alg = ext->alg, set_key = 1, rc; in airo_set_encodeext() local
6495 alg = IW_ENCODE_ALG_NONE; in airo_set_encodeext()
6514 switch (alg) { in airo_set_encodeext()
/linux-4.1.27/Documentation/device-mapper/
Dverity.txt116 alg = sha256, num_blocks = 32768, block_size = 4096
/linux-4.1.27/drivers/media/i2c/
Ds5k5baf.c652 static void s5k5baf_hw_set_alg(struct s5k5baf *state, u16 alg, bool enable) in s5k5baf_hw_set_alg() argument
661 new_alg = enable ? (cur_alg | alg) : (cur_alg & ~alg); in s5k5baf_hw_set_alg()
/linux-4.1.27/fs/ecryptfs/
Dkeystore.c2212 struct blkcipher_alg *alg = crypto_blkcipher_alg(desc.tfm); in write_tag_3_packet() local
2215 "defaulting to [%d]\n", alg->max_keysize); in write_tag_3_packet()
2217 alg->max_keysize; in write_tag_3_packet()
Dcrypto.c1622 struct blkcipher_alg *alg = crypto_blkcipher_alg(*key_tfm); in ecryptfs_process_key_cipher() local
1624 *key_size = alg->max_keysize; in ecryptfs_process_key_cipher()
/linux-4.1.27/drivers/scsi/aic7xxx/
Daic7xxx_osm.c1275 struct ahc_devinfo *devinfo, ahc_queue_alg alg) in ahc_platform_set_tags() argument
1286 switch (alg) { in ahc_platform_set_tags()
1324 } else if (alg == AHC_QUEUE_TAGGED) { in ahc_platform_set_tags()
Daic79xx_osm.c1405 struct ahd_devinfo *devinfo, ahd_queue_alg alg) in ahd_platform_set_tags() argument
1419 switch (alg) { in ahd_platform_set_tags()
1457 } else if (alg == AHD_QUEUE_TAGGED) { in ahd_platform_set_tags()
Daic7xxx_core.c2677 struct ahc_devinfo *devinfo, ahc_queue_alg alg) in ahc_set_tags() argument
2681 ahc_platform_set_tags(ahc, sdev, devinfo, alg); in ahc_set_tags()
Daic79xx_core.c4090 struct ahd_devinfo *devinfo, ahd_queue_alg alg) in ahd_set_tags() argument
4094 ahd_platform_set_tags(ahd, sdev, devinfo, alg); in ahd_set_tags()
/linux-4.1.27/drivers/crypto/ux500/cryp/
Dcryp_core.c1096 struct crypto_alg *alg = tfm->__crt_alg; in cryp_cra_init() local
1097 struct cryp_algo_template *cryp_alg = container_of(alg, in cryp_cra_init()
/linux-4.1.27/drivers/staging/rtl8723au/os_dep/
Dioctl_cfg80211.c423 u32 alg, u8 keyid) in set_group_key() argument
450 if (is_wep_enc(alg)) in set_group_key()
453 psetkeyparm->algorithm = alg; in set_group_key()
/linux-4.1.27/drivers/block/drbd/
Ddrbd_receiver.c3446 const char *alg, const char *name) in drbd_crypto_alloc_digest_safe() argument
3450 if (!alg[0]) in drbd_crypto_alloc_digest_safe()
3453 tfm = crypto_alloc_hash(alg, 0, CRYPTO_ALG_ASYNC); in drbd_crypto_alloc_digest_safe()
3456 alg, name, PTR_ERR(tfm)); in drbd_crypto_alloc_digest_safe()
/linux-4.1.27/Documentation/networking/
Dip-sysctl.txt1774 Ability to assign md5 or sha1 as the selected alg is predicated on the