Home
last modified time | relevance | path

Searched full:key (Results 1 – 25 of 2970) sorted by relevance

12345678910>>...119

/linux/security/keys/
H A Dkey.c2 /* Basic authentication token and access key management
26 unsigned int key_quota_root_maxkeys = 1000000; /* root's key count quota */
27 unsigned int key_quota_root_maxbytes = 25000000; /* root's key space quota */
28 unsigned int key_quota_maxkeys = 200; /* general key count quota */
29 unsigned int key_quota_maxbytes = 20000; /* general key space quota */
34 /* We serialise key instantiation and link */
38 void __key_check(const struct key *key) in __key_check() argument
40 printk("__key_check: key %p {%08x} should be {%08x}\n", in __key_check()
41 key, ke in __key_check()
133 key_alloc_serial(struct key * key) key_alloc_serial() argument
230 struct key *key; key_alloc() local
374 key_payload_reserve(struct key * key,size_t datalen) key_payload_reserve() argument
412 mark_key_instantiated(struct key * key,int reject_error) mark_key_instantiated() argument
427 __key_instantiate_and_link(struct key * key,struct key_preparsed_payload * prep,struct key * keyring,struct key * authkey,struct assoc_array_edit ** _edit) __key_instantiate_and_link() argument
499 key_instantiate_and_link(struct key * key,const void * data,size_t datalen,struct key * keyring,struct key * authkey) key_instantiate_and_link() argument
575 key_reject_and_link(struct key * key,unsigned timeout,unsigned error,struct key * keyring,struct key * authkey) key_reject_and_link() argument
647 key_put(struct key * key) key_put() argument
676 struct key *key; key_lookup() local
736 key_set_timeout(struct key * key,unsigned timeout) key_set_timeout() argument
768 struct key *key = key_ref_to_ptr(key_ref); __key_update() local
821 struct key *keyring, *key = NULL; __key_create_or_update() local
1079 struct key *key = key_ref_to_ptr(key_ref); key_update() local
1131 key_revoke(struct key * key) key_revoke() argument
1167 key_invalidate(struct key * key) key_invalidate() argument
1194 generic_key_instantiate(struct key * key,struct key_preparsed_payload * prep) generic_key_instantiate() argument
[all...]
H A Drequest_key.c2 /* Request a key from userspace
7 * See Documentation/security/keys/request-key.rst
20 #define key_negative_timeout 60 /* default timeout on a negative key's existence */
22 static struct key *check_cached_key(struct keyring_search_context *ctx) in check_cached_key()
25 struct key *key = current->cached_requested_key; in check_cached_key() local
27 if (key && in check_cached_key()
28 ctx->match_data.cmp(key, &ctx->match_data) && in check_cached_key()
29 !(key->flags & ((1 << KEY_FLAG_INVALIDATED) | in check_cached_key()
31 return key_get(key); in check_cached_key()
36 cache_requested_key(struct key * key) cache_requested_key() argument
62 struct key *key = rka->target_key; complete_request_key() local
124 struct key *key = rka->target_key, *keyring, *session, *user_session; call_sbin_request_key() local
226 construct_key(struct key * key,const void * callout_info,size_t callout_len,void * aux,struct key * dest_keyring) construct_key() argument
376 struct key *key; construct_alloc_key() local
497 struct key *key; construct_key_and_link() local
596 struct key *key; request_key_and_link() local
676 wait_for_key_construction(struct key * key,bool intr) wait_for_key_construction() argument
711 struct key *key; request_key_tag() local
753 struct key *key; request_key_with_auxdata() local
798 struct key *key; request_key_rcu() local
[all...]
H A Dgc.c2 /* Key garbage collector
14 * Delay between key revocation/expiry in seconds
34 #define KEY_GC_KEY_EXPIRED 0 /* A key expired and needs unlinking */
40 * Any key whose type gets unregistered will be re-typed to this if it can't be
70 * Set the expiration time on a key.
72 void key_set_expiry(struct key *key, time64_t expiry) in key_set_expiry() argument
74 key->expiry = expiry; in key_set_expiry()
76 if (!(key->type->flags & KEY_TYPE_INSTANT_REAP)) in key_set_expiry()
92 * Some key's cleanup time was met after it expired, so we need to get the
138 struct key *key = in key_gc_unused_keys() local
[all …]
H A Dkeyring.c25 * When plumbing the depths of the key tree, this sets a hard limit
40 static inline struct key *keyring_ptr_to_key(const struct assoc_array_ptr *x) in keyring_ptr_to_key()
43 return (struct key *)((unsigned long)object & ~KEYRING_PTR_SUBTYPE); in keyring_ptr_to_key()
45 static inline void *keyring_key_to_ptr(struct key *key) in keyring_key_to_ptr() argument
47 if (key->type == &key_type_keyring) in keyring_key_to_ptr()
48 return (void *)((unsigned long)key | KEYRING_PTR_SUBTYPE); in keyring_key_to_ptr()
49 return key; in keyring_key_to_ptr()
70 * The keyring key type definition. Keyrings are simply keys of this type and
76 static int keyring_instantiate(struct key *keyrin
305 const struct key *key = keyring_ptr_to_key(object); keyring_get_object_key_chunk() local
312 const struct key *key = keyring_ptr_to_key(object); keyring_compare_object() local
461 const struct key *key = keyring_ptr_to_key(object); keyring_read_iterator() local
565 key_default_cmp(const struct key * key,const struct key_match_data * match_data) key_default_cmp() argument
577 const struct key *key = keyring_ptr_to_key(object); keyring_search_iterator() local
675 struct key *key; search_nested_keyrings() local
955 key_ref_t key; keyring_search() local
1104 struct key *keyring, *key; find_key_to_update() local
1197 const struct key *key = keyring_ptr_to_key(object); keyring_detect_cycle_iterator() local
1354 __key_link_check_live_key(struct key * keyring,struct key * key) __key_link_check_live_key() argument
1371 __key_link(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_link() argument
1411 __key_link_check_restriction(struct key * keyring,struct key * key) __key_link_check_restriction() argument
1439 key_link(struct key * keyring,struct key * key) key_link() argument
1488 __key_unlink_begin(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_unlink_begin() argument
1510 __key_unlink(struct key * keyring,struct key * key,struct assoc_array_edit ** _edit) __key_unlink() argument
1522 __key_unlink_end(struct key * keyring,struct key * key,struct assoc_array_edit * edit) __key_unlink_end() argument
1549 key_unlink(struct key * keyring,struct key * key) key_unlink() argument
1594 key_move(struct key * key,struct key * from_keyring,struct key * to_keyring,unsigned int flags) key_move() argument
1696 struct key *key = keyring_ptr_to_key(object); keyring_gc_select_iterator() local
1707 const struct key *key = keyring_ptr_to_key(object); keyring_gc_check_iterator() local
[all...]
H A Drequest_key_auth.c2 /* Request key authorisation token key definition.
7 * See Documentation/security/keys/request-key.rst
20 static int request_key_auth_instantiate(struct key *,
22 static void request_key_auth_describe(const struct key *, struct seq_file *);
23 static void request_key_auth_revoke(struct key *);
24 static void request_key_auth_destroy(struct key *);
25 static long request_key_auth_read(const struct key *, char *, size_t);
29 * The request-key authorisation key typ
54 request_key_auth_instantiate(struct key * key,struct key_preparsed_payload * prep) request_key_auth_instantiate() argument
64 request_key_auth_describe(const struct key * key,struct seq_file * m) request_key_auth_describe() argument
82 request_key_auth_read(const struct key * key,char * buffer,size_t buflen) request_key_auth_read() argument
134 request_key_auth_revoke(struct key * key) request_key_auth_revoke() argument
146 request_key_auth_destroy(struct key * key) request_key_auth_destroy() argument
[all...]
/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c42 static int bpf_map_lookup_elem_with_ref_bit(int fd, unsigned long long key, in bpf_map_lookup_elem_with_ref_bit() argument
48 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit()
103 printf("key:%llu not found from map. %s(%d)\n", in map_subset()
108 printf("key:%llu value0:%llu != value1:%llu\n", in map_subset()
154 * Add key=1 (+1 key)
155 * Add key=2 (+1 key)
156 * Lookup Key=1
157 * Add Key=3
158 * => Key=2 will be removed by LRU
159 * Iterate map. Only found key=1 and key=3
[all …]
/linux/drivers/net/wireless/silabs/wfx/
H A Dkey.c3 * Key management related functions.
11 #include "key.h"
29 WARN(!(wdev->key_map & BIT(idx)), "inconsistent key allocation"); in wfx_free_key()
34 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_wep_pair() argument
36 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_pair()
37 msg->key_length = key->keylen; in fill_wep_pair()
38 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_pair()
44 struct ieee80211_key_conf *key) in fill_wep_group() argument
46 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_group()
47 msg->key_id = key->keyidx; in fill_wep_group()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tunnel_kern.c52 __type(key, __u32);
60 struct bpf_tunnel_key key; in gre_set_tunnel()
62 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
63 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
64 key.tunnel_id = 2; in gre_set_tunnel()
65 key.tunnel_tos = 0; in gre_set_tunnel()
66 key.tunnel_ttl = 64; in gre_set_tunnel()
68 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
61 struct bpf_tunnel_key key; gre_set_tunnel() local
83 struct bpf_tunnel_key key; gre_set_tunnel_no_key() local
104 struct bpf_tunnel_key key; gre_get_tunnel() local
119 struct bpf_tunnel_key key; ip6gretap_set_tunnel() local
143 struct bpf_tunnel_key key; ip6gretap_get_tunnel() local
162 struct bpf_tunnel_key key; erspan_set_tunnel() local
205 struct bpf_tunnel_key key; erspan_get_tunnel() local
241 struct bpf_tunnel_key key; ip4ip6erspan_set_tunnel() local
285 struct bpf_tunnel_key key; ip4ip6erspan_get_tunnel() local
322 struct bpf_tunnel_key key; vxlan_set_tunnel_dst() local
361 struct bpf_tunnel_key key; vxlan_set_tunnel_src() local
401 struct bpf_tunnel_key key; vxlan_get_tunnel_src() local
487 struct bpf_tunnel_key key; ip6vxlan_set_tunnel_dst() local
518 struct bpf_tunnel_key key; ip6vxlan_set_tunnel_src() local
549 struct bpf_tunnel_key key; ip6vxlan_get_tunnel_src() local
591 struct bpf_tunnel_key key; geneve_set_tunnel() local
630 struct bpf_tunnel_key key; geneve_get_tunnel() local
651 struct bpf_tunnel_key key; ip6geneve_set_tunnel() local
690 struct bpf_tunnel_key key; ip6geneve_get_tunnel() local
714 struct bpf_tunnel_key key = {}; ipip_set_tunnel() local
744 struct bpf_tunnel_key key; ipip_get_tunnel() local
759 struct bpf_tunnel_key key = {}; ipip_gue_set_tunnel() local
798 struct bpf_tunnel_key key = {}; ipip_fou_set_tunnel() local
837 struct bpf_tunnel_key key = {}; ipip_encap_get_tunnel() local
864 struct bpf_tunnel_key key = {}; ipip6_set_tunnel() local
896 struct bpf_tunnel_key key; ipip6_get_tunnel() local
913 struct bpf_tunnel_key key = {}; ip6ip6_set_tunnel() local
944 struct bpf_tunnel_key key; ip6ip6_get_tunnel() local
[all...]
/linux/fs/ubifs/
H A Dkey.h12 * This header contains various key-related definitions and helper function.
13 * UBIFS allows several key schemes, so we access key fields only via these
14 * helpers. At the moment only one key scheme is supported.
16 * Simple key scheme
20 * in case of direntry key). Next 3 bits are node type. The last 29 bits are
26 * Lot's of the key helpers require a struct ubifs_info *c as the first parameter.
28 * different c->key_format. But right now, there is only one key type, UBIFS_SIMPLE_KEY_FMT.
85 * ino_key_init - initialize inode key.
87 * @key: key to initialize
91 union ubifs_key *key, ino_t inum) in ino_key_init() argument
[all …]
/linux/crypto/
H A Drsa_helper.c3 * RSA key extract helper
19 struct rsa_key *key = context; in rsa_get_n() local
23 /* invalid key provided */ in rsa_get_n()
33 /* In FIPS mode only allow key size 2K and higher */ in rsa_get_n()
35 pr_err("RSA: key size not allowed in FIPS mode\n"); in rsa_get_n()
40 key->n = value; in rsa_get_n()
41 key->n_sz = vlen; in rsa_get_n()
49 struct rsa_key *key = context; in rsa_get_e() local
51 /* invalid key provided */ in rsa_get_e()
52 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e()
[all …]
/linux/include/linux/
H A Dkey.h2 /* Authentication token and access key management
27 /* key handle serial number */
30 /* key handle permissions mask */
33 struct key;
40 #define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
41 #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
42 #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
43 #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
44 #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
45 #define KEY_POS_SETATTR 0x20000000 /* possessor can set key attributes */
[all …]
H A Dkey-type.h2 /* Definitions for key type implementations
11 #include <linux/key.h>
20 * Pre-parsed payload, used by key add, update and instantiate.
24 * def_datalen from the key type. Then if the preparse() op is provided by the
25 * key type, that will be called. Then the struct will be passed to the
33 char *description; /* Proposed key description (or NULL) */
38 time64_t expiry; /* Expiry time of key */
41 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
51 bool (*cmp)(const struct key *key,
62 * kernel managed key type definition
[all …]
/linux/Documentation/security/keys/
H A Dcore.rst2 Kernel Key Retention Service
9 Keyrings are permitted; these are a special type of key that can hold links to
13 The key service can be configured on by enabling:
15 "Security options"/"Enable access key retention support" (CONFIG_KEYS)
22 Key Overview
26 tokens, keyrings, etc.. These are represented in the kernel by struct key.
28 Each key has a number of attributes:
32 - A description (for matching a key in a search).
39 * Each key is issued a serial number of type key_serial_t that is unique for
40 the lifetime of that key. All serial numbers are positive non-zero 32-bit
[all …]
H A Drequest-key.rst2 Key Request Service
5 The key request service is part of the key retention service (refer to
12 struct key *request_key(const struct key_type *type,
18 struct key *request_key_tag(const struct key_type *type,
25 struct key *request_key_with_auxdata(const struct key_type *type,
34 struct key *request_key_rcu(const struct key_type *type,
46 does not need to link the key to a keyring to prevent it from being immediately
47 destroyed. The kernel interface returns a pointer directly to the key, and
48 it's up to the caller to destroy the key.
56 NULL). This is only useful for those key types that define their own upcall
[all …]
/linux/drivers/md/dm-pcache/
H A Dcache_key.c9 void cache_key_init(struct pcache_cache_tree *cache_tree, struct pcache_cache_key *key) in cache_key_init() argument
11 kref_init(&key->ref); in cache_key_init()
12 key->cache_tree = cache_tree; in cache_key_init()
13 INIT_LIST_HEAD(&key->list_node); in cache_key_init()
14 RB_CLEAR_NODE(&key->rb_node); in cache_key_init()
19 struct pcache_cache_key *key; in cache_key_alloc() local
21 key = mempool_alloc(&cache_tree->key_pool, gfp_mask); in cache_key_alloc()
22 if (!key) in cache_key_alloc()
25 memset(key, 0, sizeof(struct pcache_cache_key)); in cache_key_alloc()
26 cache_key_init(cache_tree, key); in cache_key_alloc()
[all …]
H A Dcache_req.c26 * cache_data_alloc - Allocate data for a cache key.
28 * @key: Pointer to the cache key to allocate data for.
32 * the requested length for the cache key, it will allocate whatever is available
33 * and adjust the key's length accordingly. This function does not allocate
36 static int cache_data_alloc(struct pcache_cache *cache, struct pcache_cache_key *key) in cache_data_alloc() argument
48 to_alloc = key->len - allocated; in cache_data_alloc()
52 cache_pos_copy(&key->cache_pos, &data_head->head_pos); in cache_data_alloc()
53 key->seg_gen = key->cache_pos.cache_seg->gen; in cache_data_alloc()
61 /* If remaining space in segment is sufficient for the cache key, allocate it. */ in cache_data_alloc()
66 …/* If remaining space is not enough, allocate the remaining space and adjust the cache key length.… in cache_data_alloc()
[all …]
/linux/arch/s390/include/uapi/asm/
H A Dpkey.h23 #define SECKEYBLOBSIZE 64 /* secure key blob size is always 64 bytes */
24 #define PROTKEYBLOBSIZE 80 /* protected key blob size is always 80 bytes */
25 #define MAXPROTKEYSIZE 64 /* a protected key blob may be up to 64 bytes */
26 #define MAXCLRKEYSIZE 32 /* a clear key value may be up to 32 bytes */
28 #define MINEP11AESKEYBLOBSIZE 256 /* min EP11 AES key blob size */
29 #define MAXEP11AESKEYBLOBSIZE 336 /* max EP11 AES key blob size */
31 /* Minimum size of a key blob */
61 /* the newer ioctls use a pkey_key_size enum for key size information */
89 /* Struct to hold a CCA AES secure key blob */
91 __u8 seckey[SECKEYBLOBSIZE]; /* the secure key blob */
[all …]
/linux/net/ceph/
H A Dcrypto.c12 #include <linux/key-type.h>
20 static int set_aes_tfm(struct ceph_crypto_key *key) in set_aes_tfm() argument
26 key->aes_tfm = crypto_alloc_sync_skcipher("cbc(aes)", 0, 0); in set_aes_tfm()
28 if (IS_ERR(key->aes_tfm)) { in set_aes_tfm()
29 ret = PTR_ERR(key->aes_tfm); in set_aes_tfm()
30 key->aes_tfm = NULL; in set_aes_tfm()
34 ret = crypto_sync_skcipher_setkey(key->aes_tfm, key->key, key->len); in set_aes_tfm()
41 static int set_krb5_tfms(struct ceph_crypto_key *key, const u32 *key_usages, in set_krb5_tfms() argument
44 struct krb5_buffer TK = { .len = key->len, .data = key->key }; in set_krb5_tfms()
49 if (WARN_ON_ONCE(key_usage_cnt > ARRAY_SIZE(key->krb5_tfms))) in set_krb5_tfms()
[all …]
/linux/drivers/s390/crypto/
H A Dzcrypt_cca_key.h21 * mapping for the cca private ME key token.
25 * mapping for the cca key token header
40 * In a private key, the modulus doesn't appear in the public
51 unsigned short modulus_byte_len; /* In a private key, this is 0 */
55 * mapping for the cca private CRT key 'token'
92 * Set up private key fields of a type6 MEX message.
95 * @p: pointer to memory area for the key
97 * Returns the size of the key area or negative errno value.
112 } __packed *key = p; in zcrypt_type6_mex_key_en() local
124 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
[all …]
/linux/Documentation/crypto/
H A Dasymmetric-keys.rst4 Asymmetric / Public-key Cryptography Key Type
10 - Key identification.
13 - Asymmetric key subtypes.
21 The "asymmetric" key type is designed to be a container for the keys used in
22 public-key cryptography, without imposing any particular restrictions on the
23 form or mechanism of the cryptography or form of the key.
25 The asymmetric key is given a subtype that defines what sort of data is
26 associated with the key and provides operations to describe and destroy it.
27 However, no requirement is made that the key data actually be stored in the
28 key.
[all …]
/linux/drivers/nvdimm/
H A Dsecurity.c11 #include <linux/key.h>
12 #include <linux/key-type.h>
23 MODULE_PARM_DESC(key_revalidate, "Require key validation at init.");
27 static void *key_data(struct key *key) in key_data() argument
29 struct encrypted_key_payload *epayload = dereference_key_locked(key); in key_data()
31 lockdep_assert_held_read(&key->sem); in key_data()
36 static void nvdimm_put_key(struct key *key) in nvdimm_put_key() argument
38 if (!key) in nvdimm_put_key()
41 up_read(&key->sem); in nvdimm_put_key()
42 key_put(key); in nvdimm_put_key()
[all …]
/linux/drivers/crypto/intel/qat/qat_common/
H A Dadf_gen2_config.c15 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in adf_gen2_crypto_dev_config() local
30 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_BANK_NUM, i); in adf_gen2_crypto_dev_config()
32 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
36 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_BANK_NUM, i); in adf_gen2_crypto_dev_config()
38 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
42 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in adf_gen2_crypto_dev_config()
45 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
49 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in adf_gen2_crypto_dev_config()
52 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
57 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in adf_gen2_crypto_dev_config()
[all …]
/linux/lib/
H A Dtest_static_keys.c37 struct static_key *key; member
41 #define test_key_func(key, branch) \ argument
42 static bool key ## _ ## branch(void) \
44 return branch(&key); \
47 static void invert_key(struct static_key *key) in invert_key() argument
49 if (static_key_enabled(key)) in invert_key()
50 static_key_disable(key); in invert_key()
52 static_key_enable(key); in invert_key()
61 if (previous != keys[i].key) { in invert_keys()
62 invert_key(keys[i].key); in invert_keys()
[all …]
/linux/drivers/input/keyboard/
H A Dpinephone-keyboard.c46 KEY(0, 0, KEY_ESC),
47 KEY(0, 1, KEY_1),
48 KEY(0, 2, KEY_2),
49 KEY(0, 3, KEY_3),
50 KEY(0, 4, KEY_4),
51 KEY(0, 5, KEY_5),
52 KEY(0, 6, KEY_6),
53 KEY(0, 7, KEY_7),
54 KEY(0, 8, KEY_8),
55 KEY(0, 9, KEY_9),
[all …]
/linux/fs/afs/
H A Dsecurity.c22 * Allocate a key to use as a placeholder for anonymous user security.
26 struct key *key; in afs_alloc_anon_key() local
29 key = cell->anonymous_key; in afs_alloc_anon_key()
30 if (!key) { in afs_alloc_anon_key()
31 key = rxrpc_get_null_key(cell->key_desc); in afs_alloc_anon_key()
32 if (!IS_ERR(key)) in afs_alloc_anon_key()
33 cell->anonymous_key = key; in afs_alloc_anon_key()
37 if (IS_ERR(key)) in afs_alloc_anon_key()
38 return PTR_ERR(key); in afs_alloc_anon_key()
40 _debug("anon key %p{%x}", in afs_alloc_anon_key()
[all …]

12345678910>>...119