Home
last modified time | relevance | path

Searched +full:key +full:- (Results 1 – 25 of 1121) sorted by relevance

12345678910>>...45

/openbmc/linux/security/keys/
H A Dkey.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Basic authentication token and access key management
4 * Copyright (C) 2004-2008 Red Hat, Inc. All Rights Reserved.
27 unsigned int key_quota_root_maxkeys = 1000000; /* root's key count quota */
28 unsigned int key_quota_root_maxbytes = 25000000; /* root's key space quota */
29 unsigned int key_quota_maxkeys = 200; /* general key count quota */
30 unsigned int key_quota_maxbytes = 20000; /* general key space quota */
35 /* We serialise key instantiation and link */
39 void __key_check(const struct key *key) in __key_check() argument
41 printk("__key_check: key %p {%08x} should be {%08x}\n", in __key_check()
[all …]
H A Drequest_key.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Request a key from userspace
4 * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved.
7 * See Documentation/security/keys/request-key.rst
18 #include <keys/request_key_auth-type.h>
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()
[all …]
H A Dgc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Key garbage collector
4 * Copyright (C) 2009-2011 Red Hat, Inc. All Rights Reserved.
10 #include <keys/keyring-type.h>
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
49 * - time precision isn't particularly important
56 kenter("%lld", gc_at - now); in key_schedule_gc()
64 expires = jiffies + (gc_at - now) * HZ; in key_schedule_gc()
[all …]
/openbmc/u-boot/fs/ubifs/
H A Dkey.h1 /* SPDX-License-Identifier: GPL-2.0+ */
5 * Copyright (C) 2006-2008 Nokia Corporation.
12 * 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
19 * Keys are 64-bits long. First 32-bits are inode number (parent inode number
20 * in case of direntry key). Next 3 bits are node type. The last 29 bits are
29 * key_mask_hash - mask a valid hash value.
45 * key_r5_hash - R5 hash function (borrowed from reiserfs).
[all …]
/openbmc/linux/drivers/net/wireless/silabs/wfx/
H A Dkey.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Key management related functions.
5 * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
11 #include "key.h"
19 idx = ffs(~wdev->key_map) - 1; in wfx_alloc_key()
21 return -1; in wfx_alloc_key()
23 wdev->key_map |= BIT(idx); in wfx_alloc_key()
29 WARN(!(wdev->key_map & BIT(idx)), "inconsistent key allocation"); in wfx_free_key()
30 wdev->key_map &= ~BIT(idx); in wfx_free_key()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c1 // SPDX-License-Identifier: GPL-2.0-only
36 if (map_fd == -1) in create_map()
42 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()
50 BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), in bpf_map_lookup_elem_with_ref_bit()
71 return -1; in bpf_map_lookup_elem_with_ref_bit()
78 return -1; in bpf_map_lookup_elem_with_ref_bit()
83 ret = -1; 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()
[all …]
/openbmc/linux/fs/ubifs/
H A Dkey.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2006-2008 Nokia Corporation.
12 * 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
19 * Keys are 64-bits long. First 32-bits are inode number (parent inode number
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.
[all …]
/openbmc/linux/net/mac80211/
H A Dkey.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2002-2005, Instant802 Networks, Inc.
4 * Copyright 2005-2006, Devicescape Software, Inc.
5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright 2013-2014 Intel Mobile Communications GmbH
8 * Copyright 2015-2017 Intel Deutschland GmbH
9 * Copyright 2018-2020, 2022-2023 Intel Corporation
23 #include "driver-ops.h"
32 * DOC: Key handling basics
[all …]
/openbmc/qemu/hw/usb/
H A Du2f-emulated.c29 #include "qemu/main-loop.h"
32 #include "hw/qdev-properties.h"
34 #include <u2f-emu/u2f-emu.h>
51 ++counter->value; in counter_increment()
54 if (fseek(counter->fp, 0, SEEK_SET) == -1) { in counter_increment()
57 fprintf(counter->fp, "%u\n", counter->value); in counter_increment()
63 return counter->value; in counter_read()
100 #define TYPE_U2F_EMULATED "u2f-emulated"
104 static void u2f_emulated_reset(U2FEmulatedState *key) in u2f_emulated_reset() argument
106 key->pending_out_start = 0; in u2f_emulated_reset()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tunnel_kern.c1 // SPDX-License-Identifier: GPL-2.0
43 __u8 opt_data[8]; /* hard-coded to 8 byte */
73 __type(key, __u32);
81 struct bpf_tunnel_key key; in gre_set_tunnel() local
83 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
84 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
85 key.tunnel_id = 2; in gre_set_tunnel()
86 key.tunnel_tos = 0; in gre_set_tunnel()
87 key.tunnel_ttl = 64; in gre_set_tunnel()
89 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
[all …]
/openbmc/linux/crypto/
H A Drsa_helper.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * RSA key extract helper
19 struct rsa_key *key = context; in rsa_get_n() local
23 /* invalid key provided */ in rsa_get_n()
25 return -EINVAL; in rsa_get_n()
30 n_sz--; 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()
36 return -EINVAL; in rsa_get_n()
40 key->n = value; in rsa_get_n()
[all …]
/openbmc/linux/Documentation/security/keys/
H A Dcore.rst2 Kernel Key Retention Service
5 This service allows cryptographic keys, authentication tokens, cross-domain
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:
30 - A serial number.
31 - A type.
[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,
45 The main difference between the access points is that the in-kernel interface
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.
[all …]
/openbmc/linux/include/linux/
H A Dkey.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* 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 */
[all …]
H A Dkey-type.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* 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);
48 * overridden by type->match_preparse(). Should return true if a match
[all …]
/openbmc/u-boot/lib/rsa/
H A Drsa-mod-exp.c1 // SPDX-License-Identifier: GPL-2.0+
19 #include <u-boot/rsa.h>
20 #include <u-boot/rsa-mod-exp.h>
31 * subtract_modulus() - subtract modulus from the given value
33 * @key: Key containing modulus to subtract
36 static void subtract_modulus(const struct rsa_public_key *key, uint32_t num[]) in subtract_modulus() argument
41 for (i = 0; i < key->len; i++) { in subtract_modulus()
42 acc += (uint64_t)num[i] - key->modulus[i]; in subtract_modulus()
49 * greater_equal_modulus() - check if a value is >= modulus
51 * @key: Key containing modulus to check
[all …]
/openbmc/linux/kernel/
H A Djump_label.c1 // SPDX-License-Identifier: GPL-2.0-only
41 * Entrires are sorted by key. in jump_label_cmp()
44 return -1; in jump_label_cmp()
55 return -1; in jump_label_cmp()
65 long delta = (unsigned long)a - (unsigned long)b; in jump_label_swap()
70 jea->code = jeb->code - delta; in jump_label_swap()
71 jea->target = jeb->target - delta; in jump_label_swap()
72 jea->key = jeb->key - delta; in jump_label_swap()
74 jeb->code = tmp.code + delta; in jump_label_swap()
75 jeb->target = tmp.target + delta; in jump_label_swap()
[all …]
/openbmc/linux/drivers/s390/crypto/
H A Dzcrypt_cca_key.h1 /* SPDX-License-Identifier: GPL-2.0+ */
21 * 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
[all …]
/openbmc/linux/Documentation/crypto/
H A Dasymmetric-keys.rst1 .. SPDX-License-Identifier: GPL-2.0
4 Asymmetric / Public-key Cryptography Key Type
9 - Overview.
10 - Key identification.
11 - Accessing asymmetric keys.
12 - Signature verification.
13 - Asymmetric key subtypes.
14 - Instantiation data parsers.
15 - Keyring link restrictions.
21 The "asymmetric" key type is designed to be a container for the keys used in
[all …]
/openbmc/linux/net/openvswitch/
H A Dflow.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2007-2014 Nicira, Inc.
52 idle_ms = jiffies_to_msecs(jiffies - flow_jiffies); in ovs_flow_used_time()
56 return cur_ms - idle_ms; in ovs_flow_used_time()
66 int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); in ovs_flow_stats_update()
68 stats = rcu_dereference(flow->stats[cpu]); in ovs_flow_stats_update()
70 /* Check if already have CPU-specific stats. */ in ovs_flow_stats_update()
72 spin_lock(&stats->lock); in ovs_flow_stats_update()
73 /* Mark if we write on the pre-allocated stats. */ in ovs_flow_stats_update()
74 if (cpu == 0 && unlikely(flow->stats_last_writer != cpu)) in ovs_flow_stats_update()
[all …]
/openbmc/linux/net/ceph/
H A Dcrypto.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/key-type.h>
14 #include <keys/ceph-type.h>
15 #include <keys/user-type.h>
20 * Set ->key and ->tfm. The rest of the key should be filled in before
23 static int set_secret(struct ceph_crypto_key *key, void *buf) in set_secret() argument
28 key->key = NULL; in set_secret()
29 key->tfm = NULL; in set_secret()
31 switch (key->type) { in set_secret()
37 return -ENOTSUPP; in set_secret()
[all …]
/openbmc/linux/drivers/nvdimm/
H A Dsecurity.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/key.h>
12 #include <linux/key-type.h>
13 #include <keys/user-type.h>
14 #include <keys/encrypted-type.h>
15 #include "nd-core.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()
[all …]
/openbmc/qemu/qobject/
H A Dqdict.c10 * See the COPYING.LIB file in the top-level directory.
19 #include "qobject-internal.h"
38 * (from module-init-tools)
45 /* Set the initial value from the key size. */ in tdb_hash()
56 static QDictEntry *alloc_entry(const char *key, QObject *value) in alloc_entry() argument
61 entry->key = g_strdup(key); in alloc_entry()
62 entry->value = value; in alloc_entry()
74 return entry->value; in qdict_entry_value()
78 * qdict_entry_key(): Return qdict entry key
85 return entry->key; in qdict_entry_key()
[all …]
/openbmc/linux/security/selinux/ss/
H A Davtab.c46 v = (v << r1) | (v >> (32 - r1)); \ in avtab_hash()
49 hash = (hash << r2) | (hash >> (32 - r2)); \ in avtab_hash()
53 mix(keyp->target_class); in avtab_hash()
54 mix(keyp->target_type); in avtab_hash()
55 mix(keyp->source_type); in avtab_hash()
71 const struct avtab_key *key, const struct avtab_datum *datum) in avtab_insert_node() argument
78 newnode->key = *key; in avtab_insert_node()
80 if (key->specified & AVTAB_XPERMS) { in avtab_insert_node()
86 *xperms = *(datum->u.xperms); in avtab_insert_node()
87 newnode->datum.u.xperms = xperms; in avtab_insert_node()
[all …]
/openbmc/linux/arch/s390/include/uapi/asm/
H A Dpkey.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
23 #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 */
55 /* the newer ioctls use a pkey_key_size enum for key size information */
83 /* Struct to hold a CCA AES secure key blob */
[all …]

12345678910>>...45