Skip to content

Commit

Permalink
Fix malloc calls
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Feb 6, 2025
1 parent 6d7e9df commit 8e15245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faest_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4869,7 +4869,7 @@ static void aes_128_constraints_verifier(bf128_t* z_key, const bf128_t* w_key, c
}
// ::18-20
bf128_t* w_tilde_key = (bf128_t*)faest_aligned_alloc(BF128_ALIGN, Lenc * sizeof(bf128_t));
bf128_t* z_tilde_enc_key = (bf128_t*)malloc(num_enc_constraints * sizeof(bf128_t));
bf128_t* z_tilde_enc_key = (bf128_t*)faest_aligned_alloc(BF128_ALIGN, num_enc_constraints * sizeof(bf128_t));

for (unsigned int b = 0; b < beta; b++) {
for (unsigned int i = 0; i < Lenc; i++) {
Expand Down Expand Up @@ -4969,7 +4969,7 @@ static void aes_192_constraints_verifier(bf192_t* z_key, const bf192_t* w_key, c
}
// ::18-20
bf192_t* w_tilde_key = (bf192_t*)faest_aligned_alloc(BF192_ALIGN, Lenc * sizeof(bf192_t));
bf192_t* z_tilde_enc_key = (bf192_t*)malloc(num_enc_constraints * sizeof(bf192_t));
bf192_t* z_tilde_enc_key = (bf192_t*)faest_aligned_alloc(BF192_ALIGN, num_enc_constraints * sizeof(bf192_t));

for (unsigned int b = 0; b < beta; b++) {
for (unsigned int i = 0; i < Lenc; i++) {
Expand Down Expand Up @@ -5068,7 +5068,7 @@ static void aes_256_constraints_verifier(bf256_t* z_key, const bf256_t* w_key, c
}
// ::18-20
bf256_t* w_tilde_key = (bf256_t*)faest_aligned_alloc(BF256_ALIGN, Lenc * sizeof(bf256_t));
bf256_t* z_tilde_enc_key = (bf256_t*)malloc(num_enc_constraints * sizeof(bf256_t));
bf256_t* z_tilde_enc_key = (bf256_t*)faest_aligned_alloc(BF256_ALIGN, num_enc_constraints * sizeof(bf256_t));

for (unsigned int b = 0; b < beta; b++) {
for (unsigned int i = 0; i < Lenc; i++) {
Expand Down

0 comments on commit 8e15245

Please sign in to comment.