/crypto/ |
D | cbc.c | 20 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_segment() local 34 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment() 36 memcpy(iv, dst, bsize); in crypto_cbc_encrypt_segment() 38 src += bsize; in crypto_cbc_encrypt_segment() 39 dst += bsize; in crypto_cbc_encrypt_segment() 40 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_segment() 48 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_inplace() local 61 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace() 65 src += bsize; in crypto_cbc_encrypt_inplace() 66 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace() [all …]
|
D | pcbc.c | 24 int bsize = crypto_cipher_blocksize(tfm); 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() 36 dst += bsize; in crypto_pcbc_encrypt_segment() 37 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment() 46 int bsize = crypto_cipher_blocksize(tfm); 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() 56 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() [all …]
|
D | cfb.c | 61 const unsigned int bsize = crypto_cfb_bsize(tfm); 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() 73 dst += bsize; in crypto_cfb_encrypt_segment() 74 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment() 76 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_segment() 84 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_inplace() local 92 crypto_xor(src, tmp, bsize); in crypto_cfb_encrypt_inplace() 95 src += bsize; in crypto_cfb_encrypt_inplace() 96 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace() [all …]
|
D | cts.c | 103 int bsize = crypto_skcipher_blocksize(tfm); in cts_cbc_encrypt() local 112 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt() 113 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt() 115 memset(d, 0, bsize); in cts_cbc_encrypt() 118 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt() 124 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt() 149 int bsize = crypto_skcipher_blocksize(tfm); in crypto_cts_encrypt() local 155 if (nbytes < bsize) in crypto_cts_encrypt() 158 if (nbytes == bsize) { in crypto_cts_encrypt() 167 offset = rounddown(nbytes - 1, bsize); in crypto_cts_encrypt() [all …]
|
D | ctr.c | 31 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() local 43 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_final() 51 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() local 60 crypto_xor(dst, src, bsize); in crypto_ctr_crypt_segment() 63 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_segment() 65 src += bsize; in crypto_ctr_crypt_segment() 66 dst += bsize; in crypto_ctr_crypt_segment() 67 } while ((nbytes -= bsize) >= bsize); in crypto_ctr_crypt_segment() 77 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_inplace() local 88 crypto_xor(src, keystream, bsize); in crypto_ctr_crypt_inplace() [all …]
|
D | ofb.c | 22 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ofb_crypt() local 28 while (walk.nbytes >= bsize) { in crypto_ofb_crypt() 36 crypto_xor_cpy(dst, src, iv, bsize); in crypto_ofb_crypt() 37 dst += bsize; in crypto_ofb_crypt() 38 src += bsize; in crypto_ofb_crypt() 39 } while ((nbytes -= bsize) >= bsize); in crypto_ofb_crypt()
|
D | ecb.c | 20 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt() local 34 src += bsize; in crypto_ecb_crypt() 35 dst += bsize; in crypto_ecb_crypt() 36 } while ((nbytes -= bsize) >= bsize); in crypto_ecb_crypt()
|
D | skcipher.c | 94 static int skcipher_done_slow(struct skcipher_walk *walk, unsigned int bsize) in skcipher_done_slow() argument 99 addr = skcipher_get_spot(addr, bsize); in skcipher_done_slow() 100 scatterwalk_copychunks(addr, &walk->out, bsize, in skcipher_done_slow() 225 static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize) in skcipher_next_slow() argument 245 n = bsize; in skcipher_next_slow() 257 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow() 265 p->len = bsize; in skcipher_next_slow() 275 walk->dst.virt.addr = skcipher_get_spot(walk->dst.virt.addr, bsize); in skcipher_next_slow() 278 scatterwalk_copychunks(walk->src.virt.addr, &walk->in, bsize, 0); in skcipher_next_slow() 280 walk->nbytes = bsize; in skcipher_next_slow() [all …]
|
D | lrw.c | 73 int err, bsize = LRW_BLOCK_SIZE; in lrw_setkey() local 74 const u8 *tweak = key + keylen - bsize; in lrw_setkey() 81 err = crypto_skcipher_setkey(child, key, keylen - bsize); in lrw_setkey()
|