Re: [PATCH v4 1/8] crypto: xctr - Add XCTR support

Eric Biggers
2022-04-18T19:04:47Z

On Tue, Apr 12, 2022 at 05:28:09PM +0000, Nathan Huckleberry wrote:
> +// Limited to 16-byte blocks for simplicity
> +#define XCTR_BLOCKSIZE 16

Make it clear that this is talking about the current implementation, not XCTR
itself. E.g.:

/* For now this implementation is limited to 16-byte blocks for simplicity. */
#define XCTR_BLOCKSIZE 16

> +static int crypto_xctr_crypt_segment(struct skcipher_walk *walk,
> + struct crypto_cipher *tfm, u32 byte_ctr)
> +{
> + void (*fn)(struct crypto_tfm *, u8 *, const u8 *) =
> + crypto_cipher_alg(tfm)->cia_encrypt;
> + u8 *src = walk->src.virt.addr;
> + u8 *dst = walk->dst.virt.addr;

'src' can be const.