RE: AES-GCM Gives Wrong Tag Value?

2012-05-20 Thread Li, David
-openssl-us...@openssl.org] On Behalf Of Dr. Stephen Henson [st...@openssl.org] Sent: Friday, May 18, 2012 10:17 AM To: openssl-users@openssl.org Subject: Re: AES-GCM Gives Wrong Tag Value? On Fri, May 18, 2012, Li, David wrote: Hi Experts, First time I am using AES-GCM mode to run the NIST test

AES-GCM Gives Wrong Tag Value?

2012-05-18 Thread Li, David
Hi Experts, First time I am using AES-GCM mode to run the NIST test vectors. The API is: void AES_gcm128_encrypt(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) After initialization and encryption, my cipher text matched the one

Re: AES-GCM Gives Wrong Tag Value?

2012-05-18 Thread John Zavgren
David: This is just a quick and dirty superficial guess, but are you copying from the correct place in memory? I.e., is the value of: ctx.Xi.c, a pointer to the address that holds the first byte of the tag? If you do a byte-wise dump of the entire structure and then do visual pattern matching for

Re: AES-GCM Gives Wrong Tag Value?

2012-05-18 Thread Dr. Stephen Henson
On Fri, May 18, 2012, Li, David wrote: Hi Experts, First time I am using AES-GCM mode to run the NIST test vectors. The API is: void AES_gcm128_encrypt(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) After initialization