/crypto/ |
D | af_alg.c | 27 const struct af_alg_type *type; member 45 const struct af_alg_type *type = ERR_PTR(-ENOENT); in alg_get_type() local 50 if (strcmp(node->type->name, name)) in alg_get_type() 53 if (try_module_get(node->type->owner)) in alg_get_type() 54 type = node->type; in alg_get_type() 59 return type; in alg_get_type() 62 int af_alg_register_type(const struct af_alg_type *type) in af_alg_register_type() argument 69 if (!strcmp(node->type->name, type->name)) in af_alg_register_type() 78 type->ops->owner = THIS_MODULE; in af_alg_register_type() 79 if (type->ops_nokey) in af_alg_register_type() [all …]
|
D | api.c | 60 static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, in __crypto_alg_lookup() argument 72 if ((q->cra_flags ^ type) & mask) in __crypto_alg_lookup() 110 struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask) in crypto_larval_alloc() argument 119 larval->alg.cra_flags = CRYPTO_ALG_LARVAL | type; in crypto_larval_alloc() 130 static struct crypto_alg *crypto_larval_add(const char *name, u32 type, in crypto_larval_add() argument 136 larval = crypto_larval_alloc(name, type, mask); in crypto_larval_add() 143 alg = __crypto_alg_lookup(name, type, mask); in crypto_larval_add() 196 struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask) in crypto_alg_lookup() argument 201 alg = __crypto_alg_lookup(name, type, mask); in crypto_alg_lookup() 208 struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) in crypto_larval_lookup() argument [all …]
|
D | algboss.c | 34 } type; member 59 u32 type; member 181 param->type.attr.rta_len = sizeof(param->type); in cryptomgr_schedule_probe() 182 param->type.attr.rta_type = CRYPTOA_TYPE; in cryptomgr_schedule_probe() 183 param->type.data.type = larval->alg.cra_flags & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe() 184 param->type.data.mask = larval->mask & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe() 185 param->tb[0] = ¶m->type.attr; in cryptomgr_schedule_probe() 214 u32 type = param->type; in cryptomgr_test() local 221 if (type & CRYPTO_ALG_TESTED) in cryptomgr_test() 224 err = alg_test(param->driver, param->alg, type, CRYPTO_ALG_TESTED); in cryptomgr_test() [all …]
|
D | crypto_user.c | 86 strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); in crypto_report_cipher() 105 strncpy(rcomp.type, "compression", sizeof(rcomp.type)); in crypto_report_comp() 119 strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); in crypto_report_akcipher() 134 strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); in crypto_report_kpp() 164 strncpy(rl.type, "larval", sizeof(rl.type)); in crypto_report_one() 437 #define MSGSIZE(type) sizeof(struct type) argument 448 [CRYPTOCFGA_PRIORITY_VAL] = { .type = NLA_U32}, 471 int type, err; in crypto_user_rcv_msg() local 473 type = nlh->nlmsg_type; in crypto_user_rcv_msg() 474 if (type > CRYPTO_MSG_MAX) in crypto_user_rcv_msg() [all …]
|
D | internal.h | 73 struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask); 74 struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); 82 struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask); 84 struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask); 91 struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, 97 u32 type, u32 mask); 99 const struct crypto_type *frontend, u32 type, u32 mask); 108 u32 type, u32 mask);
|
D | akcipher.c | 32 strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); in crypto_akcipher_report() 96 .type = CRYPTO_ALG_TYPE_AKCIPHER, 101 u32 type, u32 mask) in crypto_grab_akcipher() argument 104 return crypto_grab_spawn(&spawn->base, name, type, mask); in crypto_grab_akcipher() 108 struct crypto_akcipher *crypto_alloc_akcipher(const char *alg_name, u32 type, in crypto_alloc_akcipher() argument 111 return crypto_alloc_tfm(alg_name, &crypto_akcipher_type, type, mask); in crypto_alloc_akcipher()
|
D | kpp.c | 32 strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); in crypto_kpp_report() 88 .type = CRYPTO_ALG_TYPE_KPP, 92 struct crypto_kpp *crypto_alloc_kpp(const char *alg_name, u32 type, u32 mask) in crypto_alloc_kpp() argument 94 return crypto_alloc_tfm(alg_name, &crypto_kpp_type, type, mask); in crypto_alloc_kpp()
|
D | aead.c | 112 strncpy(raead.type, "aead", sizeof(raead.type)); in crypto_aead_report() 171 .type = CRYPTO_ALG_TYPE_AEAD, 192 struct rtattr **tb, u32 type, u32 mask) in aead_geniv_alloc() argument 207 if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask) in aead_geniv_alloc() 221 mask |= crypto_requires_sync(algt->type, algt->mask); in aead_geniv_alloc() 224 err = crypto_grab_aead(spawn, name, type, mask); in aead_geniv_alloc() 332 u32 type, u32 mask) in crypto_grab_aead() argument 335 return crypto_grab_spawn(&spawn->base, name, type, mask); in crypto_grab_aead() 339 struct crypto_aead *crypto_alloc_aead(const char *alg_name, u32 type, u32 mask) in crypto_alloc_aead() argument 341 return crypto_alloc_tfm(alg_name, &crypto_aead_type, type, mask); in crypto_alloc_aead()
|
D | cryptd.c | 193 static inline void cryptd_check_internal(struct rtattr **tb, u32 *type, in cryptd_check_internal() argument 202 *type |= algt->type & CRYPTO_ALG_INTERNAL; in cryptd_check_internal() 379 u32 type = CRYPTO_ALG_TYPE_BLKCIPHER; in cryptd_create_blkcipher() local 383 cryptd_check_internal(tb, &type, &mask); in cryptd_create_blkcipher() 385 alg = crypto_get_attr_alg(tb, type, mask); in cryptd_create_blkcipher() 402 type = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC; in cryptd_create_blkcipher() 404 type |= CRYPTO_ALG_INTERNAL; in cryptd_create_blkcipher() 405 inst->alg.cra_flags = type; in cryptd_create_blkcipher() 651 u32 type = 0; in cryptd_create_hash() local 655 cryptd_check_internal(tb, &type, &mask); in cryptd_create_hash() [all …]
|
D | rng.c | 78 strncpy(rrng.type, "rng", sizeof(rrng.type)); in crypto_rng_report() 114 .type = CRYPTO_ALG_TYPE_RNG, 118 struct crypto_rng *crypto_alloc_rng(const char *alg_name, u32 type, u32 mask) in crypto_alloc_rng() argument 120 return crypto_alloc_tfm(alg_name, &crypto_rng_type, type, mask); in crypto_alloc_rng()
|
D | skcipher.c | 329 strncpy(rblkcipher.type, "skcipher", sizeof(rblkcipher.type)); in crypto_skcipher_report() 362 .type = CRYPTO_ALG_TYPE_SKCIPHER, 367 const char *name, u32 type, u32 mask) in crypto_grab_skcipher() argument 370 return crypto_grab_spawn(&spawn->base, name, type, mask); in crypto_grab_skcipher() 375 u32 type, u32 mask) in crypto_alloc_skcipher() argument 377 return crypto_alloc_tfm(alg_name, &crypto_skcipher_type2, type, mask); in crypto_alloc_skcipher() 381 int crypto_has_skcipher2(const char *alg_name, u32 type, u32 mask) in crypto_has_skcipher2() argument 384 type, mask); in crypto_has_skcipher2()
|
D | mcryptd.c | 254 static inline bool mcryptd_check_internal(struct rtattr **tb, u32 *type, in mcryptd_check_internal() argument 263 *type |= algt->type & CRYPTO_ALG_INTERNAL; in mcryptd_check_internal() 266 if (*type & *mask & CRYPTO_ALG_INTERNAL) in mcryptd_check_internal() 492 u32 type = 0; in mcryptd_create_hash() local 496 if (!mcryptd_check_internal(tb, &type, &mask)) in mcryptd_create_hash() 499 halg = ahash_attr_alg(tb[1], type, mask); in mcryptd_create_hash() 562 switch (algt->type & algt->mask & CRYPTO_ALG_TYPE_MASK) { in mcryptd_create() 595 u32 type, u32 mask) in mcryptd_alloc_ahash() argument 603 tfm = crypto_alloc_ahash(mcryptd_alg_name, type, mask); in mcryptd_alloc_ahash()
|
D | ahash.c | 509 strncpy(rhash.type, "ahash", sizeof(rhash.type)); in crypto_ahash_report() 550 .type = CRYPTO_ALG_TYPE_AHASH, 555 struct crypto_ahash *crypto_alloc_ahash(const char *alg_name, u32 type, in crypto_alloc_ahash() argument 558 return crypto_alloc_tfm(alg_name, &crypto_ahash_type, type, mask); in crypto_alloc_ahash() 562 int crypto_has_ahash(const char *alg_name, u32 type, u32 mask) in crypto_has_ahash() argument 564 return crypto_type_has_alg(alg_name, &crypto_ahash_type, type, mask); in crypto_has_ahash() 632 struct hash_alg_common *ahash_attr_alg(struct rtattr *rta, u32 type, u32 mask) in ahash_attr_alg() argument 636 alg = crypto_attr_alg2(rta, &crypto_ahash_type, type, mask); in ahash_attr_alg()
|
D | algapi.c | 626 if ((alg->cra_flags ^ frontend->type) & frontend->maskset) in crypto_init_spawn2() 638 u32 type, u32 mask) in crypto_grab_spawn() argument 643 alg = crypto_find_alg(name, spawn->frontend, type, mask); in crypto_grab_spawn() 685 struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, in crypto_spawn_tfm() argument 696 if (unlikely((alg->cra_flags ^ type) & mask)) in crypto_spawn_tfm() 699 tfm = __crypto_alloc_tfm(alg, type, mask); in crypto_spawn_tfm() 762 int crypto_check_attr_type(struct rtattr **tb, u32 type) in crypto_check_attr_type() argument 770 if ((algt->type ^ type) & algt->mask) in crypto_check_attr_type() 797 u32 type, u32 mask) in crypto_attr_alg2() argument 805 return crypto_find_alg(name, frontend, type, mask); in crypto_attr_alg2() [all …]
|
D | ablkcipher.c | 343 static unsigned int crypto_ablkcipher_ctxsize(struct crypto_alg *alg, u32 type, in crypto_ablkcipher_ctxsize() argument 349 static int crypto_init_ablkcipher_ops(struct crypto_tfm *tfm, u32 type, in crypto_init_ablkcipher_ops() argument 372 strncpy(rblkcipher.type, "ablkcipher", sizeof(rblkcipher.type)); in crypto_ablkcipher_report() 422 static int crypto_init_givcipher_ops(struct crypto_tfm *tfm, u32 type, in crypto_init_givcipher_ops() argument 446 strncpy(rblkcipher.type, "givcipher", sizeof(rblkcipher.type)); in crypto_givcipher_report()
|
D | ecdh_helper.c | 42 .type = CRYPTO_KPP_SECRET_TYPE_ECDH, in crypto_ecdh_encode_key() 71 if (secret.type != CRYPTO_KPP_SECRET_TYPE_ECDH) in crypto_ecdh_decode_key()
|
D | shash.c | 405 strncpy(rhash.type, "shash", sizeof(rhash.type)); in crypto_shash_report() 445 .type = CRYPTO_ALG_TYPE_SHASH, 449 struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type, in crypto_alloc_shash() argument 452 return crypto_alloc_tfm(alg_name, &crypto_shash_type, type, mask); in crypto_alloc_shash() 568 struct shash_alg *shash_attr_alg(struct rtattr *rta, u32 type, u32 mask) in shash_attr_alg() argument 572 alg = crypto_attr_alg2(rta, &crypto_shash_type, type, mask); in shash_attr_alg()
|
D | testmgr.c | 46 int alg_test(const char *driver, const char *alg, u32 type, u32 mask) in alg_test() argument 132 u32 type, u32 mask); 1507 u32 type, u32 mask) in alg_test_aead() argument 1512 tfm = crypto_alloc_aead(driver, type | CRYPTO_ALG_INTERNAL, mask); in alg_test_aead() 1536 const char *driver, u32 type, u32 mask) in alg_test_cipher() argument 1541 tfm = crypto_alloc_cipher(driver, type | CRYPTO_ALG_INTERNAL, mask); in alg_test_cipher() 1565 const char *driver, u32 type, u32 mask) in alg_test_skcipher() argument 1570 tfm = crypto_alloc_skcipher(driver, type | CRYPTO_ALG_INTERNAL, mask); in alg_test_skcipher() 1594 u32 type, u32 mask) in alg_test_comp() argument 1599 tfm = crypto_alloc_comp(driver, type, mask); in alg_test_comp() [all …]
|
D | algif_rng.c | 117 static void *rng_bind(const char *name, u32 type, u32 mask) in rng_bind() argument 119 return crypto_alloc_rng(name, type, mask); in rng_bind()
|
D | dh_helper.c | 46 .type = CRYPTO_KPP_SECRET_TYPE_DH, in crypto_dh_encode_key() 77 if (secret.type != CRYPTO_KPP_SECRET_TYPE_DH) in crypto_dh_decode_key()
|
D | blkcipher.c | 446 static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg, u32 type, in crypto_blkcipher_ctxsize() argument 494 static int crypto_init_blkcipher_ops(struct crypto_tfm *tfm, u32 type, u32 mask) in crypto_init_blkcipher_ops() argument 512 strncpy(rblkcipher.type, "blkcipher", sizeof(rblkcipher.type)); in crypto_blkcipher_report()
|
/crypto/asymmetric_keys/ |
D | Kconfig | 2 bool "Asymmetric (public-key cryptographic) key type" 5 This option provides support for a key type that holds the data for 18 This option provides support for asymmetric public key type handling. 43 tristate "PKCS#7 testing key type" 46 This option provides a type of key that can be loaded up from a
|
D | restrict.c | 74 const struct key_type *type, in restrict_link_by_signature() argument 86 if (type != &key_type_asymmetric) in restrict_link_by_signature()
|
D | pkcs7.asn1 | 109 type OBJECT IDENTIFIER ({ pkcs7_note_OID }), 114 type OBJECT IDENTIFIER,
|
D | signature.c | 54 if (key->type != &key_type_asymmetric) in verify_signature()
|