Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions wolfcrypt/src/sp_c32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ static int sp_2048_mod_exp_45(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[90];
sp_digit td[3 * 90];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -2014,7 +2014,7 @@ static int sp_2048_mod_exp_45(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 45 * 2);
#else
t[i] = &td[i * 45 * 2)];
t[i] = &td[i * 45 * 2];
#endif
}

Expand Down Expand Up @@ -2943,7 +2943,7 @@ static int sp_2048_mod_exp_90(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[180];
sp_digit td[3 * 180];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -2967,7 +2967,7 @@ static int sp_2048_mod_exp_90(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 90 * 2);
#else
t[i] = &td[i * 90 * 2)];
t[i] = &td[i * 90 * 2];
#endif
}

Expand Down Expand Up @@ -5831,7 +5831,7 @@ static int sp_3072_mod_exp_67(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[134];
sp_digit td[3 * 134];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -5855,7 +5855,7 @@ static int sp_3072_mod_exp_67(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 67 * 2);
#else
t[i] = &td[i * 67 * 2)];
t[i] = &td[i * 67 * 2];
#endif
}

Expand Down Expand Up @@ -6820,7 +6820,7 @@ static int sp_3072_mod_exp_134(sp_digit* r, const sp_digit* a, const sp_digit* e
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[268];
sp_digit td[3 * 268];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -6844,7 +6844,7 @@ static int sp_3072_mod_exp_134(sp_digit* r, const sp_digit* a, const sp_digit* e
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 134 * 2);
#else
t[i] = &td[i * 134 * 2)];
t[i] = &td[i * 134 * 2];
#endif
}

Expand Down Expand Up @@ -9895,7 +9895,7 @@ static int sp_4096_mod_exp_98(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[196];
sp_digit td[3 * 196];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -9919,7 +9919,7 @@ static int sp_4096_mod_exp_98(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 98 * 2);
#else
t[i] = &td[i * 98 * 2)];
t[i] = &td[i * 98 * 2];
#endif
}

Expand Down Expand Up @@ -10861,7 +10861,7 @@ static int sp_4096_mod_exp_196(sp_digit* r, const sp_digit* a, const sp_digit* e
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[392];
sp_digit td[3 * 392];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -10885,7 +10885,7 @@ static int sp_4096_mod_exp_196(sp_digit* r, const sp_digit* a, const sp_digit* e
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 196 * 2);
#else
t[i] = &td[i * 196 * 2)];
t[i] = &td[i * 196 * 2];
#endif
}

Expand Down
24 changes: 12 additions & 12 deletions wolfcrypt/src/sp_c64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ static int sp_2048_mod_exp_18(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[36];
sp_digit td[3 * 36];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -1662,7 +1662,7 @@ static int sp_2048_mod_exp_18(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 18 * 2);
#else
t[i] = &td[i * 18 * 2)];
t[i] = &td[i * 18 * 2];
#endif
}

Expand Down Expand Up @@ -2583,7 +2583,7 @@ static int sp_2048_mod_exp_36(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[72];
sp_digit td[3 * 72];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -2607,7 +2607,7 @@ static int sp_2048_mod_exp_36(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 36 * 2);
#else
t[i] = &td[i * 36 * 2)];
t[i] = &td[i * 36 * 2];
#endif
}

Expand Down Expand Up @@ -5819,7 +5819,7 @@ static int sp_3072_mod_exp_27(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[54];
sp_digit td[3 * 54];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -5843,7 +5843,7 @@ static int sp_3072_mod_exp_27(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 27 * 2);
#else
t[i] = &td[i * 27 * 2)];
t[i] = &td[i * 27 * 2];
#endif
}

Expand Down Expand Up @@ -6734,7 +6734,7 @@ static int sp_3072_mod_exp_54(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[108];
sp_digit td[3 * 108];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -6758,7 +6758,7 @@ static int sp_3072_mod_exp_54(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 54 * 2);
#else
t[i] = &td[i * 54 * 2)];
t[i] = &td[i * 54 * 2];
#endif
}

Expand Down Expand Up @@ -10116,7 +10116,7 @@ static int sp_4096_mod_exp_39(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[78];
sp_digit td[3 * 78];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -10140,7 +10140,7 @@ static int sp_4096_mod_exp_39(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 39 * 2);
#else
t[i] = &td[i * 39 * 2)];
t[i] = &td[i * 39 * 2];
#endif
}

Expand Down Expand Up @@ -11130,7 +11130,7 @@ static int sp_4096_mod_exp_78(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
sp_digit* td;
#else
sp_digit td[156];
sp_digit td[3 * 156];
#endif
sp_digit* t[3];
sp_digit* norm;
Expand All @@ -11154,7 +11154,7 @@ static int sp_4096_mod_exp_78(sp_digit* r, const sp_digit* a, const sp_digit* e,
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
t[i] = td + (i * 78 * 2);
#else
t[i] = &td[i * 78 * 2)];
t[i] = &td[i * 78 * 2];
#endif
}

Expand Down