Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gcrypt

Thoughts on implementing GCM

 

 

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded


bradh at frogmouth

Apr 4, 2010, 2:42 AM

Post #1 of 2 (455 views)
Permalink
Thoughts on implementing GCM

Hi,

I've started looking (again) at NIST 800-38D (Galois Counter Mode). I have a
couple of implementation questions that I'd appreciate some feedback on.

There would appear to be several ways to implement an AEAD, including a whole
new API (i.e. a peer to the existing cipher, md, etc). However I think it
should be possible to implement it within the existing cipher code with a
couple of additional functions - one that adds the additional authenticated
data (A) and one that retrieves the authentication tag (T). Thoughts on this
approach?

I think I may also need to extend struct gcry_cipher_handle. I'd like to store
the hash subkey (H) - not far enough into the implementation to know if I need
anything else. Would a union re-using the ctr[MAX_BLOCKSIZE] space be
preferred, or should I just add new elements?

Thanks for your time.

Brad

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel


wk at gnupg

Apr 6, 2010, 1:59 AM

Post #2 of 2 (417 views)
Permalink
Re: Thoughts on implementing GCM [In reply to]

On Sun, 4 Apr 2010 11:42, bradh [at] frogmouth said:

> new API (i.e. a peer to the existing cipher, md, etc). However I think it
> should be possible to implement it within the existing cipher code with a
> couple of additional functions - one that adds the additional authenticated
> data (A) and one that retrieves the authentication tag (T). Thoughts on this
> approach?

That is how I would do it.

> I think I may also need to extend struct gcry_cipher_handle. I'd like to store
> the hash subkey (H) - not far enough into the implementation to know if I need
> anything else. Would a union re-using the ctr[MAX_BLOCKSIZE] space be
> preferred, or should I just add new elements?

For easier readability I think it might be better to add new
elements. Merging them with unused elements can be done at any time
later.

Please don't change gcry_cipher_spec_t but change cipher_extra_spec_t
instead - if you need to do that at all.


Salam-Shalom,

Werner


--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.