SipHash: add separate setter for the hash size
authorRichard Levitte <levitte@openssl.org>
Thu, 6 Sep 2018 20:52:38 +0000 (22:52 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 8 Sep 2018 23:47:56 +0000 (01:47 +0200)
commitd74f23d2dbf2de0f374bff004c135242cfb65174
tree766fdbfde67286e37c872b562e4887203399a483
parent2725232132207ee30fd16e596885e3b0bd810fc4
SipHash: add separate setter for the hash size

This was originally part of SipHash_Init.  However, there are cases
where there isn't any key material to initialize from when setting the
hash size, and we do allow doing so with a EVP_PKEY control.  The
solution is to provide a separate hash_size setter and to use it in
the corresponding EVP_PKEY_METHOD.

Fixes #7143

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7145)
crypto/include/internal/siphash.h
crypto/siphash/siphash.c
crypto/siphash/siphash_pmeth.c
test/siphash_internal_test.c