diff options
author | Eric Biggers <ebiggers@google.com> | 2018-05-19 22:07:41 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-05-27 00:12:10 +0800 |
commit | 9b3abc0162e8fb2927644bab682815bd920f0f2f (patch) | |
tree | 6592dc0b3db3c524df502c8c7e2ff746bdcfc577 /crypto/cmac.c | |
parent | a179a2bf0561359973114a539c6f26c858bcb781 (diff) | |
download | op-kernel-dev-9b3abc0162e8fb2927644bab682815bd920f0f2f.zip op-kernel-dev-9b3abc0162e8fb2927644bab682815bd920f0f2f.tar.gz |
crypto: testmgr - fix testing OPTIONAL_KEY hash algorithms
Since testmgr uses a single tfm for all tests of each hash algorithm,
once a key is set the tfm won't be unkeyed anymore. But with crc32 and
crc32c, the key is really the "default initial state" and is optional;
those algorithms should have both keyed and unkeyed test vectors, to
verify that implementations use the correct default key.
Simply listing the unkeyed test vectors first isn't guaranteed to work
yet because testmgr makes multiple passes through the test vectors.
crc32c does have an unkeyed test vector listed first currently, but it
only works by chance because the last crc32c test vector happens to use
a key that is the same as the default key.
Therefore, teach testmgr to split hash test vectors into unkeyed and
keyed sections, and do all the unkeyed ones before the keyed ones.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/cmac.c')
0 files changed, 0 insertions, 0 deletions