update sike
This commit is contained in:
parent
b2f9d52be5
commit
51a41a3167
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "randombytes.h"
|
||||||
|
|
||||||
/* SIKE
|
/* SIKE
|
||||||
*
|
*
|
||||||
@ -55,7 +56,8 @@
|
|||||||
#define PQCLEAN_SIKE434_CLEAN_CRYPTO_ALGNAME "SIKE/p434"
|
#define PQCLEAN_SIKE434_CLEAN_CRYPTO_ALGNAME "SIKE/p434"
|
||||||
|
|
||||||
static inline int PQCLEAN_SIKE434_CLEAN_crypto_kem_keypair(uint8_t *pk, uint8_t *sk) {
|
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);
|
memcpy(&sk[SIKE_PRV_BYTESZ+SIKE_MSG_BYTESZ], pk, SIKE_PUB_BYTESZ);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user