ec-info: Overhaul elliptic curve domain parameter checking.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 18 Jan 2007 16:51:18 +0000 (16:51 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 29 Jan 2007 17:47:07 +0000 (17:47 +0000)
commit30ac115b90b0ed66eed17b722a76d3e7e6e4531c
tree12bbc7c1bd47d75ce7e0a46082e94703186636c6
parent45c0fd363937c6e9b05da04a9167e9912c05ca0c
ec-info: Overhaul elliptic curve domain parameter checking.

  * Separate out the common parts of prime and binary curve checking into
    its own function.

  * Replace the cofactor checking with a new, rather more complicated,
    algorithm which verifies that it has the correct value without
    needing an explicit square-root.  Also allow larger cofactors; it's
    not our responsibility to avoid small-subgroup attacks.

  * Replace the embedding-degree check with one that's rather more
    enlightened.  Unfortunately, it has to intuit the desired security
    level, and that's not going to work well.

Also check for memory leaks in the test harness (one snuck in during
development and was caught by another test).
ec-info.c
tests/group