[PATCH 2/2] [v2] Add CMAC (Cipher-based MAC) to MAC API

Jussi Kivilinna jussi.kivilinna at iki.fi
Tue Nov 19 12:53:15 CET 2013


On 19.11.2013 12:32, Werner Koch wrote:
> On Mon, 18 Nov 2013 17:32, jussi.kivilinna at iki.fi said:
> 
>> +++ b/src/gcrypt.h.in
>> @@ -1309,7 +1309,19 @@ enum gcry_mac_algos
>>      GCRY_MAC_HMAC_WHIRLPOOL     = 10,
>>      GCRY_MAC_HMAC_GOSTR3411_94  = 11,
>>      GCRY_MAC_HMAC_STRIBOG256    = 12,
>> -    GCRY_MAC_HMAC_STRIBOG512    = 13
>> +    GCRY_MAC_HMAC_STRIBOG512    = 13,
>> +
>> +    GCRY_MAC_CMAC_AES           = 100,
>> +    GCRY_MAC_CMAC_3DES          = 101,
> 
> What do you think about using 101 for the first HMAC algo and start CMAC
> at 201 ?  This might be helpful to detect the use of a cipher/hash
> algorithm in place of a MAC algorithm id.

Sure, that makes sense and later GMAC can be added starting at 401.

> 
> 
> Shalom-Salam,
> 
>    Werner
> 
> 
> p.s.
> Please put the name of a function in its definition at pos 0.

Ok.

-Jussi




More information about the Gcrypt-devel mailing list