Skip to content

Commit

Permalink
Remove unrolling in loclass to save space in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
bettse committed Jul 28, 2024
1 parent 3adb8d0 commit 21223f1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/loclass/optimized_cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ static inline void loclass_opt_suc(
bool add32Zeroes) {
for(int i = 0; i < length; i++) {
uint8_t head = in[i];
#pragma GCC unroll 8
for(int j = 0; j < 8; j++) {
loclass_opt_successor(k, s, head);
head >>= 1;
Expand All @@ -159,7 +158,6 @@ static inline void loclass_opt_suc(
}

static inline void loclass_opt_output(const uint8_t* k, LoclassState_t* s, uint8_t* buffer) {
#pragma GCC unroll 4
for(uint8_t times = 0; times < 4; times++) {
uint8_t bout = 0;
bout |= (s->r & 0x4) >> 2;
Expand Down

0 comments on commit 21223f1

Please sign in to comment.