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:
@@ -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 );
|
||||
|
Reference in New Issue
Block a user