| /crypto/ |
| A D | pcbc.c | 26 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment() local 39 return nbytes; in crypto_pcbc_encrypt_segment() 47 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace() local 61 return nbytes; in crypto_pcbc_encrypt_inplace() 69 unsigned int nbytes; in crypto_pcbc_encrypt() local 74 while (walk.nbytes) { in crypto_pcbc_encrypt() 93 unsigned int nbytes = walk->nbytes; in crypto_pcbc_decrypt_segment() local 106 return nbytes; in crypto_pcbc_decrypt_segment() 114 unsigned int nbytes = walk->nbytes; in crypto_pcbc_decrypt_inplace() local 128 return nbytes; in crypto_pcbc_decrypt_inplace() [all …]
|
| A D | xctr.c | 40 unsigned int nbytes = walk->nbytes; in crypto_xctr_crypt_final() local 45 crypto_xor_cpy(dst, keystream, src, nbytes); in crypto_xctr_crypt_final() 56 unsigned int nbytes = walk->nbytes; in crypto_xctr_crypt_segment() local 71 return nbytes; in crypto_xctr_crypt_segment() 80 unsigned int nbytes = walk->nbytes; in crypto_xctr_crypt_inplace() local 97 return nbytes; in crypto_xctr_crypt_inplace() 105 unsigned int nbytes; in crypto_xctr_crypt() local 111 while (walk.nbytes >= XCTR_BLOCKSIZE) { in crypto_xctr_crypt() 119 byte_ctr += walk.nbytes - nbytes; in crypto_xctr_crypt() 120 err = skcipher_walk_done(&walk, nbytes); in crypto_xctr_crypt() [all …]
|
| A D | scatterwalk.c | 40 nbytes -= sg->length; in scatterwalk_skip() 58 nbytes -= to_copy; in memcpy_from_scatterwalk() 59 } while (nbytes); in memcpy_from_scatterwalk() 73 nbytes -= to_copy; in memcpy_to_scatterwalk() 74 } while (nbytes); in memcpy_to_scatterwalk() 112 walk.total = nbytes; in memcpy_sglist() 121 walk.nbytes); in memcpy_sglist() 123 } while (walk.nbytes); in memcpy_sglist() 174 walk->nbytes = bsize; in skcipher_next_slow() 234 walk->nbytes = n; in skcipher_walk_next() [all …]
|
| A D | cbc.c | 21 for (; nbytes >= bsize; src += bsize, dst += bsize, nbytes -= bsize) { in crypto_cbc_encrypt_segment() 27 return nbytes; in crypto_cbc_encrypt_segment() 36 if (nbytes < bsize) in crypto_cbc_encrypt_inplace() 45 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace() 50 return nbytes; in crypto_cbc_encrypt_inplace() 76 if (nbytes < bsize) in crypto_cbc_decrypt_segment() 91 return nbytes; in crypto_cbc_decrypt_segment() 100 if (nbytes < bsize) in crypto_cbc_decrypt_inplace() 104 src += nbytes - (nbytes & (bsize - 1)) - bsize; in crypto_cbc_decrypt_inplace() 109 if ((nbytes -= bsize) < bsize) in crypto_cbc_decrypt_inplace() [all …]
|
| A D | ctr.c | 38 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_final() local 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() 116 err = skcipher_walk_done(&walk, nbytes); in crypto_ctr_crypt() [all …]
|
| A D | ahash.c | 82 return nbytes; in hash_walk_next() 174 int nbytes; in shash_ahash_update() local 176 for (nbytes = crypto_hash_walk_first(req, &walk); nbytes > 0; in shash_ahash_update() 177 nbytes = crypto_hash_walk_done(&walk, nbytes)) in shash_ahash_update() 178 nbytes = crypto_shash_update(desc, walk.data, nbytes); in shash_ahash_update() 180 return nbytes; in shash_ahash_update() 187 int nbytes; in shash_ahash_finup() local 190 if (!nbytes) in shash_ahash_finup() 198 nbytes = crypto_hash_walk_done(&walk, nbytes); in shash_ahash_finup() 201 return nbytes; in shash_ahash_finup() [all …]
|
| A D | ecdh.c | 62 size_t copied, nbytes, public_key_sz; in ecdh_compute_value() local 65 nbytes = ctx->ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecdh_compute_value() 67 public_key_sz = 2 * nbytes; in ecdh_compute_value() 74 shared_secret = kmalloc(nbytes, GFP_KERNEL); in ecdh_compute_value() 101 nbytes = public_key_sz; in ecdh_compute_value() 108 nbytes = min_t(size_t, nbytes, req->dst_len); in ecdh_compute_value() 110 nbytes), in ecdh_compute_value() 111 buf, nbytes); in ecdh_compute_value() 112 if (copied != nbytes) in ecdh_compute_value()
|
| A D | chacha.c | 60 while (walk.nbytes > 0) { in chacha_stream_xor() 61 unsigned int nbytes = walk.nbytes; in chacha_stream_xor() local 63 if (nbytes < walk.total) in chacha_stream_xor() 64 nbytes = round_down(nbytes, CHACHA_BLOCK_SIZE); in chacha_stream_xor() 68 walk.src.virt.addr, nbytes, ctx->nrounds); in chacha_stream_xor() 71 walk.src.virt.addr, nbytes, in chacha_stream_xor() 73 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in chacha_stream_xor()
|
| A 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()
|
| A 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()
|
| A D | jitterentropy-testing.c | 181 size_t nbytes, loff_t *ppos, in jent_testing_extract_user() argument 185 int ret = 0, large_request = (nbytes > 256); in jent_testing_extract_user() 187 if (!nbytes) in jent_testing_extract_user() 204 while (nbytes) { in jent_testing_extract_user() 216 i = min_t(int, nbytes, 125 * sizeof(u64)); in jent_testing_extract_user() 228 nbytes -= i; in jent_testing_extract_user()
|
| A D | ecb.c | 17 u8 *dst, unsigned nbytes, bool final, in crypto_ecb_crypt() argument 22 while (nbytes >= bsize) { in crypto_ecb_crypt() 28 nbytes -= bsize; in crypto_ecb_crypt() 31 return nbytes && final ? -EINVAL : nbytes; in crypto_ecb_crypt()
|
| A D | aegis128-core.c | 329 while (walk->nbytes) { in crypto_aegis128_process_crypt() 330 unsigned int nbytes = walk->nbytes; in crypto_aegis128_process_crypt() local 332 if (nbytes < walk->total) in crypto_aegis128_process_crypt() 333 nbytes = round_down(nbytes, walk->stride); in crypto_aegis128_process_crypt() 335 crypt(state, walk->dst.virt.addr, walk->src.virt.addr, nbytes); in crypto_aegis128_process_crypt() 337 err = skcipher_walk_done(walk, walk->nbytes - nbytes); in crypto_aegis128_process_crypt()
|
| A 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()
|
| A D | hmac.c | 123 const u8 *data, unsigned int nbytes) in hmac_update() argument 127 return crypto_shash_update(desc, data, nbytes); in hmac_update() 131 unsigned int nbytes, u8 *out) in hmac_finup() argument 141 return crypto_shash_finup(desc, data, nbytes, out) ?: in hmac_finup() 348 ahash_request_set_virt(req, preq->svirt, NULL, preq->nbytes); in hmac_update_ahash() 350 ahash_request_set_crypt(req, preq->src, NULL, preq->nbytes); in hmac_update_ahash() 394 preq->nbytes); in hmac_finup_ahash() 397 preq->nbytes); in hmac_finup_ahash()
|
| A D | arc4.c | 28 u8 *dst, unsigned nbytes, u8 *siv, u32 flags) in crypto_arc4_crypt() argument 37 arc4_crypt(ctx, dst, src, nbytes); in crypto_arc4_crypt()
|
| A D | shash.c | 143 unsigned int nbytes = len - nonzero; in crypto_shash_finup() local 148 nbytes = bs; in crypto_shash_finup() 152 err = crypto_shash_alg(tfm)->update(desc, src, nbytes); in crypto_shash_finup() 156 data += nbytes - err - *blenp; in crypto_shash_finup() 157 len -= nbytes - err - *blenp; in crypto_shash_finup()
|
| A 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()
|
| A D | ecc.c | 71 void ecc_digits_from_bytes(const u8 *in, unsigned int nbytes, in ecc_digits_from_bytes() argument 74 int diff = ndigits - DIV_ROUND_UP_POW2(nbytes, sizeof(u64)); in ecc_digits_from_bytes() 75 unsigned int o = nbytes & 7; in ecc_digits_from_bytes() 1503 int nbytes; in ecc_is_key_valid() local 1506 nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecc_is_key_valid() 1508 if (private_key_len != nbytes) in ecc_is_key_valid() 1526 unsigned int nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecc_gen_privkey() local 1553 (u8 *)private_key, nbytes); in ecc_gen_privkey() 1669 unsigned int nbytes; in crypto_ecdh_shared_secret() local 1677 nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in crypto_ecdh_shared_secret() [all …]
|
| A 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()
|
| A D | lskcipher.c | 187 while (walk.nbytes) { in crypto_lskcipher_crypt_sg() 189 walk.nbytes, ivs, in crypto_lskcipher_crypt_sg() 190 flags & ~(walk.nbytes == walk.total ? in crypto_lskcipher_crypt_sg()
|
| A D | skcipher.c | 49 walk->nbytes = 0; in skcipher_walk_virt() 80 walk->nbytes = 0; in skcipher_walk_aead_common()
|
| A D | authenc.c | 220 scatterwalk_map_and_copy(ihash, req->src, ahreq->nbytes, authsize, 0); in crypto_authenc_decrypt_tail()
|
| A D | krb5enc.c | 256 scatterwalk_map_and_copy(msg_hash, req->src, ahreq->nbytes, authsize, 0); in krb5enc_verify_hash()
|
| A D | gcm.c | 931 unsigned int nbytes = req->assoclen + req->cryptlen - in crypto_rfc4543_crypt() local 934 memcpy_sglist(req->dst, req->src, nbytes); in crypto_rfc4543_crypt()
|