Re: Padding twice in GCM - why?
- From: tom@xxxxxxx
- Date: Thu, 9 Apr 2009 03:18:59 -0700 (PDT)
On Apr 9, 12:17 am, WTShaw <lure...@xxxxxxxxx> wrote:
On Apr 8, 8:33 am, "Scott Fluhrer" <sfluh...@xxxxxxxxxxxxx> wrote:
"TRNG" <T...@xxxxxxxxxxxxxxxxxx> wrote in message
news:01ec9394$0$20628$c3e8da3@xxxxxxxxxxxxxxxxxxxx
Hi,
In the GHASH calcuation in GCM, the input to the GF multiplier is padded
to a block boundary with zeros *twice*, first at the end of the
"AAD" (authenticated but not encrypted data), and then again at the end
of the ciphertext.
I can understand that the concatenation of the AAD and ciphertext must be
padded to match the block size, but this could be achieved with just one
lot of padding at the end of the ciphertext.
Questions:
1. Is there a security advantage to padding twice? (Or, put another
way, if the padding at the end of AAD was removed, would there be any
reduction in the security?)
Or is it just an implementation thing?
It's just an implementation thing.
2. If it is just an implementation thing, can someone please suggest a
reason why padding twice would be simpler than padding once, particularly
with respect to high-speed hardware designs?
Alignment; as designed, the core of the algorithm (which includes the AES
implementation and the GHASH unit) deals only with 128 bit chunks as entire
units. This does make it simpler in a pipelined architecture.
In the encrypt direction, a pipelined implementation of GCM (and GCM was
designed specifically to be pipeline friendly) can take each 128 bit chunk
coming out of the AES pipeline, xor it with the next 128 bits of plaintext
and then immediately xor that result with the running GHASH. If the
encrypted region wasn't aligned to a 128 bit boundary, then what we would
need to present to the GHASH unit would be N bits of this ciphertext and
128-N bits of the previous ciphertext (and the value of N would depend on
how long the AAD data actually is). Similar logic would be needed in the
decrypt direction. This is certainly doable, but it would add another step
and more complexity.
--
poncho
Imagine that reducing complexity makes it easier to verify a guessed
key, a particular key or many trials in a any shorter period of time.
Now, just WHO would want this?
The people doing multi-gigabit per second GCM that's who.
Tom
.
- References:
- Padding twice in GCM - why?
- From: TRNG
- Re: Padding twice in GCM - why?
- From: Scott Fluhrer
- Re: Padding twice in GCM - why?
- From: WTShaw
- Padding twice in GCM - why?
- Prev by Date: Re: Joint Thin Tile Cipher – Batch and Real Time.
- Next by Date: Re: RSA moduli sizes
- Previous by thread: Re: Padding twice in GCM - why?
- Index(es):
Relevant Pages
|