Home
last modified time | relevance | path

Searched refs:srclen (Results 1 – 25 of 46) sorted by relevance

12

/kernel/linux/linux-5.10/crypto/
Dpoly1305_generic.c35 const u8 *src, unsigned int srclen) in crypto_poly1305_setdesckey() argument
38 if (!dctx->rset && srclen >= POLY1305_BLOCK_SIZE) { in crypto_poly1305_setdesckey()
41 srclen -= POLY1305_BLOCK_SIZE; in crypto_poly1305_setdesckey()
44 if (srclen >= POLY1305_BLOCK_SIZE) { in crypto_poly1305_setdesckey()
50 srclen -= POLY1305_BLOCK_SIZE; in crypto_poly1305_setdesckey()
54 return srclen; in crypto_poly1305_setdesckey()
58 unsigned int srclen) in poly1305_blocks() argument
63 datalen = crypto_poly1305_setdesckey(dctx, src, srclen); in poly1305_blocks()
64 src += srclen - datalen; in poly1305_blocks()
65 srclen = datalen; in poly1305_blocks()
[all …]
Dnhpoly1305.c94 const u8 *src, unsigned int srclen, nh_t nh_fn) in nhpoly1305_units() argument
101 bytes = min_t(unsigned int, srclen, NH_MESSAGE_BYTES); in nhpoly1305_units()
111 bytes = min(srclen, state->nh_remaining); in nhpoly1305_units()
121 srclen -= bytes; in nhpoly1305_units()
122 } while (srclen); in nhpoly1305_units()
156 const u8 *src, unsigned int srclen, in crypto_nhpoly1305_update_helper() argument
164 bytes = min(srclen, (int)NH_MESSAGE_UNIT - state->buflen); in crypto_nhpoly1305_update_helper()
173 srclen -= bytes; in crypto_nhpoly1305_update_helper()
176 if (srclen >= NH_MESSAGE_UNIT) { in crypto_nhpoly1305_update_helper()
177 bytes = round_down(srclen, NH_MESSAGE_UNIT); in crypto_nhpoly1305_update_helper()
[all …]
Dghash-generic.c79 const u8 *src, unsigned int srclen) in ghash_update() argument
86 int n = min(srclen, dctx->bytes); in ghash_update()
90 srclen -= n; in ghash_update()
99 while (srclen >= GHASH_BLOCK_SIZE) { in ghash_update()
103 srclen -= GHASH_BLOCK_SIZE; in ghash_update()
106 if (srclen) { in ghash_update()
107 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
108 while (srclen--) in ghash_update()
/kernel/linux/linux-5.10/fs/hfs/
Dtrans.c39 int srclen, dstlen, size; in hfs_mac2asc() local
42 srclen = in->len; in hfs_mac2asc()
43 if (srclen > HFS_NAMELEN) in hfs_mac2asc()
44 srclen = HFS_NAMELEN; in hfs_mac2asc()
50 while (srclen > 0) { in hfs_mac2asc()
52 size = nls_disk->char2uni(src, srclen, &ch); in hfs_mac2asc()
58 srclen -= size; in hfs_mac2asc()
61 srclen--; in hfs_mac2asc()
78 while (--srclen >= 0) in hfs_mac2asc()
103 int srclen, dstlen, size; in hfs_asc2mac() local
[all …]
/kernel/linux/linux-5.10/drivers/crypto/vmx/
Dghash.c95 const u8 *src, unsigned int srclen) in __ghash_blocks() argument
102 src, srclen); in __ghash_blocks()
107 while (srclen >= GHASH_BLOCK_SIZE) { in __ghash_blocks()
110 srclen -= GHASH_BLOCK_SIZE; in __ghash_blocks()
117 const u8 *src, unsigned int srclen) in p8_ghash_update() argument
124 if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { in p8_ghash_update()
126 srclen); in p8_ghash_update()
127 dctx->bytes += srclen; in p8_ghash_update()
136 srclen -= GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
139 len = srclen & ~(GHASH_DIGEST_SIZE - 1); in p8_ghash_update()
[all …]
/kernel/linux/linux-5.10/net/core/
Dutils.c118 int in4_pton(const char *src, int srclen, in in4_pton() argument
129 if (srclen < 0) in in4_pton()
130 srclen = strlen(src); in in4_pton()
136 c = xdigit2bin(srclen > 0 ? *s : '\0', delim); in in4_pton()
161 srclen--; in in4_pton()
184 int in6_pton(const char *src, int srclen, in in6_pton() argument
200 if (srclen < 0) in in6_pton()
201 srclen = strlen(src); in in6_pton()
206 c = xdigit2bin(srclen > 0 ? *s : '\0', delim); in in6_pton()
249 ret = in4_pton(tok ? tok : s, srclen + (int)(s - tok), d, delim, &s); in in6_pton()
[all …]
/kernel/linux/linux-5.10/arch/arm64/crypto/
Dnhpoly1305-neon-glue.c27 const u8 *src, unsigned int srclen) in nhpoly1305_neon_update() argument
29 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_neon_update()
30 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_neon_update()
33 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_neon_update()
39 srclen -= n; in nhpoly1305_neon_update()
40 } while (srclen); in nhpoly1305_neon_update()
/kernel/linux/linux-5.10/arch/x86/crypto/
Dnhpoly1305-sse2-glue.c27 const u8 *src, unsigned int srclen) in nhpoly1305_sse2_update() argument
29 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_sse2_update()
30 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_sse2_update()
33 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_sse2_update()
39 srclen -= n; in nhpoly1305_sse2_update()
40 } while (srclen); in nhpoly1305_sse2_update()
Dnhpoly1305-avx2-glue.c27 const u8 *src, unsigned int srclen) in nhpoly1305_avx2_update() argument
29 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_avx2_update()
30 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_avx2_update()
33 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_avx2_update()
39 srclen -= n; in nhpoly1305_avx2_update()
40 } while (srclen); in nhpoly1305_avx2_update()
Dpoly1305_glue.c169 unsigned int srclen) in poly1305_update_arch() argument
174 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in poly1305_update_arch()
177 srclen -= bytes; in poly1305_update_arch()
187 if (likely(srclen >= POLY1305_BLOCK_SIZE)) { in poly1305_update_arch()
188 bytes = round_down(srclen, POLY1305_BLOCK_SIZE); in poly1305_update_arch()
189 srclen -= bytes; in poly1305_update_arch()
196 if (unlikely(srclen)) { in poly1305_update_arch()
197 dctx->buflen = srclen; in poly1305_update_arch()
198 memcpy(dctx->buf, src, srclen); in poly1305_update_arch()
226 const u8 *src, unsigned int srclen) in crypto_poly1305_update() argument
[all …]
Dghash-clmulni-intel_glue.c28 void clmul_ghash_update(char *dst, const char *src, unsigned int srclen,
77 const u8 *src, unsigned int srclen) in ghash_update() argument
85 int n = min(srclen, dctx->bytes); in ghash_update()
89 srclen -= n; in ghash_update()
98 clmul_ghash_update(dst, src, srclen, &ctx->shash); in ghash_update()
101 if (srclen & 0xf) { in ghash_update()
102 src += srclen - (srclen & 0xf); in ghash_update()
103 srclen &= 0xf; in ghash_update()
104 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
105 while (srclen--) in ghash_update()
/kernel/linux/linux-5.10/arch/arm/crypto/
Dnhpoly1305-neon-glue.c27 const u8 *src, unsigned int srclen) in nhpoly1305_neon_update() argument
29 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_neon_update()
30 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_neon_update()
33 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_neon_update()
39 srclen -= n; in nhpoly1305_neon_update()
40 } while (srclen); in nhpoly1305_neon_update()
Dpoly1305-glue.c116 const u8 *src, unsigned int srclen) in arm_poly1305_update() argument
120 arm_poly1305_do_update(dctx, src, srclen, false); in arm_poly1305_update()
126 unsigned int srclen) in arm_poly1305_update_neon() argument
129 bool do_neon = crypto_simd_usable() && srclen > 128; in arm_poly1305_update_neon()
133 arm_poly1305_do_update(dctx, src, srclen, do_neon); in arm_poly1305_update_neon()
/kernel/linux/linux-5.10/arch/s390/crypto/
Dghash_s390.c55 const u8 *src, unsigned int srclen) in ghash_update() argument
64 n = min(srclen, dctx->bytes); in ghash_update()
66 srclen -= n; in ghash_update()
77 n = srclen & ~(GHASH_BLOCK_SIZE - 1); in ghash_update()
81 srclen -= n; in ghash_update()
84 if (srclen) { in ghash_update()
85 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
86 memcpy(buf, src, srclen); in ghash_update()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/nx-gzip/
Dgzfht_test.c76 static int compress_fht_sample(char *src, uint32_t srclen, char *dst, in compress_fht_sample() argument
107 put32(cmdp->crb.source_dde, ddebc, srclen); in compress_fht_sample()
237 uint32_t srclen, dstlen; in compress_file() local
287 srclen = NX_MIN(chunk, inlen); in compress_file()
289 dstlen = NX_MIN(2*srclen, outlen); in compress_file()
300 nxu_touch_pages(srcbuf, srclen, pagelen, 0); in compress_file()
304 srcbuf, srclen, in compress_file()
332 inlen = inlen - srclen; in compress_file()
333 srcbuf = srcbuf + srclen; in compress_file()
334 srctotlen = srctotlen + srclen; in compress_file()
[all …]
/kernel/linux/linux-5.10/fs/btrfs/
Dlzo.c288 size_t srclen = cb->compressed_len; in lzo_decompress_bio() local
289 unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE); in lzo_decompress_bio()
318 if (tot_len > min_t(size_t, BTRFS_MAX_COMPRESSED, srclen) || in lzo_decompress_bio()
319 tot_len < srclen - PAGE_SIZE) { in lzo_decompress_bio()
424 struct page *dest_page, unsigned long start_byte, size_t srclen, in lzo_decompress() argument
435 if (srclen < LZO_LEN || srclen > max_segment_len + LZO_LEN * 2) in lzo_decompress()
439 if (in_len != srclen) in lzo_decompress()
444 if (in_len != srclen - LZO_LEN * 2) { in lzo_decompress()
Dzlib.c285 size_t srclen = cb->compressed_len; in zlib_decompress_bio() local
286 unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE); in zlib_decompress_bio()
294 workspace->strm.avail_in = min_t(size_t, srclen, PAGE_SIZE); in zlib_decompress_bio()
303 if (srclen > 2 && !(data_in[1] & PRESET_DICT) && in zlib_decompress_bio()
317 while (workspace->strm.total_in < srclen) { in zlib_decompress_bio()
350 tmp = srclen - workspace->strm.total_in; in zlib_decompress_bio()
369 struct page *dest_page, unsigned long start_byte, size_t srclen, in zlib_decompress() argument
384 workspace->strm.avail_in = srclen; in zlib_decompress()
392 if (srclen > 2 && !(data_in[1] & PRESET_DICT) && in zlib_decompress()
Dcompression.h88 unsigned long start_byte, size_t srclen, size_t destlen);
152 struct page *dest_page, unsigned long start_byte, size_t srclen,
163 struct page *dest_page, unsigned long start_byte, size_t srclen,
173 struct page *dest_page, unsigned long start_byte, size_t srclen,
Dzstd.c552 size_t srclen = cb->compressed_len; in zstd_decompress_bio() local
556 unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE); in zstd_decompress_bio()
570 workspace->in_buf.size = min_t(size_t, srclen, PAGE_SIZE); in zstd_decompress_bio()
596 if (workspace->in_buf.pos >= srclen) in zstd_decompress_bio()
610 srclen -= PAGE_SIZE; in zstd_decompress_bio()
613 workspace->in_buf.size = min_t(size_t, srclen, PAGE_SIZE); in zstd_decompress_bio()
625 struct page *dest_page, unsigned long start_byte, size_t srclen, in zstd_decompress() argument
648 workspace->in_buf.size = srclen; in zstd_decompress()
/kernel/linux/linux-5.10/fs/cramfs/
Duncompress.c31 int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen) in cramfs_uncompress_block() argument
36 stream.avail_in = srclen; in cramfs_uncompress_block()
55 pr_err("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen); in cramfs_uncompress_block()
/kernel/linux/linux-5.10/lib/
Dnlattr.c725 size_t srclen = nla_len(nla); in nla_strlcpy() local
728 if (srclen > 0 && src[srclen - 1] == '\0') in nla_strlcpy()
729 srclen--; in nla_strlcpy()
732 size_t len = (srclen >= dstsize) ? dstsize - 1 : srclen; in nla_strlcpy()
738 return srclen; in nla_strlcpy()
751 size_t srclen = nla_len(nla); in nla_strdup() local
754 if (srclen > 0 && src[srclen - 1] == '\0') in nla_strdup()
755 srclen--; in nla_strdup()
757 dst = kmalloc(srclen + 1, flags); in nla_strdup()
759 memcpy(dst, src, srclen); in nla_strdup()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dsw842.h7 int sw842_compress(const u8 *src, unsigned int srclen,
10 int sw842_decompress(const u8 *src, unsigned int srclen,
Dinet.h53 extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
54 extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
/kernel/linux/linux-5.10/drivers/crypto/cavium/nitrox/
Dnitrox_aead.c177 rctx->srclen); in nitrox_set_creq()
230 rctx->srclen = areq->assoclen + areq->cryptlen; in nitrox_aes_gcm_enc()
231 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc()
264 rctx->srclen = areq->cryptlen + areq->assoclen; in nitrox_aes_gcm_dec()
265 rctx->dstlen = rctx->srclen - aead->authsize; in nitrox_aes_gcm_dec()
452 aead_rctx->srclen = aead_rctx->assoclen + aead_rctx->cryptlen; in nitrox_rfc4106_enc()
453 aead_rctx->dstlen = aead_rctx->srclen + aead->authsize; in nitrox_rfc4106_enc()
484 aead_rctx->srclen = in nitrox_rfc4106_dec()
486 aead_rctx->dstlen = aead_rctx->srclen - aead->authsize; in nitrox_rfc4106_dec()
/kernel/linux/linux-5.10/include/crypto/
Dnhpoly1305.h66 const u8 *src, unsigned int srclen);
68 const u8 *src, unsigned int srclen,

12