/lib/ |
A D | test_static_keys.c | 129 .key = &true_key.key, in test_key_func() 134 .key = &true_key.key, in test_key_func() 139 .key = &false_key.key, in test_key_func() 144 .key = &false_key.key, in test_key_func() 171 .key = &base_true_key.key, in test_key_func() 176 .key = &base_true_key.key, in test_key_func() 181 .key = &base_inv_true_key.key, in test_key_func() 186 .key = &base_inv_true_key.key, in test_key_func() 191 .key = &base_false_key.key, in test_key_func() 196 .key = &base_false_key.key, in test_key_func() [all …]
|
A D | btree.c | 140 val = key[i]; in dec_key() 141 key[i] = val - 1; in dec_key() 207 unsigned long *key) in btree_last() argument 224 unsigned long *key) in keycmp() argument 234 if (key[i]) in keyzero() 241 unsigned long *key) in btree_lookup_node() argument 263 unsigned long *key) in btree_lookup() argument 320 dec_key(geo, key); in btree_get_prev() 359 unsigned long *key) in getpos() argument 625 unsigned long *key) in btree_remove() argument [all …]
|
A D | siphash.c | 28 v3 ^= key->key[1]; \ 29 v2 ^= key->key[0]; \ 30 v1 ^= key->key[1]; \ 31 v0 ^= key->key[0]; 156 const siphash_key_t *key) in siphash_3u64() argument 216 const siphash_key_t *key) in siphash_3u32() argument 280 const hsiphash_key_t *key) in __hsiphash_unaligned() argument 393 v3 ^= key->key[1]; \ 394 v2 ^= key->key[0]; \ 395 v1 ^= key->key[1]; \ [all …]
|
A D | digsig.c | 67 static int digsig_verify_rsa(struct key *key, in digsig_verify_rsa() argument 84 down_read(&key->sem); in digsig_verify_rsa() 85 ukp = user_key_payload_locked(key); in digsig_verify_rsa() 179 up_read(&key->sem); in digsig_verify_rsa() 206 struct key *key; in digsig_verify() local 223 key = ERR_CAST(kref); in digsig_verify() 225 key = key_ref_to_ptr(kref); in digsig_verify() 227 key = request_key(&key_type_user, name, NULL); in digsig_verify() 229 if (IS_ERR(key)) { in digsig_verify() 231 return PTR_ERR(key); in digsig_verify() [all …]
|
A D | test_static_key_base.c | 34 static void invert_key(struct static_key *key) in invert_key() argument 36 if (static_key_enabled(key)) in invert_key() 37 static_key_disable(key); in invert_key() 39 static_key_enable(key); in invert_key() 46 invert_key(&base_inv_true_key.key); in test_static_key_base_init() 47 invert_key(&base_inv_false_key.key); in test_static_key_base_init()
|
A D | rbtree_test.c | 20 u32 key; member 36 u32 key = node->key; in insert() local 40 if (key < rb_entry(parent, struct test_node, rb)->key) in insert() 53 u32 key = node->key; in insert_cached() local 58 if (key < rb_entry(parent, struct test_node, rb)->key) in insert_cached() 90 u32 key = node->key; in RB_DECLARE_CALLBACKS_MAX() local 99 if (key < parent->key) in RB_DECLARE_CALLBACKS_MAX() 114 u32 key = node->key; in insert_augmented_cached() local 124 if (key < parent->key) in insert_augmented_cached() 200 WARN_ON_ONCE(node->key < prev_key); in check() [all …]
|
A D | once.c | 10 struct static_key_true *key; member 19 BUG_ON(!static_key_enabled(work->key)); in once_deferred() 20 static_branch_disable(work->key); in once_deferred() 25 static void once_disable_jump(struct static_key_true *key, struct module *mod) in once_disable_jump() argument 34 w->key = key; in once_disable_jump()
|
A D | test_rhashtable.c | 90 const struct test_obj_val *val = arg->key; in my_cmpfn() 146 struct test_obj_val key = { in test_rht_lookup() local 160 key.id); in test_rht_lookup() 247 struct test_obj_val key = { in test_rhashtable() local 314 struct test_obj_val key = { in test_rhltable() local 524 const char *key; in test_insert_dup() local 594 struct test_obj_val key = { in thread_lookup_test() local 601 pr_err(" found unexpected object %d-%d\n", key.tid, key.id); in thread_lookup_test() 604 pr_err(" object %d-%d not found!\n", key.tid, key.id); in thread_lookup_test() 606 } else if (obj && memcmp(&obj->value, &key, sizeof(key))) { in thread_lookup_test() [all …]
|
A D | bsearch.c | 31 void *bsearch(const void *key, const void *base, size_t num, size_t size, cmp_func_t cmp) in bsearch() argument 33 return __inline_bsearch(key, base, num, size, cmp); in bsearch()
|
A D | bootconfig.c | 220 xbc_node_find_subkey(struct xbc_node *parent, const char *key) in xbc_node_find_subkey() argument 230 if (!xbc_node_match_prefix(node, &key)) in xbc_node_find_subkey() 232 else if (*key != '\0') in xbc_node_find_subkey() 257 xbc_node_find_value(struct xbc_node *parent, const char *key, in xbc_node_find_value() argument 260 struct xbc_node *node = xbc_node_find_subkey(parent, key); in xbc_node_find_value() 501 static inline __init bool xbc_valid_keyword(char *key) in xbc_valid_keyword() argument 503 if (key[0] == '\0') in xbc_valid_keyword() 506 while (isalnum(*key) || *key == '-' || *key == '_') in xbc_valid_keyword() 507 key++; in xbc_valid_keyword() 509 return *key == '\0'; in xbc_valid_keyword()
|
A D | bucket_locks.c | 16 const char *name, struct lock_class_key *key) in __alloc_bucket_spinlocks() argument 39 lockdep_init_map(&tlocks[i].dep_map, name, key, 0); in __alloc_bucket_spinlocks()
|
A D | test_objagg.c | 38 struct tokey key; member 51 struct tokey key; in world_obj_get() local 54 key.id = key_id; in world_obj_get() 55 objagg_obj = objagg_obj_get(objagg, &key); in world_obj_get() 93 const struct tokey *key = obj; in delta_check() local 94 int diff = key->id - parent_key->id; in delta_check() 103 struct tokey *key = obj; in delta_create() local 104 int diff = key->id - parent_key->id; in delta_create() 130 struct tokey *key = obj; in root_create() local 136 memcpy(&root->key, key, sizeof(root->key)); in root_create() [all …]
|
/lib/tests/ |
A D | hashtable_test.c | 13 int key; member 41 a.key = 1; in hashtable_test_hash_empty() 54 a.key = 1; in hashtable_test_hash_hashed() 57 b.key = 1; in hashtable_test_hash_hashed() 71 a.key = 1; in hashtable_test_hash_add() 75 b.key = 2; in hashtable_test_hash_add() 82 if (x->key == a.key) in hashtable_test_hash_add() 84 else if (x->key == b.key) in hashtable_test_hash_add() 100 a.key = 1; in hashtable_test_hash_del() 103 b.key = 2; in hashtable_test_hash_del() [all …]
|
/lib/crypto/ |
A D | poly1305-donna32.c | 18 key->key.r[0] = (get_unaligned_le32(&raw_key[0])) & 0x3ffffff; in poly1305_core_setkey() 19 key->key.r[1] = (get_unaligned_le32(&raw_key[3]) >> 2) & 0x3ffff03; in poly1305_core_setkey() 25 key->precomputed_s.r[0] = key->key.r[1] * 5; in poly1305_core_setkey() 26 key->precomputed_s.r[1] = key->key.r[2] * 5; in poly1305_core_setkey() 27 key->precomputed_s.r[2] = key->key.r[3] * 5; in poly1305_core_setkey() 28 key->precomputed_s.r[3] = key->key.r[4] * 5; in poly1305_core_setkey() 48 r0 = key->key.r[0]; in poly1305_core_blocks() 49 r1 = key->key.r[1]; in poly1305_core_blocks() 50 r2 = key->key.r[2]; in poly1305_core_blocks() 51 r3 = key->key.r[3]; in poly1305_core_blocks() [all …]
|
A D | poly1305-donna64.c | 14 void poly1305_core_setkey(struct poly1305_core_key *key, in poly1305_core_setkey() argument 23 key->key.r64[0] = t0 & 0xffc0fffffffULL; in poly1305_core_setkey() 24 key->key.r64[1] = ((t0 >> 44) | (t1 << 20)) & 0xfffffc0ffffULL; in poly1305_core_setkey() 25 key->key.r64[2] = ((t1 >> 24)) & 0x00ffffffc0fULL; in poly1305_core_setkey() 28 key->precomputed_s.r64[0] = key->key.r64[1] * 20; in poly1305_core_setkey() 29 key->precomputed_s.r64[1] = key->key.r64[2] * 20; in poly1305_core_setkey() 50 r0 = key->key.r64[0]; in poly1305_core_blocks() 51 r1 = key->key.r64[1]; in poly1305_core_blocks() 52 r2 = key->key.r64[2]; in poly1305_core_blocks() 58 s1 = key->precomputed_s.r64[0]; in poly1305_core_blocks() [all …]
|
A D | blake2s-selftest.c | 550 u8 key[BLAKE2S_KEY_SIZE]; in blake2s_digest_test() local 557 key[0] = key[1] = 1; in blake2s_digest_test() 558 for (i = 2; i < sizeof(key); ++i) in blake2s_digest_test() 559 key[i] = key[i - 2] + key[i - 1]; in blake2s_digest_test() 568 blake2s(hash, buf, key + BLAKE2S_KEY_SIZE - keylen, outlen, i, in blake2s_digest_test() 579 key + BLAKE2S_KEY_SIZE - keylen, in blake2s_digest_test()
|
A D | poly1305.c | 19 const u8 key[POLY1305_KEY_SIZE]) in poly1305_init() 21 desc->s[0] = get_unaligned_le32(key + 16); in poly1305_init() 22 desc->s[1] = get_unaligned_le32(key + 20); in poly1305_init() 23 desc->s[2] = get_unaligned_le32(key + 24); in poly1305_init() 24 desc->s[3] = get_unaligned_le32(key + 28); in poly1305_init() 27 poly1305_block_init_arch(&desc->state, key); in poly1305_init() 29 poly1305_block_init_generic(&desc->state, key); in poly1305_init()
|
A D | chacha20poly1305.c | 34 const u8 *key, const u8 *nonce) in xchacha_init() argument 42 chacha_load_key(k, key); in xchacha_init() 98 chacha_load_key(k, key); in chacha20poly1305_encrypt() 119 xchacha_init(&chacha_state, key, nonce); in xchacha20poly1305_encrypt() 180 chacha_load_key(k, key); in chacha20poly1305_decrypt() 203 xchacha_init(&chacha_state, key, nonce); in xchacha20poly1305_decrypt() 241 chacha_load_key(b.k, key); in chacha20poly1305_crypt_sg_inplace() 338 const u8 key[CHACHA20POLY1305_KEY_SIZE]) in chacha20poly1305_encrypt_sg_inplace() 341 nonce, key, 1); in chacha20poly1305_encrypt_sg_inplace() 348 const u8 key[CHACHA20POLY1305_KEY_SIZE]) in chacha20poly1305_decrypt_sg_inplace() [all …]
|
A D | aesgcm.c | 45 int aesgcm_expandkey(struct aesgcm_ctx *ctx, const u8 *key, in aesgcm_expandkey() argument 52 aes_expandkey(&ctx->aes_ctx, key, keysize); in aesgcm_expandkey() 68 gf128mul_lle(ghash, key); in aesgcm_ghash() 561 u8 key[AES_MAX_KEY_SIZE] __nonstring; member 581 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 591 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 615 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 636 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 648 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 664 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" [all …]
|
A D | aescfb.c | 111 u8 key[AES_MAX_KEY_SIZE] __nonstring; member 118 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" 141 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52" 165 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe" 190 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" 203 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" 220 if (aes_expandkey(&ctx, aescfb_tv[i].key, aescfb_tv[i].klen)) { in libaescfb_init()
|
A D | sha256.c | 299 void hmac_sha224_preparekey(struct hmac_sha224_key *key, in hmac_sha224_preparekey() argument 302 __hmac_sha256_preparekey(&key->key.istate, &key->key.ostate, in hmac_sha224_preparekey() 307 void hmac_sha256_preparekey(struct hmac_sha256_key *key, in hmac_sha256_preparekey() argument 310 __hmac_sha256_preparekey(&key->key.istate, &key->key.ostate, in hmac_sha256_preparekey() 316 const struct __hmac_sha256_key *key) in __hmac_sha256_init() argument 318 __sha256_init(&ctx->sha_ctx, &key->istate, SHA256_BLOCK_SIZE); in __hmac_sha256_init() 319 ctx->ostate = key->ostate; in __hmac_sha256_init() 374 void hmac_sha224(const struct hmac_sha224_key *key, in hmac_sha224() argument 379 hmac_sha224_init(&ctx, key); in hmac_sha224() 385 void hmac_sha256(const struct hmac_sha256_key *key, in hmac_sha256() argument [all …]
|
A D | sha512.c | 285 void hmac_sha384_preparekey(struct hmac_sha384_key *key, in hmac_sha384_preparekey() argument 288 __hmac_sha512_preparekey(&key->key.istate, &key->key.ostate, in hmac_sha384_preparekey() 293 void hmac_sha512_preparekey(struct hmac_sha512_key *key, in hmac_sha512_preparekey() argument 296 __hmac_sha512_preparekey(&key->key.istate, &key->key.ostate, in hmac_sha512_preparekey() 302 const struct __hmac_sha512_key *key) in __hmac_sha512_init() argument 304 __sha512_init(&ctx->sha_ctx, &key->istate, SHA512_BLOCK_SIZE); in __hmac_sha512_init() 305 ctx->ostate = key->ostate; in __hmac_sha512_init() 362 void hmac_sha384(const struct hmac_sha384_key *key, in hmac_sha384() argument 367 hmac_sha384_init(&ctx, key); in hmac_sha384() 373 void hmac_sha512(const struct hmac_sha512_key *key, in hmac_sha512() argument [all …]
|
A D | sha1.c | 266 void hmac_sha1_preparekey(struct hmac_sha1_key *key, in hmac_sha1_preparekey() argument 269 __hmac_sha1_preparekey(&key->istate, &key->ostate, in hmac_sha1_preparekey() 274 void hmac_sha1_init(struct hmac_sha1_ctx *ctx, const struct hmac_sha1_key *key) in hmac_sha1_init() argument 276 ctx->sha_ctx.state = key->istate; in hmac_sha1_init() 278 ctx->ostate = key->ostate; in hmac_sha1_init() 310 void hmac_sha1(const struct hmac_sha1_key *key, in hmac_sha1() argument 315 hmac_sha1_init(&ctx, key); in hmac_sha1()
|
/lib/crypto/tests/ |
A D | poly1305_kunit.c | 16 static void poly1305(const u8 key[POLY1305_KEY_SIZE], const u8 *data, in poly1305() 21 poly1305_init(&ctx, key); in poly1305() 117 static const u8 key[POLY1305_KEY_SIZE] = { 1 }; /* r_key=1, s_key=0 */ in test_poly1305_reduction_edge_cases() local 142 poly1305(key, data, sizeof(data), actual_mac); in test_poly1305_reduction_edge_cases()
|
/lib/vdso/ |
A D | getrandom.c | 163 if (getrandom_syscall(state->key, sizeof(state->key), 0) != sizeof(state->key)) { in __cvdso_getrandom_data() 240 __arch_chacha20_blocks_nostack(buffer, state->key, counter, nblocks); in __cvdso_getrandom_data() 248 __arch_chacha20_blocks_nostack(state->batch_key, state->key, counter, in __cvdso_getrandom_data()
|