Skip to content

Commit

Permalink
Fix bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Feb 6, 2025
1 parent a530338 commit b786cd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions faest_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2271,8 +2271,8 @@ static bf192_t* column_to_row_major_and_shrink_V_192(uint8_t** v, unsigned int e
// V is \hat \ell times \lambda matrix over F_2
// v has \hat \ell rows, \lambda columns, storing in column-major order, new_v has \ell + \lambda
// rows and \lambda columns storing in row-major order
bf192_t* new_v = faest_aligned_alloc(BF192_ALIGN, (ell + FAEST_192F_LAMBDA) * sizeof(bf192_t));
for (unsigned int row = 0; row != ell + FAEST_192F_LAMBDA; ++row) {
bf192_t* new_v = faest_aligned_alloc(BF192_ALIGN, (ell + FAEST_192F_LAMBDA*2) * sizeof(bf192_t));
for (unsigned int row = 0; row != ell + FAEST_192F_LAMBDA*2; ++row) {
uint8_t new_row[BF192_NUM_BYTES] = {0};
for (unsigned int column = 0; column != FAEST_192F_LAMBDA; ++column) {
ptr_set_bit(new_row, ptr_get_bit(v[column], row), column);
Expand All @@ -2286,8 +2286,8 @@ static bf256_t* column_to_row_major_and_shrink_V_256(uint8_t** v, unsigned int e
// V is \hat \ell times \lambda matrix over F_2
// v has \hat \ell rows, \lambda columns, storing in column-major order, new_v has \ell + \lambda
// rows and \lambda columns storing in row-major order
bf256_t* new_v = faest_aligned_alloc(BF256_ALIGN, (ell + FAEST_256F_LAMBDA) * sizeof(bf256_t));
for (unsigned int row = 0; row != ell + FAEST_256F_LAMBDA; ++row) {
bf256_t* new_v = faest_aligned_alloc(BF256_ALIGN, (ell + FAEST_256F_LAMBDA*2) * sizeof(bf256_t));
for (unsigned int row = 0; row != ell + FAEST_256F_LAMBDA*2; ++row) {
uint8_t new_row[BF256_NUM_BYTES] = {0};
for (unsigned int column = 0; column != FAEST_256F_LAMBDA; ++column) {
ptr_set_bit(new_row, ptr_get_bit(v[column], row), column);
Expand Down

0 comments on commit b786cd1

Please sign in to comment.