cryptocheck: Add support for Blake2{B,S} hashes

Since they are not yet present in the version of openssl in base, this will
require installing the ports openssl.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2018-03-23 05:37:18 +00:00
parent f634b92384
commit 266796e885
2 changed files with 10 additions and 1 deletions

View File

@ -32,7 +32,10 @@ MAN=
BINDIR?= /usr/local/bin
# cryptocheck: test symmetric crypto functions
LIBADD.cryptocheck+= crypto ssl util
# Use openssl from ports for Blake2 algorithms
CFLAGS.cryptocheck.c+= $$(pkg-config --cflags openssl)
LDFLAGS.cryptocheck+= $$(pkg-config --libs openssl)
LIBADD.cryptocheck+= util
# cryptokeytest: test asymmetric crypto functions
LIBADD.cryptokeytest+= crypto

View File

@ -59,6 +59,8 @@
* sha256 256-bit sha2 hmac
* sha384 384-bit sha2 hmac
* sha512 512-bit sha2 hmac
* blake2b Blake2-B
* blake2s Blake2-S
*
* Block Ciphers:
* aes-cbc 128-bit aes cbc
@ -115,6 +117,10 @@ struct alg {
.evp_md = EVP_sha384 },
{ .name = "sha512", .mac = CRYPTO_SHA2_512_HMAC, .type = T_HMAC,
.evp_md = EVP_sha512 },
{ .name = "blake2b", .mac = CRYPTO_BLAKE2B, .type = T_HMAC,
.evp_md = EVP_blake2b512 },
{ .name = "blake2s", .mac = CRYPTO_BLAKE2S, .type = T_HMAC,
.evp_md = EVP_blake2s256 },
{ .name = "aes-cbc", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER,
.evp_cipher = EVP_aes_128_cbc },
{ .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER,