/crypto/ |
D | pcbc.c | 25 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment() local 37 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment() 39 return nbytes; in crypto_pcbc_encrypt_segment() 47 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace() local 59 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_inplace() 61 return nbytes; in crypto_pcbc_encrypt_inplace() 69 unsigned int nbytes; in crypto_pcbc_encrypt() local 74 while ((nbytes = walk.nbytes)) { in crypto_pcbc_encrypt() 76 nbytes = crypto_pcbc_encrypt_inplace(req, &walk, in crypto_pcbc_encrypt() 79 nbytes = crypto_pcbc_encrypt_segment(req, &walk, in crypto_pcbc_encrypt() [all …]
|
D | cfb.c | 52 unsigned int nbytes = walk->nbytes; in crypto_cfb_final() local 55 crypto_xor_cpy(dst, stream, src, nbytes); in crypto_cfb_final() 62 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment() local 74 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment() 78 return nbytes; in crypto_cfb_encrypt_segment() 85 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_inplace() local 96 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace() 100 return nbytes; in crypto_cfb_encrypt_inplace() 112 while (walk.nbytes >= bsize) { in crypto_cfb_encrypt() 120 if (walk.nbytes) { in crypto_cfb_encrypt() [all …]
|
D | cbc.c | 22 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_segment() local 40 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_segment() 42 return nbytes; in crypto_cbc_encrypt_segment() 50 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_inplace() local 66 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace() 70 return nbytes; in crypto_cbc_encrypt_inplace() 81 while (walk.nbytes) { in crypto_cbc_encrypt() 97 unsigned int nbytes = walk->nbytes; in crypto_cbc_decrypt_segment() local 115 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_decrypt_segment() 119 return nbytes; in crypto_cbc_decrypt_segment() [all …]
|
D | scatterwalk.c | 18 static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) in memcpy_dir() argument 23 memcpy(dst, src, nbytes); in memcpy_dir() 27 size_t nbytes, int out) in scatterwalk_copychunks() argument 33 if (len_this_page > nbytes) in scatterwalk_copychunks() 34 len_this_page = nbytes; in scatterwalk_copychunks() 44 if (nbytes == len_this_page) in scatterwalk_copychunks() 48 nbytes -= len_this_page; in scatterwalk_copychunks() 56 unsigned int start, unsigned int nbytes, int out) in scatterwalk_map_and_copy() argument 61 if (!nbytes) in scatterwalk_map_and_copy() 67 scatterwalk_copychunks(buf, &walk, nbytes, out); in scatterwalk_map_and_copy()
|
D | ecdh.c | 74 size_t copied, nbytes, public_key_sz; in ecdh_compute_value() local 77 nbytes = ctx->ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecdh_compute_value() 79 public_key_sz = 2 * nbytes; in ecdh_compute_value() 86 shared_secret = kmalloc(nbytes, GFP_KERNEL); in ecdh_compute_value() 113 nbytes = public_key_sz; in ecdh_compute_value() 120 nbytes = min_t(size_t, nbytes, req->dst_len); in ecdh_compute_value() 122 nbytes), in ecdh_compute_value() 123 buf, nbytes); in ecdh_compute_value() 124 if (copied != nbytes) in ecdh_compute_value()
|
D | ctr.c | 38 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_final() local 41 crypto_xor_cpy(dst, keystream, src, nbytes); in crypto_ctr_crypt_final() 55 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_segment() local 67 } while ((nbytes -= bsize) >= bsize); in crypto_ctr_crypt_segment() 69 return nbytes; in crypto_ctr_crypt_segment() 79 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_inplace() local 94 } while ((nbytes -= bsize) >= bsize); in crypto_ctr_crypt_inplace() 96 return nbytes; in crypto_ctr_crypt_inplace() 105 unsigned int nbytes; in crypto_ctr_crypt() local 110 while (walk.nbytes >= bsize) { in crypto_ctr_crypt() [all …]
|
D | chacha_generic.c | 26 while (walk.nbytes > 0) { in chacha_stream_xor() 27 unsigned int nbytes = walk.nbytes; in chacha_stream_xor() local 29 if (nbytes < walk.total) in chacha_stream_xor() 30 nbytes = round_down(nbytes, CHACHA_BLOCK_SIZE); in chacha_stream_xor() 33 walk.src.virt.addr, nbytes, ctx->nrounds); in chacha_stream_xor() 34 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in chacha_stream_xor()
|
D | ofb.c | 28 while (walk.nbytes >= bsize) { in crypto_ofb_crypt() 32 unsigned int nbytes = walk.nbytes; in crypto_ofb_crypt() local 39 } while ((nbytes -= bsize) >= bsize); in crypto_ofb_crypt() 41 err = skcipher_walk_done(&walk, nbytes); in crypto_ofb_crypt() 44 if (walk.nbytes) { in crypto_ofb_crypt() 47 walk.nbytes); in crypto_ofb_crypt()
|
D | shash.c | 270 int nbytes; in shash_ahash_update() local 272 for (nbytes = crypto_hash_walk_first(req, &walk); nbytes > 0; in shash_ahash_update() 273 nbytes = crypto_hash_walk_done(&walk, nbytes)) in shash_ahash_update() 274 nbytes = crypto_shash_update(desc, walk.data, nbytes); in shash_ahash_update() 276 return nbytes; in shash_ahash_update() 293 int nbytes; in shash_ahash_finup() local 295 nbytes = crypto_hash_walk_first(req, &walk); in shash_ahash_finup() 296 if (!nbytes) in shash_ahash_finup() 300 nbytes = crypto_hash_walk_last(&walk) ? in shash_ahash_finup() 301 crypto_shash_finup(desc, walk.data, nbytes, in shash_ahash_finup() [all …]
|
D | keywrap.c | 154 unsigned int nbytes = req->cryptlen; in crypto_kw_decrypt() local 156 while (nbytes) { in crypto_kw_decrypt() 158 crypto_kw_scatterlist_ff(&src_walk, src, nbytes); in crypto_kw_decrypt() 171 crypto_kw_scatterlist_ff(&dst_walk, dst, nbytes); in crypto_kw_decrypt() 176 nbytes -= SEMIBSIZE; in crypto_kw_decrypt() 227 unsigned int nbytes = req->cryptlen; in crypto_kw_encrypt() local 232 while (nbytes) { in crypto_kw_encrypt() 248 nbytes -= SEMIBSIZE; in crypto_kw_encrypt()
|
D | ahash.c | 45 unsigned int nbytes = min(walk->entrylen, in hash_walk_next() local 54 if (nbytes > unaligned) in hash_walk_next() 55 nbytes = unaligned; in hash_walk_next() 58 walk->entrylen -= nbytes; in hash_walk_next() 59 return nbytes; in hash_walk_next() 86 unsigned int nbytes; in crypto_hash_walk_done() local 89 nbytes = min(walk->entrylen, in crypto_hash_walk_done() 91 if (nbytes) { in crypto_hash_walk_done() 92 walk->entrylen -= nbytes; in crypto_hash_walk_done() 94 return nbytes; in crypto_hash_walk_done() [all …]
|
D | salsa20_generic.c | 165 while (walk.nbytes > 0) { in salsa20_crypt() 166 unsigned int nbytes = walk.nbytes; in salsa20_crypt() local 168 if (nbytes < walk.total) in salsa20_crypt() 169 nbytes = round_down(nbytes, walk.stride); in salsa20_crypt() 172 nbytes); in salsa20_crypt() 173 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in salsa20_crypt()
|
D | curve25519-generic.c | 30 int copied, nbytes; in curve25519_compute_value() local 48 nbytes = min_t(size_t, CURVE25519_KEY_SIZE, req->dst_len); in curve25519_compute_value() 50 nbytes), in curve25519_compute_value() 51 buf, nbytes); in curve25519_compute_value() 52 if (copied != nbytes) in curve25519_compute_value()
|
D | ecb.c | 22 unsigned int nbytes; in crypto_ecb_crypt() local 27 while ((nbytes = walk.nbytes) != 0) { in crypto_ecb_crypt() 36 } while ((nbytes -= bsize) >= bsize); in crypto_ecb_crypt() 38 err = skcipher_walk_done(&walk, nbytes); in crypto_ecb_crypt()
|
D | cts.c | 150 unsigned int nbytes = req->cryptlen; in crypto_cts_encrypt() local 155 if (nbytes < bsize) in crypto_cts_encrypt() 158 if (nbytes == bsize) { in crypto_cts_encrypt() 162 skcipher_request_set_crypt(subreq, req->src, req->dst, nbytes, in crypto_cts_encrypt() 167 offset = rounddown(nbytes - 1, bsize); in crypto_cts_encrypt() 244 unsigned int nbytes = req->cryptlen; in crypto_cts_decrypt() local 250 if (nbytes < bsize) in crypto_cts_decrypt() 253 if (nbytes == bsize) { in crypto_cts_decrypt() 257 skcipher_request_set_crypt(subreq, req->src, req->dst, nbytes, in crypto_cts_decrypt() 267 offset = rounddown(nbytes - 1, bsize); in crypto_cts_decrypt()
|
D | skcipher.c | 107 unsigned int n = walk->nbytes; in skcipher_walk_done() 108 unsigned int nbytes = 0; in skcipher_walk_done() local 115 nbytes = walk->total - n; in skcipher_walk_done() 140 nbytes = 0; in skcipher_walk_done() 148 walk->total = nbytes; in skcipher_walk_done() 149 walk->nbytes = 0; in skcipher_walk_done() 153 scatterwalk_done(&walk->in, 0, nbytes); in skcipher_walk_done() 154 scatterwalk_done(&walk->out, 1, nbytes); in skcipher_walk_done() 156 if (nbytes) { in skcipher_walk_done() 280 walk->nbytes = bsize; in skcipher_next_slow() [all …]
|
D | aegis128-core.c | 335 while (walk->nbytes) { in crypto_aegis128_process_crypt() 336 unsigned int nbytes = walk->nbytes; in crypto_aegis128_process_crypt() local 338 if (nbytes < walk->total) in crypto_aegis128_process_crypt() 339 nbytes = round_down(nbytes, walk->stride); in crypto_aegis128_process_crypt() 341 crypt(state, walk->dst.virt.addr, walk->src.virt.addr, nbytes); in crypto_aegis128_process_crypt() 343 err = skcipher_walk_done(walk, walk->nbytes - nbytes); in crypto_aegis128_process_crypt()
|
D | ansi_cprng.c | 181 static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx, in get_prng_bytes() argument 185 unsigned int byte_count = (unsigned int)nbytes; in get_prng_bytes() 201 if (nbytes < DEFAULT_BLK_SZ) in get_prng_bytes() 219 memset(buf, 0, nbytes); in get_prng_bytes() 246 memset(buf, 0, nbytes); in get_prng_bytes()
|
D | arc4.c | 35 while (walk.nbytes > 0) { in crypto_arc4_crypt() 37 walk.nbytes); in crypto_arc4_crypt()
|
D | hmac.c | 106 const u8 *data, unsigned int nbytes) in hmac_update() argument 110 return crypto_shash_update(desc, data, nbytes); in hmac_update() 127 unsigned int nbytes, u8 *out) in hmac_finup() argument 136 return crypto_shash_finup(desc, data, nbytes, out) ?: in hmac_finup()
|
D | crypto_null.c | 83 while (walk.nbytes) { in null_skcipher_crypt() 86 walk.nbytes); in null_skcipher_crypt()
|
D | lrw.c | 168 while (w.nbytes) { in lrw_xor_tweak() 169 unsigned int avail = w.nbytes; in lrw_xor_tweak() 185 if (second_pass && w.nbytes == w.total) { in lrw_xor_tweak()
|
D | xts.c | 100 while (w.nbytes) { in xts_xor_tweak() 101 unsigned int avail = w.nbytes; in xts_xor_tweak() 110 w.total - w.nbytes + avail < 2 * XTS_BLOCK_SIZE) { in xts_xor_tweak()
|
D | ecc.c | 1320 int nbytes; in ecc_is_key_valid() local 1323 nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecc_is_key_valid() 1325 if (private_key_len != nbytes) in ecc_is_key_valid() 1348 unsigned int nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecc_gen_privkey() local 1370 err = crypto_rng_get_bytes(crypto_default_rng, (u8 *)priv, nbytes); in ecc_gen_privkey() 1492 unsigned int nbytes; in crypto_ecdh_shared_secret() local 1501 nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in crypto_ecdh_shared_secret() 1503 get_random_bytes(rand_z, nbytes); in crypto_ecdh_shared_secret()
|
D | algapi.c | 1181 void crypto_stats_ahash_update(unsigned int nbytes, int ret, in crypto_stats_ahash_update() argument 1187 atomic64_add(nbytes, &alg->stats.hash.hash_tlen); in crypto_stats_ahash_update() 1192 void crypto_stats_ahash_final(unsigned int nbytes, int ret, in crypto_stats_ahash_final() argument 1199 atomic64_add(nbytes, &alg->stats.hash.hash_tlen); in crypto_stats_ahash_final()
|