diff options
| author | davidhofman | 2021-12-09 16:32:53 +0100 |
|---|---|---|
| committer | GitHub | 2021-12-09 16:32:53 +0100 |
| commit | 9c8d14b6fa44bb6d1b3928ecf2afc133b35e0a51 (patch) | |
| tree | 442ed80f7622bce6da229a2465c2673d356b9d5e /src/cz/crcs/ectester/common/util/ECUtil.java | |
| parent | 22ef8bacc8f8238cfe07f12f2fa94b45deee04b2 (diff) | |
| download | ECTester-9c8d14b6fa44bb6d1b3928ecf2afc133b35e0a51.tar.gz ECTester-9c8d14b6fa44bb6d1b3928ecf2afc133b35e0a51.tar.zst ECTester-9c8d14b6fa44bb6d1b3928ecf2afc133b35e0a51.zip | |
Test with default curve if possible.
Final changes to the new test suites and scripts. (#16)
* Final changes in some of the test suites.
* Final changes to testing scripts.
* Roll back recent changes in the cofactor test suite.
* Change key generation method in Degenerate, Invalid, and Twist test suites.
* Small cosmetic change to the edge-cases test suite.
* Small change to run_test_suite.sh
Diffstat (limited to 'src/cz/crcs/ectester/common/util/ECUtil.java')
| -rw-r--r-- | src/cz/crcs/ectester/common/util/ECUtil.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cz/crcs/ectester/common/util/ECUtil.java b/src/cz/crcs/ectester/common/util/ECUtil.java index ccc6c48..e047439 100644 --- a/src/cz/crcs/ectester/common/util/ECUtil.java +++ b/src/cz/crcs/ectester/common/util/ECUtil.java @@ -461,5 +461,13 @@ public class ECUtil { return null; } - + public static boolean equalKeyPairParameters(ECPrivateKey priv, ECPublicKey pub) { + if(priv == null || pub == null) { + return false; + } + return priv.getParams().getCurve().equals(pub.getParams().getCurve()) && + priv.getParams().getCofactor() == pub.getParams().getCofactor() && + priv.getParams().getGenerator().equals(pub.getParams().getGenerator()) && + priv.getParams().getOrder().equals(pub.getParams().getOrder()); + } } |
