Home
last modified time | relevance | path

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

123

/Linux-v6.6/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()
Dpolyval-generic.c153 const u8 *src, unsigned int srclen) in polyval_update() argument
162 n = min(srclen, dctx->bytes); in polyval_update()
166 srclen -= n; in polyval_update()
175 while (srclen >= POLYVAL_BLOCK_SIZE) { in polyval_update()
180 srclen -= POLYVAL_BLOCK_SIZE; in polyval_update()
183 if (srclen) { in polyval_update()
184 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_update()
186 while (srclen--) in polyval_update()
/Linux-v6.6/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 …]
/Linux-v6.6/arch/powerpc/crypto/
Dpoly1305-p10-glue.c78 const u8 *src, unsigned int srclen) in crypto_poly1305_p10_update() argument
84 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in crypto_poly1305_p10_update()
87 srclen -= bytes; in crypto_poly1305_p10_update()
102 if (likely(srclen >= POLY1305_BLOCK_SIZE)) { in crypto_poly1305_p10_update()
103 bytes = round_down(srclen, POLY1305_BLOCK_SIZE); in crypto_poly1305_p10_update()
106 srclen -= used; in crypto_poly1305_p10_update()
109 if (crypto_simd_usable() && (srclen >= POLY1305_BLOCK_SIZE*4)) { in crypto_poly1305_p10_update()
111 poly1305_p10le_4blocks(&dctx->h, src, srclen); in crypto_poly1305_p10_update()
113 src += srclen - (srclen % (POLY1305_BLOCK_SIZE * 4)); in crypto_poly1305_p10_update()
114 srclen %= POLY1305_BLOCK_SIZE * 4; in crypto_poly1305_p10_update()
[all …]
/Linux-v6.6/drivers/crypto/vmx/
Dghash.c96 const u8 *src, unsigned int srclen) in __ghash_blocks() argument
103 src, srclen); in __ghash_blocks()
108 while (srclen >= GHASH_BLOCK_SIZE) { in __ghash_blocks()
111 srclen -= GHASH_BLOCK_SIZE; in __ghash_blocks()
118 const u8 *src, unsigned int srclen) in p8_ghash_update() argument
125 if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { in p8_ghash_update()
127 srclen); in p8_ghash_update()
128 dctx->bytes += srclen; in p8_ghash_update()
137 srclen -= GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
140 len = srclen & ~(GHASH_DIGEST_SIZE - 1); in p8_ghash_update()
[all …]
/Linux-v6.6/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 …]
/Linux-v6.6/arch/arm/crypto/
Dnhpoly1305-neon-glue.c20 const u8 *src, unsigned int srclen) in nhpoly1305_neon_update() argument
22 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_neon_update()
23 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_neon_update()
26 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_neon_update()
32 srclen -= n; in nhpoly1305_neon_update()
33 } while (srclen); in nhpoly1305_neon_update()
/Linux-v6.6/arch/x86/crypto/
Dnhpoly1305-avx2-glue.c20 const u8 *src, unsigned int srclen) in nhpoly1305_avx2_update() argument
22 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_avx2_update()
23 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_avx2_update()
26 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_avx2_update()
32 srclen -= n; in nhpoly1305_avx2_update()
33 } while (srclen); in nhpoly1305_avx2_update()
Dnhpoly1305-sse2-glue.c20 const u8 *src, unsigned int srclen) in nhpoly1305_sse2_update() argument
22 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_sse2_update()
23 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_sse2_update()
26 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_sse2_update()
32 srclen -= n; in nhpoly1305_sse2_update()
33 } while (srclen); in nhpoly1305_sse2_update()
Dpolyval-clmulni_glue.c111 const u8 *src, unsigned int srclen) in polyval_x86_update() argument
120 n = min(srclen, dctx->bytes); in polyval_x86_update()
124 srclen -= n; in polyval_x86_update()
134 while (srclen >= POLYVAL_BLOCK_SIZE) { in polyval_x86_update()
136 nblocks = min(srclen, 4096U) / POLYVAL_BLOCK_SIZE; in polyval_x86_update()
138 srclen -= nblocks * POLYVAL_BLOCK_SIZE; in polyval_x86_update()
142 if (srclen) { in polyval_x86_update()
143 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_x86_update()
145 while (srclen--) in polyval_x86_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.c29 void clmul_ghash_update(char *dst, const char *src, unsigned int srclen,
96 const u8 *src, unsigned int srclen) in ghash_update() argument
104 int n = min(srclen, dctx->bytes); in ghash_update()
108 srclen -= n; in ghash_update()
117 clmul_ghash_update(dst, src, srclen, &ctx->shash); in ghash_update()
120 if (srclen & 0xf) { in ghash_update()
121 src += srclen - (srclen & 0xf); in ghash_update()
122 srclen &= 0xf; in ghash_update()
123 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
124 while (srclen--) in ghash_update()
/Linux-v6.6/arch/arm64/crypto/
Dnhpoly1305-neon-glue.c20 const u8 *src, unsigned int srclen) in nhpoly1305_neon_update() argument
22 if (srclen < 64 || !crypto_simd_usable()) in nhpoly1305_neon_update()
23 return crypto_nhpoly1305_update(desc, src, srclen); in nhpoly1305_neon_update()
26 unsigned int n = min_t(unsigned int, srclen, SZ_4K); in nhpoly1305_neon_update()
32 srclen -= n; in nhpoly1305_neon_update()
33 } while (srclen); in nhpoly1305_neon_update()
Dpolyval-ce-glue.c102 const u8 *src, unsigned int srclen) in polyval_arm64_update() argument
111 n = min(srclen, dctx->bytes); in polyval_arm64_update()
115 srclen -= n; in polyval_arm64_update()
125 while (srclen >= POLYVAL_BLOCK_SIZE) { in polyval_arm64_update()
127 nblocks = min(srclen, 4096U) / POLYVAL_BLOCK_SIZE; in polyval_arm64_update()
129 srclen -= nblocks * POLYVAL_BLOCK_SIZE; in polyval_arm64_update()
133 if (srclen) { in polyval_arm64_update()
134 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_arm64_update()
136 while (srclen--) in polyval_arm64_update()
/Linux-v6.6/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()
/Linux-v6.6/tools/testing/selftests/powerpc/nx-gzip/
Dgzfht_test.c79 static int compress_fht_sample(char *src, uint32_t srclen, char *dst, in compress_fht_sample() argument
110 put32(cmdp->crb.source_dde, ddebc, srclen); in compress_fht_sample()
192 uint32_t srclen, dstlen; in compress_file() local
252 srclen = NX_MIN(chunk, inlen); in compress_file()
254 dstlen = NX_MIN(2*srclen, outlen); in compress_file()
265 nxu_touch_pages(srcbuf, srclen, pagelen, 0); in compress_file()
269 srcbuf, srclen, in compress_file()
297 inlen = inlen - srclen; in compress_file()
298 srcbuf = srcbuf + srclen; in compress_file()
299 srctotlen = srctotlen + srclen; in compress_file()
[all …]
/Linux-v6.6/lib/
Dbase64.c32 int base64_encode(const u8 *src, int srclen, char *dst) in base64_encode() argument
39 for (i = 0; i < srclen; i++) { in base64_encode()
73 int base64_decode(const char *src, int srclen, u8 *dst) in base64_decode() argument
80 for (i = 0; i < srclen; i++) { in base64_decode()
Dnlattr.c748 size_t srclen = nla_len(nla); in nla_strscpy() local
756 if (srclen > 0 && src[srclen - 1] == '\0') in nla_strscpy()
757 srclen--; in nla_strscpy()
759 if (srclen >= dstsize) { in nla_strscpy()
763 len = srclen; in nla_strscpy()
784 size_t srclen = nla_len(nla); in nla_strdup() local
787 if (srclen > 0 && src[srclen - 1] == '\0') in nla_strdup()
788 srclen--; in nla_strdup()
790 dst = kmalloc(srclen + 1, flags); in nla_strdup()
792 memcpy(dst, src, srclen); in nla_strdup()
[all …]
/Linux-v6.6/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()
/Linux-v6.6/fs/btrfs/
Dzlib.c279 size_t srclen = cb->compressed_len; in zlib_decompress_bio() local
280 unsigned long total_pages_in = DIV_ROUND_UP(srclen, PAGE_SIZE); in zlib_decompress_bio()
286 workspace->strm.avail_in = min_t(size_t, srclen, PAGE_SIZE); in zlib_decompress_bio()
295 if (srclen > 2 && !(data_in[1] & PRESET_DICT) && in zlib_decompress_bio()
309 while (workspace->strm.total_in < srclen) { in zlib_decompress_bio()
341 tmp = srclen - workspace->strm.total_in; in zlib_decompress_bio()
357 struct page *dest_page, unsigned long start_byte, size_t srclen, in zlib_decompress() argument
371 workspace->strm.avail_in = srclen; in zlib_decompress()
379 if (srclen > 2 && !(data_in[1] & PRESET_DICT) && in zlib_decompress()
Dcompression.h86 unsigned long start_byte, size_t srclen, size_t destlen);
146 struct page *dest_page, unsigned long start_byte, size_t srclen,
157 struct page *dest_page, unsigned long start_byte, size_t srclen,
167 struct page *dest_page, unsigned long start_byte, size_t srclen,
/Linux-v6.6/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);

123