Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 27) sorted by relevance

12

/crypto/krb5/
A Dselftest.c66 buf->data = kmalloc(buf->len, GFP_KERNEL); in prep_buf()
67 if (!buf->data) in prep_buf()
86 PREP_BUF(buf, len - 1); in load_buf()
95 PREP_BUF(buf, len / 2); in load_buf()
96 ret = hex2bin(buf->data, from, buf->len); in load_buf()
109 kfree(buf->data); in clear_buf()
110 buf->len = 0; in clear_buf()
111 buf->data = NULL; in clear_buf()
492 void *buf; in krb5_selftest() local
496 if (!buf) in krb5_selftest()
[all …]
A Dkrb5_kdf.c89 u8 buf[5] __aligned(CRYPTO_MINALIGN); in krb5_derive_Kc() local
90 struct krb5_buffer usage_constant = { .len = 5, .data = buf }; in krb5_derive_Kc()
92 *(__be32 *)buf = cpu_to_be32(usage); in krb5_derive_Kc()
93 buf[4] = KEY_USAGE_SEED_CHECKSUM; in krb5_derive_Kc()
113 u8 buf[5] __aligned(CRYPTO_MINALIGN); in krb5_derive_Ke() local
114 struct krb5_buffer usage_constant = { .len = 5, .data = buf }; in krb5_derive_Ke()
116 *(__be32 *)buf = cpu_to_be32(usage); in krb5_derive_Ke()
117 buf[4] = KEY_USAGE_SEED_ENCRYPTION; in krb5_derive_Ke()
137 u8 buf[5] __aligned(CRYPTO_MINALIGN); in krb5_derive_Ki() local
140 *(__be32 *)buf = cpu_to_be32(usage); in krb5_derive_Ki()
[all …]
/crypto/
A Decdh_helper.c33 int crypto_ecdh_encode_key(char *buf, unsigned int len, in crypto_ecdh_encode_key() argument
36 u8 *ptr = buf; in crypto_ecdh_encode_key()
42 if (unlikely(!buf)) in crypto_ecdh_encode_key()
56 int crypto_ecdh_decode_key(const char *buf, unsigned int len, in crypto_ecdh_decode_key() argument
59 const u8 *ptr = buf; in crypto_ecdh_decode_key()
62 if (unlikely(!buf || len < ECDH_KPP_SECRET_MIN_SIZE)) in crypto_ecdh_decode_key()
A Dcurve25519-generic.c9 static int curve25519_set_secret(struct crypto_kpp *tfm, const void *buf, in curve25519_set_secret() argument
17 crypto_memneq(buf, curve25519_null_point, CURVE25519_KEY_SIZE)) in curve25519_set_secret()
18 memcpy(secret, buf, CURVE25519_KEY_SIZE); in curve25519_set_secret()
29 u8 buf[CURVE25519_KEY_SIZE]; in curve25519_compute_value() local
45 curve25519_generic(buf, secret, bp); in curve25519_compute_value()
51 buf, nbytes); in curve25519_compute_value()
A Ddh_helper.c40 int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params) in crypto_dh_encode_key() argument
42 u8 *ptr = buf; in crypto_dh_encode_key()
66 int __crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params) in __crypto_dh_decode_key() argument
68 const u8 *ptr = buf; in __crypto_dh_decode_key()
71 if (unlikely(!buf || len < DH_KPP_SECRET_MIN_SIZE)) in __crypto_dh_decode_key()
94 int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params) in crypto_dh_decode_key() argument
98 err = __crypto_dh_decode_key(buf, len, params); in crypto_dh_decode_key()
A Dshash.c72 u8 *buf = shash_desc_ctx(desc); in __crypto_shash_init() local
75 *buf = 0; in __crypto_shash_init()
118 u8 *buf; in crypto_shash_finup() local
137 buf = blenp - bs; in crypto_shash_finup()
149 src = buf; in crypto_shash_finup()
166 data = buf; in crypto_shash_finup()
211 u8 *buf = shash_desc_ctx(desc); in __crypto_shash_export() local
219 memcpy(out, buf, ss); in __crypto_shash_export()
255 u8 *buf = shash_desc_ctx(desc); in __crypto_shash_import() local
265 buf[descsize - 1] = 0; in __crypto_shash_import()
[all …]
A Dakcipher.c33 u8 *buf; member
178 u8 *buf; in crypto_akcipher_sync_prep() local
193 buf = (u8 *)(req + 1) + reqsize; in crypto_akcipher_sync_prep()
194 data->buf = buf; in crypto_akcipher_sync_prep()
195 memcpy(buf, data->src, data->slen); in crypto_akcipher_sync_prep()
198 sg_init_one(sg, buf, mlen); in crypto_akcipher_sync_prep()
212 memcpy(data->dst, data->buf, data->dlen); in crypto_akcipher_sync_post()
A Dscatterwalk.c48 inline void memcpy_from_scatterwalk(void *buf, struct scatter_walk *walk, in memcpy_from_scatterwalk() argument
55 memcpy(buf, walk->addr, to_copy); in memcpy_from_scatterwalk()
57 buf += to_copy; in memcpy_from_scatterwalk()
63 inline void memcpy_to_scatterwalk(struct scatter_walk *walk, const void *buf, in memcpy_to_scatterwalk() argument
70 memcpy(walk->addr, buf, to_copy); in memcpy_to_scatterwalk()
72 buf += to_copy; in memcpy_to_scatterwalk()
78 void memcpy_from_sglist(void *buf, struct scatterlist *sg, in memcpy_from_sglist() argument
87 memcpy_from_scatterwalk(buf, &walk, nbytes); in memcpy_from_sglist()
92 const void *buf, unsigned int nbytes) in memcpy_to_sglist() argument
100 memcpy_to_scatterwalk(&walk, buf, nbytes); in memcpy_to_sglist()
A Drng.c33 u8 *buf = NULL; in crypto_rng_reset() local
37 buf = kmalloc(slen, GFP_KERNEL); in crypto_rng_reset()
38 if (!buf) in crypto_rng_reset()
41 err = get_random_bytes_wait(buf, slen); in crypto_rng_reset()
44 seed = buf; in crypto_rng_reset()
49 kfree_sensitive(buf); in crypto_rng_reset()
A Decdh.c26 static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf, in ecdh_set_secret() argument
33 if (crypto_ecdh_decode_key(buf, len, &params) < 0 || in ecdh_set_secret()
61 void *buf; in ecdh_compute_value() local
96 buf = shared_secret; in ecdh_compute_value()
100 buf = public_key; in ecdh_compute_value()
111 buf, nbytes); in ecdh_compute_value()
A Dahash.c382 u8 *buf = ahash_request_ctx(req); in crypto_ahash_init() local
385 *buf = 0; in crypto_ahash_init()
412 u8 *buf; in ahash_update_finish() local
416 buf = blenp - bs; in ahash_update_finish()
450 u8 *buf; in crypto_ahash_update() local
461 buf = blenp - bs; in crypto_ahash_update()
530 u8 *buf; in crypto_ahash_finup() local
543 buf = blenp - bs; in crypto_ahash_finup()
647 u8 *buf = ahash_request_ctx(req); in crypto_ahash_export() local
678 u8 *buf = ahash_request_ctx(req); in crypto_ahash_import() local
[all …]
A Ddrbg.c278 struct s *conversion = (struct s *) buf; in drbg_cpu_to_be32()
323 const unsigned char *pos = curr->buf; in drbg_ctr_bcc()
674 seed2.buf = &prefix; in drbg_hmac_update()
695 unsigned char *buf, in drbg_hmac_generate() argument
723 memcpy(buf + len, drbg->V, outlen); in drbg_hmac_generate()
922 unsigned char *buf, in drbg_hash_hashgen() argument
948 memcpy(buf + len, dst, outlen); in drbg_hash_hashgen()
981 len = drbg_hash_hashgen(drbg, buf, buflen); in drbg_hash_generate()
1221 if (pers && pers->buf && 0 < pers->len) { in drbg_seed()
1379 if (0 == buflen || !buf) { in drbg_generate()
[all …]
A Dansi_cprng.c53 static void hexdump(char *note, unsigned char *buf, unsigned int len) in hexdump() argument
59 buf, len, false); in hexdump()
181 static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx, in get_prng_bytes() argument
184 unsigned char *ptr = buf; in get_prng_bytes()
219 memset(buf, 0, nbytes); in get_prng_bytes()
246 memset(buf, 0, nbytes); in get_prng_bytes()
A Ddh.c71 static int dh_set_secret(struct crypto_kpp *tfm, const void *buf, in dh_set_secret() argument
80 if (crypto_dh_decode_key(buf, len, &params) < 0) in dh_set_secret()
464 void *buf = NULL, *key = NULL; in dh_safe_prime_set_secret() local
490 buf = kmalloc(buf_size, GFP_KERNEL); in dh_safe_prime_set_secret()
491 if (!buf) { in dh_safe_prime_set_secret()
496 err = crypto_dh_encode_key(buf, buf_size, &params); in dh_safe_prime_set_secret()
500 err = crypto_kpp_set_secret(tfm_ctx->dh_tfm, buf, buf_size); in dh_safe_prime_set_secret()
502 kfree_sensitive(buf); in dh_safe_prime_set_secret()
A Djitterentropy-testing.c180 static int jent_testing_extract_user(struct file *file, char __user *buf, in jent_testing_extract_user() argument
223 if (copy_to_user(buf, tmp_aligned, i)) { in jent_testing_extract_user()
229 buf += i; in jent_testing_extract_user()
A Daegis128-neon-inner.c246 uint8_t buf[AEGIS_BLOCK_SIZE]; in crypto_aegis128_encrypt_chunk_neon() local
252 in = out = memcpy(buf + AEGIS_BLOCK_SIZE - size, src, size); in crypto_aegis128_encrypt_chunk_neon()
292 uint8_t buf[AEGIS_BLOCK_SIZE]; in crypto_aegis128_decrypt_chunk_neon() local
298 in = out = memcpy(buf + AEGIS_BLOCK_SIZE - size, src, size); in crypto_aegis128_decrypt_chunk_neon()
A Dghash-generic.c112 u8 *buf = dctx->buffer; in ghash_finup() local
115 memcpy(dst, buf, GHASH_BLOCK_SIZE); in ghash_finup()
A Daegis128-core.c282 union aegis_block buf; in crypto_aegis128_process_ad() local
294 memcpy(buf.bytes + pos, src, fill); in crypto_aegis128_process_ad()
295 crypto_aegis128_update_a(state, &buf, do_simd); in crypto_aegis128_process_ad()
306 memcpy(buf.bytes + pos, src, left); in crypto_aegis128_process_ad()
314 memset(buf.bytes + pos, 0, AEGIS_BLOCK_SIZE - pos); in crypto_aegis128_process_ad()
315 crypto_aegis128_update_a(state, &buf, do_simd); in crypto_aegis128_process_ad()
A Dtestmgr.c169 buf, len, false); in hexdump()
178 if (!buf[i]) in __testmgr_alloc_buf()
193 return __testmgr_alloc_buf(buf, 0); in testmgr_alloc_buf()
206 __testmgr_free_buf(buf, 0); in testmgr_free_buf()
1001 memset(buf, b, count); in generate_random_bytes()
1002 mutate_buffer(rng, buf, count); in generate_random_bytes()
1009 buf[i] = b; in generate_random_bytes()
1010 mutate_buffer(rng, buf, count); in generate_random_bytes()
3585 if (!buf) in drbg_cavs_test()
3590 kfree_sensitive(buf); in drbg_cavs_test()
[all …]
A Dstreebog_generic.c980 struct streebog_uint512 buf = { { 0 } }; in streebog_stage3() local
986 buf.qword[0] = cpu_to_le64(len << 3); in streebog_stage3()
991 streebog_add512(&ctx->N, &buf, &ctx->N); in streebog_stage3()
A Drsa-pkcs1pad.c63 static void pkcs1pad_sg_set_buf(struct scatterlist *sg, void *buf, size_t len, in pkcs1pad_sg_set_buf() argument
69 sg_set_buf(sg, buf, len); in pkcs1pad_sg_set_buf()
A Dsha1.c26 static_assert(offsetof(struct sha1_ctx, buf) == offsetof(struct sha1_state, buffer));
A Dsha512.c26 static_assert(offsetof(struct __sha512_ctx, buf) == 80);
A Dsha256.c26 static_assert(offsetof(struct __sha256_ctx, buf) == 40);
/crypto/asymmetric_keys/
A Dpkcs7_verify.c125 int pkcs7_get_digest(struct pkcs7_message *pkcs7, const u8 **buf, u32 *len, in pkcs7_get_digest() argument
141 *buf = sinfo->sig->digest; in pkcs7_get_digest()

Completed in 42 milliseconds

12