Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsa exp: move declarations before code #17287

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions crypto/bn/rsaz_exp_x2.c
Expand Up @@ -412,6 +412,8 @@ int RSAZ_mod_exp_x2_ifma256(BN_ULONG *out,
int exp_chunk_no = exp_bit_no / 64;
int exp_chunk_shift = exp_bit_no % 64;

BN_ULONG red_table_idx_0, red_table_idx_1;

/*
* If rem == 0, then
* exp_bit_no = modulus_bitsize - exp_win_size
Expand All @@ -423,8 +425,9 @@ int RSAZ_mod_exp_x2_ifma256(BN_ULONG *out,
OPENSSL_assert(rem != 0);

/* Process 1-st exp window - just init result */
BN_ULONG red_table_idx_0 = expz[exp_chunk_no + 0 * (exp_digits + 1)];
BN_ULONG red_table_idx_1 = expz[exp_chunk_no + 1 * (exp_digits + 1)];
red_table_idx_0 = expz[exp_chunk_no + 0 * (exp_digits + 1)];
red_table_idx_1 = expz[exp_chunk_no + 1 * (exp_digits + 1)];

/*
* The function operates with fixed moduli sizes divisible by 64,
* thus table index here is always in supported range [0, EXP_WIN_SIZE).
Expand Down