diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-02 12:50:27 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-02 12:50:27 +0300 |
commit | d0f80d5e60d77854f9d6262a59a7349e2b21f9d2 (patch) | |
tree | 01f1e033ce5519d96b7d6a83718221dcb8021eec /contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c | |
parent | 26286f616cee657612a9d820be6da2cdbd4de0ef (diff) | |
download | ydb-d0f80d5e60d77854f9d6262a59a7349e2b21f9d2.tar.gz |
intermediate changes
ref:40ac71fae6ea311a73473cf4297ca93bf27559c3
Diffstat (limited to 'contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c')
-rw-r--r-- | contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c b/contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c index cb566d7435..21b0b6f5a3 100644 --- a/contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c +++ b/contrib/restricted/aws/s2n/pq-crypto/bike_r1/bike_r1_kem.c @@ -13,6 +13,7 @@ #include "parallel_hash.h" #include "sampling.h" #include "tls/s2n_kem.h" +#include "pq-crypto/s2n_pq.h" _INLINE_ void split_e(OUT split_e_t *splitted_e, IN const e_t *e) @@ -155,6 +156,8 @@ get_ss(OUT ss_t *out, IN const e_t *e) int BIKE1_L1_R1_crypto_kem_keypair(OUT unsigned char *pk, OUT unsigned char *sk) { + ENSURE_POSIX(s2n_pq_is_enabled(), S2N_ERR_PQ_DISABLED); + // Convert to this implementation types pk_t *l_pk = (pk_t *)pk; @@ -211,6 +214,7 @@ BIKE1_L1_R1_crypto_kem_enc(OUT unsigned char * ct, IN const unsigned char *pk) { DMSG(" Enter crypto_kem_enc.\n"); + ENSURE_POSIX(s2n_pq_is_enabled(), S2N_ERR_PQ_DISABLED); // Convert to this implementation types const pk_t *l_pk = (const pk_t *)pk; @@ -265,6 +269,7 @@ BIKE1_L1_R1_crypto_kem_dec(OUT unsigned char * ss, IN const unsigned char *sk) { DMSG(" Enter crypto_kem_dec.\n"); + ENSURE_POSIX(s2n_pq_is_enabled(), S2N_ERR_PQ_DISABLED); // Convert to this implementation types const ct_t *l_ct = (const ct_t *)ct; |