| /crypto/ |
| A D | testmgr.h | 194 .key = 237 .key = 304 .key = 412 .key = 456 .key = 1838 .key = 1863 .key = 1888 .key = 1913 .key = 1947 .key = [all …]
|
| A D | rsa_helper.c | 40 key->n = value; in rsa_get_n() 41 key->n_sz = vlen; in rsa_get_n() 52 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e() 55 key->e = value; in rsa_get_e() 56 key->e_sz = vlen; in rsa_get_e() 67 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_d() 70 key->d = value; in rsa_get_d() 71 key->d_sz = vlen; in rsa_get_d() 85 key->p = value; in rsa_get_p() 100 key->q = value; in rsa_get_q() [all …]
|
| A D | nhpoly1305.c | 56 sums[0] += (u64)(u32)(m0 + key[ 0]) * (u32)(m2 + key[ 2]); in nh_generic() 57 sums[1] += (u64)(u32)(m0 + key[ 4]) * (u32)(m2 + key[ 6]); in nh_generic() 58 sums[2] += (u64)(u32)(m0 + key[ 8]) * (u32)(m2 + key[10]); in nh_generic() 59 sums[3] += (u64)(u32)(m0 + key[12]) * (u32)(m2 + key[14]); in nh_generic() 60 sums[0] += (u64)(u32)(m1 + key[ 1]) * (u32)(m3 + key[ 3]); in nh_generic() 61 sums[1] += (u64)(u32)(m1 + key[ 5]) * (u32)(m3 + key[ 7]); in nh_generic() 62 sums[2] += (u64)(u32)(m1 + key[ 9]) * (u32)(m3 + key[11]); in nh_generic() 63 sums[3] += (u64)(u32)(m1 + key[13]) * (u32)(m3 + key[15]); in nh_generic() 64 key += NH_MESSAGE_UNIT / sizeof(key[0]); in nh_generic() 135 key += POLY1305_BLOCK_SIZE; in crypto_nhpoly1305_setkey() [all …]
|
| A D | cast6_generic.c | 96 key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); in W() 97 key[5] ^= F2(key[6], Tr[i % 4][1], Tm[i][1]); in W() 98 key[4] ^= F3(key[5], Tr[i % 4][2], Tm[i][2]); in W() 99 key[3] ^= F1(key[4], Tr[i % 4][3], Tm[i][3]); in W() 100 key[2] ^= F2(key[3], Tr[i % 4][4], Tm[i][4]); in W() 101 key[1] ^= F3(key[2], Tr[i % 4][5], Tm[i][5]); in W() 102 key[0] ^= F1(key[1], Tr[i % 4][6], Tm[i][6]); in W() 103 key[7] ^= F2(key[0], Tr[i % 4][7], Tm[i][7]); in W() 109 u32 key[8]; in __cast6_setkey() local 128 W(key, 2 * i); in __cast6_setkey() [all …]
|
| A D | rsa.c | 62 return mpi_powm(c, m, key->e, key->n); in _rsa_enc() 91 ret = mpi_powm(m_or_m1_or_h, c, key->dp, key->p); in _rsa_dec_crt() 96 ret = mpi_powm(m2, c, key->dq, key->q); in _rsa_dec_crt() 102 mpi_mulm(m_or_m1_or_h, m12_or_qh, key->qinv, key->p); in _rsa_dec_crt() 207 key->d = NULL; in rsa_free_mpi_key() 208 key->e = NULL; in rsa_free_mpi_key() 209 key->n = NULL; in rsa_free_mpi_key() 210 key->p = NULL; in rsa_free_mpi_key() 211 key->q = NULL; in rsa_free_mpi_key() 212 key->dp = NULL; in rsa_free_mpi_key() [all …]
|
| A D | twofish_common.c | 469 if (key[i]) { \ 530 mds[0][q0[a ^ key[(j) + 8]] ^ key[j]] \ 531 ^ mds[1][q0[b ^ key[(j) + 9]] ^ key[(j) + 1]] \ 532 ^ mds[2][q1[c ^ key[(j) + 10]] ^ key[(j) + 2]] \ 533 ^ mds[3][q1[d ^ key[(j) + 11]] ^ key[(j) + 3]] 544 q1[b ^ key[(j) + 17]], \ 545 q0[c ^ key[(j) + 18]], \ 546 q1[d ^ key[(j) + 19]], j) 557 q1[a ^ key[(j) + 25]], \ 558 q0[a ^ key[(j) + 26]], \ [all …]
|
| A D | chacha.c | 16 u32 key[8]; member 21 const u8 *key, unsigned int keysize, int nrounds) in chacha_setkey() argument 29 for (i = 0; i < ARRAY_SIZE(ctx->key); i++) in chacha_setkey() 30 ctx->key[i] = get_unaligned_le32(key + i * sizeof(u32)); in chacha_setkey() 37 const u8 *key, unsigned int keysize) in chacha20_setkey() argument 39 return chacha_setkey(tfm, key, keysize, 20); in chacha20_setkey() 43 const u8 *key, unsigned int keysize) in chacha12_setkey() argument 45 return chacha_setkey(tfm, key, keysize, 12); in chacha12_setkey() 58 chacha_init(&state, ctx->key, iv); in chacha_stream_xor() 104 chacha_init(&state, ctx->key, req->iv); in crypto_xchacha_crypt() [all …]
|
| A D | crc32c.c | 45 u32 key; member 62 ctx->crc = mctx->key; in chksum_init() 72 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() argument 77 if (keylen != sizeof(mctx->key)) in chksum_setkey() 79 mctx->key = get_unaligned_le32(key); in chksum_setkey() 119 return __chksum_finup(&mctx->key, data, length, out); in chksum_digest() 126 mctx->key = ~0; in crc32c_cra_init()
|
| A D | dh.c | 354 __be64 *key; in dh_safe_prime_gen_privkey() local 384 if (!key) in dh_safe_prime_gen_privkey() 429 h = be64_to_cpu(key[0]); in dh_safe_prime_gen_privkey() 443 key[n] = cpu_to_be64(1); in dh_safe_prime_gen_privkey() 448 memmove(key, &key[1], *key_size); in dh_safe_prime_gen_privkey() 450 return key; in dh_safe_prime_gen_privkey() 453 kfree_sensitive(key); in dh_safe_prime_gen_privkey() 484 if (IS_ERR(key)) in dh_safe_prime_set_secret() 485 return PTR_ERR(key); in dh_safe_prime_set_secret() 486 params.key = key; in dh_safe_prime_set_secret() [all …]
|
| A D | af_alg.c | 212 u8 *key; in alg_setkey() local 216 if (!key) in alg_setkey() 233 static const u8 *key_data_ptr_user(const struct key *key, in key_data_ptr_user() argument 247 static const u8 *key_data_ptr_encrypted(const struct key *key, in key_data_ptr_encrypted() argument 261 static const u8 *key_data_ptr_trusted(const struct key *key, in key_data_ptr_trusted() argument 272 return tkp->key; in key_data_ptr_trusted() 293 struct key *key; in alg_setkey_by_key_serial() local 304 if (IS_ERR(key)) in alg_setkey_by_key_serial() 323 key_put(key); in alg_setkey_by_key_serial() 330 key_put(key); in alg_setkey_by_key_serial() [all …]
|
| A D | aegis.h | 34 const union aegis_block *key, 62 const union aegis_block *key) in crypto_aegis_aesenc() argument 73 dst->words32[0] = cpu_to_le32(d0) ^ key->words32[0]; in crypto_aegis_aesenc() 74 dst->words32[1] = cpu_to_le32(d1) ^ key->words32[1]; in crypto_aegis_aesenc() 75 dst->words32[2] = cpu_to_le32(d2) ^ key->words32[2]; in crypto_aegis_aesenc() 76 dst->words32[3] = cpu_to_le32(d3) ^ key->words32[3]; in crypto_aegis_aesenc()
|
| A D | cipher.c | 20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, in setkey_unaligned() argument 35 memcpy(alignbuffer, key, keylen); in setkey_unaligned() 43 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() argument 51 if ((unsigned long)key & alignmask) in crypto_cipher_setkey() 52 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey() 54 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey()
|
| A D | ansi_cprng.c | 277 const unsigned char *key, size_t klen, in reset_prng_context() argument 286 prng_key = (key != NULL) ? key : (unsigned char *)DEFAULT_PRNG_KEY; in reset_prng_context() 288 if (!key) in reset_prng_context() 368 const u8 *key = seed + DEFAULT_BLK_SZ; in cprng_reset() local 375 dt = key + DEFAULT_PRNG_KSZ; in cprng_reset() 377 reset_prng_context(prng, key, DEFAULT_PRNG_KSZ, seed, dt); in cprng_reset() 398 const u8 *key = seed + DEFAULT_BLK_SZ; in fips_cprng_reset() local 407 if (!memcmp(seed, key, DEFAULT_PRNG_KSZ)) in fips_cprng_reset()
|
| A D | blowfish_common.c | 345 int blowfish_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in blowfish_setkey() argument 364 temp = (((u32)key[j] << 24) | in blowfish_setkey() 365 ((u32)key[(j + 1) % keylen] << 16) | in blowfish_setkey() 366 ((u32)key[(j + 2) % keylen] << 8) | in blowfish_setkey() 367 ((u32)key[(j + 3) % keylen])); in blowfish_setkey()
|
| A D | crc32.c | 24 u32 *key = crypto_tfm_ctx(tfm); in crc32_cra_init() local 26 *key = 0; in crc32_cra_init() 36 static int crc32_setkey(struct crypto_shash *hash, const u8 *key, in crc32_setkey() argument 43 *mctx = get_unaligned_le32(key); in crc32_setkey()
|
| /crypto/asymmetric_keys/ |
| A D | restrict.c | 76 struct key *key; in restrict_link_by_signature() local 100 if (IS_ERR(key)) in restrict_link_by_signature() 111 key_put(key); in restrict_link_by_signature() 212 struct key *key = NULL; in key_or_keyring_common() local 240 if (IS_ERR(key)) in key_or_keyring_common() 241 key = NULL; in key_or_keyring_common() 295 if (IS_ERR(key)) in key_or_keyring_common() 296 key = NULL; in key_or_keyring_common() 299 if (!key) in key_or_keyring_common() 302 ret = key_validate(key); in key_or_keyring_common() [all …]
|
| A D | asymmetric_type.c | 41 struct key *find_asymmetric_key(struct key *keyring, in find_asymmetric_key() 47 struct key *key; in find_asymmetric_key() local 121 return key; in find_asymmetric_key() 124 key_put(key); in find_asymmetric_key() 252 static bool asymmetric_key_cmp(const struct key *key, in asymmetric_key_cmp() argument 278 static bool asymmetric_key_cmp_name(const struct key *key, in asymmetric_key_cmp_name() argument 457 static void asymmetric_key_destroy(struct key *key) in asymmetric_key_destroy() argument 479 struct key *key) in asymmetric_restriction_alloc() argument 488 keyres->key = key; in asymmetric_restriction_alloc() 523 struct key *key; in asymmetric_lookup_restriction() local [all …]
|
| A D | public_key.c | 35 if (key) in public_key_describe() 36 seq_printf(m, "%s.%s", key->id_type, key->pkey_algo); in public_key_describe() 44 if (key) { in public_key_free() 45 kfree_sensitive(key->key); in public_key_free() 47 kfree(key); in public_key_free() 180 if (!key) in software_key_query() 183 memcpy(key, pkey->key, pkey->keylen); in software_key_query() 288 if (!key) in software_key_eds_op() 291 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op() 410 if (!key) { in public_key_verify_signature() [all …]
|
| A D | pkcs7_trust.c | 24 struct key *trust_keyring) in pkcs7_validate_trust_one() 28 struct key *key; in pkcs7_validate_trust_one() local 52 if (!IS_ERR(key)) { in pkcs7_validate_trust_one() 62 if (key == ERR_PTR(-ENOMEM)) in pkcs7_validate_trust_one() 86 if (!IS_ERR(key)) { in pkcs7_validate_trust_one() 92 if (PTR_ERR(key) != -ENOKEY) in pkcs7_validate_trust_one() 93 return PTR_ERR(key); in pkcs7_validate_trust_one() 101 if (!IS_ERR(key)) { in pkcs7_validate_trust_one() 108 if (PTR_ERR(key) != -ENOKEY) in pkcs7_validate_trust_one() 109 return PTR_ERR(key); in pkcs7_validate_trust_one() [all …]
|
| A D | signature.c | 46 struct key *key = params->key; in query_asymmetric_key() local 51 if (key->type != &key_type_asymmetric) in query_asymmetric_key() 53 subtype = asymmetric_key_subtype(key); in query_asymmetric_key() 55 !key->payload.data[0]) in query_asymmetric_key() 74 int verify_signature(const struct key *key, in verify_signature() argument 82 if (key->type != &key_type_asymmetric) in verify_signature() 84 subtype = asymmetric_key_subtype(key); in verify_signature() 86 !key->payload.data[0]) in verify_signature() 91 ret = subtype->verify_signature(key, sig); in verify_signature()
|
| A D | Kconfig | 3 bool "Asymmetric (public-key cryptographic) key type" 6 This option provides support for a key type that holds the data for 7 the asymmetric keys used for public key cryptographic operations such 14 tristate "Asymmetric public-key crypto algorithm subtype" 33 data and provides the ability to instantiate a crypto key from a 34 public key packet found inside the certificate. 37 tristate "PKCS#8 private key parser" 43 private key data and provides the ability to instantiate a crypto key 57 tristate "PKCS#7 testing key type" 60 This option provides a type of key that can be loaded up from a [all …]
|
| A D | x509_loader.c | 9 const struct key *keyring) in x509_load_certificate_list() 11 key_ref_t key; in x509_load_certificate_list() local 31 key = key_create_or_update(make_key_ref(keyring, 1), in x509_load_certificate_list() 41 if (IS_ERR(key)) { in x509_load_certificate_list() 43 PTR_ERR(key)); in x509_load_certificate_list() 46 key_ref_to_ptr(key)->description); in x509_load_certificate_list() 47 key_ref_put(key); in x509_load_certificate_list()
|
| A D | pkcs8_parser.c | 26 const void *key; member 89 ctx->key = value; in pkcs8_note_key() 119 pub->key = kmemdup(ctx.key, ctx.key_size, GFP_KERNEL); in pkcs8_parse() 120 if (!pub->key) in pkcs8_parse()
|
| /crypto/krb5/ |
| A D | selftest_data.c | 20 .key = "3705D96080C17728A0E800EAB6E0D23C", 43 .key = "3705D96080C17728A0E800EAB6E0D23C", 45 .Kc.key = "B31A018A48F54776F403E9A396325DC3", 47 .Ke.key = "9B197DD1E8C5609D6E67C3E37C62C72E", 49 .Ki.key = "9FDA0E56AB2D85E1569A688696C26A6C", 55 .Kc.key = "EF5718BE86CC84963D8BBB5031E9F5C4BA41F28FAF69E73D", 59 .Ki.key = "69B16514E3CD8E56B82010D5C73012B622C4D00FFC23ED1F", 65 .key = "57D0297298FFD9D35DE5A47FB4BDE24B", 67 .Kc.key = "D155775A209D05F02B38D42A389E5A56", 69 .Ke.key = "64DF83F85A532F17577D8C37035796AB", [all …]
|
| A D | krb5_kdf.c | 87 u32 usage, struct krb5_buffer *key, gfp_t gfp) in krb5_derive_Kc() argument 95 key->len = krb5->Kc_len; in krb5_derive_Kc() 96 return krb5->profile->calc_Kc(krb5, TK, &usage_constant, key, gfp); in krb5_derive_Kc() 111 u32 usage, struct krb5_buffer *key, gfp_t gfp) in krb5_derive_Ke() argument 119 key->len = krb5->Ke_len; in krb5_derive_Ke() 120 return krb5->profile->calc_Ke(krb5, TK, &usage_constant, key, gfp); in krb5_derive_Ke() 135 u32 usage, struct krb5_buffer *key, gfp_t gfp) in krb5_derive_Ki() argument 143 key->len = krb5->Ki_len; in krb5_derive_Ki() 144 return krb5->profile->calc_Ki(krb5, TK, &usage_constant, key, gfp); in krb5_derive_Ki()
|