/crypto/async_tx/ |
D | async_xor.c | 66 xor_src_cnt, unmap->len, in do_async_xor() 77 xor_src_cnt, unmap->len, in do_async_xor() 102 int src_cnt, size_t len, struct async_submit_ctl *submit) in do_sync_xor_offs() argument 125 memset(dest_buf, 0, len); in do_sync_xor_offs() 130 xor_blocks(xor_src_cnt, len, dest_buf, &srcs[src_off]); in do_sync_xor_offs() 142 unsigned int *src_offs, int src_cnt, int len) in dma_xor_aligned_offsets() argument 146 if (!is_dma_xor_aligned(device, offset, 0, len)) in dma_xor_aligned_offsets() 153 if (!is_dma_xor_aligned(device, src_offs[i], 0, len)) in dma_xor_aligned_offsets() 184 int src_cnt, size_t len, struct async_submit_ctl *submit) in async_xor_offs() argument 188 src_cnt, len); in async_xor_offs() [all …]
|
D | async_pq.c | 81 &scfs[src_off], unmap->len, in do_async_gen_syndrome() 108 size_t len, struct async_submit_ctl *submit) in do_sync_gen_syndrome() argument 136 raid6_call.xor_syndrome(disks, start, stop, len, srcs); in do_sync_gen_syndrome() 138 raid6_call.gen_syndrome(disks, len, srcs); in do_sync_gen_syndrome() 144 int src_cnt, size_t len) in is_dma_pq_aligned_offs() argument 149 if (!is_dma_pq_aligned(dev, offs[i], 0, len)) in is_dma_pq_aligned_offs() 178 size_t len, struct async_submit_ctl *submit) in async_gen_syndrome() argument 183 blocks, src_cnt, len); in async_gen_syndrome() 196 is_dma_pq_aligned_offs(device, offsets, disks, len)) { in async_gen_syndrome() 204 __func__, disks, len); in async_gen_syndrome() [all …]
|
D | async_memcpy.c | 33 unsigned int src_offset, size_t len, in async_memcpy() argument 37 &dest, 1, &src, 1, len); in async_memcpy() 45 if (unmap && is_dma_copy_aligned(device, src_offset, dest_offset, len)) { in async_memcpy() 54 unmap->addr[0] = dma_map_page(device->dev, src, src_offset, len, in async_memcpy() 57 unmap->addr[1] = dma_map_page(device->dev, dest, dest_offset, len, in async_memcpy() 59 unmap->len = len; in async_memcpy() 62 unmap->addr[0], len, in async_memcpy() 67 pr_debug("%s: (async) len: %zu\n", __func__, len); in async_memcpy() 73 pr_debug("%s: (sync) len: %zu\n", __func__, len); in async_memcpy() 81 memcpy(dest_buf, src_buf, len); in async_memcpy()
|
D | async_raid6_recov.c | 20 size_t len, struct async_submit_ctl *submit) in async_sum_product() argument 23 &dest, 1, srcs, 2, len); in async_sum_product() 42 len, DMA_TO_DEVICE); in async_sum_product() 44 len, DMA_TO_DEVICE); in async_sum_product() 48 len, DMA_BIDIRECTIONAL); in async_sum_product() 53 unmap->len = len; in async_sum_product() 55 len, dma_flags); in async_sum_product() 77 while (len--) { in async_sum_product() 88 unsigned int s_off, u8 coef, size_t len, in async_mult() argument 92 &dest, 1, &src, 1, len); in async_mult() [all …]
|
/crypto/ |
D | testmgr.h | 72 unsigned int len; member 8661 .len = 8, 8667 .len = 8, 8673 .len = 8, 8683 .len = 24, 8691 .len = 8, 8699 .len = 16, 8707 .len = 16, 8719 .len = 32, 8785 .len = 248, [all …]
|
D | algif_rng.c | 55 unsigned int len; member 73 static int _rng_recvmsg(struct crypto_rng *drng, struct msghdr *msg, size_t len, in _rng_recvmsg() argument 80 if (len == 0) in _rng_recvmsg() 82 if (len > MAXSIZE) in _rng_recvmsg() 83 len = MAXSIZE; in _rng_recvmsg() 89 memset(result, 0, len); in _rng_recvmsg() 97 genlen = crypto_rng_generate(drng, addtl, addtl_len, result, len); in _rng_recvmsg() 101 err = memcpy_to_msg(msg, result, len); in _rng_recvmsg() 102 memzero_explicit(result, len); in _rng_recvmsg() 104 return err ? err : len; in _rng_recvmsg() [all …]
|
D | xcbc.c | 45 unsigned int len; member 79 ctx->len = 0; in crypto_xcbc_digest_init() 86 unsigned int len) in crypto_xcbc_digest_update() argument 98 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update() 99 memcpy(odds + ctx->len, p, len); in crypto_xcbc_digest_update() 100 ctx->len += len; in crypto_xcbc_digest_update() 105 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_xcbc_digest_update() 106 len -= bs - ctx->len; in crypto_xcbc_digest_update() 107 p += bs - ctx->len; in crypto_xcbc_digest_update() 113 ctx->len = 0; in crypto_xcbc_digest_update() [all …]
|
D | cmac.c | 46 unsigned int len; member 112 ctx->len = 0; in crypto_cmac_digest_init() 119 unsigned int len) in crypto_cmac_digest_update() argument 131 if ((ctx->len + len) <= bs) { in crypto_cmac_digest_update() 132 memcpy(odds + ctx->len, p, len); in crypto_cmac_digest_update() 133 ctx->len += len; in crypto_cmac_digest_update() 138 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_cmac_digest_update() 139 len -= bs - ctx->len; in crypto_cmac_digest_update() 140 p += bs - ctx->len; in crypto_cmac_digest_update() 146 ctx->len = 0; in crypto_cmac_digest_update() [all …]
|
D | drbg.c | 334 size_t len = curr->len; in drbg_ctr_bcc() local 336 while (len) { in drbg_ctr_bcc() 347 len--; in drbg_ctr_bcc() 435 inputlen += seed->len; in drbg_ctr_df() 599 int len = min_t(int, buflen, INT_MAX); in drbg_ctr_generate() local 609 ret = drbg_kcapi_sym_ctr(drbg, NULL, 0, buf, len); in drbg_ctr_generate() 616 len = ret; in drbg_ctr_generate() 618 return len; in drbg_ctr_generate() 711 int len = 0; in drbg_hmac_generate() local 725 while (len < buflen) { in drbg_hmac_generate() [all …]
|
D | ecdh_helper.c | 33 int crypto_ecdh_encode_key(char *buf, unsigned int len, in crypto_ecdh_encode_key() argument 39 .len = len in crypto_ecdh_encode_key() 45 if (len != crypto_ecdh_key_len(params)) in crypto_ecdh_encode_key() 56 int crypto_ecdh_decode_key(const char *buf, unsigned int len, in crypto_ecdh_decode_key() argument 62 if (unlikely(!buf || len < ECDH_KPP_SECRET_MIN_SIZE)) in crypto_ecdh_decode_key() 69 if (unlikely(len < secret.len)) in crypto_ecdh_decode_key() 73 if (secret.len != crypto_ecdh_key_len(params)) in crypto_ecdh_decode_key()
|
D | algif_hash.c | 26 unsigned int len; member 89 int len = msg_data_left(msg); in hash_sendmsg() local 91 if (len > limit) in hash_sendmsg() 92 len = limit; in hash_sendmsg() 94 len = af_alg_make_sg(&ctx->sgl, &msg->msg_iter, len); in hash_sendmsg() 95 if (len < 0) { in hash_sendmsg() 96 err = copied ? 0 : len; in hash_sendmsg() 100 ahash_request_set_crypt(&ctx->req, ctx->sgl.sg, NULL, len); in hash_sendmsg() 108 copied += len; in hash_sendmsg() 109 iov_iter_advance(&msg->msg_iter, len); in hash_sendmsg() [all …]
|
D | crc32_generic.c | 58 unsigned int len) in crc32_update() argument 62 *crcp = crc32_le(*crcp, data, len); in crc32_update() 67 static int __crc32_finup(u32 *crcp, const u8 *data, unsigned int len, in __crc32_finup() argument 70 put_unaligned_le32(crc32_le(*crcp, data, len), out); in __crc32_finup() 75 unsigned int len, u8 *out) in crc32_finup() argument 77 return __crc32_finup(shash_desc_ctx(desc), data, len, out); in crc32_finup() 89 unsigned int len, u8 *out) in crc32_digest() argument 91 return __crc32_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_digest()
|
D | algif_skcipher.c | 62 size_t len = 0; in _skcipher_recvmsg() local 77 err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len); in _skcipher_recvmsg() 85 if (ctx->more || len < ctx->used) in _skcipher_recvmsg() 86 len -= len % bs; in _skcipher_recvmsg() 92 areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0); in _skcipher_recvmsg() 103 af_alg_pull_tsgl(sk, len, areq->tsgl, 0); in _skcipher_recvmsg() 108 areq->first_rsgl.sgl.sg, len, ctx->iv); in _skcipher_recvmsg() 116 areq->outlen = len; in _skcipher_recvmsg() 146 return err ? err : len; in _skcipher_recvmsg() 318 sock_kfree_s(sk, ctx, ctx->len); in skcipher_sock_destruct() [all …]
|
D | michael_mic.c | 60 unsigned int len) in michael_update() argument 66 if (flen > len) in michael_update() 67 flen = len; in michael_update() 71 len -= flen; in michael_update() 81 while (len >= 4) { in michael_update() 85 len -= 4; in michael_update() 88 if (len > 0) { in michael_update() 89 mctx->pending_len = len; in michael_update() 90 memcpy(&mctx->pending, data, len); in michael_update()
|
D | scatterwalk.c | 74 unsigned int len) in scatterwalk_ffwd() argument 77 if (!len) in scatterwalk_ffwd() 80 if (src->length > len) in scatterwalk_ffwd() 83 len -= src->length; in scatterwalk_ffwd() 88 sg_set_page(dst, sg_page(src), src->length - len, src->offset + len); in scatterwalk_ffwd()
|
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 43 u8 * const end = ptr + len; in crypto_dh_encode_key() 46 .len = len in crypto_dh_encode_key() 49 if (unlikely(!len)) 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 73 if (unlikely(!buf || len < DH_KPP_SECRET_MIN_SIZE)) in crypto_dh_decode_key() 84 if (secret.len != crypto_dh_key_len(params)) in crypto_dh_decode_key()
|
D | shash.c | 92 unsigned int len) in shash_update_unaligned() argument 110 if (unaligned_len > len) in shash_update_unaligned() 111 unaligned_len = len; in shash_update_unaligned() 118 shash->update(desc, data + unaligned_len, len - unaligned_len); in shash_update_unaligned() 122 unsigned int len) in crypto_shash_update() argument 129 return shash_update_unaligned(desc, data, len); in crypto_shash_update() 131 return shash->update(desc, data, len); in crypto_shash_update() 177 unsigned int len, u8 *out) in shash_finup_unaligned() argument 179 return crypto_shash_update(desc, data, len) ?: in shash_finup_unaligned() 184 unsigned int len, u8 *out) in crypto_shash_finup() argument [all …]
|
D | fips140-module.c | 440 static void fips140_sha256(void *p, const u8 *data, unsigned int len, u8 *out, in fips140_sha256() argument 443 sha256(data, len, out); in fips140_sha256() 566 void __crypto_xor(u8 *dst, const u8 *src1, const u8 *src2, unsigned int len) in __crypto_xor() argument 568 while (len >= 8) { in __crypto_xor() 573 len -= 8; in __crypto_xor() 576 while (len >= 4) { in __crypto_xor() 581 len -= 4; in __crypto_xor() 584 while (len >= 2) { in __crypto_xor() 589 len -= 2; in __crypto_xor() 592 while (len--) in __crypto_xor()
|
D | algboss.c | 79 unsigned int len; in cryptomgr_schedule_probe() local 92 len = p - name; in cryptomgr_schedule_probe() 93 if (!len || *p != '(') in cryptomgr_schedule_probe() 96 memcpy(param->template, name, len); in cryptomgr_schedule_probe() 120 len = p - name; in cryptomgr_schedule_probe() 121 if (!len) in cryptomgr_schedule_probe() 126 memcpy(param->attrs[i].data.name, name, len); in cryptomgr_schedule_probe()
|
D | sha1_generic.c | 43 unsigned int len) in crypto_sha1_update() argument 45 return sha1_base_do_update(desc, data, len, sha1_generic_block_fn); in crypto_sha1_update() 56 unsigned int len, u8 *out) in crypto_sha1_finup() argument 58 sha1_base_do_update(desc, data, len, sha1_generic_block_fn); in crypto_sha1_finup()
|
D | crct10dif_generic.c | 68 static int __chksum_finup(__u16 crc, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument 70 *(__u16 *)out = crc_t10dif_generic(crc, data, len); in __chksum_finup() 75 unsigned int len, u8 *out) in chksum_finup() argument 79 return __chksum_finup(ctx->crc, data, len, out); in chksum_finup()
|
D | sha256_generic.c | 49 unsigned int len) in crypto_sha256_update() argument 51 sha256_update(shash_desc_ctx(desc), data, len); in crypto_sha256_update() 66 unsigned int len, u8 *hash) in crypto_sha256_finup() argument 68 sha256_update(shash_desc_ctx(desc), data, len); in crypto_sha256_finup()
|
/crypto/asymmetric_keys/ |
D | asym_tpm.c | 309 static inline uint32_t definite_length(uint32_t len) in definite_length() argument 311 if (len <= 127) in definite_length() 313 if (len <= 255) in definite_length() 319 uint32_t len) in encode_tag_length() argument 323 if (len <= 127) { in encode_tag_length() 324 buf[0] = len; in encode_tag_length() 328 if (len <= 255) { in encode_tag_length() 330 buf[1] = len; in encode_tag_length() 335 put_unaligned_be16(len, buf + 1); in encode_tag_length() 339 static uint32_t derive_pub_key(const void *pub_key, uint32_t len, uint8_t *buf) in derive_pub_key() argument [all …]
|
D | asymmetric_type.c | 55 int len; in find_asymmetric_key() local 61 len = id_0->len; in find_asymmetric_key() 64 len = id_1->len; in find_asymmetric_key() 68 p = req = kmalloc(2 + 1 + len * 2 + 1, GFP_KERNEL); in find_asymmetric_key() 80 p = bin2hex(p, lookup, len); in find_asymmetric_key() 146 kid->len = len_1 + len_2; in asymmetric_key_generate_id() 163 if (kid1->len != kid2->len) in asymmetric_key_id_same() 165 return memcmp(kid1->data, kid2->data, kid1->len) == 0; in asymmetric_key_id_same() 180 if (kid1->len < kid2->len) in asymmetric_key_id_partial() 182 return memcmp(kid1->data + (kid1->len - kid2->len), in asymmetric_key_id_partial() [all …]
|
D | pkcs7_verify.c | 125 int pkcs7_get_digest(struct pkcs7_message *pkcs7, const u8 **buf, u32 *len, in pkcs7_get_digest() argument 142 *len = sinfo->sig->digest_size; in pkcs7_get_digest() 186 sinfo->sig->auth_ids[0]->len, sinfo->sig->auth_ids[0]->data); in pkcs7_find_key() 230 sig->auth_ids[0]->len, sig->auth_ids[0]->data); in pkcs7_verify_sig_chain() 233 sig->auth_ids[1]->len, sig->auth_ids[1]->data); in pkcs7_verify_sig_chain() 253 pr_debug("- want %*phN\n", auth->len, auth->data); in pkcs7_verify_sig_chain() 256 p->index, p->id->len, p->id->data); in pkcs7_verify_sig_chain() 262 pr_debug("- want %*phN\n", auth->len, auth->data); in pkcs7_verify_sig_chain() 267 p->index, p->skid->len, p->skid->data); in pkcs7_verify_sig_chain()
|