]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cryptocheck: Correct mismatch between OpenSSL use and OCF Blake2
authorcem <cem@FreeBSD.org>
Fri, 20 Jul 2018 01:51:05 +0000 (01:51 +0000)
committercem <cem@FreeBSD.org>
Fri, 20 Jul 2018 01:51:05 +0000 (01:51 +0000)
commit68ad9dcc434e3b54b223b76901608e3808154563
treeee9d5df7e7cc3f23dc10585848405876cecb9575
parent235e28007962ab2aabb5584111e7f7a3cd12bc1b
cryptocheck: Correct mismatch between OpenSSL use and OCF Blake2

This corrects a mistake introduced to the cryptocheck tool in r331418.

Our CRYPTO_BLAKE2B and CRYPTO_BLAKE2S algorithms refer to either the plain,
unkeyed hashes (specified with cri_klen = 0), or a Blake2-specific keyed MAC
(when a cri_key is provided).

In contrast, OpenSSL's Blake2 algorithms only provide the plain hash.
Cryptocheck's T_HMAC corresponds to OpenSSL's HMAC() routine, which is the
ordinary HMAC construction applied to any plain, unkeyed hash.  We don't
have any HMAC-Blake2 cipher modes in OCF, so fix the test to only test
Blake2 as a plain hash.

(Ideally we would test keyed Blake2 as well, but that is left as future
work.)

PR: 229795
tools/tools/crypto/cryptocheck.c