Skip to content

Commit

Permalink
[open-quantum-safe#1823] Use OpenSSL Memory Allocator for BIKE, Frodo…
Browse files Browse the repository at this point in the history
…KEM, and NTRUPrime

Signed-off-by: Songling Han <[email protected]>
  • Loading branch information
songlingatpan committed Sep 17, 2024
1 parent 04a9a73 commit 201771c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/kem/bike/kem_bike.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef OQS_ENABLE_KEM_bike_l1
OQS_KEM *OQS_KEM_bike_l1_new(void) {
OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand All @@ -31,7 +31,7 @@ OQS_KEM *OQS_KEM_bike_l1_new(void) {

#ifdef OQS_ENABLE_KEM_bike_l3
OQS_KEM *OQS_KEM_bike_l3_new(void) {
OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand All @@ -56,7 +56,7 @@ OQS_KEM *OQS_KEM_bike_l3_new(void) {

#ifdef OQS_ENABLE_KEM_bike_l5
OQS_KEM *OQS_KEM_bike_l5_new(void) {
OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem1344aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_1344_aes_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem1344shake.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_1344_shake_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem640aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_640_aes_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem640shake.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_640_shake_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem976aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_976_aes_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/frodokem/kem_frodokem976shake.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_frodokem_976_shake_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kem/ntruprime/kem_ntruprime_sntrup761.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

OQS_KEM *OQS_KEM_ntruprime_sntrup761_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
OQS_KEM *kem = OQS_MEM_malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
Expand Down

0 comments on commit 201771c

Please sign in to comment.