/crypto/ |
D | scatterwalk.c | 18 static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) in memcpy_dir() argument 20 void *src = out ? buf : sgdata; in memcpy_dir() 21 void *dst = out ? sgdata : buf; in memcpy_dir() 26 void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, in scatterwalk_copychunks() argument 38 memcpy_dir(buf, vaddr, len_this_page, out); in scatterwalk_copychunks() 47 buf += len_this_page; in scatterwalk_copychunks() 55 void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, in scatterwalk_map_and_copy() argument 67 scatterwalk_copychunks(buf, &walk, nbytes, out); in scatterwalk_map_and_copy()
|
D | aegis128-neon-inner.c | 168 uint8_t buf[AEGIS_BLOCK_SIZE] = {}; in crypto_aegis128_encrypt_chunk_neon() local 170 memcpy(buf, src, size); in crypto_aegis128_encrypt_chunk_neon() 171 msg = vld1q_u8(buf); in crypto_aegis128_encrypt_chunk_neon() 173 vst1q_u8(buf, msg ^ s); in crypto_aegis128_encrypt_chunk_neon() 174 memcpy(dst, buf, size); in crypto_aegis128_encrypt_chunk_neon() 200 uint8_t buf[AEGIS_BLOCK_SIZE]; in crypto_aegis128_decrypt_chunk_neon() local 202 vst1q_u8(buf, s); in crypto_aegis128_decrypt_chunk_neon() 203 memcpy(buf, src, size); in crypto_aegis128_decrypt_chunk_neon() 204 msg = vld1q_u8(buf) ^ s; in crypto_aegis128_decrypt_chunk_neon() 205 vst1q_u8(buf, msg); in crypto_aegis128_decrypt_chunk_neon() [all …]
|
D | ecdh_helper.c | 33 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() 57 int crypto_ecdh_decode_key(const char *buf, unsigned int len, in crypto_ecdh_decode_key() argument 60 const u8 *ptr = buf; in crypto_ecdh_decode_key() 63 if (unlikely(!buf || len < ECDH_KPP_SECRET_MIN_SIZE)) in crypto_ecdh_decode_key()
|
D | ecdh.c | 35 static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf, in ecdh_set_secret() argument 42 if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0) in ecdh_set_secret() 71 void *buf; in ecdh_compute_value() local 106 buf = shared_secret; in ecdh_compute_value() 110 buf = public_key; in ecdh_compute_value() 121 buf, nbytes); in ecdh_compute_value()
|
D | rng.c | 34 u8 *buf = NULL; in crypto_rng_reset() local 39 buf = kmalloc(slen, GFP_KERNEL); in crypto_rng_reset() 40 if (!buf) in crypto_rng_reset() 43 err = get_random_bytes_wait(buf, slen); in crypto_rng_reset() 46 seed = buf; in crypto_rng_reset() 52 kzfree(buf); in crypto_rng_reset()
|
D | dh_helper.c | 40 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() 68 int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params) in crypto_dh_decode_key() argument 70 const u8 *ptr = buf; in crypto_dh_decode_key() 73 if (unlikely(!buf || len < DH_KPP_SECRET_MIN_SIZE)) in crypto_dh_decode_key()
|
D | drbg.c | 282 static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf) in drbg_cpu_to_be32() argument 287 struct s *conversion = (struct s *) buf; in drbg_cpu_to_be32() 332 const unsigned char *pos = curr->buf; in drbg_ctr_bcc() 594 unsigned char *buf, unsigned int buflen, in drbg_ctr_generate() argument 608 ret = drbg_kcapi_sym_ctr(drbg, NULL, 0, buf, len); in drbg_ctr_generate() 685 seed2.buf = &prefix; in drbg_hmac_update() 706 unsigned char *buf, in drbg_hmac_generate() argument 734 memcpy(buf + len, drbg->V, outlen); in drbg_hmac_generate() 935 unsigned char *buf, in drbg_hash_hashgen() argument 961 memcpy(buf + len, dst, outlen); in drbg_hash_hashgen() [all …]
|
D | sha3_generic.c | 188 memcpy(sctx->buf + sctx->partial, data, in crypto_sha3_update() 190 src = sctx->buf; in crypto_sha3_update() 206 memcpy(sctx->buf + sctx->partial, src, len - done); in crypto_sha3_update() 220 sctx->buf[inlen++] = 0x06; in crypto_sha3_final() 221 memset(sctx->buf + inlen, 0, sctx->rsiz - inlen); in crypto_sha3_final() 222 sctx->buf[sctx->rsiz - 1] |= 0x80; in crypto_sha3_final() 225 sctx->st[i] ^= get_unaligned_le64(sctx->buf + 8 * i); in crypto_sha3_final()
|
D | shash.c | 93 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_update_unaligned() local 96 if (WARN_ON(buf + unaligned_len > ubuf + sizeof(ubuf))) in shash_update_unaligned() 102 memcpy(buf, data, unaligned_len); in shash_update_unaligned() 103 err = shash->update(desc, buf, unaligned_len); in shash_update_unaligned() 104 memset(buf, 0, unaligned_len); in shash_update_unaligned() 135 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_final_unaligned() local 138 if (WARN_ON(buf + ds > ubuf + sizeof(ubuf))) in shash_final_unaligned() 141 err = shash->final(desc, buf); in shash_final_unaligned() 145 memcpy(out, buf, ds); in shash_final_unaligned() 148 memset(buf, 0, ds); in shash_final_unaligned()
|
D | ansi_cprng.c | 52 static void hexdump(char *note, unsigned char *buf, unsigned int len) in hexdump() argument 58 buf, len, false); in hexdump() 180 static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx, in get_prng_bytes() argument 183 unsigned char *ptr = buf; in get_prng_bytes() 218 memset(buf, 0, nbytes); in get_prng_bytes() 245 memset(buf, 0, nbytes); in get_prng_bytes()
|
D | poly1305_generic.c | 189 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update() 195 poly1305_blocks(dctx, dctx->buf, in crypto_poly1305_update() 209 memcpy(dctx->buf, src, srclen); in crypto_poly1305_update() 274 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_final() 275 memset(dctx->buf + dctx->buflen, 0, in crypto_poly1305_final() 277 poly1305_blocks(dctx, dctx->buf, POLY1305_BLOCK_SIZE, 0); in crypto_poly1305_final()
|
D | aegis128-core.c | 286 union aegis_block buf; in crypto_aegis128_process_ad() local 299 memcpy(buf.bytes + pos, src, fill); in crypto_aegis128_process_ad() 300 crypto_aegis128_update_a(state, &buf); in crypto_aegis128_process_ad() 311 memcpy(buf.bytes + pos, src, left); in crypto_aegis128_process_ad() 321 memset(buf.bytes + pos, 0, AEGIS_BLOCK_SIZE - pos); in crypto_aegis128_process_ad() 322 crypto_aegis128_update_a(state, &buf); in crypto_aegis128_process_ad()
|
D | ghash-generic.c | 137 u8 *buf = dctx->buffer; in ghash_final() local 140 memcpy(dst, buf, GHASH_BLOCK_SIZE); in ghash_final()
|
D | dh.c | 74 static int dh_set_secret(struct crypto_kpp *tfm, const void *buf, in dh_set_secret() argument 83 if (crypto_dh_decode_key(buf, len, ¶ms) < 0) in dh_set_secret()
|
D | testmgr.c | 143 static void hexdump(unsigned char *buf, unsigned int len) in hexdump() argument 147 buf, len, false); in hexdump() 150 static int __testmgr_alloc_buf(char *buf[XBUFSIZE], int order) in __testmgr_alloc_buf() 155 buf[i] = (char *)__get_free_pages(GFP_KERNEL, order); in __testmgr_alloc_buf() 156 if (!buf[i]) in __testmgr_alloc_buf() 164 free_pages((unsigned long)buf[i], order); in __testmgr_alloc_buf() 169 static int testmgr_alloc_buf(char *buf[XBUFSIZE]) in testmgr_alloc_buf() 171 return __testmgr_alloc_buf(buf, 0); in testmgr_alloc_buf() 174 static void __testmgr_free_buf(char *buf[XBUFSIZE], int order) in __testmgr_free_buf() 179 free_pages((unsigned long)buf[i], order); in __testmgr_free_buf() [all …]
|
D | streebog_generic.c | 989 struct streebog_uint512 buf = { { 0 } }; in streebog_stage3() local 991 buf.qword[0] = cpu_to_le64(ctx->fillsize << 3); in streebog_stage3() 995 streebog_add512(&ctx->N, &buf, &ctx->N); in streebog_stage3()
|
D | rsa-pkcs1pad.c | 161 static void pkcs1pad_sg_set_buf(struct scatterlist *sg, void *buf, size_t len, in pkcs1pad_sg_set_buf() argument 167 sg_set_buf(sg, buf, len); in pkcs1pad_sg_set_buf()
|
D | tcrypt.c | 85 static int testmgr_alloc_buf(char *buf[XBUFSIZE]) in testmgr_alloc_buf() 90 buf[i] = (void *)__get_free_page(GFP_KERNEL); in testmgr_alloc_buf() 91 if (!buf[i]) in testmgr_alloc_buf() 99 free_page((unsigned long)buf[i]); in testmgr_alloc_buf() 104 static void testmgr_free_buf(char *buf[XBUFSIZE]) in testmgr_free_buf() 109 free_page((unsigned long)buf[i]); in testmgr_free_buf()
|
D | gcm.c | 79 u8 buf[16]; member 1220 sg_init_one(&gcm_zeroes->sg, gcm_zeroes->buf, sizeof(gcm_zeroes->buf)); in crypto_gcm_module_init()
|
/crypto/asymmetric_keys/ |
D | asym_tpm.c | 334 static inline uint8_t *encode_tag_length(uint8_t *buf, uint8_t tag, in encode_tag_length() argument 337 *buf++ = tag; in encode_tag_length() 340 buf[0] = len; in encode_tag_length() 341 return buf + 1; in encode_tag_length() 345 buf[0] = 0x81; in encode_tag_length() 346 buf[1] = len; in encode_tag_length() 347 return buf + 2; in encode_tag_length() 350 buf[0] = 0x82; in encode_tag_length() 351 put_unaligned_be16(len, buf + 1); in encode_tag_length() 352 return buf + 3; in encode_tag_length() [all …]
|
D | pkcs7_verify.c | 125 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()
|