From 51a41a31674d5ab572c7a30e47fcba21468819b2 Mon Sep 17 00:00:00 2001 From: Kris Kwiatkowski Date: Fri, 9 Apr 2021 00:54:14 +0100 Subject: [PATCH] update sike --- src/kem/sike/includes/sike/sike.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kem/sike/includes/sike/sike.h b/src/kem/sike/includes/sike/sike.h index 09d1e580..e71cde57 100644 --- a/src/kem/sike/includes/sike/sike.h +++ b/src/kem/sike/includes/sike/sike.h @@ -3,6 +3,7 @@ #include #include +#include "randombytes.h" /* SIKE * @@ -55,7 +56,8 @@ #define PQCLEAN_SIKE434_CLEAN_CRYPTO_ALGNAME "SIKE/p434" static inline int PQCLEAN_SIKE434_CLEAN_crypto_kem_keypair(uint8_t *pk, uint8_t *sk) { - SIKE_keypair(sk, pk); + randombytes(sk, SIKE_MSG_BYTESZ); + SIKE_keypair(sk+SIKE_MSG_BYTESZ, pk); memcpy(&sk[SIKE_PRV_BYTESZ+SIKE_MSG_BYTESZ], pk, SIKE_PUB_BYTESZ); return 1; }