Fix/add comment to clarify.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2014-06-19 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/ecc-mont.c (compute_nQ): Add comment.
|
||||
|
||||
* src/mod.c (mod_inv): Fix comment. X^-1 = 0 when X=0
|
||||
is important for Montgomery curve computation.
|
||||
|
||||
2014-06-05 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* tool/add_openpgp_authkey_from_gpgssh.py: New.
|
||||
|
||||
@@ -185,6 +185,11 @@ compute_nQ (bn256 *res, const bn256 *n, const bn256 *q_x)
|
||||
}
|
||||
|
||||
/* We know the LSB of N is always 0. Thus, result is always in P0. */
|
||||
/*
|
||||
* p0->z may be zero here, but our mod_inv doesn't raise error for 0,
|
||||
* but returns 0 (like the implementation of z^(p-2)), thus, RES will
|
||||
* be 0 in that case, which is correct value.
|
||||
*/
|
||||
mod_inv (res, p0->z, p25519);
|
||||
mod25638_mul (res, res, p0->x);
|
||||
mod25519_reduce (res);
|
||||
|
||||
Reference in New Issue
Block a user