diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer128f/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer128f/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer128f/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer128f/aimer.c	2024-05-02 09:30:59.815396199 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -352,8 +367,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer128s/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer128s/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer128s/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer128s/aimer.c	2024-05-02 09:30:59.815396199 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -352,8 +367,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer192f/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer192f/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer192f/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer192f/aimer.c	2024-05-02 09:31:04.271495544 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -353,8 +368,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer192s/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer192s/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer192s/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer192s/aimer.c	2024-05-02 09:31:04.271495544 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -353,8 +368,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer256f/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer256f/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer256f/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer256f/aimer.c	2024-05-02 09:30:54.623280445 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -373,8 +388,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/aarch64/aimer256s/aimer.c 240402_AIMer.patched/Additional_Implementation/aarch64/aimer256s/aimer.c
--- 240402_AIMer/Additional_Implementation/aarch64/aimer256s/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/aarch64/aimer256s/aimer.c	2024-05-02 09:30:54.623280445 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -373,8 +388,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer128f/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer128f/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer128f/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer128f/aimer.c	2024-05-02 09:31:15.111737256 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -352,8 +367,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer128s/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer128s/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer128s/aimer.c	2024-05-02 09:06:59.187437417 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer128s/aimer.c	2024-05-02 09:31:15.111737256 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -352,8 +367,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer192f/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer192f/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer192f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer192f/aimer.c	2024-05-02 09:31:16.959778466 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -354,8 +369,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer192s/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer192s/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer192s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer192s/aimer.c	2024-05-02 09:31:16.959778466 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -354,8 +369,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer256f/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer256f/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer256f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer256f/aimer.c	2024-05-02 09:31:12.775685166 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -373,8 +388,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Additional_Implementation/avx2/aimer256s/aimer.c 240402_AIMer.patched/Additional_Implementation/avx2/aimer256s/aimer.c
--- 240402_AIMer/Additional_Implementation/avx2/aimer256s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Additional_Implementation/avx2/aimer256s/aimer.c	2024-05-02 09:31:12.775685166 -0500
@@ -25,6 +25,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in),
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -373,8 +388,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][0][i_bar],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep][0], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer128f/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer128f/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer128f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer128f/aimer.c	2024-05-02 09:31:23.095915301 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -347,8 +362,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer128s/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer128s/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer128s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer128s/aimer.c	2024-05-02 09:31:23.095915301 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -347,8 +362,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer192f/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer192f/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer192f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer192f/aimer.c	2024-05-02 09:31:25.011958033 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -349,8 +364,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer192s/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer192s/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer192s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer192s/aimer.c	2024-05-02 09:31:25.011958033 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -349,8 +364,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer256f/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer256f/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer256f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer256f/aimer.c	2024-05-02 09:31:20.987868292 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -367,8 +382,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Optimized_Implementation/aimer256s/aimer.c 240402_AIMer.patched/Optimized_Implementation/aimer256s/aimer.c
--- 240402_AIMer/Optimized_Implementation/aimer256s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Optimized_Implementation/aimer256s/aimer.c	2024-05-02 09:31:20.987868292 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -367,8 +382,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer128f/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer128f/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer128f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer128f/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer128s/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer128s/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer128s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer128s/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer192f/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer192f/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer192f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer192f/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer192s/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer192s/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer192s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer192s/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer256f/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer256f/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer256f/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer256f/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
diff -ruw 240402_AIMer/Reference_Implementation/aimer256s/aimer.c 240402_AIMer.patched/Reference_Implementation/aimer256s/aimer.c
--- 240402_AIMer/Reference_Implementation/aimer256s/aimer.c	2024-05-02 09:06:59.191437507 -0500
+++ 240402_AIMer.patched/Reference_Implementation/aimer256s/aimer.c	2024-05-02 09:31:18.919822175 -0500
@@ -24,6 +24,21 @@
   }
 }
 
+static void lookup2(uint8_t out[AIM2_NUM_BYTES_FIELD],
+                    const GF (*in)[2],
+                    crypto_int64 inlen,
+                    crypto_int64 inpos)
+{
+  crypto_int64 i, j;
+  GF gfout;
+  memset(gfout,0,AIM2_NUM_BYTES_FIELD);
+  for (i = 0;i < inlen;++i) {
+    crypto_int64 mask = crypto_int64_equal_mask(i,inpos);
+    for (j = 0;j < AIM2_NUM_WORDS_FIELD;++j)
+      gfout[j] |= mask & in[i][0][j];
+  }
+  GF_to_bytes(gfout,out);
+}
 
 #define L   AIM2_NUM_INPUT_SBOX
 #define TAU AIMER_NUM_REPETITIONS
@@ -332,8 +347,7 @@
     size_t i_bar = indices[rep];
     reveal_all_but(nodes[rep], i_bar, sig->proofs[rep].reveal_path);
     lookup(sig->proofs[rep].missing_commitment, commits[rep], N, i_bar);
-    GF_to_bytes(alpha_v_shares[rep][i_bar][0],
-                sig->proofs[rep].missing_alpha_share_bytes);
+    lookup2(sig->proofs[rep].missing_alpha_share_bytes, alpha_v_shares[rep], N, i_bar);
   }
 
   free(nodes);
