aboutsummaryrefslogtreecommitdiff
path: root/modexp.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-09-12 10:04:55 -0400
committerRob Austein <sra@hactrn.net>2017-09-12 10:04:55 -0400
commit8ff9d4131bf79b36551c2ed995881a88fb9c0a61 (patch)
treef54783f74a3b89fdf7f5fbb8abdc2cdb1c0fa807 /modexp.c
parentc5fa163f67df9649ad12486f0f35cb776660f706 (diff)
Untested ASN.1 support for ModExpA7 private speedup factors.
Diffstat (limited to 'modexp.c')
-rw-r--r--modexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modexp.c b/modexp.c
index 7ff7b21..12b5789 100644
--- a/modexp.c
+++ b/modexp.c
@@ -177,7 +177,7 @@ static inline hal_error_t set_buffer(const hal_core_t *core,
*/
hal_error_t hal_modexp(hal_core_t *core,
- const int precalc_done,
+ const int precalc,
const uint8_t * const msg, const size_t msg_len, /* Message */
const uint8_t * const exp, const size_t exp_len, /* Exponent */
const uint8_t * const mod, const size_t mod_len, /* Modulus */
@@ -242,7 +242,7 @@ hal_error_t hal_modexp(hal_core_t *core,
* is edge-triggered by "init" bit going from zero to one.
*/
- if (!precalc_done) {
+ if (precalc) {
check(hal_io_zero(core));
check(hal_io_init(core));
check(hal_io_wait_ready(core));