On Wed, 2019-05-15 at 11:42 +0200, Niels Möller wrote:
> Simo Sorce <[email protected]> writes:
>
> > Attached find patch that adds points checks to the ECDH test case.
> > Let me know if that's ok or if you prefer a whole new test.
>
> I think it's ok to have it in the same file.
>
> > -static void
> > -set_point (struct ecc_point *p,
> > - const char *x, const char *y)
> > +static int
> > +ret_set_point (struct ecc_point *p,
> > + const char *x, const char *y)
> > {
>
> I think it's nicer to just change set_point to return int, and wrap
> all existing calls in ASSERT, e.g,
>
> - set_point (&A, ax, ay);
> + ASSERT (set_point (&A, ax, ay));
>
> in test_dh. Or name functions as int set_point(...), void
> set_point_or_die (...), but I think ASSERT is still clearer, in this
> case.
Ok, will change.
> > + test_public_key ("(0,0) with secp-192r1", &_nettle_secp_192r1, "0", "0",
> > 0);
> > + test_public_key (
> > + "(P,0) with secp-192r1", &_nettle_secp_192r1,
> > + "6277101735386680763835789423207666416083908700390324961279",
> > + "0", 0);
>
> Any particular reason the tests are all for secp_192r1 ?
Less copy-pasting as the numbers are smaller, the curve used really
makes no difference.
Nioks,
is the fact we do not enable 192r1 in some distribution a problem?
Simo.
--
Simo Sorce
Sr. Principal Software Engineer
Red Hat, Inc
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs