modes/gcm128.c: coalesce calls to GHASH.
authorAndy Polyakov <appro@openssl.org>
Sun, 20 May 2018 10:02:39 +0000 (12:02 +0200)
committerAndy Polyakov <appro@openssl.org>
Sun, 3 Jun 2018 19:13:28 +0000 (21:13 +0200)
On contemporary platforms assembly GHASH processes multiple blocks
faster than one by one. For TLS payloads shorter than 16 bytes, e.g.
alerts, it's possible to reduce hashing operation to single call.
And for block lengths not divisible by 16 - fold two final calls to
one. Improvement is most noticeable with "reptoline", because call to
assembly GHASH is indirect.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6312)


No differences found