/linux-6.12.1/tools/testing/selftests/bpf/ |
D | test_lru_map.c | 1 // 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 …]
|
D | test_maps.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 long long key, next_key, first_key, value; in test_hashmap() local 42 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap() 48 key = 1; in test_hashmap() 50 /* Insert key=1 element. */ in test_hashmap() 51 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap() 55 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap() 56 /* key=1 already exists. */ in test_hashmap() 59 /* -1 is an invalid flag. */ in test_hashmap() 60 assert(bpf_map_update_elem(fd, &key, &value, -1) < 0 && in test_hashmap() [all …]
|
D | test_lpm_map.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Randomized tests for eBPF longest-prefix-match maps 5 * This program runs randomized tests against the lpm-bpf-map. It implements a 9 * Based on tlpm, this inserts randomized data into bpf-lpm-maps and verifies 10 * the trie-based bpf-map implementation behaves the same way as tlpm. 33 uint8_t key[]; member 37 const uint8_t *key, 41 const uint8_t *key, in tlpm_add() argument 50 node = tlpm_match(list, key, n_bits); in tlpm_add() 51 if (node && node->n_bits == n_bits) { in tlpm_add() [all …]
|
/linux-6.12.1/include/linux/platform_data/ |
D | keyboard-spear.h | 6 * License version 2. This program is licensed "as is" without any 20 KEY(0, 0, KEY_ESC), \ 21 KEY(0, 1, KEY_1), \ 22 KEY(0, 2, KEY_2), \ 23 KEY(0, 3, KEY_3), \ 24 KEY(0, 4, KEY_4), \ 25 KEY(0, 5, KEY_5), \ 26 KEY(0, 6, KEY_6), \ 27 KEY(0, 7, KEY_7), \ 28 KEY(0, 8, KEY_8), \ [all …]
|
/linux-6.12.1/drivers/input/keyboard/ |
D | pinephone-keyboard.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org> 18 #define DRV_NAME "pinephone-keyboard" 46 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), [all …]
|
/linux-6.12.1/drivers/s390/crypto/ |
D | zcrypt_cca_key.h | 1 /* 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 48 unsigned char reserved[2]; 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. [all …]
|
D | zcrypt_ccamisc.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 16 /* Key token types */ 17 #define TOKTYPE_NON_CCA 0x00 /* Non-CCA key token */ 18 #define TOKTYPE_CCA_INTERNAL 0x01 /* CCA internal sym key token */ 19 #define TOKTYPE_CCA_INTERNAL_PKA 0x1f /* CCA internal asym key token */ 22 #define TOKVER_PROTECTED_KEY 0x01 /* Protected key token */ 23 #define TOKVER_CLEAR_KEY 0x02 /* Clear key token */ 26 #define TOKVER_CCA_AES 0x04 /* CCA AES key token */ 27 #define TOKVER_CCA_VLSC 0x05 /* var length sym cipher key token */ 29 /* Max size of a cca variable length cipher key token */ [all …]
|
/linux-6.12.1/crypto/asymmetric_keys/ |
D | restrict.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Instantiate a public key crypto key from an X.509 Certificate 31 size_t hexlen = (strlen(str) - 3) / 2; in ca_keys_setup() 43 ca_keyid = p; /* owner key 'id:xxxxxx' */ in ca_keys_setup() 54 * restrict_link_by_signature - Restrict additions to a ring of public keys 56 * @type: The type of key being added. 57 * @payload: The payload of the new key. 61 * those is the signing key and validates the new certificate, then mark the 64 * Returns 0 if the new certificate was accepted, -ENOKEY if we couldn't find a 65 * matching parent certificate in the trusted list, -EKEYREJECTED if the [all …]
|
D | asymmetric_type.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Asymmetric public-key cryptography key type 4 * See Documentation/crypto/asymmetric-keys.rst 9 #include <keys/asymmetric-subtype.h> 10 #include <keys/asymmetric-parser.h> 17 #include <keys/user-type.h> 25 [VERIFYING_KEY_SIGNATURE] = "key sig", 26 [VERIFYING_KEY_SELF_SIGNATURE] = "key self sig", 35 * find_asymmetric_key - Find a key by ID. 40 * @id_2: The fallback ID to match against @keyring keys' id[2] if both of the [all …]
|
/linux-6.12.1/lib/crypto/ |
D | poly1305-donna32.c | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 5 * This is based in part on Andrew Moon's poly1305-donna, which is in the 13 void poly1305_core_setkey(struct poly1305_core_key *key, in poly1305_core_setkey() argument 17 key->key.r[0] = (get_unaligned_le32(&raw_key[0])) & 0x3ffffff; in poly1305_core_setkey() 18 key->key.r[1] = (get_unaligned_le32(&raw_key[3]) >> 2) & 0x3ffff03; in poly1305_core_setkey() 19 key->key.r[2] = (get_unaligned_le32(&raw_key[6]) >> 4) & 0x3ffc0ff; in poly1305_core_setkey() 20 key->key.r[3] = (get_unaligned_le32(&raw_key[9]) >> 6) & 0x3f03fff; in poly1305_core_setkey() 21 key->key.r[4] = (get_unaligned_le32(&raw_key[12]) >> 8) & 0x00fffff; in poly1305_core_setkey() 24 key->precomputed_s.r[0] = key->key.r[1] * 5; in poly1305_core_setkey() [all …]
|
/linux-6.12.1/lib/ |
D | siphash.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 * SipHash: a fast short-input PRF 7 * This implementation is specifically for SipHash2-4 for a secure PRF 8 * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for 17 #include <asm/word-at-a-time.h> 28 v3 ^= key->key[1]; \ 29 v2 ^= key->key[0]; \ 30 v1 ^= key->key[1]; \ 31 v0 ^= key->key[0]; [all …]
|
D | hashtable_test.c | 1 // SPDX-License-Identifier: GPL-2.0 13 int key; member 22 DEFINE_HASHTABLE(hash1, 2); in hashtable_test_hash_init() 41 a.key = 1; in hashtable_test_hash_empty() 43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty() 54 a.key = 1; in hashtable_test_hash_hashed() 56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed() 57 b.key = 1; in hashtable_test_hash_hashed() 58 b.data = 2; in hashtable_test_hash_hashed() 59 hash_add(hash, &b.node, b.key); in hashtable_test_hash_hashed() [all …]
|
/linux-6.12.1/tools/perf/ui/tui/ |
D | util.c | 1 // SPDX-License-Identifier: GPL-2.0 23 ui_browser__write_nstring(browser, *arg, browser->width); in ui_browser__argv_write() 28 int key; in popup_menu__run() local 30 if (ui_browser__show(menu, " ", "ESC: exit, ENTER|->: Select option") < 0) in popup_menu__run() 31 return -1; in popup_menu__run() 34 key = ui_browser__run(menu, 0); in popup_menu__run() 36 switch (key) { in popup_menu__run() 39 key = menu->index; in popup_menu__run() 45 key = -1; in popup_menu__run() 49 *keyp = key; in popup_menu__run() [all …]
|
/linux-6.12.1/net/wireless/ |
D | lib80211_crypt_ccmp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * lib80211 crypt: host-based CCMP encryption implementation for lib80211 5 * Copyright (c) 2003-2004, Jouni Malinen <j@w1.fi> 40 u8 key[CCMP_TK_LEN]; member 55 u8 tx_aad[2 * AES_BLOCK_LEN]; 56 u8 rx_aad[2 * AES_BLOCK_LEN]; 66 priv->key_idx = key_idx; in lib80211_ccmp_init() 68 priv->tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); in lib80211_ccmp_init() 69 if (IS_ERR(priv->tfm)) { in lib80211_ccmp_init() 70 priv->tfm = NULL; in lib80211_ccmp_init() [all …]
|
/linux-6.12.1/tools/testing/selftests/bpf/progs/ |
D | test_tunnel_kern.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * modify it under the terms of version 2 of the GNU General Public 53 __type(key, __u32); 61 struct bpf_tunnel_key key; in gre_set_tunnel() local 63 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel() 64 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel() 65 key.tunnel_id = 2; in gre_set_tunnel() 66 key.tunnel_tos = 0; in gre_set_tunnel() 67 key.tunnel_ttl = 64; in gre_set_tunnel() 69 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel() [all …]
|
/linux-6.12.1/include/linux/ |
D | siphash.h | 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 * SipHash: a fast short-input PRF 7 * This implementation is specifically for SipHash2-4 for a secure PRF 8 * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for 20 u64 key[2]; member 25 static inline bool siphash_key_is_zero(const siphash_key_t *key) in siphash_key_is_zero() argument 27 return !(key->key[0] | key->key[1]); in siphash_key_is_zero() 30 u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); 31 u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); [all …]
|
/linux-6.12.1/arch/arm/mach-omap1/ |
D | board-ams-delta.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/arch/arm/mach-omap1/board-ams-delta.c 5 * Modified from board-generic.c 19 #include <linux/mtd/nand-gpio.h> 29 #include <linux/platform_data/gpio-omap.h> 30 #include <linux/soc/ti/omap1-mux.h> 33 #include <asm/mach-types.h> 37 #include <linux/platform_data/keypad-omap.h> 41 #include "ams-delta-fiq.h" 42 #include "board-ams-delta.h" [all …]
|
/linux-6.12.1/crypto/ |
D | nhpoly1305.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * NHPoly1305 - ε-almost-∆-universal hash function for Adiantum 15 * ε-almost-∆-universal (ε-∆U) hash function for equal-length inputs over 16 * Z/(2^{128}Z), where the "∆" operation is addition. It hashes 1024-byte 17 * chunks of the input with the NH hash function [2], reducing the input length 19 * GF(2^{130}-5), like in the Poly1305 MAC [3]. Note that the polynomial 20 * evaluation by itself would suffice to achieve the ε-∆U property; NH is used 25 * [1] Adiantum: length-preserving encryption for entry-level processors 27 * [2] UMAC: Fast and Secure Message Authentication 29 * [3] The Poly1305-AES message-authentication code [all …]
|
D | cast6_generic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * cast6.c - Cast6 cipher algorithm [rfc2612]. 5 * CAST-256 (*cast6*) is a DES like Substitution-Permutation Network (SPN) 6 * cryptosystem built upon the CAST-128 (*cast5*) [rfc2144] encryption 28 (((s1[I >> 24] ^ s2[(I>>16)&0xff]) - s3[(I>>8)&0xff]) + s4[I&0xff])) 30 (((s1[I >> 24] - s2[(I>>16)&0xff]) + s3[(I>>8)&0xff]) ^ s4[I&0xff])) 31 #define F3(D, r, m) ((I = ((m) - (D))), (I = rol32(I, (r))), \ 32 (((s1[I >> 24] + s2[(I>>16)&0xff]) ^ s3[(I>>8)&0xff]) - s4[I&0xff])) 93 static inline void W(u32 *key, unsigned int i) in W() argument 96 key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); in W() [all …]
|
D | rsa.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* RSA asymmetric public-key algorithm [RFC3447] 32 return -EINVAL; in rsa_check_payload() 36 return -ENOMEM; in rsa_check_payload() 40 return -EINVAL; in rsa_check_payload() 51 static int _rsa_enc(const struct rsa_mpi_key *key, MPI c, MPI m) in _rsa_enc() argument 54 * Even though (1) in RFC3447 only requires 0 <= m <= n - 1, we are in _rsa_enc() 55 * slightly more conservative and require 1 < m < n - 1. This is in line in _rsa_enc() 56 * with SP 800-56Br2, Section 7.1.1. in _rsa_enc() 58 if (rsa_check_payload(m, key->n)) in _rsa_enc() [all …]
|
/linux-6.12.1/include/uapi/linux/ |
D | keyctl.h | 1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 10 * 2 of the License, or (at your option) any later version. 19 #define KEY_SPEC_THREAD_KEYRING -1 /* - key ID for thread-specific keyring */ 20 #define KEY_SPEC_PROCESS_KEYRING -2 /* - key ID for process-specific keyring */ 21 #define KEY_SPEC_SESSION_KEYRING -3 /* - key ID for session-specific keyring */ 22 #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ 23 #define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ 24 #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ 25 #define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */ 26 #define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */ [all …]
|
/linux-6.12.1/tools/bpf/bpftool/ |
D | map.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 /* Copyright (C) 2017-2018 Netronome Systems, Inc. */ 59 return -1; in map_type_from_str() 64 if (map_is_per_cpu(info->type)) in alloc_value() 65 return malloc(round_up(info->value_size, 8) * in alloc_value() 68 return malloc(info->value_size); in alloc_value() 72 struct bpf_map_info *map_info, void *key, in do_dump_btf() argument 78 /* start of key-value pair */ in do_dump_btf() 79 jsonw_start_object(d->jw); in do_dump_btf() 81 if (map_info->btf_key_type_id) { in do_dump_btf() [all …]
|
/linux-6.12.1/net/mac80211/ |
D | debugfs_key.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2003-2005 Devicescape Software, Inc. 7 * Copyright (C) 2021-2023 Intel Corporation 13 #include "key.h" 22 struct ieee80211_key *key = file->private_data; \ 24 format_string, key->prop); \ 66 KEY_READ(ifindex, sdata->name, "%s\n"); 74 struct ieee80211_key *key = file->private_data; in key_algorithm_read() local 75 u32 c = key->conf.cipher; in key_algorithm_read() 77 sprintf(buf, "%.2x-%.2x-%.2x:%d\n", in key_algorithm_read() [all …]
|
/linux-6.12.1/net/rxrpc/ |
D | key.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* RxRPC key management 17 #include <linux/key-type.h> 22 #include <keys/rxrpc-type.h> 23 #include <keys/user-type.h> 24 #include "ar-internal.h" 28 static void rxrpc_destroy(struct key *); 29 static void rxrpc_describe(const struct key *, struct seq_file *); 30 static long rxrpc_read(const struct key *, char *, size_t); 50 * - the caller guarantees we have at least 4 words [all …]
|
/linux-6.12.1/drivers/staging/rtl8192e/ |
D | rtllib_crypt_ccmp.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Host AP crypt: host-based CCMP encryption implementation for Host AP driver 4 * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi> 31 u8 key[CCMP_TK_LEN]; member 46 u8 tx_aad[2 * AES_BLOCK_LEN]; 47 u8 rx_aad[2 * AES_BLOCK_LEN]; 57 priv->key_idx = key_idx; in rtllib_ccmp_init() 59 priv->tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); in rtllib_ccmp_init() 60 if (IS_ERR(priv->tfm)) { in rtllib_ccmp_init() 62 priv->tfm = NULL; in rtllib_ccmp_init() [all …]
|