Re: Calculating HMAC for a key based on password and salt

Phil Arcuri <[email protected]> Thu, 14 Mar 2013 09:09:45 +0000
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Hi,

Is this a general bug for which we should apply the fix you give below?
Or should we wait for the next incremental release?
Asking this another way - is the risk of making this change to our code less than leaving it "as is" and living with this bug?
Thanks,

- Phil

________________________________________
From: [email protected] [[email protected]] on behalf of Peter Gutmann [[email protected]]
Sent: Wednesday, March 13, 2013 7:42 AM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [Cryptlib] Calculating HMAC for a key based on password and salt

Lahiru Dissanayake <[email protected]> writes:

>However I get -16 as the status of the last statement. Are password based
>keys not meant to be used with HMAC in Cryptlib, or am I doing something
>wrong?

The algorithm type is being written to the wrong field, to fix it change
context/keyload.c, line 951 from:

  contextInfoPtr->ctxConv->keySetupAlgorithm = hmacAlgo;

to:

  macInfo->keySetupAlgorithm = hmacAlgo;

Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.