ANDROID: crypto: heh - factor out poly_hash algorithm
authorEric Biggers <ebiggers@google.com>
Wed, 11 Jan 2017 18:36:41 +0000 (10:36 -0800)
committerEric Biggers <ebiggers@google.com>
Fri, 10 Feb 2017 20:09:06 +0000 (20:09 +0000)
commit58b9edb065b0b75a794f9b6f80e42e992bde72d2
tree4437b2f9695c0b9693f9e53ea4f3d29bc03b26d9
parent698ffc03b70134f4f4af89bf64f3bcb96e358545
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