/crypto/ |
D | pcbc.c | 26 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_segment() local 31 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_segment() 33 crypto_xor_cpy(iv, dst, src, bsize); in crypto_pcbc_encrypt_segment() 35 src += bsize; in crypto_pcbc_encrypt_segment() 48 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_inplace() local 53 memcpy(tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() 54 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_inplace() 55 crypto_cipher_encrypt_one(tfm, src, iv); in crypto_pcbc_encrypt_inplace() 56 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() 58 src += bsize; in crypto_pcbc_encrypt_inplace() [all …]
|
D | cbc.c | 23 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_segment() local 34 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment() 38 src += bsize; in crypto_cbc_encrypt_segment() 51 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_inplace() local 61 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace() 62 fn(tfm, src, src); in crypto_cbc_encrypt_inplace() 63 iv = src; in crypto_cbc_encrypt_inplace() 65 src += bsize; in crypto_cbc_encrypt_inplace() 82 if (walk.src.virt.addr == walk.dst.virt.addr) in crypto_cbc_encrypt() 98 u8 *src = walk->src.virt.addr; in crypto_cbc_decrypt_segment() local [all …]
|
D | poly1305_generic.c | 35 const u8 *src, unsigned int srclen) in crypto_poly1305_setdesckey() argument 39 poly1305_core_setkey(&dctx->core_r, src); in crypto_poly1305_setdesckey() 40 src += POLY1305_BLOCK_SIZE; in crypto_poly1305_setdesckey() 45 dctx->s[0] = get_unaligned_le32(src + 0); in crypto_poly1305_setdesckey() 46 dctx->s[1] = get_unaligned_le32(src + 4); in crypto_poly1305_setdesckey() 47 dctx->s[2] = get_unaligned_le32(src + 8); in crypto_poly1305_setdesckey() 48 dctx->s[3] = get_unaligned_le32(src + 12); in crypto_poly1305_setdesckey() 49 src += POLY1305_BLOCK_SIZE; in crypto_poly1305_setdesckey() 57 static void poly1305_blocks(struct poly1305_desc_ctx *dctx, const u8 *src, in poly1305_blocks() argument 63 datalen = crypto_poly1305_setdesckey(dctx, src, srclen); in poly1305_blocks() [all …]
|
D | cfb.c | 37 const u8 *src, u8 *dst) in crypto_cfb_encrypt_one() argument 39 crypto_cipher_encrypt_one(skcipher_cipher_simple(tfm), dst, src); in crypto_cfb_encrypt_one() 49 u8 *src = walk->src.virt.addr; in crypto_cfb_final() local 55 crypto_xor_cpy(dst, stream, src, nbytes); in crypto_cfb_final() 63 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_segment() local 69 crypto_xor(dst, src, bsize); in crypto_cfb_encrypt_segment() 72 src += bsize; in crypto_cfb_encrypt_segment() 86 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_inplace() local 92 crypto_xor(src, tmp, bsize); in crypto_cfb_encrypt_inplace() 93 iv = src; in crypto_cfb_encrypt_inplace() [all …]
|
D | scatterwalk.c | 20 void *src = out ? buf : sgdata; in memcpy_dir() local 23 memcpy(dst, src, nbytes); in memcpy_dir() 73 struct scatterlist *src, in scatterwalk_ffwd() argument 78 return src; in scatterwalk_ffwd() 80 if (src->length > len) in scatterwalk_ffwd() 83 len -= src->length; in scatterwalk_ffwd() 84 src = sg_next(src); in scatterwalk_ffwd() 88 sg_set_page(dst, sg_page(src), src->length - len, src->offset + len); in scatterwalk_ffwd() 89 scatterwalk_crypto_chain(dst, sg_next(src), 2); in scatterwalk_ffwd()
|
D | aegis128-core.c | 67 const u8 *src, unsigned int size); 69 const u8 *src, unsigned int size); 135 const u8 *src, unsigned int size) in crypto_aegis128_ad() argument 137 if (AEGIS_ALIGNED(src)) { in crypto_aegis128_ad() 139 (const union aegis_block *)src; in crypto_aegis128_ad() 149 crypto_aegis128_update_u(state, src); in crypto_aegis128_ad() 152 src += AEGIS_BLOCK_SIZE; in crypto_aegis128_ad() 158 const u8 *src, unsigned int size) in crypto_aegis128_encrypt_chunk() argument 162 if (AEGIS_ALIGNED(src) && AEGIS_ALIGNED(dst)) { in crypto_aegis128_encrypt_chunk() 167 (const union aegis_block *)src; in crypto_aegis128_encrypt_chunk() [all …]
|
D | lz4hc.c | 52 static int __lz4hc_compress_crypto(const u8 *src, unsigned int slen, in __lz4hc_compress_crypto() argument 55 int out_len = LZ4_compress_HC(src, dst, slen, in __lz4hc_compress_crypto() 65 static int lz4hc_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_scompress() argument 69 return __lz4hc_compress_crypto(src, slen, dst, dlen, ctx); in lz4hc_scompress() 72 static int lz4hc_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4hc_compress_crypto() argument 78 return __lz4hc_compress_crypto(src, slen, dst, dlen, in lz4hc_compress_crypto() 82 static int __lz4hc_decompress_crypto(const u8 *src, unsigned int slen, in __lz4hc_decompress_crypto() argument 85 int out_len = LZ4_decompress_safe(src, dst, slen, *dlen); in __lz4hc_decompress_crypto() 94 static int lz4hc_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_sdecompress() argument 98 return __lz4hc_decompress_crypto(src, slen, dst, dlen, NULL); in lz4hc_sdecompress() [all …]
|
D | lz4.c | 53 static int __lz4_compress_crypto(const u8 *src, unsigned int slen, in __lz4_compress_crypto() argument 56 int out_len = LZ4_compress_default(src, dst, in __lz4_compress_crypto() 66 static int lz4_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4_scompress() argument 70 return __lz4_compress_crypto(src, slen, dst, dlen, ctx); in lz4_scompress() 73 static int lz4_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4_compress_crypto() argument 78 return __lz4_compress_crypto(src, slen, dst, dlen, ctx->lz4_comp_mem); in lz4_compress_crypto() 81 static int __lz4_decompress_crypto(const u8 *src, unsigned int slen, in __lz4_decompress_crypto() argument 84 int out_len = LZ4_decompress_safe(src, dst, slen, *dlen); in __lz4_decompress_crypto() 93 static int lz4_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4_sdecompress() argument 97 return __lz4_decompress_crypto(src, slen, dst, dlen, NULL); in lz4_sdecompress() [all …]
|
D | lzo-rle.c | 52 static int __lzorle_compress(const u8 *src, unsigned int slen, in __lzorle_compress() argument 58 err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx); in __lzorle_compress() 67 static int lzorle_compress(struct crypto_tfm *tfm, const u8 *src, in lzorle_compress() argument 72 return __lzorle_compress(src, slen, dst, dlen, ctx->lzorle_comp_mem); in lzorle_compress() 75 static int lzorle_scompress(struct crypto_scomp *tfm, const u8 *src, in lzorle_scompress() argument 79 return __lzorle_compress(src, slen, dst, dlen, ctx); in lzorle_scompress() 82 static int __lzorle_decompress(const u8 *src, unsigned int slen, in __lzorle_decompress() argument 88 err = lzo1x_decompress_safe(src, slen, dst, &tmp_len); in __lzorle_decompress() 97 static int lzorle_decompress(struct crypto_tfm *tfm, const u8 *src, in lzorle_decompress() argument 100 return __lzorle_decompress(src, slen, dst, dlen); in lzorle_decompress() [all …]
|
D | lzo.c | 52 static int __lzo_compress(const u8 *src, unsigned int slen, in __lzo_compress() argument 58 err = lzo1x_1_compress(src, slen, dst, &tmp_len, ctx); in __lzo_compress() 67 static int lzo_compress(struct crypto_tfm *tfm, const u8 *src, in lzo_compress() argument 72 return __lzo_compress(src, slen, dst, dlen, ctx->lzo_comp_mem); in lzo_compress() 75 static int lzo_scompress(struct crypto_scomp *tfm, const u8 *src, in lzo_scompress() argument 79 return __lzo_compress(src, slen, dst, dlen, ctx); in lzo_scompress() 82 static int __lzo_decompress(const u8 *src, unsigned int slen, in __lzo_decompress() argument 88 err = lzo1x_decompress_safe(src, slen, dst, &tmp_len); in __lzo_decompress() 97 static int lzo_decompress(struct crypto_tfm *tfm, const u8 *src, in lzo_decompress() argument 100 return __lzo_decompress(src, slen, dst, dlen); in lzo_decompress() [all …]
|
D | aegis.h | 28 const union aegis_block *src) in crypto_aegis_block_xor() argument 30 dst->words64[0] ^= src->words64[0]; in crypto_aegis_block_xor() 31 dst->words64[1] ^= src->words64[1]; in crypto_aegis_block_xor() 35 const union aegis_block *src) in crypto_aegis_block_and() argument 37 dst->words64[0] &= src->words64[0]; in crypto_aegis_block_and() 38 dst->words64[1] &= src->words64[1]; in crypto_aegis_block_and() 42 const union aegis_block *src, in crypto_aegis_aesenc() argument 45 const u8 *s = src->bytes; in crypto_aegis_aesenc()
|
D | zstd.c | 150 static int __zstd_compress(const u8 *src, unsigned int slen, in __zstd_compress() argument 157 out_len = ZSTD_compressCCtx(zctx->cctx, dst, *dlen, src, slen, params); in __zstd_compress() 164 static int zstd_compress(struct crypto_tfm *tfm, const u8 *src, in zstd_compress() argument 169 return __zstd_compress(src, slen, dst, dlen, ctx); in zstd_compress() 172 static int zstd_scompress(struct crypto_scomp *tfm, const u8 *src, in zstd_scompress() argument 176 return __zstd_compress(src, slen, dst, dlen, ctx); in zstd_scompress() 179 static int __zstd_decompress(const u8 *src, unsigned int slen, in __zstd_decompress() argument 185 out_len = ZSTD_decompressDCtx(zctx->dctx, dst, *dlen, src, slen); in __zstd_decompress() 192 static int zstd_decompress(struct crypto_tfm *tfm, const u8 *src, in zstd_decompress() argument 197 return __zstd_decompress(src, slen, dst, dlen, ctx); in zstd_decompress() [all …]
|
D | chacha20poly1305.c | 41 struct scatterlist src[1]; member 47 struct scatterlist src[1]; member 52 struct scatterlist src[2]; member 100 scatterwalk_map_and_copy(tag, req->src, in poly_verify_tag() 128 struct scatterlist *src, *dst; in chacha_decrypt() local 136 src = scatterwalk_ffwd(rctx->src, req->src, req->assoclen); in chacha_decrypt() 137 dst = src; in chacha_decrypt() 138 if (req->src != req->dst) in chacha_decrypt() 144 skcipher_request_set_crypt(&creq->req, src, dst, in chacha_decrypt() 179 sg_init_one(preq->src, &preq->tail, sizeof(preq->tail)); in poly_tail() [all …]
|
D | 842.c | 66 const u8 *src, unsigned int slen, in crypto842_compress() argument 71 return sw842_compress(src, slen, dst, dlen, ctx->wmem); in crypto842_compress() 75 const u8 *src, unsigned int slen, in crypto842_scompress() argument 78 return sw842_compress(src, slen, dst, dlen, ctx); in crypto842_scompress() 82 const u8 *src, unsigned int slen, in crypto842_decompress() argument 85 return sw842_decompress(src, slen, dst, dlen); in crypto842_decompress() 89 const u8 *src, unsigned int slen, in crypto842_sdecompress() argument 92 return sw842_decompress(src, slen, dst, dlen); in crypto842_sdecompress()
|
D | cipher.c | 60 u8 *dst, const u8 *src, bool enc) in cipher_crypt_one() argument 67 if (unlikely(((unsigned long)dst | (unsigned long)src) & alignmask)) { in cipher_crypt_one() 72 memcpy(tmp, src, bs); in cipher_crypt_one() 76 fn(crypto_cipher_tfm(tfm), dst, src); in cipher_crypt_one() 81 u8 *dst, const u8 *src) in crypto_cipher_encrypt_one() argument 83 cipher_crypt_one(tfm, dst, src, true); in crypto_cipher_encrypt_one() 88 u8 *dst, const u8 *src) in crypto_cipher_decrypt_one() argument 90 cipher_crypt_one(tfm, dst, src, false); in crypto_cipher_decrypt_one()
|
D | keywrap.c | 129 struct scatterlist *src, *dst; in crypto_kw_decrypt() local 149 src = req->src; in crypto_kw_decrypt() 158 crypto_kw_scatterlist_ff(&src_walk, src, nbytes); in crypto_kw_decrypt() 180 src = req->dst; in crypto_kw_decrypt() 198 struct scatterlist *src, *dst; in crypto_kw_encrypt() local 222 src = req->src; in crypto_kw_encrypt() 229 scatterwalk_start(&src_walk, src); in crypto_kw_encrypt() 252 src = req->dst; in crypto_kw_encrypt()
|
D | des_generic.c | 37 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_encrypt() argument 41 des_encrypt(dctx, dst, src); in crypto_des_encrypt() 44 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_decrypt() argument 48 des_decrypt(dctx, dst, src); in crypto_des_decrypt() 70 const u8 *src) in crypto_des3_ede_encrypt() argument 74 des3_ede_encrypt(dctx, dst, src); in crypto_des3_ede_encrypt() 78 const u8 *src) in crypto_des3_ede_decrypt() argument 82 des3_ede_decrypt(dctx, dst, src); in crypto_des3_ede_decrypt()
|
D | aegis128-neon.c | 13 void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src, 15 void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src, 48 const u8 *src, unsigned int size) in crypto_aegis128_encrypt_chunk_simd() argument 51 crypto_aegis128_encrypt_chunk_neon(state, dst, src, size); in crypto_aegis128_encrypt_chunk_simd() 56 const u8 *src, unsigned int size) in crypto_aegis128_decrypt_chunk_simd() argument 59 crypto_aegis128_decrypt_chunk_neon(state, dst, src, size); in crypto_aegis128_decrypt_chunk_simd()
|
D | nhpoly1305.c | 94 const u8 *src, unsigned int srclen, nh_t nh_fn) in nhpoly1305_units() argument 102 nh_fn(key->nh_key, src, bytes, state->nh_hash); in nhpoly1305_units() 112 nh_fn(&key->nh_key[pos / 4], src, bytes, tmp_hash); in nhpoly1305_units() 120 src += bytes; in nhpoly1305_units() 156 const u8 *src, unsigned int srclen, in crypto_nhpoly1305_update_helper() argument 165 memcpy(&state->buffer[state->buflen], src, bytes); in crypto_nhpoly1305_update_helper() 172 src += bytes; in crypto_nhpoly1305_update_helper() 178 nhpoly1305_units(state, key, src, bytes, nh_fn); in crypto_nhpoly1305_update_helper() 179 src += bytes; in crypto_nhpoly1305_update_helper() 184 memcpy(state->buffer, src, srclen); in crypto_nhpoly1305_update_helper() [all …]
|
D | deflate.c | 176 static int __deflate_compress(const u8 *src, unsigned int slen, in __deflate_compress() argument 189 stream->next_in = (u8 *)src; in __deflate_compress() 205 static int deflate_compress(struct crypto_tfm *tfm, const u8 *src, in deflate_compress() argument 210 return __deflate_compress(src, slen, dst, dlen, dctx); in deflate_compress() 213 static int deflate_scompress(struct crypto_scomp *tfm, const u8 *src, in deflate_scompress() argument 217 return __deflate_compress(src, slen, dst, dlen, ctx); in deflate_scompress() 220 static int __deflate_decompress(const u8 *src, unsigned int slen, in __deflate_decompress() argument 234 stream->next_in = (u8 *)src; in __deflate_decompress() 261 static int deflate_decompress(struct crypto_tfm *tfm, const u8 *src, in deflate_decompress() argument 266 return __deflate_decompress(src, slen, dst, dlen, dctx); in deflate_decompress() [all …]
|
D | ccm.c | 35 struct scatterlist src[3]; member 45 struct scatterlist src[3]; member 193 sg_chain(sg, 3, req->src); in crypto_ccm_auth() 196 sg_chain(sg, 2, req->src); in crypto_ccm_auth() 268 sg_init_table(pctx->src, 3); in crypto_ccm_init_crypt() 269 sg_set_buf(pctx->src, tag, 16); in crypto_ccm_init_crypt() 270 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_ccm_init_crypt() 271 if (sg != pctx->src + 1) in crypto_ccm_init_crypt() 272 sg_chain(pctx->src, 2, sg); in crypto_ccm_init_crypt() 274 if (req->src != req->dst) { in crypto_ccm_init_crypt() [all …]
|
D | gcm.c | 38 struct scatterlist src[3]; member 59 struct scatterlist *src; member 67 struct scatterlist src[3]; member 162 sg_init_table(pctx->src, 3); in crypto_gcm_init_common() 163 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); in crypto_gcm_init_common() 164 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common() 165 if (sg != pctx->src + 1) in crypto_gcm_init_common() 166 sg_chain(pctx->src, 2, sg); in crypto_gcm_init_common() 168 if (req->src != req->dst) { in crypto_gcm_init_common() 186 dst = req->src == req->dst ? pctx->src : pctx->dst; in crypto_gcm_init_crypt() [all …]
|
D | tea.c | 57 static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_encrypt() argument 62 const __le32 *in = (const __le32 *)src; in tea_encrypt() 85 static void tea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_decrypt() argument 90 const __le32 *in = (const __le32 *)src; in tea_decrypt() 130 static void xtea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xtea_encrypt() argument 135 const __le32 *in = (const __le32 *)src; in xtea_encrypt() 151 static void xtea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xtea_decrypt() argument 155 const __le32 *in = (const __le32 *)src; in xtea_decrypt() 174 static void xeta_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xeta_encrypt() argument 179 const __le32 *in = (const __le32 *)src; in xeta_encrypt() [all …]
|
D | ctr.c | 36 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_final() local 41 crypto_xor_cpy(dst, keystream, src, nbytes); in crypto_ctr_crypt_final() 53 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_segment() local 60 crypto_xor(dst, src, bsize); in crypto_ctr_crypt_segment() 65 src += bsize; in crypto_ctr_crypt_segment() 81 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_inplace() local 88 crypto_xor(src, keystream, bsize); in crypto_ctr_crypt_inplace() 93 src += bsize; in crypto_ctr_crypt_inplace() 111 if (walk.src.virt.addr == walk.dst.virt.addr) in crypto_ctr_crypt() 212 skcipher_request_set_crypt(subreq, req->src, req->dst, in crypto_rfc3686_crypt()
|
D | authenc.c | 35 struct scatterlist src[2]; member 186 skcipher_request_set_crypt(skreq, req->src, req->dst, req->assoclen, in crypto_authenc_copy_assoc() 203 struct scatterlist *src, *dst; in crypto_authenc_encrypt() local 206 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt() 207 dst = src; in crypto_authenc_encrypt() 209 if (req->src != req->dst) { in crypto_authenc_encrypt() 220 skcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv); in crypto_authenc_encrypt() 242 struct scatterlist *src, *dst; in crypto_authenc_decrypt_tail() local 244 scatterwalk_map_and_copy(ihash, req->src, ahreq->nbytes, authsize, 0); in crypto_authenc_decrypt_tail() 249 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_decrypt_tail() [all …]
|