This commit is contained in:
Mikael Vidstedt 2019-07-12 02:50:43 -07:00
commit cfcd0223a9
28 changed files with 1882 additions and 849 deletions

View file

@ -104,21 +104,10 @@ public class CurveDB {
if (namedCurve.getCurve().getField().getFieldSize() != fieldSize) {
continue;
}
if (namedCurve.getCurve().equals(params.getCurve()) == false) {
continue;
if (ECUtil.equals(namedCurve, params)) {
// everything matches our named curve, return it
return namedCurve;
}
if (namedCurve.getGenerator().equals(params.getGenerator()) ==
false) {
continue;
}
if (namedCurve.getOrder().equals(params.getOrder()) == false) {
continue;
}
if (namedCurve.getCofactor() != params.getCofactor()) {
continue;
}
// everything matches our named curve, return it
return namedCurve;
}
// no match found
return null;