mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 02:40:08 +00:00
fixes for ECC
This commit is contained in:
parent
8d56a4bff5
commit
abde30b943
@ -1,4 +1,9 @@
|
||||
2014-12-03 NIIBE Yutaka <gniibe@fsij.org>
|
||||
2014-12-09 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/ecc.c (compute_kP): Bug fix. It's P, not G.
|
||||
(point_is_on_the_curve): Bug fix.
|
||||
|
||||
2014-12-03 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
Changes for RSA-4096.
|
||||
|
||||
|
@ -169,7 +169,7 @@ point_is_on_the_curve (const ac *P)
|
||||
MFNC(sqr) (s, P->x);
|
||||
MFNC(mul) (s, s, P->x);
|
||||
|
||||
#ifdef COEFFICIENT_A_IS_ZERO
|
||||
#ifndef COEFFICIENT_A_IS_ZERO
|
||||
MFNC(mul) (t, coefficient_a, P->x);
|
||||
MFNC(add) (s, s, t);
|
||||
#endif
|
||||
@ -311,7 +311,7 @@ FUNC(compute_kP) (ac *X, const bn256 *K, const ac *P)
|
||||
}
|
||||
|
||||
dst = k_is_even ? Q : tmp;
|
||||
FUNC(jpc_add_ac) (dst, Q, &precomputed_KG[0]);
|
||||
FUNC(jpc_add_ac) (dst, Q, P);
|
||||
|
||||
return FUNC(jpc_to_ac) (X, Q);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user