1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

CCM operations allow input == output

This commit is contained in:
Manuel Pégourié-Gonnard
2014-05-07 14:43:46 +02:00
parent aed6065793
commit 0f6b66dba1
3 changed files with 14 additions and 17 deletions

View File

@ -103,7 +103,7 @@ void ccm_free( ccm_context *ctx )
/*
* Encrypt or decrypt a partial block with CTR
* Warning: using b for temporary storage! src and dst must not be b!
* (This avoids allocating one more 16 bytes buffer.)
* This avoids allocating one more 16 bytes buffer while allowing src == dst.
*/
#define CTR_CRYPT( dst, src, len ) \
if( ( ret = cipher_update( &ctx->cipher_ctx, ctr, 16, b, &olen ) ) != 0 ) \