cipher: handle ChaCha20 as a stream cipher

That's what it is. So we shouldn't set a block size != 1.

While at it, move call to chachapoly_update() closer to the one for GCM, as
they are similar (AEAD).
This commit is contained in:
Manuel Pégourié-Gonnard 2018-05-10 12:30:19 +02:00
parent c0dfcd4bf1
commit 32902e6eae
3 changed files with 27 additions and 30 deletions

View file

@ -193,7 +193,7 @@ enum {
/** Maximum length of any IV, in Bytes. */
#define MBEDTLS_MAX_IV_LENGTH 16
/** Maximum block size of any cipher, in Bytes. */
#define MBEDTLS_MAX_BLOCK_LENGTH 64
#define MBEDTLS_MAX_BLOCK_LENGTH 16
/**
* Base cipher information (opaque struct).