summaryrefslogtreecommitdiffstats
path: root/crypto/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-09-06 22:52:38 +0200
committerRichard Levitte <levitte@openssl.org>2018-09-09 01:47:56 +0200
commitd74f23d2dbf2de0f374bff004c135242cfb65174 (patch)
tree766fdbfde67286e37c872b562e4887203399a483 /crypto/include
parent2725232132207ee30fd16e596885e3b0bd810fc4 (diff)
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)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/siphash.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/include/internal/siphash.h b/crypto/include/internal/siphash.h
index e086859622..d8bcdcaa4a 100644
--- a/crypto/include/internal/siphash.h
+++ b/crypto/include/internal/siphash.h
@@ -18,7 +18,8 @@ typedef struct siphash_st SIPHASH;
size_t SipHash_ctx_size(void);
size_t SipHash_hash_size(SIPHASH *ctx);
-int SipHash_Init(SIPHASH *ctx, const unsigned char *k, int hash_size,
+int SipHash_set_hash_size(SIPHASH *ctx, size_t hash_size);
+int SipHash_Init(SIPHASH *ctx, const unsigned char *k,
int crounds, int drounds);
void SipHash_Update(SIPHASH *ctx, const unsigned char *in, size_t inlen);
int SipHash_Final(SIPHASH *ctx, unsigned char *out, size_t outlen);