1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

GCM in the cipher layer, step 1

- no support for additional data
- no support for tag
This commit is contained in:
Manuel Pégourié-Gonnard
2013-08-30 18:34:08 +02:00
parent b5e85885de
commit 07f8fa5a69
7 changed files with 225 additions and 7 deletions

View File

@@ -293,11 +293,11 @@ int gcm_finish( gcm_context *ctx,
uint64_t orig_len = ctx->len * 8;
uint64_t orig_add_len = ctx->add_len * 8;
memcpy( tag, ctx->base_ectr, tag_len );
if( tag_len > 16 )
return( POLARSSL_ERR_GCM_BAD_INPUT );
memcpy( tag, ctx->base_ectr, tag_len );
if( orig_len || orig_add_len )
{
memset( work_buf, 0x00, 16 );