# Re: \[PATCH 19/22\] crypto: inside-secure - add check for xts input length equal to zero

- From: Herbert Xu \<herbert@gondor.apana.org.au\>
- Date: 2020-08-12 00:37:28 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2020/08/6066460
- Thread: https://ratatoskr.run/linux-crypto/2020/08/6063137/t.md

```text
On Tue, Aug 11, 2020 at 06:28:39PM +0300, Horia Geantă wrote:
>
> What about, for example, CBC?
> AFAICT cbc(aes) with input length = 0 is valid.

That's just because CBC accepts any input which is a multiple
of blocksize.

> Same for CTR (with the note that blocksize = 1) and several other algorithms
> mentioned in the cover letter.

CTR accepts any input size.

> What's the rule in these cases?

What input size is accepted depends on the algorithm.

Cheers,
-- 
Email: Herbert Xu [ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
