Skip to content

Commit

Permalink
Advance by b * blocksize
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Feb 6, 2025
1 parent a769537 commit 6d7e9df
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions faest_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4631,13 +4631,9 @@ static void aes_192_constraints_prover(bf192_t* z_deg0, bf192_t* z_deg1, bf192_t
if (b == 1) {
in[0] = in[0] ^ 0x01;
in_tag[0] = bf192_add(in_tag[0], bf192_one());
out_tag += blocksize;
}

aes_192_enc_constraints_prover(z_tilde_deg0, z_tilde_deg1, z_tilde_deg2, in, in_tag, out, out_tag, w_tilde, w_tilde_tag, rkeys, rkeys_tag, params);
// uint32_t z_offset = 1 + (2*FAEST_192F_Ske);
// printf("z offset = %d\n", z_offset);
// aes_192_enc_constraints_prover(z_deg0 + z_offset, z_deg1 + z_offset, z_deg2 + z_offset, in, in_tag, out, out_tag, w_tilde, w_tilde_tag, k, k_tag, params);
aes_192_enc_constraints_prover(z_tilde_deg0, z_tilde_deg1, z_tilde_deg2, in, in_tag, out + b * blocksize , out_tag + b * blocksize, w_tilde, w_tilde_tag, rkeys, rkeys_tag, params);

// :22
for (unsigned int i = 0; i < num_enc_constraints; i++) {
Expand Down Expand Up @@ -4983,9 +4979,8 @@ static void aes_192_constraints_verifier(bf192_t* z_key, const bf192_t* w_key, c
memset(z_tilde_enc_key, 0, num_enc_constraints * sizeof(bf192_t));
if (b == 1) {
in_key[0] = bf192_add(in_key[0], delta); // adding one
out_key += blocksize;
}
aes_192_enc_constraints_verifier(z_tilde_enc_key, in_key, out_key, w_tilde_key, rkeys_key, delta, params);
aes_192_enc_constraints_verifier(z_tilde_enc_key, in_key, out_key + b * blocksize, w_tilde_key, rkeys_key, delta, params);

// :22
for (unsigned int i = 0; i < num_enc_constraints; i++) {
Expand Down

0 comments on commit 6d7e9df

Please sign in to comment.