ANDROID: crypto: heh - factor out poly_hash algorithm
authorEric Biggers <ebiggers@google.com>
Wed, 11 Jan 2017 18:36:41 +0000 (10:36 -0800)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commiteba753c13d1e663986b159b858972ce07cae148d
treec05040caa4704b823e42da9b9469c64026605d2c
parenta2f9a7b9fe8a9562fa8819dd23711a9d6dcfd1be
ANDROID: crypto: heh - factor out poly_hash algorithm

Factor most of poly_hash() out into its own keyed hash algorithm so that
optimized architecture-specific implementations of it will be possible.

For now we call poly_hash through the shash API, since HEH already had
an example of using shash for another algorithm (CMAC), and we will not
be adding any poly_hash implementations that require ahash yet.  We can
however switch to ahash later if it becomes useful.

Bug: 32508661
Signed-off-by: Eric Biggers <ebiggers@google.com>
Change-Id: I8de54ddcecd1d7fa6e9842a09506a08129bae0b6
crypto/heh.c