Creating a MAC

Folkert van Heusden folkert at vanheusden.com
Wed Aug 17 22:14:34 CEST 2005


Isn't it easier (and faster perhaps?) to use the openssl library?

#include <openssl/sha.h>

int SHA_Init(SHA_CTX *c);
int SHA_Update(SHA_CTX *c, const void *data, unsigned long len);
int SHA_Final(unsigned char *md, SHA_CTX *c);

easy as pie

On Wed, Aug 17, 2005 at 10:57:35AM -0700, Heather Shaw wrote:
> Hello,
>   I am a newbie so please forgive stupid questions
> but, I am trying to create a message digest using the
> gcry_md_open (&md, GCRY_MD_SHA1, GCRY_MD_FLAG_HMAC). 
> In the documentation it states that you must call the
> gcry_md_setkey to be used to set the MAC key.  How do
> I calculate this MAC key?  What is the MAC key...does
> it get generated from the message itself in
> combination with another key of some sort. 
> 
> Thanks
> Heather
> 
> 
> _______________________________________________
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-devel


Folkert van Heusden

-- 
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
----------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 282 bytes
Desc: Digital signature
Url : /pipermail/attachments/20050817/980e3492/attachment.pgp


More information about the Gnupg-devel mailing list