All of lore.kernel.org
 help / color / mirror / Atom feed
* ghash
@ 2019-07-19 14:05 Pascal Van Leeuwen
  2019-07-19 16:16 ` ghash Eric Biggers
  0 siblings, 1 reply; 9+ messages in thread
From: Pascal Van Leeuwen @ 2019-07-19 14:05 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, davem

Hi,

While implementing GHASH support for the inside-secure driver and wondering why I couldn't get 
the test vectors to pass I have come to the conclusion that ghash-generic.c actually does *not*
implement GHASH at all. It merely implements the underlying chained GF multiplication, which,
I understand, is convenient as a building block for e.g. aes-gcm but is is NOT the full GHASH.
Most importantly, it does NOT actually close the hash, so you can trivially add more data to the
authenticated block (i.e. the resulting output cannot be used directly without external closing)

GHASH is defined as GHASH(H,A,C) whereby you do this chained GF multiply on a block of AAD
data padded to 16 byte alignment with zeroes, followed by a block of ciphertext padded to 16
byte alignment with zeroes, followed by a block that contains both AAD and cipher length.

See also https://en.wikipedia.org/wiki/Galois/Counter_Mode

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-19 23:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 14:05 ghash Pascal Van Leeuwen
2019-07-19 16:16 ` ghash Eric Biggers
2019-07-19 19:26   ` ghash Pascal Van Leeuwen
2019-07-19 19:56     ` ghash Eric Biggers
2019-07-19 20:49       ` ghash Pascal Van Leeuwen
2019-07-19 21:48         ` ghash Eric Biggers
2019-07-19 22:35           ` ghash Eric Biggers
2019-07-19 23:25             ` ghash Pascal Van Leeuwen
2019-07-19 23:09           ` ghash Pascal Van Leeuwen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.