aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ08nY2024-03-22 23:58:55 +0100
committerJ08nY2024-03-25 14:52:43 +0100
commit73af477a8774e1ede5dd8de6491eb353dc0b12bd (patch)
tree2d4e3b19bc5fb55308b886032312be76341736d4 /src
parent64b95fa059295e1dc23371c849f2302c1c18f5b4 (diff)
downloadECTester-73af477a8774e1ede5dd8de6491eb353dc0b12bd.tar.gz
ECTester-73af477a8774e1ede5dd8de6491eb353dc0b12bd.tar.zst
ECTester-73af477a8774e1ede5dd8de6491eb353dc0b12bd.zip
Basic Gradle setup.
Diffstat (limited to 'src')
-rw-r--r--src/cz/crcs/ectester/applet/AppletBase.java1026
-rw-r--r--src/cz/crcs/ectester/applet/AppletUtil.java35
-rw-r--r--src/cz/crcs/ectester/applet/ECKeyGenerator.java526
-rw-r--r--src/cz/crcs/ectester/applet/ECKeyTester.java225
-rw-r--r--src/cz/crcs/ectester/applet/ECTesterApplet.java63
-rw-r--r--src/cz/crcs/ectester/applet/ECTesterAppletExtended.java64
-rw-r--r--src/cz/crcs/ectester/applet/EC_Consts.java1512
-rw-r--r--src/cz/crcs/ectester/common/cli/Argument.java29
-rw-r--r--src/cz/crcs/ectester/common/cli/CLITools.java161
-rw-r--r--src/cz/crcs/ectester/common/cli/Colors.java97
-rw-r--r--src/cz/crcs/ectester/common/cli/ParserOptions.java35
-rw-r--r--src/cz/crcs/ectester/common/cli/TreeCommandLine.java179
-rw-r--r--src/cz/crcs/ectester/common/cli/TreeParser.java130
-rw-r--r--src/cz/crcs/ectester/common/ec/CustomECFieldF2m.java67
-rw-r--r--src/cz/crcs/ectester/common/ec/CustomECFieldFp.java43
-rw-r--r--src/cz/crcs/ectester/common/ec/CustomECParameterSpec.java47
-rw-r--r--src/cz/crcs/ectester/common/ec/CustomEllipticCurve.java60
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Category.java110
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Curve.java164
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Data.java265
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_KAResult.java65
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Key.java83
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Keypair.java41
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Params.java234
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_SigResult.java75
-rw-r--r--src/cz/crcs/ectester/common/ec/RawECPrivateKey.java46
-rw-r--r--src/cz/crcs/ectester/common/ec/RawECPublicKey.java46
-rw-r--r--src/cz/crcs/ectester/common/output/BaseTextTestWriter.java149
-rw-r--r--src/cz/crcs/ectester/common/output/BaseXMLTestWriter.java144
-rw-r--r--src/cz/crcs/ectester/common/output/BaseYAMLTestWriter.java120
-rw-r--r--src/cz/crcs/ectester/common/output/OutputLogger.java63
-rw-r--r--src/cz/crcs/ectester/common/output/TeeOutputStream.java36
-rw-r--r--src/cz/crcs/ectester/common/output/TeeTestWriter.java43
-rw-r--r--src/cz/crcs/ectester/common/output/TestWriter.java38
-rw-r--r--src/cz/crcs/ectester/common/test/BaseTestable.java44
-rw-r--r--src/cz/crcs/ectester/common/test/CompoundTest.java214
-rw-r--r--src/cz/crcs/ectester/common/test/Result.java106
-rw-r--r--src/cz/crcs/ectester/common/test/SimpleTest.java38
-rw-r--r--src/cz/crcs/ectester/common/test/Test.java83
-rw-r--r--src/cz/crcs/ectester/common/test/TestCallback.java11
-rw-r--r--src/cz/crcs/ectester/common/test/TestException.java15
-rw-r--r--src/cz/crcs/ectester/common/test/TestSuite.java100
-rw-r--r--src/cz/crcs/ectester/common/test/TestSuiteException.java14
-rw-r--r--src/cz/crcs/ectester/common/test/Testable.java38
-rw-r--r--src/cz/crcs/ectester/common/util/ByteUtil.java193
-rw-r--r--src/cz/crcs/ectester/common/util/CardUtil.java534
-rw-r--r--src/cz/crcs/ectester/common/util/ECUtil.java485
-rw-r--r--src/cz/crcs/ectester/common/util/FileUtil.java99
-rw-r--r--src/cz/crcs/ectester/common/util/Util.java28
-rw-r--r--src/cz/crcs/ectester/data/EC_Store.java405
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous112.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous128.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous160.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous192.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous224.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous256.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous320.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous384.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous512.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/anomalous521.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/curves.xml92
-rw-r--r--src/cz/crcs/ectester/data/anomalous/miyaji128a1.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/miyaji128a2.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/miyaji128b1.csv1
-rw-r--r--src/cz/crcs/ectester/data/anomalous/miyaji128b2.csv1
-rw-r--r--src/cz/crcs/ectester/data/anssi/curves.xml10
-rw-r--r--src/cz/crcs/ectester/data/anssi/frp256v1.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn158.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn190.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn222.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn254.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn286.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn318.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn350.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn382.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn414.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn446.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn478.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn510.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn542.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn574.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn606.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/bn638.csv1
-rw-r--r--src/cz/crcs/ectester/data/bn/curves.xml116
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP160r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP160t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP192r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP192t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP224r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP224t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP256r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP256t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP320r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP320t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP384r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP384t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP512r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/brainpoolP512t1.csv1
-rw-r--r--src/cz/crcs/ectester/data/brainpool/curves.xml88
-rw-r--r--src/cz/crcs/ectester/data/categories.xml107
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p128.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p16.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p2.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p32.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p4.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p56467.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p64.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p65521.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p65535.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor128p8.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p16.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p2.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p32.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p4.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p56467.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p64.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p65521.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p65535.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor160p8.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t128.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t16.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t2.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t32.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t4.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t64.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor163t8.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor192p2.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor192p4.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor192p8.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t128.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t16.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t2.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t32.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t4.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t64.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/cofactor233t8.csv1
-rw-r--r--src/cz/crcs/ectester/data/cofactor/curves.xml225
-rw-r--r--src/cz/crcs/ectester/data/cofactor/keys.xml742
-rw-r--r--src/cz/crcs/ectester/data/cofactor/secg_keys.xml221
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_128.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_192.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_224.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_256.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_384.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_512.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/carmichael_521.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128_pq.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128_pq1.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128_pq2.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128_rg0.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite128_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160_pq.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160_pq1.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160_pq2.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160_rg0.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite160_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192_pq.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192_pq1.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192_pq2.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192_rg0.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite192_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224_pq.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224_pq1.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224_pq2.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224_rg0.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite224_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256_pq.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256_pq1.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256_pq2.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256_rg0.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite256_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite384.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite384_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite521.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/composite521_small.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/curves.xml668
-rw-r--r--src/cz/crcs/ectester/data/composite/keys.xml568
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/10.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/112.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/12.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/128.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/135.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/14.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/140.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/144.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/146.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/148.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/150.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/152.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/152_cofactor.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/16.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/20.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/25.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/2a.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/2b.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/3.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/32.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/4.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/48.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/5.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/6.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/64.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/7.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/70.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/8.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/80.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/90.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/first/96.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/140.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/141.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/142.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/143.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/144.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/145.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/146.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/147.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/148.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/149.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/150.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/151.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/152.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/153.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/154.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/155.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/156.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/157.csv1
-rw-r--r--src/cz/crcs/ectester/data/composite/varying/160/second/158.csv1
-rw-r--r--src/cz/crcs/ectester/data/degenerate/brainpool.xml362
-rw-r--r--src/cz/crcs/ectester/data/degenerate/cofactor.xml123
-rw-r--r--src/cz/crcs/ectester/data/degenerate/keys.xml16
-rw-r--r--src/cz/crcs/ectester/data/degenerate/secg.xml628
-rw-r--r--src/cz/crcs/ectester/data/gost/curves.xml16
-rw-r--r--src/cz/crcs/ectester/data/gost/gost256.csv1
-rw-r--r--src/cz/crcs/ectester/data/gost/gost512.csv1
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160r1.xml344
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160t1.xml344
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192r1.xml386
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192t1.xml386
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224r1.xml434
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224t1.xml434
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256r1.xml482
-rw-r--r--src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256t1.xml482
-rw-r--r--src/cz/crcs/ectester/data/invalid/keys.xml60
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/b163.xml325
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/b233.xml427
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/b283.xml499
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/k163.xml325
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/k233.xml427
-rw-r--r--src/cz/crcs/ectester/data/invalid/nist/k283.xml499
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml266
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml266
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml289
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml290
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml344
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml344
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml392
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml434
-rw-r--r--src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml482
-rw-r--r--src/cz/crcs/ectester/data/misc/keys.xml50
-rw-r--r--src/cz/crcs/ectester/data/misc/results.xml14
-rw-r--r--src/cz/crcs/ectester/data/mnt/curves.xml74
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt1.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt2_1.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt2_2.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt3_1.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt3_2.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt3_3.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt4.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt5_1.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt5_2.csv1
-rw-r--r--src/cz/crcs/ectester/data/mnt/mnt5_3.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/b163.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/b233.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/b283.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/b409.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/b571.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/curves.xml95
-rw-r--r--src/cz/crcs/ectester/data/nist/k163.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/k233.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/k283.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/k409.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/k571.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/p192.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/p224.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/p256.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/p384.csv1
-rw-r--r--src/cz/crcs/ectester/data/nist/p521.csv1
-rw-r--r--src/cz/crcs/ectester/data/other/curve25519.csv1
-rw-r--r--src/cz/crcs/ectester/data/other/curves.xml33
-rw-r--r--src/cz/crcs/ectester/data/other/m221.csv1
-rw-r--r--src/cz/crcs/ectester/data/other/m383.csv1
-rw-r--r--src/cz/crcs/ectester/data/other/m511.csv1
-rw-r--r--src/cz/crcs/ectester/data/schema.xsd133
-rw-r--r--src/cz/crcs/ectester/data/secg/curves.xml161
-rw-r--r--src/cz/crcs/ectester/data/secg/secp112r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp112r2.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp128r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp128r2.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp160k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp160r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp160r2.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp192k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp192r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp224r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp256k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp256r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp384r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/secp521r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect163k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect163r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect163r2.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect233k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect233r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect239k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect283k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect283r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect409k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect409r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect571k1.csv1
-rw-r--r--src/cz/crcs/ectester/data/secg/sect571r1.csv1
-rw-r--r--src/cz/crcs/ectester/data/supersingular/curves.xml32
-rw-r--r--src/cz/crcs/ectester/data/supersingular/ss128.csv1
-rw-r--r--src/cz/crcs/ectester/data/supersingular/ss192.csv1
-rw-r--r--src/cz/crcs/ectester/data/supersingular/ss224.csv1
-rw-r--r--src/cz/crcs/ectester/data/supersingular/ss256.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyA.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyB.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyA.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyB.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyA.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyB.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyA.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyB.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/keys.xml216
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b163-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b163-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b163-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b163-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b233-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b233-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b233-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b233-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b283-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b283-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b283-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b283-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b409-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b409-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b409-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b409-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b571-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b571-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b571-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/b571-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k163-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k163-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k163-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k163-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k233-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k233-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k233-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k233-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k283-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k283-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k283-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k283-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k409-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k409-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k409-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k409-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k571-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k571-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k571-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/k571-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p192-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p192-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p192-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p192-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p224-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p224-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p224-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p224-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p256-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p256-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p256-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p256-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p384-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p384-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p384-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p384-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p521-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p521-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p521-keyCAVS.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/nist/p521-keyIUT.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/results.xml263
-rw-r--r--src/cz/crcs/ectester/data/test/secg/secp160r1-dh-kdf.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/secp160r1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/secp160r1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/secp160r1-keyU.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/secp160r1-keyV.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dh-kdf.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dh-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dh-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-kdf.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-raw.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-sha1.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-keyU.csv1
-rw-r--r--src/cz/crcs/ectester/data/test/secg/sect163k1-keyV.csv1
-rw-r--r--src/cz/crcs/ectester/data/twist/cofactor/cofactor128p4.xml44
-rw-r--r--src/cz/crcs/ectester/data/twist/cofactor/cofactor160p4.xml74
-rw-r--r--src/cz/crcs/ectester/data/twist/keys.xml54
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/b163.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/b233.xml43
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/b283.xml43
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/k163.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/k233.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/k283.xml13
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/p192.xml19
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/p224.xml43
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/p256.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/p384.xml7
-rw-r--r--src/cz/crcs/ectester/data/twist/nist/p521.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp112r1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp112r2.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp128r1.xml25
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp128r2.xml19
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp160k1.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp160r1.xml19
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp160r2.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp192k1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp192r1.xml19
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp224r1.xml43
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp256k1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp256r1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp384r1.xml7
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/secp521r1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect163k1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect163r1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect163r2.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect233k1.xml37
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect233r1.xml43
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect239k1.xml31
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect283k1.xml13
-rw-r--r--src/cz/crcs/ectester/data/twist/secg/sect283r1.xml43
-rw-r--r--src/cz/crcs/ectester/data/wrong/curves.xml95
-rw-r--r--src/cz/crcs/ectester/data/wrong/keys.xml28
-rw-r--r--src/cz/crcs/ectester/data/wrong/results.xml213
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp128.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp160.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp192.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp224.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp256.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp384.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongp521.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt163.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt233.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt239.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt283.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt409.csv1
-rw-r--r--src/cz/crcs/ectester/data/wrong/wrongt571.csv1
-rw-r--r--src/cz/crcs/ectester/data/wycheproof/keys.xml892
-rw-r--r--src/cz/crcs/ectester/data/wycheproof/results.xml589
-rw-r--r--src/cz/crcs/ectester/data/x962/curves.xml48
-rw-r--r--src/cz/crcs/ectester/data/x962/prime192v1.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime192v2.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime192v3.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime239v1.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime239v2.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime239v3.csv1
-rw-r--r--src/cz/crcs/ectester/data/x962/prime256v1.csv1
-rw-r--r--src/cz/crcs/ectester/reader/CardMngr.java478
-rw-r--r--src/cz/crcs/ectester/reader/ECTesterReader.java1104
-rw-r--r--src/cz/crcs/ectester/reader/ISO7816_status_words.txt71
-rw-r--r--src/cz/crcs/ectester/reader/command/Command.java920
-rw-r--r--src/cz/crcs/ectester/reader/output/FileTestWriter.java53
-rw-r--r--src/cz/crcs/ectester/reader/output/ResponseWriter.java43
-rw-r--r--src/cz/crcs/ectester/reader/output/TextTestWriter.java71
-rw-r--r--src/cz/crcs/ectester/reader/output/XMLTestWriter.java159
-rw-r--r--src/cz/crcs/ectester/reader/output/YAMLTestWriter.java119
-rw-r--r--src/cz/crcs/ectester/reader/response/Response.java526
-rw-r--r--src/cz/crcs/ectester/reader/test/CardCofactorSuite.java65
-rw-r--r--src/cz/crcs/ectester/reader/test/CardCompositeSuite.java122
-rw-r--r--src/cz/crcs/ectester/reader/test/CardCompressionSuite.java155
-rw-r--r--src/cz/crcs/ectester/reader/test/CardDefaultSuite.java141
-rw-r--r--src/cz/crcs/ectester/reader/test/CardDegenerateSuite.java69
-rw-r--r--src/cz/crcs/ectester/reader/test/CardEdgeCasesSuite.java336
-rw-r--r--src/cz/crcs/ectester/reader/test/CardInvalidSuite.java72
-rw-r--r--src/cz/crcs/ectester/reader/test/CardMiscSuite.java77
-rw-r--r--src/cz/crcs/ectester/reader/test/CardSignatureSuite.java68
-rw-r--r--src/cz/crcs/ectester/reader/test/CardTestSuite.java94
-rw-r--r--src/cz/crcs/ectester/reader/test/CardTestVectorSuite.java235
-rw-r--r--src/cz/crcs/ectester/reader/test/CardTwistSuite.java67
-rw-r--r--src/cz/crcs/ectester/reader/test/CardWrongSuite.java232
-rw-r--r--src/cz/crcs/ectester/reader/test/CommandTest.java85
-rw-r--r--src/cz/crcs/ectester/reader/test/CommandTestable.java44
-rw-r--r--src/cz/crcs/ectester/reader/test/PerformanceTest.java141
-rw-r--r--src/cz/crcs/ectester/standalone/ECTesterStandalone.java942
-rw-r--r--src/cz/crcs/ectester/standalone/consts/Ident.java88
-rw-r--r--src/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java126
-rw-r--r--src/cz/crcs/ectester/standalone/consts/KeyPairGeneratorIdent.java55
-rw-r--r--src/cz/crcs/ectester/standalone/consts/SignatureIdent.java141
-rw-r--r--src/cz/crcs/ectester/standalone/libs/BoringsslLib.java19
-rw-r--r--src/cz/crcs/ectester/standalone/libs/BotanLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/BouncyCastleLib.java28
-rw-r--r--src/cz/crcs/ectester/standalone/libs/CryptoppLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/ECLibrary.java26
-rw-r--r--src/cz/crcs/ectester/standalone/libs/GcryptLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/IppcpLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/LibresslLib.java19
-rw-r--r--src/cz/crcs/ectester/standalone/libs/MatrixsslLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/MbedTLSLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/MscngLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/NativeECLibrary.java81
-rw-r--r--src/cz/crcs/ectester/standalone/libs/NettleLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/OpensslLib.java19
-rw-r--r--src/cz/crcs/ectester/standalone/libs/ProviderECLibrary.java113
-rw-r--r--src/cz/crcs/ectester/standalone/libs/SunECLib.java28
-rw-r--r--src/cz/crcs/ectester/standalone/libs/TomcryptLib.java20
-rw-r--r--src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java18
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/.clang-format90
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/.gitignore6
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/Makefile217
-rwxr-xr-xsrc/cz/crcs/ectester/standalone/libs/jni/Makefile.bat163
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java184
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java185
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java449
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java367
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java159
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java657
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/boringssl.c516
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/botan.cpp528
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/c_timing.c254
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/c_timing.h44
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/c_utils.c252
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/c_utils.h68
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.cpp115
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.hpp50
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/cryptopp.cpp767
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/gcrypt.c623
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/ippcp.c698
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/libressl.c609
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/matrixssl.c397
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/mbedtls.c544
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/mscng.c1273
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/native.h2044
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/nettle.c511
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/openssl.c584
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/tomcrypt.c465
-rw-r--r--src/cz/crcs/ectester/standalone/output/TextTestWriter.java56
-rw-r--r--src/cz/crcs/ectester/standalone/output/XMLTestWriter.java156
-rw-r--r--src/cz/crcs/ectester/standalone/output/YAMLTestWriter.java124
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/KeyAgreementTest.java59
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java179
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTest.java43
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTestable.java70
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/PerformanceTest.java109
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/SignatureTest.java43
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/SignatureTestable.java143
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/StandaloneTestable.java25
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneCofactorSuite.java111
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneCompositeSuite.java210
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneDefaultSuite.java108
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneDegenerateSuite.java121
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneEdgeCasesSuite.java314
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneInvalidSuite.java120
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneMiscSuite.java150
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandalonePerformanceSuite.java142
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneSignatureSuite.java87
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneTestSuite.java25
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneTestVectorSuite.java63
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneTwistSuite.java120
-rw-r--r--src/cz/crcs/ectester/standalone/test/suites/StandaloneWrongSuite.java344
585 files changed, 0 insertions, 48985 deletions
diff --git a/src/cz/crcs/ectester/applet/AppletBase.java b/src/cz/crcs/ectester/applet/AppletBase.java
deleted file mode 100644
index 9a8a479..0000000
--- a/src/cz/crcs/ectester/applet/AppletBase.java
+++ /dev/null
@@ -1,1026 +0,0 @@
-package cz.crcs.ectester.applet;
-
-import javacard.framework.*;
-import javacard.security.*;
-
-/**
- * Applet base class, that handles instructions, given
- * either basic or extended length APDUs.
- *
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class AppletBase extends Applet {
-
- // MAIN INSTRUCTION CLASS
- public static final byte CLA_ECTESTERAPPLET = (byte) 0xB0;
-
- // INSTRUCTIONS
- public static final byte INS_ALLOCATE = (byte) 0x5a;
- public static final byte INS_CLEAR = (byte) 0x5b;
- public static final byte INS_SET = (byte) 0x5c;
- public static final byte INS_TRANSFORM = (byte) 0x5d;
- public static final byte INS_GENERATE = (byte) 0x5e;
- public static final byte INS_EXPORT = (byte) 0x5f;
- public static final byte INS_ECDH = (byte) 0x70;
- public static final byte INS_ECDH_DIRECT = (byte) 0x71;
- public static final byte INS_ECDSA = (byte) 0x72;
- public static final byte INS_ECDSA_SIGN = (byte) 0x73;
- public static final byte INS_ECDSA_VERIFY = (byte) 0x74;
- public static final byte INS_CLEANUP = (byte) 0x75;
- public static final byte INS_ALLOCATE_KA = (byte) 0x76;
- public static final byte INS_ALLOCATE_SIG = (byte) 0x77;
- public static final byte INS_GET_INFO = (byte) 0x78;
- public static final byte INS_SET_DRY_RUN_MODE = (byte) 0x79;
- public static final byte INS_BUFFER = (byte) 0x7a;
- public static final byte INS_PERFORM = (byte) 0x7b;
-
- // PARAMETERS for P1 and P2
- public static final byte KEYPAIR_LOCAL = (byte) 0x01;
- public static final byte KEYPAIR_REMOTE = (byte) 0x02;
- public static final byte KEYPAIR_BOTH = KEYPAIR_LOCAL | KEYPAIR_REMOTE;
- public static final byte BUILD_KEYPAIR = (byte) 0x01;
- public static final byte BUILD_KEYBUILDER = (byte) 0x02;
- public static final byte EXPORT_TRUE = (byte) 0xff;
- public static final byte EXPORT_FALSE = (byte) 0x00;
- public static final byte MODE_NORMAL = (byte) 0xaa;
- public static final byte MODE_DRY_RUN = (byte) 0xbb;
-
- // STATUS WORDS
- public static final short SW_SIG_VERIFY_FAIL = (short) 0x0ee1;
- public static final short SW_DH_DHC_MISMATCH = (short) 0x0ee2;
- public static final short SW_KEYPAIR_NULL = (short) 0x0ee3;
- public static final short SW_KA_NULL = (short) 0x0ee4;
- public static final short SW_SIGNATURE_NULL = (short) 0x0ee5;
- public static final short SW_OBJECT_NULL = (short) 0x0ee6;
- public static final short SW_CANNOT_FIT = (short) 0x0ee7;
- public static final short SW_Exception = (short) 0xff01;
- public static final short SW_ArrayIndexOutOfBoundsException = (short) 0xff02;
- public static final short SW_ArithmeticException = (short) 0xff03;
- public static final short SW_ArrayStoreException = (short) 0xff04;
- public static final short SW_NullPointerException = (short) 0xff05;
- public static final short SW_NegativeArraySizeException = (short) 0xff06;
- public static final short SW_CryptoException_prefix = (short) 0xf100;
- public static final short SW_SystemException_prefix = (short) 0xf200;
- public static final short SW_PINException_prefix = (short) 0xf300;
- public static final short SW_TransactionException_prefix = (short) 0xf400;
- public static final short SW_CardRuntimeException_prefix = (short) 0xf500;
-
- //
- public static final short BASE_221 = (short) 0x0221;
- public static final short BASE_222 = (short) 0x0222;
-
- //
- public static final short CDATA_BASIC = (short) 5;
- public static final short CDATA_EXTENDED = (short) 7;
-
- //
- public static final byte[] VERSION = {'v', '0', '.', '3', '.', '3'};
-
- public static final short ARRAY_LENGTH = 0x100;
- public static final short APDU_MAX_LENGTH = 1024;//512
-
- // TEMPORARRY ARRAY IN RAM
- byte[] ramArray = null;
- byte[] ramArray2 = null;
- byte[] apduArray = null;
- short apduEnd = 0;
- short cdata = 0;
-
- RandomData randomData = null;
-
- ECKeyTester keyTester = null;
- ECKeyGenerator keyGenerator = null;
- KeyPair localKeypair = null;
- KeyPair remoteKeypair = null;
-
- protected AppletBase(byte[] buffer, short offset, byte length) {
- if (length > 9) {
- /*
- short dataOffset = offset;
- // shift to privilege offset
- dataOffset += (short) (1 + buffer[offset]);
- // finally shift to Application specific offset
- dataOffset += (short) (1 + buffer[dataOffset]);
- // go to proprietary data
- dataOffset++;
- */
- short resetMemory = JCSystem.getAvailableMemory(JCSystem.MEMORY_TYPE_TRANSIENT_RESET);
- short deselectMemory = JCSystem.getAvailableMemory(JCSystem.MEMORY_TYPE_TRANSIENT_DESELECT);
- short bigMem;
- short smallMem;
- byte bigMemType;
- byte smallMemType;
- if (resetMemory >= deselectMemory) {
- bigMem = resetMemory;
- smallMem = deselectMemory;
- bigMemType = JCSystem.CLEAR_ON_RESET;
- smallMemType = JCSystem.CLEAR_ON_DESELECT;
- } else {
- bigMem = deselectMemory;
- smallMem = resetMemory;
- bigMemType = JCSystem.CLEAR_ON_DESELECT;
- smallMemType = JCSystem.CLEAR_ON_RESET;
- }
- short[] lensBig = new short[]{APDU_MAX_LENGTH + 2 * ARRAY_LENGTH, APDU_MAX_LENGTH + ARRAY_LENGTH, APDU_MAX_LENGTH,};
- short[] lensSmall = new short[]{0, ARRAY_LENGTH, 2 * ARRAY_LENGTH};
- byte[] allocsBig = new byte[]{0x07, 0x03, 0x01};
- boolean done = false;
- for (short i = 0; i < 3; ++i) {
- if (lensBig[i] <= bigMem && lensSmall[i] <= smallMem) {
- byte allocI = 1;
- while (allocI < 0x08) {
- byte type = ((allocI & allocsBig[i]) != 0) ? bigMemType : smallMemType;
- switch (allocI) {
- case 0x01:
- apduArray = JCSystem.makeTransientByteArray(APDU_MAX_LENGTH, type);
- break;
- case 0x02:
- ramArray = JCSystem.makeTransientByteArray(ARRAY_LENGTH, type);
- break;
- case 0x04:
- ramArray2 = JCSystem.makeTransientByteArray(ARRAY_LENGTH, type);
- break;
- }
- allocI = (byte) (allocI << 1);
- }
- done = true;
- break;
- }
- }
- if (!done) {
- ISOException.throwIt((short) 0x6a84);
- }
-
- randomData = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
- EC_Consts.randomData = randomData;
-
- keyGenerator = new ECKeyGenerator();
- keyTester = new ECKeyTester();
- }
- }
-
- public void process(APDU apdu) throws ISOException {
- // get the APDU buffer
- byte[] apduBuffer = apdu.getBuffer();
- byte cla = apduBuffer[ISO7816.OFFSET_CLA];
- byte ins = apduBuffer[ISO7816.OFFSET_INS];
-
- // ignore the applet select command dispatched to the process
- if (selectingApplet()) {
- return;
- }
-
- if (cla == CLA_ECTESTERAPPLET) {
- try {
- if (ins == INS_BUFFER) {
- short read = readAPDU(apdu, true);
- if (read == -1) {
- ISOException.throwIt(SW_CANNOT_FIT);
- return;
- }
- apduEnd += read;
- apdu.setOutgoingAndSend((short) 0, (short) 0);
- return;
- } else {
- apduEnd = 0;
- if (ins == INS_PERFORM) {
- ins = apduArray[ISO7816.OFFSET_INS];
- apdu.setIncomingAndReceive();
- } else {
- if (readAPDU(apdu, false) == -1) {
- ISOException.throwIt(SW_CANNOT_FIT);
- return;
- }
- }
- }
-
- short length = 0;
- switch (ins) {
- case INS_ALLOCATE_KA:
- length = insAllocateKA(apdu);
- break;
- case INS_ALLOCATE_SIG:
- length = insAllocateSig(apdu);
- break;
- case INS_ALLOCATE:
- length = insAllocate(apdu);
- break;
- case INS_CLEAR:
- length = insClear(apdu);
- break;
- case INS_SET:
- length = insSet(apdu);
- break;
- case INS_TRANSFORM:
- length = insTransform(apdu);
- break;
- case INS_GENERATE:
- length = insGenerate(apdu);
- break;
- case INS_EXPORT:
- length = insExport(apdu);
- break;
- case INS_ECDH:
- length = insECDH(apdu);
- break;
- case INS_ECDH_DIRECT:
- length = insECDH_direct(apdu);
- break;
- case INS_ECDSA:
- length = insECDSA(apdu);
- break;
- case INS_ECDSA_SIGN:
- length = insECDSA_sign(apdu);
- break;
- case INS_ECDSA_VERIFY:
- length = insECDSA_verify(apdu);
- break;
- case INS_CLEANUP:
- length = insCleanup(apdu);
- break;
- case INS_GET_INFO:
- length = insGetInfo(apdu);
- break;
- case INS_SET_DRY_RUN_MODE:
- length = insSetDryRunMode(apdu);
- break;
- default:
- // The INS code is not supported by the dispatcher
- ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
- break;
- }
- apdu.setOutgoingAndSend((short) 0, length);
-
- } catch (ISOException e) {
- throw e; // Our exception from code, just re-emit
- } catch (ArrayIndexOutOfBoundsException e) {
- ISOException.throwIt(SW_ArrayIndexOutOfBoundsException);
- } catch (ArithmeticException e) {
- ISOException.throwIt(SW_ArithmeticException);
- } catch (ArrayStoreException e) {
- ISOException.throwIt(SW_ArrayStoreException);
- } catch (NullPointerException e) {
- ISOException.throwIt(SW_NullPointerException);
- } catch (NegativeArraySizeException e) {
- ISOException.throwIt(SW_NegativeArraySizeException);
- } catch (CryptoException e) {
- ISOException.throwIt((short) (SW_CryptoException_prefix | e.getReason()));
- } catch (SystemException e) {
- ISOException.throwIt((short) (SW_SystemException_prefix | e.getReason()));
- } catch (PINException e) {
- ISOException.throwIt((short) (SW_PINException_prefix | e.getReason()));
- } catch (TransactionException e) {
- ISOException.throwIt((short) (SW_TransactionException_prefix | e.getReason()));
- } catch (CardRuntimeException e) {
- ISOException.throwIt((short) (SW_CardRuntimeException_prefix | e.getReason()));
- } catch (Exception e) {
- ISOException.throwIt(SW_Exception);
- }
-
- } else ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
- }
-
- private short readAPDU(APDU apdu, boolean skipHeader) {
- byte[] apduBuffer = apdu.getBuffer();
-
- /* How much stuff is in apduBuffer */
- short read = apdu.setIncomingAndReceive();
- short cdataOffset = getOffsetCdata(apdu);
- read += cdataOffset;
-
- /* Where to start reading from? */
- short offset = 0;
- if (skipHeader) {
- offset = cdataOffset;
- cdata = CDATA_EXTENDED;
- } else {
- cdata = CDATA_BASIC;
- }
-
- /* How much stuff was really sent in this APDU? */
- short total = (short) (getIncomingLength(apdu) + cdataOffset);
- short todo = (short) (total - offset);
- /* Can we fit? */
- if (todo > (short) (apduArray.length - apduEnd)) {
- return -1;
- }
-
- /* How much stuff was copied over. */
- short written = 0;
- while (written < todo) {
- Util.arrayCopyNonAtomic(apduBuffer, offset, apduArray, (short) (apduEnd + written), (short) (read - offset));
- written += (short) (read - offset);
- offset = 0;
- read = apdu.receiveBytes((short) 0);
- }
- return written;
- }
-
- abstract short getOffsetCdata(APDU apdu);
-
- abstract short getIncomingLength(APDU apdu);
-
- abstract short getBase();
-
- /**
- * Allocates KeyAgreement object, returns allocate SW.
- *
- * @param apdu DATA = byte KeyAgreementType
- * @return length of response
- */
- private short insAllocateKA(APDU apdu) {
- byte kaType = apduArray[cdata];
- short sw = keyTester.allocateKA(kaType);
- Util.setShort(apdu.getBuffer(), (short) 0, sw);
- return 2;
- }
-
- /**
- * Allocates a Signature object, returns allocate SW.
- *
- * @param apdu DATA = byte SignatureType
- * @return length of response
- */
- private short insAllocateSig(APDU apdu) {
- byte sigType = apduArray[cdata];
- short sw = keyTester.allocateSig(sigType);
- Util.setShort(apdu.getBuffer(), (short) 0, sw);
- return 2;
- }
-
- /**
- * Allocates local and remote keyPairs.
- * returns allocate SWs
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 = byte build
- * DATA = short keyLength
- * byte keyClass
- * @return length of response
- */
- private short insAllocate(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte build = apduArray[ISO7816.OFFSET_P2];
- short keyLength = Util.getShort(apduArray, cdata);
- byte keyClass = apduArray[(short) (cdata + 2)];
-
- return allocate(keyPair, build, keyLength, keyClass, apdu.getBuffer(), (short) 0);
- }
-
- /**
- * Clears local and remote keyPair's keys {@code .clearKey()}.
- * returns clearKey SWs
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 =
- * @return length of response
- */
- private short insClear(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += clear(localKeypair, apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += clear(remoteKeypair, apdu.getBuffer(), len);
- }
-
- return len;
- }
-
- /**
- * Sets curve parameters on local and remote keyPairs.
- * returns setCurve SWs
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 = byte curve (EC_Consts.CURVE_*)
- * DATA = short params (EC_Consts.PARAMETER_* | ...)
- * <p>
- * if curveID = CURVE_EXTERNAL:
- * [short paramLength, byte[] param],
- * for all params in params,
- * in order: field,a,b,g,r,k,w,s
- * @return length of response
- */
- private short insSet(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte curve = apduArray[ISO7816.OFFSET_P2];
- short params = Util.getShort(apduArray, cdata);
-
- short len = 0;
-
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += set(localKeypair, curve, params, apduArray, (short) (cdata + 2), apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += set(remoteKeypair, curve, params, apduArray, (short) (cdata + 2), apdu.getBuffer(), len);
- }
-
- return len;
- }
-
- /**
- * Transforms curve paramaters of local and remote keyPairs.
- * returns transformCurve SWs
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 = byte key (EC_Consts.KEY_* | ...)
- * DATA = short params (EC_Consts.PARAMETER_* | ...)
- * short transformation (EC_Consts.TRANSFORMATION_* || ...)
- * @return length of response
- */
- private short insTransform(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte key = apduArray[ISO7816.OFFSET_P2];
- short params = Util.getShort(apduArray, cdata);
- short transformation = Util.getShort(apduArray, (short) (cdata + 2));
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += transform(localKeypair, key, params, transformation, apdu.getBuffer(), (short) 0);
- }
-
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += transform(remoteKeypair, key, params, transformation, apdu.getBuffer(), len);
- }
-
- return len;
- }
-
- /**
- * Generates the local and remote keyPairs.
- * returns generate SWs
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 =
- * @return length of response
- */
- private short insGenerate(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += generate(localKeypair, apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += generate(remoteKeypair, apdu.getBuffer(), len);
- }
-
- return len;
- }
-
- /**
- * Exports selected key and domain parameters from the selected keyPair and key.
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_* | ...)
- * P2 = byte key (EC_Consts.KEY_* | ...)
- * DATA = short params
- * @return length of response
- */
- private short insExport(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte key = apduArray[ISO7816.OFFSET_P2];
- short params = Util.getShort(apduArray, cdata);
-
- short swOffset = 0;
- short len = (short) (keyPair == KEYPAIR_BOTH ? 4 : 2);
-
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += export(localKeypair, key, params, apdu.getBuffer(), swOffset, len);
- swOffset += 2;
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += export(remoteKeypair, key, params, apdu.getBuffer(), swOffset, len);
- }
-
- return len;
- }
-
- /**
- * Performs ECDH, between the pubkey specified in P1(local/remote) and the privkey specified in P2(local/remote).
- * returns deriveSecret SW, {@code if(export == EXPORT_TRUE)} => short secretlen, byte[] secret
- *
- * @param apdu P1 = byte pubkey (KEYPAIR_*)
- * P2 = byte privkey (KEYPAIR_*)
- * DATA = byte export (EXPORT_TRUE || EXPORT_FALSE)
- * short transformation (EC_Consts.TRANSFORMATION_* | ...)
- * byte type (EC_Consts.KA_* | ...)
- * @return length of response
- */
- private short insECDH(APDU apdu) {
- byte pubkey = apduArray[ISO7816.OFFSET_P1];
- byte privkey = apduArray[ISO7816.OFFSET_P2];
- byte export = apduArray[cdata];
- short transformation = Util.getShort(apduArray, (short) (cdata + 1));
- byte type = apduArray[(short) (cdata + 3)];
-
- return ecdh(pubkey, privkey, export, transformation, type, apdu.getBuffer(), (short) 0);
- }
-
- /**
- * Performs ECDH, directly between the privkey specified in P1(local/remote) and the raw data
- *
- * @param apdu P1 = byte privkey (KEYPAIR_*)
- * P2 = byte export (EXPORT_TRUE || EXPORT_FALSE)
- * DATA = short transformation (EC_Consts.TRANSFORMATION_* | ...)
- * byte type (EC_Consts.KA_* | ...)
- * short length
- * byte[] pubkey
- * @return length of response
- */
- private short insECDH_direct(APDU apdu) {
- byte privkey = apduArray[ISO7816.OFFSET_P1];
- byte export = apduArray[ISO7816.OFFSET_P2];
- short transformation = Util.getShort(apduArray, cdata);
- byte type = apduArray[(short) (cdata + 2)];
- short length = Util.getShort(apduArray, (short) (cdata + 3));
-
- return ecdh_direct(privkey, export, transformation, type, (short) (cdata + 5), length, apdu.getBuffer(), (short) 0);
- }
-
- /**
- * Performs ECDSA signature and verification on data provided or random, using the keyPair in P1(local/remote).
- * returns ecdsa SW, {@code if(export == EXPORT_TRUE)} => short signature_length, byte[] signature
- *
- * @param apdu P1 = byte keyPair (KEYPAIR_*)
- * P2 = byte export (EXPORT_TRUE || EXPORT_FALSE)
- * DATA = byte sigType
- * short dataLength (00 = random data generated, !00 = data length)
- * byte[] data
- * @return length of response
- */
- private short insECDSA(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte export = apduArray[ISO7816.OFFSET_P2];
- byte sigType = apduArray[cdata];
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += ecdsa(localKeypair, sigType, export, apduArray, (short) (cdata + 1), apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += ecdsa(remoteKeypair, sigType, export, apduArray, (short) (cdata + 1), apdu.getBuffer(), len);
- }
-
- return len;
- }
-
- /**
- * @param apdu P1 = byte keyPair (KEYPAIR_*)
- * P2 = byte export (EXPORT_TRUE || EXPORT_FALSE)
- * DATA = byte sigType
- * short dataLength (00 = random data generated, !00 = data length)
- * byte[] data
- * @return length of response
- */
- private short insECDSA_sign(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte export = apduArray[ISO7816.OFFSET_P2];
- byte sigType = apduArray[cdata];
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += ecdsa_sign(localKeypair, sigType, export, apduArray, (short) (cdata + 1), apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += ecdsa_sign(remoteKeypair, sigType, export, apduArray, (short) (cdata + 1), apdu.getBuffer(), len);
- }
- return len;
- }
-
- /**
- * @param apdu P1 = byte keyPair (KEYPAIR_*)
- * P2 = byte sigType
- * DATA = short dataLength (00 = random data generated, !00 = data length)
- * byte[] data
- * short sigLength
- * byte[] signature
- * @return length of response
- */
- private short insECDSA_verify(APDU apdu) {
- byte keyPair = apduArray[ISO7816.OFFSET_P1];
- byte sigType = apduArray[ISO7816.OFFSET_P2];
-
- short len = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- len += ecdsa_verify(localKeypair, sigType, apduArray, cdata, apdu.getBuffer(), (short) 0);
- }
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- len += ecdsa_verify(remoteKeypair, sigType, apduArray, cdata, apdu.getBuffer(), len);
- }
- return len;
- }
-
-
- /**
- * Performs card memory cleanup via JCSystem.requestObjectDeletion()
- *
- * @param apdu no data
- * @return length of response
- */
- private short insCleanup(APDU apdu) {
- byte[] apdubuf = apdu.getBuffer();
-
- return cleanup(apdubuf, (short) 0);
- }
-
- /**
- * Gathers info about the applet and the card environment.
- *
- * @param apdu no data
- * @return length of response
- */
- private short insGetInfo(APDU apdu) {
- byte[] apdubuf = apdu.getBuffer();
-
- return getInfo(apdubuf, (short) 0);
- }
-
- /**
- * Set the dry run mode of the applet.
- *
- * @param apdu P1 = byte mode (MODE_* || ...)
- * @return length of response
- */
- private short insSetDryRunMode(APDU apdu) {
- byte[] apdubuf = apdu.getBuffer();
- byte mode = apduArray[ISO7816.OFFSET_P1];
-
- short len = 0;
- if (mode == MODE_NORMAL) {
- len = setDryRunMode(apdubuf, false, (short) 0);
- }
- if (mode == MODE_DRY_RUN) {
- len = setDryRunMode(apdubuf, true, (short) 0);
- }
- return len;
- }
-
- /**
- * @param keyPair which keyPair to use, local/remote (KEYPAIR_* | ...)
- * @param build whether to use KeyBuilder or Keypair alloc
- * @param keyLength key length to set
- * @param keyClass key class to allocate
- * @param outBuffer buffer to write sw to
- * @param outOffset offset into buffer
- * @return length of data written to the buffer
- */
- private short allocate(byte keyPair, byte build, short keyLength, byte keyClass, byte[] outBuffer, short outOffset) {
- short length = 0;
- if ((keyPair & KEYPAIR_LOCAL) != 0) {
- if ((build & BUILD_KEYPAIR) != 0) {
- localKeypair = keyGenerator.allocatePair(keyClass, keyLength);
- if (keyGenerator.getSW() != ISO7816.SW_NO_ERROR && (build & BUILD_KEYBUILDER) != 0) {
- localKeypair = keyGenerator.constructPair(keyClass, keyLength);
- }
- } else if ((build & BUILD_KEYBUILDER) != 0) {
- localKeypair = keyGenerator.constructPair(keyClass, keyLength);
- }
- Util.setShort(outBuffer, outOffset, keyGenerator.getSW());
- length += 2;
- }
-
- if ((keyPair & KEYPAIR_REMOTE) != 0) {
- if ((build & BUILD_KEYPAIR) != 0) {
- remoteKeypair = keyGenerator.allocatePair(keyClass, keyLength);
- if (keyGenerator.getSW() != ISO7816.SW_NO_ERROR && (build & BUILD_KEYBUILDER) != 0) {
- remoteKeypair = keyGenerator.constructPair(keyClass, keyLength);
- }
- } else if ((build & BUILD_KEYBUILDER) != 0) {
- remoteKeypair = keyGenerator.constructPair(keyClass, keyLength);
- }
- Util.setShort(outBuffer, (short) (outOffset + length), keyGenerator.getSW());
- length += 2;
- }
-
- return length;
- }
-
- /**
- * @param keyPair KeyPair to clear
- * @param outBuffer buffer to write sw to
- * @param outOffset offset into buffer
- * @return length of data written to the buffer
- */
- private short clear(KeyPair keyPair, byte[] outBuffer, short outOffset) {
- short sw = keyGenerator.clearPair(keyPair, EC_Consts.KEY_BOTH);
- Util.setShort(outBuffer, outOffset, sw);
-
- return 2;
- }
-
- /**
- * @param keyPair KeyPair to set params on
- * @param curve curve to set (EC_Consts.CURVE_*)
- * @param params parameters to set (EC_Consts.PARAMETER_* | ...)
- * @param inBuffer buffer to read params from
- * @param inOffset input offset in buffer
- * @param outBuffer buffer to write sw to
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short set(KeyPair keyPair, byte curve, short params, byte[] inBuffer, short inOffset, byte[] outBuffer, short outOffset) {
- short sw = ISO7816.SW_NO_ERROR;
-
- switch (curve) {
- case EC_Consts.CURVE_default:
- //default, dont set anything
- break;
- case EC_Consts.CURVE_external:
- //external
- sw = keyGenerator.setExternalCurve(keyPair, params, inBuffer, inOffset);
- break;
- default:
- //custom
- sw = keyGenerator.setCurve(keyPair, curve, params, ramArray, (short) 0);
- break;
- }
-
- Util.setShort(outBuffer, outOffset, sw);
- return 2;
- }
-
- /**
- * @param keyPair KeyPair to transform
- * @param key key to transform (EC_Consts.KEY_* | ...)
- * @param params parameters to transform (EC_Consts.PARAMETER_* | ...)
- * @param transformation transformation type (EC_Consts.TRANSFORMATION_*)
- * @param outBuffer buffer to output sw to
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short transform(KeyPair keyPair, byte key, short params, short transformation, byte[] outBuffer, short outOffset) {
- short sw = keyGenerator.transformCurve(keyPair, key, params, transformation, ramArray, (short) 0);
- Util.setShort(outBuffer, outOffset, sw);
- return 2;
- }
-
- /**
- * @param keyPair KeyPair to generate
- * @param outBuffer buffer to output sw to
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short generate(KeyPair keyPair, byte[] outBuffer, short outOffset) {
- short sw = keyGenerator.generatePair(keyPair);
- Util.setShort(outBuffer, outOffset, sw);
-
- return 2;
- }
-
- /**
- * @param keyPair KeyPair to export from
- * @param key which key to export from (EC_Consts.KEY_PUBLIC | EC_Consts.KEY_PRIVATE)
- * @param params which params to export (EC_Consts.PARAMETER_* | ...)
- * @param outBuffer buffer to export params to
- * @param swOffset offset to output sw to buffer
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short export(KeyPair keyPair, byte key, short params, byte[] outBuffer, short swOffset, short outOffset) {
- short length = 0;
-
- short sw = ISO7816.SW_NO_ERROR;
- if ((key & EC_Consts.KEY_PUBLIC) != 0) {
- //export params from public
- length += keyGenerator.exportParameters(keyPair, EC_Consts.KEY_PUBLIC, params, outBuffer, outOffset);
- sw = keyGenerator.getSW();
- }
- if ((key & EC_Consts.KEY_PRIVATE) != 0 && sw == ISO7816.SW_NO_ERROR) {
- //export params from private
- length += keyGenerator.exportParameters(keyPair, EC_Consts.KEY_PRIVATE, params, outBuffer, (short) (outOffset + length));
- sw = keyGenerator.getSW();
- }
- Util.setShort(outBuffer, swOffset, sw);
-
- return length;
- }
-
- /**
- * @param pubkey keyPair to use for public key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param privkey keyPair to use for private key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param export whether to export ECDH secret
- * @param transformation whether to transform the pubkey before ECDH
- * @param type KeyAgreement type to test
- * @param outBuffer buffer to write sw to, and export ECDH secret {@code if(export == EXPORT_TRUE)}
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short ecdh(byte pubkey, byte privkey, byte export, short transformation, byte type, byte[] outBuffer, short outOffset) {
- short length = 0;
-
- KeyPair pub = ((pubkey & KEYPAIR_LOCAL) != 0) ? localKeypair : remoteKeypair;
- KeyPair priv = ((privkey & KEYPAIR_LOCAL) != 0) ? localKeypair : remoteKeypair;
-
- short secretLength = 0;
- if (keyTester.getKaType() == type) {
- secretLength = keyTester.testKA(priv, pub, ramArray, (short) 0, ramArray2, (short) 0, transformation);
- } else {
- short allocateSW = keyTester.allocateKA(type);
- if (allocateSW == ISO7816.SW_NO_ERROR) {
- secretLength = keyTester.testKA(priv, pub, ramArray, (short) 0, ramArray2, (short) 0, transformation);
- }
- }
- Util.setShort(outBuffer, outOffset, keyTester.getSW());
- length += 2;
-
- if ((export == EXPORT_TRUE)) {
- Util.setShort(outBuffer, (short) (outOffset + length), secretLength);
- length += 2;
- Util.arrayCopyNonAtomic(ramArray2, (short) 0, outBuffer, (short) (outOffset + length), secretLength);
- length += secretLength;
- }
-
- return length;
- }
-
- private short ecdh_direct(byte privkey, byte export, short transformation, byte type, short keyOffset, short keyLength, byte[] outBuffer, short outOffset) {
- short length = 0;
-
- KeyPair priv = ((privkey & KEYPAIR_LOCAL) != 0) ? localKeypair : remoteKeypair;
-
- short secretLength = 0;
- if (keyTester.getKaType() == type) {
- secretLength = keyTester.testKA_direct(priv, apduArray, keyOffset, keyLength, ramArray2, (short) 0, transformation);
- } else {
- short allocateSW = keyTester.allocateKA(type);
- if (allocateSW == ISO7816.SW_NO_ERROR) {
- secretLength = keyTester.testKA_direct(priv, apduArray, keyOffset, keyLength, ramArray2, (short) 0, transformation);
- }
- }
-
- Util.setShort(outBuffer, outOffset, keyTester.getSW());
- length += 2;
-
- if ((export == EXPORT_TRUE)) {
- Util.setShort(outBuffer, (short) (outOffset + length), secretLength);
- length += 2;
- Util.arrayCopyNonAtomic(ramArray2, (short) 0, outBuffer, (short) (outOffset + length), secretLength);
- length += secretLength;
- }
- return length;
- }
-
- /**
- * @param sign keyPair to use for signing and verification
- * @param sigType Signature type to use
- * @param export whether to export ECDSA signature
- * @param inBuffer buffer to read dataLength and data to sign from
- * @param inOffset input offset in buffer
- * @param outBuffer buffer to write sw to, and export ECDSA signature {@code if(export == EXPORT_TRUE)}
- * @param outOffset output offset in buffer
- * @return length of data written to the buffer
- */
- private short ecdsa(KeyPair sign, byte sigType, byte export, byte[] inBuffer, short inOffset, byte[] outBuffer, short outOffset) {
- short length = 0;
-
- short dataLength = Util.getShort(inBuffer, inOffset);
- if (dataLength == 0) { //no data to sign
- //generate random
- dataLength = 64;
- randomData.generateData(ramArray, (short) 0, dataLength);
- } else {
- Util.arrayCopyNonAtomic(inBuffer, (short) (inOffset + 2), ramArray, (short) 0, dataLength);
- }
-
- short signatureLength = 0;
- if (keyTester.getSigType() == sigType) {
- signatureLength = keyTester.testECDSA((ECPrivateKey) sign.getPrivate(), (ECPublicKey) sign.getPublic(), ramArray, (short) 0, dataLength, ramArray2, (short) 0);
- } else {
- short allocateSW = keyTester.allocateSig(sigType);
- if (allocateSW == ISO7816.SW_NO_ERROR) {
- signatureLength = keyTester.testECDSA((ECPrivateKey) sign.getPrivate(), (ECPublicKey) sign.getPublic(), ramArray, (short) 0, dataLength, ramArray2, (short) 0);
- }
- }
- Util.setShort(outBuffer, outOffset, keyTester.getSW());
- length += 2;
-
- if (export == EXPORT_TRUE) {
- Util.setShort(outBuffer, (short) (outOffset + length), signatureLength);
- length += 2;
-
- Util.arrayCopyNonAtomic(ramArray2, (short) 0, outBuffer, (short) (outOffset + length), signatureLength);
- length += signatureLength;
- }
-
- return length;
- }
-
- private short ecdsa_sign(KeyPair sign, byte sigType, byte export, byte[] inBuffer, short inOffset, byte[] outBuffer, short outOffset) {
- short length = 0;
-
- short dataLength = Util.getShort(inBuffer, inOffset);
- if (dataLength == 0) { //no data to sign
- //generate random
- dataLength = 64;
- randomData.generateData(ramArray, (short) 0, dataLength);
- } else {
- Util.arrayCopyNonAtomic(inBuffer, (short) (inOffset + 2), ramArray, (short) 0, dataLength);
- }
-
- short signatureLength = 0;
- if (keyTester.getSigType() == sigType) {
- signatureLength = keyTester.testECDSA_sign((ECPrivateKey) sign.getPrivate(), ramArray, (short) 0, dataLength, ramArray2, (short) 0);
- } else {
- short allocateSW = keyTester.allocateSig(sigType);
- if (allocateSW == ISO7816.SW_NO_ERROR) {
- signatureLength = keyTester.testECDSA_sign((ECPrivateKey) sign.getPrivate(), ramArray, (short) 0, dataLength, ramArray2, (short) 0);
- }
- }
- Util.setShort(outBuffer, outOffset, keyTester.getSW());
- length += 2;
-
- if (export == EXPORT_TRUE) {
- Util.setShort(outBuffer, (short) (outOffset + length), signatureLength);
- length += 2;
-
- Util.arrayCopyNonAtomic(ramArray2, (short) 0, outBuffer, (short) (outOffset + length), signatureLength);
- length += signatureLength;
- }
-
- return length;
- }
-
- private short ecdsa_verify(KeyPair verify, byte sigType, byte[] inBuffer, short inOffset, byte[] outBuffer, short outOffset) {
- short length = 0;
-
- short dataLength = Util.getShort(inBuffer, inOffset);
- short dataOffset = (short) (inOffset + 2);
- short sigLength = Util.getShort(inBuffer, (short) (dataOffset + dataLength));
- short sigOffset = (short) (dataOffset + dataLength + 2);
-
- if (keyTester.getSigType() == sigType) {
- keyTester.testECDSA_verify((ECPublicKey) verify.getPublic(), inBuffer, dataOffset, dataLength, inBuffer, sigOffset, sigLength);
- } else {
- short allocateSW = keyTester.allocateSig(sigType);
- if (allocateSW == ISO7816.SW_NO_ERROR) {
- keyTester.testECDSA_verify((ECPublicKey) verify.getPublic(), inBuffer, dataOffset, dataLength, inBuffer, sigOffset, sigLength);
- }
- }
- Util.setShort(outBuffer, outOffset, keyTester.getSW());
- length += 2;
-
- return length;
- }
-
- /**
- * @param buffer buffer to write sw to
- * @param offset output offset in buffer
- * @return length of data written to the buffer
- */
- private short cleanup(byte[] buffer, short offset) {
- short sw = ISO7816.SW_NO_ERROR;
- try {
- if (JCSystem.isObjectDeletionSupported())
- JCSystem.requestObjectDeletion();
- } catch (CardRuntimeException crex) {
- sw = crex.getReason();
- }
-
- Util.setShort(buffer, offset, sw);
- return 2;
- }
-
- /**
- * @param buffer buffer to write sw to
- * @param offset output offset in buffer
- * @return length of data written to the buffer
- */
- private short getInfo(byte[] buffer, short offset) {
- short length = 0;
- Util.setShort(buffer, (short) (offset + length), ISO7816.SW_NO_ERROR);
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) VERSION.length);
- length += 2;
- Util.arrayCopyNonAtomic(VERSION, (short) 0, buffer, (short) (offset + length), (short) (VERSION.length));
- length += VERSION.length;
- Util.setShort(buffer, (short) (offset + length), getBase());
- length += 2;
- Util.setShort(buffer, (short) (offset + length), JCSystem.getVersion());
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) (JCSystem.isObjectDeletionSupported() ? 1 : 0));
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) buffer.length);
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) ramArray.length);
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) ramArray2.length);
- length += 2;
- Util.setShort(buffer, (short) (offset + length), (short) apduArray.length);
- length += 2;
- return length;
- }
-
- private short setDryRunMode(byte[] buffer, boolean mode, short offset) {
- if (keyTester != null) {
- keyTester.setDryRun(mode);
- }
- if (keyGenerator != null) {
- keyGenerator.setDryRun(mode);
- }
- Util.setShort(buffer, offset, ISO7816.SW_NO_ERROR);
- return 2;
- }
-}
diff --git a/src/cz/crcs/ectester/applet/AppletUtil.java b/src/cz/crcs/ectester/applet/AppletUtil.java
deleted file mode 100644
index 9869aa4..0000000
--- a/src/cz/crcs/ectester/applet/AppletUtil.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cz.crcs.ectester.applet;
-
-import javacard.framework.ISO7816;
-import javacard.framework.ISOException;
-import javacard.security.KeyAgreement;
-import javacard.security.KeyPair;
-import javacard.security.Signature;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class AppletUtil {
-
- private static short nullCheck(Object obj, short sw) {
- if (obj == null)
- ISOException.throwIt(sw);
- return ISO7816.SW_NO_ERROR;
- }
-
- public static short objCheck(Object obj) {
- return nullCheck(obj, AppletBase.SW_OBJECT_NULL);
- }
-
- public static short keypairCheck(KeyPair keyPair) {
- return nullCheck(keyPair, AppletBase.SW_KEYPAIR_NULL);
- }
-
- public static short kaCheck(KeyAgreement keyAgreement) {
- return nullCheck(keyAgreement, AppletBase.SW_KA_NULL);
- }
-
- public static short signCheck(Signature signature) {
- return nullCheck(signature, AppletBase.SW_SIGNATURE_NULL);
- }
-}
diff --git a/src/cz/crcs/ectester/applet/ECKeyGenerator.java b/src/cz/crcs/ectester/applet/ECKeyGenerator.java
deleted file mode 100644
index 601654a..0000000
--- a/src/cz/crcs/ectester/applet/ECKeyGenerator.java
+++ /dev/null
@@ -1,526 +0,0 @@
-package cz.crcs.ectester.applet;
-
-import javacard.framework.CardRuntimeException;
-import javacard.framework.ISO7816;
-import javacard.framework.ISOException;
-import javacard.framework.Util;
-import javacard.security.*;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ECKeyGenerator {
-
- private short sw = ISO7816.SW_NO_ERROR;
- private boolean dryRun = false;
-
- /**
- * @param keyClass
- * @param keyLength
- * @return
- */
- public KeyPair allocatePair(byte keyClass, short keyLength) {
- sw = ISO7816.SW_NO_ERROR;
- KeyPair ecKeyPair = null;
- try {
- if (!dryRun) {
- ecKeyPair = new KeyPair(keyClass, keyLength);
-
- if (ecKeyPair.getPublic() == null || ecKeyPair.getPrivate() == null) {
- try {
- ecKeyPair.genKeyPair();
- } catch (Exception ignored) {
- }
- }
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return ecKeyPair;
- }
-
- /**
- * @param keyClass
- * @param keyLength
- * @return
- */
- public KeyPair constructPair(byte keyClass, short keyLength) {
- sw = ISO7816.SW_NO_ERROR;
- KeyPair ecKeyPair = null;
- byte privKeyType;
- byte pubKeyType;
- if (keyClass == KeyPair.ALG_EC_FP) {
- privKeyType = KeyBuilder.TYPE_EC_FP_PRIVATE;
- pubKeyType = KeyBuilder.TYPE_EC_FP_PUBLIC;
- } else {
- privKeyType = KeyBuilder.TYPE_EC_F2M_PRIVATE;
- pubKeyType = KeyBuilder.TYPE_EC_F2M_PUBLIC;
- }
- try {
- if (!dryRun) {
- ECPrivateKey privateKey = (ECPrivateKey) KeyBuilder.buildKey(privKeyType, keyLength, false);
- ECPublicKey publicKey = (ECPublicKey) KeyBuilder.buildKey(pubKeyType, keyLength, false);
-
- ecKeyPair = new KeyPair(publicKey, privateKey);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return ecKeyPair;
- }
-
- /**
- * @param keypair
- * @param key
- * @return
- */
- public short clearPair(KeyPair keypair, byte key) {
- try {
- sw = AppletUtil.keypairCheck(keypair);
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) keypair.getPublic().clearKey();
- if ((key & EC_Consts.KEY_PRIVATE) != 0) keypair.getPrivate().clearKey();
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- /**
- * @param keypair
- * @return
- */
- public short generatePair(KeyPair keypair) {
- try {
- sw = AppletUtil.keypairCheck(keypair);
- if (!dryRun) {
- keypair.genKeyPair();
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- /**
- * @param keypair
- * @param curve
- * @param buffer
- * @param offset
- * @return
- */
- public short setCurve(KeyPair keypair, byte curve, byte[] buffer, short offset) {
- return setCurve(keypair, curve, EC_Consts.PARAMETERS_ALL, buffer, offset);
- }
-
- /**
- * @param keypair
- * @param curve
- * @param params
- * @param buffer
- * @param offset
- * @return
- */
- public short setCurve(KeyPair keypair, byte curve, short params, byte[] buffer, short offset) {
- return setCurve(keypair, EC_Consts.KEY_BOTH, curve, params, buffer, offset);
- }
-
- /**
- * @param keypair
- * @param key
- * @param curve
- * @param params
- * @param buffer
- * @param offset
- * @return
- */
- public short setCurve(KeyPair keypair, byte key, byte curve, short params, byte[] buffer, short offset) {
- byte alg = EC_Consts.getCurveType(curve);
- sw = ISO7816.SW_NO_ERROR;
-
- if (params == EC_Consts.PARAMETERS_NONE) {
- return sw;
- }
-
- short length;
- //handle fp and f2m differently, as a FP KeyPair doesnt contain a F2M field and vice versa.
- if (alg == KeyPair.ALG_EC_FP && (params & EC_Consts.PARAMETER_FP) != 0) {
- length = EC_Consts.getCurveParameter(curve, EC_Consts.PARAMETER_FP, buffer, offset);
- sw = setParameter(keypair, key, EC_Consts.PARAMETER_FP, buffer, offset, length);
- } else if (alg == KeyPair.ALG_EC_F2M && (params & EC_Consts.PARAMETER_F2M) != 0) {
- length = EC_Consts.getCurveParameter(curve, EC_Consts.PARAMETER_F2M, buffer, offset);
- sw = setParameter(keypair, key, EC_Consts.PARAMETER_F2M, buffer, offset, length);
- }
- if (sw != ISO7816.SW_NO_ERROR) return sw;
-
- //go through all params
- short paramMask = EC_Consts.PARAMETER_A;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (paramMask & params);
- if (masked != 0) {
- length = EC_Consts.getCurveParameter(curve, masked, buffer, offset);
- sw = setParameter(keypair, key, masked, buffer, offset, length);
- if (sw != ISO7816.SW_NO_ERROR) break;
- }
- paramMask = (short) (paramMask << 1);
- }
- return sw;
- }
-
- /**
- * @param keypair
- * @param params
- * @param transformation
- * @param buffer
- * @param offset
- * @return
- */
- public short transformCurve(KeyPair keypair, short params, short transformation, byte[] buffer, short offset) {
- return transformCurve(keypair, EC_Consts.KEY_BOTH, params, transformation, buffer, offset);
- }
-
- /**
- * @param keypair
- * @param key
- * @param params
- * @param transformation
- * @param buffer
- * @param offset
- * @return
- */
- public short transformCurve(KeyPair keypair, byte key, short params, short transformation, byte[] buffer, short offset) {
- sw = ISO7816.SW_NO_ERROR;
- if (params == EC_Consts.PARAMETERS_NONE) {
- return sw;
- }
-
- //go through param bit by bit, and invalidate all selected params
- short paramMask = EC_Consts.PARAMETER_FP;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (paramMask & params);
- if (masked != 0) {
- short length = exportParameter(keypair, key, masked, buffer, offset);
- length = EC_Consts.transformParameter(transformation, buffer, offset, length);
- sw = setParameter(keypair, key, masked, buffer, offset, length);
- if (sw != ISO7816.SW_NO_ERROR) break;
- }
- paramMask = (short) (paramMask << 1);
- }
- return sw;
- }
-
- /**
- * @param key
- * @param param
- * @param data
- * @param offset
- * @param length
- * @return
- */
- public short setParameter(KeyPair keypair, byte key, short param, byte[] data, short offset, short length) {
- try {
- sw = AppletUtil.keypairCheck(keypair);
-
- ECPublicKey ecPublicKey = null;
- ECPrivateKey ecPrivateKey = null;
- if (!dryRun) {
- ecPublicKey = (ECPublicKey) keypair.getPublic();
- ecPrivateKey = (ECPrivateKey) keypair.getPrivate();
- }
-
- switch (param) {
- case EC_Consts.PARAMETER_FP:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setFieldFP(data, offset, length);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setFieldFP(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_F2M:
- if (length == 4) {
- short i = Util.getShort(data, (short) (offset + 2));
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setFieldF2M(i);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setFieldF2M(i);
- }
- } else if (length == 8) {
- short i1 = Util.getShort(data, (short) (offset + 2));
- short i2 = Util.getShort(data, (short) (offset + 4));
- short i3 = Util.getShort(data, (short) (offset + 6));
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setFieldF2M(i1, i2, i3);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setFieldF2M(i1, i2, i3);
- }
- // if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setFieldF2M(i3, i2, i1);
- // if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setFieldF2M(i3, i2, i1);
- } else {
- sw = ISO7816.SW_UNKNOWN;
- }
- break;
- case EC_Consts.PARAMETER_A:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setA(data, offset, length);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setA(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_B:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setB(data, offset, length);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setB(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_G:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setG(data, offset, length);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setG(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_R:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setR(data, offset, length);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setR(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_K:
- short k = 0;
- if (length > 2 || length <= 0) {
- sw = ISO7816.SW_UNKNOWN;
- break;
- } else if (length == 2) {
- k = Util.getShort(data, offset);
- } else if (length == 1) {
- k = data[offset];
- }
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setK(k);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setK(k);
- }
- break;
- case EC_Consts.PARAMETER_S:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PRIVATE) != 0) ecPrivateKey.setS(data, offset, length);
- }
- break;
- case EC_Consts.PARAMETER_W:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) ecPublicKey.setW(data, offset, length);
- }
- break;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- /**
- * @param keypair
- * @param params
- * @param inBuffer
- * @param inOffset
- * @return
- */
- public short setExternalCurve(KeyPair keypair, short params, byte[] inBuffer, short inOffset) {
- return setExternalCurve(keypair, EC_Consts.KEY_BOTH, params, inBuffer, inOffset);
- }
-
- /**
- * @param keypair
- * @param key
- * @param params
- * @param inBuffer
- * @param inOffset
- * @return
- */
- public short setExternalCurve(KeyPair keypair, byte key, short params, byte[] inBuffer, short inOffset) {
- sw = ISO7816.SW_NO_ERROR;
- if (params == EC_Consts.PARAMETERS_NONE) {
- return sw;
- }
-
- short paramMask = EC_Consts.PARAMETER_FP;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (paramMask & params);
- if (masked != 0) {
- short paramLength = Util.getShort(inBuffer, inOffset);
- inOffset += 2;
- sw = setParameter(keypair, key, masked, inBuffer, inOffset, paramLength);
- inOffset += paramLength;
- if (sw != ISO7816.SW_NO_ERROR) break;
- }
- paramMask = (short) (paramMask << 1);
- }
- return sw;
- }
-
- /**
- * Exports a selected parameter from a given keyPairs key.
- *
- * @param keypair keypair to export from
- * @param key key to export from (KEY_PUBLIC || KEY_PRIVATE)
- * @param param parameter to export (EC_Consts.PARAMETER_* || ...)
- * @param outputBuffer buffer to write to
- * @param outputOffset offset to start writing in buffer
- * @return length of data written
- */
- public short exportParameter(KeyPair keypair, byte key, short param, byte[] outputBuffer, short outputOffset) {
- short length = 0;
- try {
- sw = AppletUtil.keypairCheck(keypair);
-
- ECPublicKey ecPublicKey = null;
- ECPrivateKey ecPrivateKey = null;
- if (!dryRun) {
- ecPublicKey = (ECPublicKey) keypair.getPublic();
- ecPrivateKey = (ECPrivateKey) keypair.getPrivate();
- }
-
- switch (param) {
- case EC_Consts.PARAMETER_FP:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0)
- length = ecPublicKey.getField(outputBuffer, outputOffset);
- if ((key & EC_Consts.KEY_PRIVATE) != 0)
- length = ecPrivateKey.getField(outputBuffer, outputOffset);
- }
- break;
- case EC_Consts.PARAMETER_F2M:
- if ((key & EC_Consts.KEY_PUBLIC) != 0 && !dryRun) {
- Util.setShort(outputBuffer, outputOffset, ecPublicKey.getSize());
- length = 2;
- length += ecPublicKey.getField(outputBuffer, (short) (outputOffset + 2));
- }
- if ((key & EC_Consts.KEY_PRIVATE) != 0 && !dryRun) {
- Util.setShort(outputBuffer, outputOffset, ecPrivateKey.getSize());
- length = 2;
- length += ecPrivateKey.getField(outputBuffer, (short) (outputOffset + 2));
- }
- break;
- case EC_Consts.PARAMETER_A:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) length = ecPublicKey.getA(outputBuffer, outputOffset);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) length = ecPrivateKey.getA(outputBuffer, outputOffset);
- }
- break;
- case EC_Consts.PARAMETER_B:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) length = ecPublicKey.getB(outputBuffer, outputOffset);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) length = ecPrivateKey.getB(outputBuffer, outputOffset);
- }
- break;
- case EC_Consts.PARAMETER_G:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) length = ecPublicKey.getG(outputBuffer, outputOffset);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) length = ecPrivateKey.getG(outputBuffer, outputOffset);
- }
- break;
- case EC_Consts.PARAMETER_R:
- if (!dryRun) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0) length = ecPublicKey.getR(outputBuffer, outputOffset);
- if ((key & EC_Consts.KEY_PRIVATE) != 0) length = ecPrivateKey.getR(outputBuffer, outputOffset);
- }
- break;
- case EC_Consts.PARAMETER_K:
- if (!dryRun) {
- length = 2;
- if ((key & EC_Consts.KEY_PUBLIC) != 0)
- Util.setShort(outputBuffer, outputOffset, ecPublicKey.getK());
- if ((key & EC_Consts.KEY_PRIVATE) != 0)
- Util.setShort(outputBuffer, outputOffset, ecPrivateKey.getK());
- }
- break;
- case EC_Consts.PARAMETER_W:
- if ((key & EC_Consts.KEY_PUBLIC) != 0 && !dryRun)
- length = ecPublicKey.getW(outputBuffer, outputOffset);
- break;
- case EC_Consts.PARAMETER_S:
- if ((key & EC_Consts.KEY_PRIVATE) != 0 && !dryRun)
- length = ecPrivateKey.getS(outputBuffer, outputOffset);
- break;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- /**
- * Exports selected parameters from a given keyPairs key.
- * Raw parameter data is always prepended by its length as a
- * short value. The order of parameters is the usual one from
- * EC_Consts: field,a,b,g,r,k,w,s.
- *
- * @param keypair keyPair to export from
- * @param key key to export from (KEY_PUBLIC || KEY_PRIVATE)
- * @param params params to export (EC_Consts.PARAMETER_* | ...)
- * @param buffer buffer to export to
- * @param offset offset to start writing in buffer
- * @return length of data written
- */
- public short exportParameters(KeyPair keypair, byte key, short params, byte[] buffer, short offset) {
- sw = ISO7816.SW_NO_ERROR;
- if (params == EC_Consts.PARAMETERS_NONE) {
- return sw;
- }
-
- short length = 0;
- short paramMask = EC_Consts.PARAMETER_FP;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (paramMask & params);
- if (masked != 0) {
- short len = exportParameter(keypair, key, masked, buffer, (short) (offset + 2));
- if (len == 0) {
- paramMask = (short) (paramMask << 1);
- continue;
- }
- Util.setShort(buffer, offset, len);
- offset += len + 2;
- length += len + 2;
- }
- paramMask = (short) (paramMask << 1);
- }
- return length;
- }
-
- /**
- * Copies this KeyPairs curve parameters to another ECKeyGenerator.
- *
- * @param from keyPair to copy from
- * @param to keyPair to copy to
- * @param params parameters to copy
- * @param buffer buffer to use for copying
- * @param offset offset to use in buffer
- * @return sw
- */
- public short copyCurve(KeyPair from, KeyPair to, short params, byte[] buffer, short offset) {
- try {
- sw = AppletUtil.keypairCheck(from);
- sw = AppletUtil.keypairCheck(to);
-
- short param = EC_Consts.PARAMETER_FP;
- while (param <= EC_Consts.PARAMETER_K) {
- short masked = (short) (param & params);
- if (masked != 0) {
- short paramLength = exportParameter(from, EC_Consts.KEY_PUBLIC, masked, buffer, offset);
- setParameter(to, EC_Consts.KEY_BOTH, masked, buffer, offset, paramLength);
- }
- param = (short) (param << 1);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- public short getSW() {
- return sw;
- }
-
- public void setDryRun(boolean dryRun) {
- this.dryRun = dryRun;
- }
-}
diff --git a/src/cz/crcs/ectester/applet/ECKeyTester.java b/src/cz/crcs/ectester/applet/ECKeyTester.java
deleted file mode 100644
index 89590d0..0000000
--- a/src/cz/crcs/ectester/applet/ECKeyTester.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package cz.crcs.ectester.applet;
-
-
-import javacard.framework.CardRuntimeException;
-import javacard.framework.ISO7816;
-import javacard.security.*;
-
-/**
- * Class capable of testing ECDH/C and ECDSA.
- * Note that ECDH and ECDHC output should equal, only the algorithm is different.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ECKeyTester {
- private KeyAgreement ecKeyAgreement = null;
- private short kaType = 0;
- private Signature ecdsaSignature = null;
- private short sigType = 0;
-
- private short sw = ISO7816.SW_NO_ERROR;
- private boolean dryRun = false;
-
- public short allocateKA(byte algorithm) {
- sw = ISO7816.SW_NO_ERROR;
- try {
- if (!dryRun) {
- ecKeyAgreement = KeyAgreement.getInstance(algorithm, false);
- kaType = algorithm;
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- public short allocateSig(byte algorithm) {
- sw = ISO7816.SW_NO_ERROR;
- try {
- if (!dryRun) {
- ecdsaSignature = Signature.getInstance(algorithm, false);
- sigType = algorithm;
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return sw;
- }
-
- /**
- * Tests ECDH secret generation with keys from given {@code privatePair} and {@code publicPair}.
- * Uses {@code pubkeyBuffer} at {@code pubkeyOffset} for computations.
- * Output should equal with ECDHC output.
- *
- * @param privatePair KeyPair from which the private key is used
- * @param publicPair KeyPair from which the public key is used
- * @param pubkeyBuffer buffer to be used for the public key
- * @param pubkeyOffset offset into pubkeyBuffer that can be used for the public key
- * @param outputBuffer buffer to be used for the secret output
- * @param outputOffset offset into the outputBuffer
- * @param transformation (EC_Consts.TRANSFORMATION_* | ...)
- * @return derived secret length
- **/
- public short testKA(KeyPair privatePair, KeyPair publicPair, byte[] pubkeyBuffer, short pubkeyOffset, byte[] outputBuffer, short outputOffset, short transformation) {
- short length = 0;
- try {
- sw = AppletUtil.kaCheck(ecKeyAgreement);
- sw = AppletUtil.keypairCheck(privatePair);
- sw = AppletUtil.keypairCheck(publicPair);
- if (!dryRun) {
- short pubkeyLength = ((ECPublicKey) publicPair.getPublic()).getW(pubkeyBuffer, pubkeyOffset);
- ecKeyAgreement.init(privatePair.getPrivate());
-
- pubkeyLength = EC_Consts.transformParameter(transformation, pubkeyBuffer, pubkeyOffset, pubkeyLength);
- length = ecKeyAgreement.generateSecret(pubkeyBuffer, pubkeyOffset, pubkeyLength, outputBuffer, outputOffset);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- /**
- * @param privatePair
- * @param pubkey
- * @param pubkeyOffset
- * @param pubkeyLength
- * @param outpuBuffer
- * @param outputOffset
- * @param transformation
- * @return
- */
- public short testKA_direct(KeyPair privatePair, byte[] pubkey, short pubkeyOffset, short pubkeyLength, byte[] outpuBuffer, short outputOffset, short transformation) {
- short length = 0;
- try {
- sw = AppletUtil.kaCheck(ecKeyAgreement);
- sw = AppletUtil.keypairCheck(privatePair);
-
- if (!dryRun) {
- ecKeyAgreement.init(privatePair.getPrivate());
- pubkeyLength = EC_Consts.transformParameter(transformation, pubkey, pubkeyOffset, pubkeyLength);
- length = ecKeyAgreement.generateSecret(pubkey, pubkeyOffset, pubkeyLength, outpuBuffer, outputOffset);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- /**
- * Uses {@code signKey} to sign data from {@code inputBuffer} at {@code inputOffset} with {@code inputOffset}.
- * Then checks for correct signature length.
- * Then tries verifying the data with {@code verifyKey}.
- *
- * @param signKey key to use for signing
- * @param verifyKey key to use for verifying the signature
- * @param inputBuffer buffer to sign data from
- * @param inputOffset offset into inputBuffer to sign data from
- * @param inputLength length of data to sign
- * @param sigBuffer buffer to output signature to
- * @param sigOffset offset into sigBuffer to output to
- * @return signature length
- */
- public short testECDSA(ECPrivateKey signKey, ECPublicKey verifyKey, byte[] inputBuffer, short inputOffset, short inputLength, byte[] sigBuffer, short sigOffset) {
- short length = 0;
- try {
- sw = AppletUtil.signCheck(ecdsaSignature);
-
- if (!dryRun) {
- ecdsaSignature.init(signKey, Signature.MODE_SIGN);
- length = ecdsaSignature.sign(inputBuffer, inputOffset, inputLength, sigBuffer, sigOffset);
-
- ecdsaSignature.init(verifyKey, Signature.MODE_VERIFY);
- if (!ecdsaSignature.verify(inputBuffer, inputOffset, inputLength, sigBuffer, sigOffset, length)) {
- sw = AppletBase.SW_SIG_VERIFY_FAIL;
- }
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- /**
- * @param signKey
- * @param inputBuffer
- * @param inputOffset
- * @param inputLength
- * @param sigBuffer
- * @param sigOffset
- * @return
- */
- public short testECDSA_sign(ECPrivateKey signKey, byte[] inputBuffer, short inputOffset, short inputLength, byte[] sigBuffer, short sigOffset) {
- short length = 0;
- try {
- sw = AppletUtil.signCheck(ecdsaSignature);
-
- if (!dryRun) {
- ecdsaSignature.init(signKey, Signature.MODE_SIGN);
- length = ecdsaSignature.sign(inputBuffer, inputOffset, inputLength, sigBuffer, sigOffset);
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- /**
- * @param verifyKey
- * @param inputBuffer
- * @param inputOffset
- * @param inputLength
- * @param sigBuffer
- * @param sigOffset
- * @param sigLength
- * @return
- */
- public short testECDSA_verify(ECPublicKey verifyKey, byte[] inputBuffer, short inputOffset, short inputLength, byte[] sigBuffer, short sigOffset, short sigLength) {
- short length = 0;
- try {
- sw = AppletUtil.signCheck(ecdsaSignature);
-
- if (!dryRun) {
- ecdsaSignature.init(verifyKey, Signature.MODE_VERIFY);
- if (!ecdsaSignature.verify(inputBuffer, inputOffset, inputLength, sigBuffer, sigOffset, sigLength)) {
- sw = AppletBase.SW_SIG_VERIFY_FAIL;
- }
- }
- } catch (CardRuntimeException ce) {
- sw = ce.getReason();
- }
- return length;
- }
-
- public KeyAgreement getKA() {
- return ecKeyAgreement;
- }
-
- public Signature getSig() {
- return ecdsaSignature;
- }
-
- public boolean hasKA() {
- return ecKeyAgreement != null;
- }
-
- public boolean hasSig() {
- return ecdsaSignature != null;
- }
-
- public short getKaType() {
- return kaType;
- }
-
- public short getSigType() {
- return sigType;
- }
-
- public short getSW() {
- return sw;
- }
-
- public void setDryRun(boolean dryRun) {
- this.dryRun = dryRun;
- }
-}
diff --git a/src/cz/crcs/ectester/applet/ECTesterApplet.java b/src/cz/crcs/ectester/applet/ECTesterApplet.java
deleted file mode 100644
index 12978e6..0000000
--- a/src/cz/crcs/ectester/applet/ECTesterApplet.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * ECTester, tool for testing Elliptic curve cryptography implementations.
- * Copyright (c) 2016-2019 Petr Svenda <petr@svenda.com>
- * Copyright (c) 2016-2019 Jan Jancar <johny@neuromancer.sk>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-/*
- * PACKAGEID: 4543546573746572
- * APPLETID: 454354657374657230333362 // VERSION v0.3.3
- */
-package cz.crcs.ectester.applet;
-
-import javacard.framework.APDU;
-import javacard.framework.ISO7816;
-import javacard.framework.ISOException;
-
-/**
- * Applet part of ECTester, a tool for testing Elliptic curve support on javacards.
- *
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ECTesterApplet extends AppletBase {
- protected ECTesterApplet(byte[] buffer, short offset, byte length) {
- super(buffer, offset, length);
- register();
- }
-
- public static void install(byte[] bArray, short bOffset, byte bLength) throws ISOException {
- // applet instance creation
- new ECTesterApplet(bArray, bOffset, bLength);
- }
-
- short getOffsetCdata(APDU apdu) {
- return ISO7816.OFFSET_CDATA;
- }
-
- short getIncomingLength(APDU apdu) {
- byte[] apduBuffer = apdu.getBuffer();
- return (short) (0xff & apduBuffer[ISO7816.OFFSET_LC]);
- }
-
- short getBase() {
- return AppletBase.BASE_221;
- }
-}
diff --git a/src/cz/crcs/ectester/applet/ECTesterAppletExtended.java b/src/cz/crcs/ectester/applet/ECTesterAppletExtended.java
deleted file mode 100644
index 97a3769..0000000
--- a/src/cz/crcs/ectester/applet/ECTesterAppletExtended.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * ECTester, tool for testing Elliptic curve cryptography implementations.
- * Copyright (c) 2016-2019 Petr Svenda <petr@svenda.com>
- * Copyright (c) 2016-2019 Jan Jancar <johny@neuromancer.sk>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-/*
- * PACKAGEID: 4543546573746572
- * APPLETID: 454354657374657230333378 // VERSION v0.3.3
- */
-package cz.crcs.ectester.applet;
-
-import javacard.framework.APDU;
-import javacard.framework.CardRuntimeException;
-import javacard.framework.ISO7816;
-import javacard.framework.ISOException;
-import javacardx.apdu.ExtendedLength;
-
-/**
- * Applet part of ECTester, a tool for testing Elliptic curve support on javacards.
- *
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ECTesterAppletExtended extends AppletBase implements ExtendedLength {
- protected ECTesterAppletExtended(byte[] buffer, short offset, byte length) {
- super(buffer, offset, length);
- register();
- }
-
- public static void install(byte[] bArray, short bOffset, byte bLength) throws ISOException {
- // applet instance creation
- new ECTesterAppletExtended(bArray, bOffset, bLength);
- }
-
- short getOffsetCdata(APDU apdu) {
- return apdu.getOffsetCdata();
- }
-
- short getIncomingLength(APDU apdu) {
- return apdu.getIncomingLength();
- }
-
- short getBase() {
- return AppletBase.BASE_222;
- }
-}
diff --git a/src/cz/crcs/ectester/applet/EC_Consts.java b/src/cz/crcs/ectester/applet/EC_Consts.java
deleted file mode 100644
index 81016ac..0000000
--- a/src/cz/crcs/ectester/applet/EC_Consts.java
+++ /dev/null
@@ -1,1512 +0,0 @@
-package cz.crcs.ectester.applet;
-
-import javacard.framework.ISO7816;
-import javacard.framework.ISOException;
-import javacard.framework.Util;
-import javacard.security.KeyPair;
-import javacard.security.RandomData;
-
-/**
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Consts {
-
- public static final byte KeyAgreement_ALG_EC_SVDP_DH_KDF = 1;
- public static final byte KeyAgreement_ALG_EC_SVDP_DHC_KDF = 2;
- private static byte[] EC_FP_P = null; //p
- private static byte[] EC_A = null; //a
- private static byte[] EC_B = null; //b
- private static byte[] EC_G_X = null; //G[x,y]
- private static byte[] EC_G_Y = null; //
- private static byte[] EC_R = null; //n
- private static short EC_K = 1; //h
-
- private static byte[] EC_W_X = null; //Pubkey[x,y]
- private static byte[] EC_W_Y = null;
- private static byte[] EC_S = null; //Private
-
- private static byte[] EC_F2M_F2M = null; //[short i1, short i2, short i3], f = x^m + x^i1 + x^i2 + x^i3 + 1
-
- // EC domain parameter identifiers (bit flags)
- public static final short PARAMETER_FP = 0x0001;
- public static final short PARAMETER_F2M = 0x0002;
-
- public static final short PARAMETER_A = 0x0004;
- public static final short PARAMETER_B = 0x0008;
- public static final short PARAMETER_G = 0x0010;
- public static final short PARAMETER_R = 0x0020;
- public static final short PARAMETER_K = 0x0040;
- public static final short PARAMETER_W = 0x0080;
- public static final short PARAMETER_S = 0x0100;
-
- public static final short PARAMETERS_NONE = 0x0000;
- /**
- * FP,A,B,G,R,K
- */
- public static final short PARAMETERS_DOMAIN_FP = 0x007d;
- /**
- * F2M,A,B,G,R,K
- */
- public static final short PARAMETERS_DOMAIN_F2M = 0x007e;
- /**
- * W,S
- */
- public static final short PARAMETERS_KEYPAIR = 0x0180;
- public static final short PARAMETERS_ALL = 0x01ff;
-
-
- // EC key identifiers
- public static final byte KEY_PUBLIC = 0x01;
- public static final byte KEY_PRIVATE = 0x02;
- public static final byte KEY_BOTH = KEY_PUBLIC | KEY_PRIVATE;
-
- public static RandomData randomData = null;
-
- // secp112r1
- public static final byte[] EC112_FP_P = new byte[]{
- (byte) 0xdb, (byte) 0x7c, (byte) 0x2a, (byte) 0xbf,
- (byte) 0x62, (byte) 0xe3, (byte) 0x5e, (byte) 0x66,
- (byte) 0x80, (byte) 0x76, (byte) 0xbe, (byte) 0xad,
- (byte) 0x20, (byte) 0x8b
- };
-
- public static final byte[] EC112_FP_A = new byte[]{
- (byte) 0xdb, (byte) 0x7c, (byte) 0x2a, (byte) 0xbf,
- (byte) 0x62, (byte) 0xe3, (byte) 0x5e, (byte) 0x66,
- (byte) 0x80, (byte) 0x76, (byte) 0xbe, (byte) 0xad,
- (byte) 0x20, (byte) 0x88
- };
-
- public static final byte[] EC112_FP_B = new byte[]{
- (byte) 0x65, (byte) 0x9e, (byte) 0xf8, (byte) 0xba,
- (byte) 0x04, (byte) 0x39, (byte) 0x16, (byte) 0xee,
- (byte) 0xde, (byte) 0x89, (byte) 0x11, (byte) 0x70,
- (byte) 0x2b, (byte) 0x22
- };
-
- public static final byte[] EC112_FP_G_X = new byte[]{
- (byte) 0x09, (byte) 0x48, (byte) 0x72, (byte) 0x39,
- (byte) 0x99, (byte) 0x5a, (byte) 0x5e, (byte) 0xe7,
- (byte) 0x6b, (byte) 0x55, (byte) 0xf9, (byte) 0xc2,
- (byte) 0xf0, (byte) 0x98
- };
-
- public static final byte[] EC112_FP_G_Y = new byte[]{
- (byte) 0xa8, (byte) 0x9c, (byte) 0xe5, (byte) 0xaf,
- (byte) 0x87, (byte) 0x24, (byte) 0xc0, (byte) 0xa2,
- (byte) 0x3e, (byte) 0x0e, (byte) 0x0f, (byte) 0xf7,
- (byte) 0x75, (byte) 0x00
- };
-
- public static final byte[] EC112_FP_R = new byte[]{
- (byte) 0xdb, (byte) 0x7c, (byte) 0x2a, (byte) 0xbf,
- (byte) 0x62, (byte) 0xe3, (byte) 0x5e, (byte) 0x76,
- (byte) 0x28, (byte) 0xdf, (byte) 0xac, (byte) 0x65,
- (byte) 0x61, (byte) 0xc5
- };
-
- public static final short EC112_FP_K = 1;
-
-
- // secp128r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC128_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFD,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
-
- public static final byte[] EC128_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFD,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
-
- public static final byte[] EC128_FP_B = new byte[]{
- (byte) 0xE8, (byte) 0x75, (byte) 0x79, (byte) 0xC1,
- (byte) 0x10, (byte) 0x79, (byte) 0xF4, (byte) 0x3D,
- (byte) 0xD8, (byte) 0x24, (byte) 0x99, (byte) 0x3C,
- (byte) 0x2C, (byte) 0xEE, (byte) 0x5E, (byte) 0xD3
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC128_FP_G_X = new byte[]{
- (byte) 0x16, (byte) 0x1F, (byte) 0xF7, (byte) 0x52,
- (byte) 0x8B, (byte) 0x89, (byte) 0x9B, (byte) 0x2D,
- (byte) 0x0C, (byte) 0x28, (byte) 0x60, (byte) 0x7C,
- (byte) 0xA5, (byte) 0x2C, (byte) 0x5B, (byte) 0x86
- };
-
- // second part of G uncompressed
- public static final byte[] EC128_FP_G_Y = new byte[]{
- (byte) 0xCF, (byte) 0x5A, (byte) 0xC8, (byte) 0x39,
- (byte) 0x5B, (byte) 0xAF, (byte) 0xEB, (byte) 0x13,
- (byte) 0xC0, (byte) 0x2D, (byte) 0xA2, (byte) 0x92,
- (byte) 0xDD, (byte) 0xED, (byte) 0x7A, (byte) 0x83
- };
- // Order of G
- public static final byte[] EC128_FP_R = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x75, (byte) 0xA3, (byte) 0x0D, (byte) 0x1B,
- (byte) 0x90, (byte) 0x38, (byte) 0xA1, (byte) 0x15
- };
- // cofactor of G
- public static final short EC128_FP_K = 1;
-
- // secp160r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC160_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x7F, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
-
- public static final byte[] EC160_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x7F, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
-
- public static final byte[] EC160_FP_B = new byte[]{
- (byte) 0x1C, (byte) 0x97, (byte) 0xBE, (byte) 0xFC,
- (byte) 0x54, (byte) 0xBD, (byte) 0x7A, (byte) 0x8B,
- (byte) 0x65, (byte) 0xAC, (byte) 0xF8, (byte) 0x9F,
- (byte) 0x81, (byte) 0xD4, (byte) 0xD4, (byte) 0xAD,
- (byte) 0xC5, (byte) 0x65, (byte) 0xFA, (byte) 0x45
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC160_FP_G_X = new byte[]{
- (byte) 0x4A, (byte) 0x96, (byte) 0xB5, (byte) 0x68,
- (byte) 0x8E, (byte) 0xF5, (byte) 0x73, (byte) 0x28,
- (byte) 0x46, (byte) 0x64, (byte) 0x69, (byte) 0x89,
- (byte) 0x68, (byte) 0xC3, (byte) 0x8B, (byte) 0xB9,
- (byte) 0x13, (byte) 0xCB, (byte) 0xFC, (byte) 0x82
- };
-
- // second part of G uncompressed
- public static final byte[] EC160_FP_G_Y = new byte[]{
- (byte) 0x23, (byte) 0xA6, (byte) 0x28, (byte) 0x55,
- (byte) 0x31, (byte) 0x68, (byte) 0x94, (byte) 0x7D,
- (byte) 0x59, (byte) 0xDC, (byte) 0xC9, (byte) 0x12,
- (byte) 0x04, (byte) 0x23, (byte) 0x51, (byte) 0x37,
- (byte) 0x7A, (byte) 0xC5, (byte) 0xFB, (byte) 0x32
- };
- // Order of G
- public static final byte[] EC160_FP_R = new byte[]{
- (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x01, (byte) 0xF4, (byte) 0xC8,
- (byte) 0xF9, (byte) 0x27, (byte) 0xAE, (byte) 0xD3,
- (byte) 0xCA, (byte) 0x75, (byte) 0x22, (byte) 0x57
- };
- // cofactor of G
- public static final short EC160_FP_K = 1;
-
-
- // secp192r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC192_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
- public static final byte[] EC192_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
- public static final byte[] EC192_FP_B = new byte[]{
- (byte) 0x64, (byte) 0x21, (byte) 0x05, (byte) 0x19,
- (byte) 0xE5, (byte) 0x9C, (byte) 0x80, (byte) 0xE7,
- (byte) 0x0F, (byte) 0xA7, (byte) 0xE9, (byte) 0xAB,
- (byte) 0x72, (byte) 0x24, (byte) 0x30, (byte) 0x49,
- (byte) 0xFE, (byte) 0xB8, (byte) 0xDE, (byte) 0xEC,
- (byte) 0xC1, (byte) 0x46, (byte) 0xB9, (byte) 0xB1
- };
- // G in compressed form / first part of ucompressed
- public static final byte[] EC192_FP_G_X = new byte[]{
- (byte) 0x18, (byte) 0x8D, (byte) 0xA8, (byte) 0x0E,
- (byte) 0xB0, (byte) 0x30, (byte) 0x90, (byte) 0xF6,
- (byte) 0x7C, (byte) 0xBF, (byte) 0x20, (byte) 0xEB,
- (byte) 0x43, (byte) 0xA1, (byte) 0x88, (byte) 0x00,
- (byte) 0xF4, (byte) 0xFF, (byte) 0x0A, (byte) 0xFD,
- (byte) 0x82, (byte) 0xFF, (byte) 0x10, (byte) 0x12
- };
- // second part of G uncompressed
- public static final byte[] EC192_FP_G_Y = new byte[]{
- (byte) 0x07, (byte) 0x19, (byte) 0x2B, (byte) 0x95,
- (byte) 0xFF, (byte) 0xC8, (byte) 0xDA, (byte) 0x78,
- (byte) 0x63, (byte) 0x10, (byte) 0x11, (byte) 0xED,
- (byte) 0x6B, (byte) 0x24, (byte) 0xCD, (byte) 0xD5,
- (byte) 0x73, (byte) 0xF9, (byte) 0x77, (byte) 0xA1,
- (byte) 0x1E, (byte) 0x79, (byte) 0x48, (byte) 0x11
- };
- // Order of G
- public static final byte[] EC192_FP_R = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x99, (byte) 0xDE, (byte) 0xF8, (byte) 0x36,
- (byte) 0x14, (byte) 0x6B, (byte) 0xC9, (byte) 0xB1,
- (byte) 0xB4, (byte) 0xD2, (byte) 0x28, (byte) 0x31
- };
- // cofactor of G
- public static final short EC192_FP_K = 1;
-
- // secp224r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC224_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01
- };
-
- public static final byte[] EC224_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE
- };
-
- public static final byte[] EC224_FP_B = new byte[]{
- (byte) 0xB4, (byte) 0x05, (byte) 0x0A, (byte) 0x85,
- (byte) 0x0C, (byte) 0x04, (byte) 0xB3, (byte) 0xAB,
- (byte) 0xF5, (byte) 0x41, (byte) 0x32, (byte) 0x56,
- (byte) 0x50, (byte) 0x44, (byte) 0xB0, (byte) 0xB7,
- (byte) 0xD7, (byte) 0xBF, (byte) 0xD8, (byte) 0xBA,
- (byte) 0x27, (byte) 0x0B, (byte) 0x39, (byte) 0x43,
- (byte) 0x23, (byte) 0x55, (byte) 0xFF, (byte) 0xB4
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC224_FP_G_X = new byte[]{
- (byte) 0xB7, (byte) 0x0E, (byte) 0x0C, (byte) 0xBD,
- (byte) 0x6B, (byte) 0xB4, (byte) 0xBF, (byte) 0x7F,
- (byte) 0x32, (byte) 0x13, (byte) 0x90, (byte) 0xB9,
- (byte) 0x4A, (byte) 0x03, (byte) 0xC1, (byte) 0xD3,
- (byte) 0x56, (byte) 0xC2, (byte) 0x11, (byte) 0x22,
- (byte) 0x34, (byte) 0x32, (byte) 0x80, (byte) 0xD6,
- (byte) 0x11, (byte) 0x5C, (byte) 0x1D, (byte) 0x21
- };
- // second part of G uncompressed
- public static final byte[] EC224_FP_G_Y = new byte[]{
- (byte) 0xBD, (byte) 0x37, (byte) 0x63, (byte) 0x88,
- (byte) 0xB5, (byte) 0xF7, (byte) 0x23, (byte) 0xFB,
- (byte) 0x4C, (byte) 0x22, (byte) 0xDF, (byte) 0xE6,
- (byte) 0xCD, (byte) 0x43, (byte) 0x75, (byte) 0xA0,
- (byte) 0x5A, (byte) 0x07, (byte) 0x47, (byte) 0x64,
- (byte) 0x44, (byte) 0xD5, (byte) 0x81, (byte) 0x99,
- (byte) 0x85, (byte) 0x00, (byte) 0x7E, (byte) 0x34
- };
- // Order of G
- public static final byte[] EC224_FP_R = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0x16, (byte) 0xA2,
- (byte) 0xE0, (byte) 0xB8, (byte) 0xF0, (byte) 0x3E,
- (byte) 0x13, (byte) 0xDD, (byte) 0x29, (byte) 0x45,
- (byte) 0x5C, (byte) 0x5C, (byte) 0x2A, (byte) 0x3D
- };
- // cofactor of G
- public static final short EC224_FP_K = 1;
-
- // secp256r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC256_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
- public static final byte[] EC256_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
- public static final byte[] EC256_FP_B = new byte[]{
- (byte) 0x5A, (byte) 0xC6, (byte) 0x35, (byte) 0xD8,
- (byte) 0xAA, (byte) 0x3A, (byte) 0x93, (byte) 0xE7,
- (byte) 0xB3, (byte) 0xEB, (byte) 0xBD, (byte) 0x55,
- (byte) 0x76, (byte) 0x98, (byte) 0x86, (byte) 0xBC,
- (byte) 0x65, (byte) 0x1D, (byte) 0x06, (byte) 0xB0,
- (byte) 0xCC, (byte) 0x53, (byte) 0xB0, (byte) 0xF6,
- (byte) 0x3B, (byte) 0xCE, (byte) 0x3C, (byte) 0x3E,
- (byte) 0x27, (byte) 0xD2, (byte) 0x60, (byte) 0x4B
- };
- // G in compressed form / first part of ucompressed
- public static final byte[] EC256_FP_G_X = new byte[]{
- (byte) 0x6B, (byte) 0x17, (byte) 0xD1, (byte) 0xF2,
- (byte) 0xE1, (byte) 0x2C, (byte) 0x42, (byte) 0x47,
- (byte) 0xF8, (byte) 0xBC, (byte) 0xE6, (byte) 0xE5,
- (byte) 0x63, (byte) 0xA4, (byte) 0x40, (byte) 0xF2,
- (byte) 0x77, (byte) 0x03, (byte) 0x7D, (byte) 0x81,
- (byte) 0x2D, (byte) 0xEB, (byte) 0x33, (byte) 0xA0,
- (byte) 0xF4, (byte) 0xA1, (byte) 0x39, (byte) 0x45,
- (byte) 0xD8, (byte) 0x98, (byte) 0xC2, (byte) 0x96
- };
- // second part of G uncompressed
- public static final byte[] EC256_FP_G_Y = new byte[]{
- (byte) 0x4F, (byte) 0xE3, (byte) 0x42, (byte) 0xE2,
- (byte) 0xFE, (byte) 0x1A, (byte) 0x7F, (byte) 0x9B,
- (byte) 0x8E, (byte) 0xE7, (byte) 0xEB, (byte) 0x4A,
- (byte) 0x7C, (byte) 0x0F, (byte) 0x9E, (byte) 0x16,
- (byte) 0x2B, (byte) 0xCE, (byte) 0x33, (byte) 0x57,
- (byte) 0x6B, (byte) 0x31, (byte) 0x5E, (byte) 0xCE,
- (byte) 0xCB, (byte) 0xB6, (byte) 0x40, (byte) 0x68,
- (byte) 0x37, (byte) 0xBF, (byte) 0x51, (byte) 0xF5
- };
- // Order of G
- public static final byte[] EC256_FP_R = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xBC, (byte) 0xE6, (byte) 0xFA, (byte) 0xAD,
- (byte) 0xA7, (byte) 0x17, (byte) 0x9E, (byte) 0x84,
- (byte) 0xF3, (byte) 0xB9, (byte) 0xCA, (byte) 0xC2,
- (byte) 0xFC, (byte) 0x63, (byte) 0x25, (byte) 0x51
- };
- // cofactor of G
- public static final short EC256_FP_K = 1;
-
- // secp384r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC384_FP_P = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
-
- public static final byte[] EC384_FP_A = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
-
- public static final byte[] EC384_FP_B = new byte[]{
- (byte) 0xB3, (byte) 0x31, (byte) 0x2F, (byte) 0xA7,
- (byte) 0xE2, (byte) 0x3E, (byte) 0xE7, (byte) 0xE4,
- (byte) 0x98, (byte) 0x8E, (byte) 0x05, (byte) 0x6B,
- (byte) 0xE3, (byte) 0xF8, (byte) 0x2D, (byte) 0x19,
- (byte) 0x18, (byte) 0x1D, (byte) 0x9C, (byte) 0x6E,
- (byte) 0xFE, (byte) 0x81, (byte) 0x41, (byte) 0x12,
- (byte) 0x03, (byte) 0x14, (byte) 0x08, (byte) 0x8F,
- (byte) 0x50, (byte) 0x13, (byte) 0x87, (byte) 0x5A,
- (byte) 0xC6, (byte) 0x56, (byte) 0x39, (byte) 0x8D,
- (byte) 0x8A, (byte) 0x2E, (byte) 0xD1, (byte) 0x9D,
- (byte) 0x2A, (byte) 0x85, (byte) 0xC8, (byte) 0xED,
- (byte) 0xD3, (byte) 0xEC, (byte) 0x2A, (byte) 0xEF
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC384_FP_G_X = new byte[]{
- (byte) 0xAA, (byte) 0x87, (byte) 0xCA, (byte) 0x22,
- (byte) 0xBE, (byte) 0x8B, (byte) 0x05, (byte) 0x37,
- (byte) 0x8E, (byte) 0xB1, (byte) 0xC7, (byte) 0x1E,
- (byte) 0xF3, (byte) 0x20, (byte) 0xAD, (byte) 0x74,
- (byte) 0x6E, (byte) 0x1D, (byte) 0x3B, (byte) 0x62,
- (byte) 0x8B, (byte) 0xA7, (byte) 0x9B, (byte) 0x98,
- (byte) 0x59, (byte) 0xF7, (byte) 0x41, (byte) 0xE0,
- (byte) 0x82, (byte) 0x54, (byte) 0x2A, (byte) 0x38,
- (byte) 0x55, (byte) 0x02, (byte) 0xF2, (byte) 0x5D,
- (byte) 0xBF, (byte) 0x55, (byte) 0x29, (byte) 0x6C,
- (byte) 0x3A, (byte) 0x54, (byte) 0x5E, (byte) 0x38,
- (byte) 0x72, (byte) 0x76, (byte) 0x0A, (byte) 0xB7
- };
- // second part of G uncompressed
- public static final byte[] EC384_FP_G_Y = new byte[]{
- (byte) 0x36, (byte) 0x17, (byte) 0xDE, (byte) 0x4A,
- (byte) 0x96, (byte) 0x26, (byte) 0x2C, (byte) 0x6F,
- (byte) 0x5D, (byte) 0x9E, (byte) 0x98, (byte) 0xBF,
- (byte) 0x92, (byte) 0x92, (byte) 0xDC, (byte) 0x29,
- (byte) 0xF8, (byte) 0xF4, (byte) 0x1D, (byte) 0xBD,
- (byte) 0x28, (byte) 0x9A, (byte) 0x14, (byte) 0x7C,
- (byte) 0xE9, (byte) 0xDA, (byte) 0x31, (byte) 0x13,
- (byte) 0xB5, (byte) 0xF0, (byte) 0xB8, (byte) 0xC0,
- (byte) 0x0A, (byte) 0x60, (byte) 0xB1, (byte) 0xCE,
- (byte) 0x1D, (byte) 0x7E, (byte) 0x81, (byte) 0x9D,
- (byte) 0x7A, (byte) 0x43, (byte) 0x1D, (byte) 0x7C,
- (byte) 0x90, (byte) 0xEA, (byte) 0x0E, (byte) 0x5F
- };
-
- // Order of G
- public static final byte[] EC384_FP_R = new byte[]{
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xC7, (byte) 0x63, (byte) 0x4D, (byte) 0x81,
- (byte) 0xF4, (byte) 0x37, (byte) 0x2D, (byte) 0xDF,
- (byte) 0x58, (byte) 0x1A, (byte) 0x0D, (byte) 0xB2,
- (byte) 0x48, (byte) 0xB0, (byte) 0xA7, (byte) 0x7A,
- (byte) 0xEC, (byte) 0xEC, (byte) 0x19, (byte) 0x6A,
- (byte) 0xCC, (byte) 0xC5, (byte) 0x29, (byte) 0x73
- };
- // cofactor of G
- public static final short EC384_FP_K = 1;
-
-
- // secp521r1 from http://www.secg.org/sec2-v2.pdf
- public static final byte[] EC521_FP_P = new byte[]{
- (byte) 0x01, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
- };
-
- public static final byte[] EC521_FP_A = new byte[]{
- (byte) 0x01, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC
- };
-
- public static final byte[] EC521_FP_B = new byte[]{
- (byte) 0x00, (byte) 0x51, (byte) 0x95, (byte) 0x3E,
- (byte) 0xB9, (byte) 0x61, (byte) 0x8E, (byte) 0x1C,
- (byte) 0x9A, (byte) 0x1F, (byte) 0x92, (byte) 0x9A,
- (byte) 0x21, (byte) 0xA0, (byte) 0xB6, (byte) 0x85,
- (byte) 0x40, (byte) 0xEE, (byte) 0xA2, (byte) 0xDA,
- (byte) 0x72, (byte) 0x5B, (byte) 0x99, (byte) 0xB3,
- (byte) 0x15, (byte) 0xF3, (byte) 0xB8, (byte) 0xB4,
- (byte) 0x89, (byte) 0x91, (byte) 0x8E, (byte) 0xF1,
- (byte) 0x09, (byte) 0xE1, (byte) 0x56, (byte) 0x19,
- (byte) 0x39, (byte) 0x51, (byte) 0xEC, (byte) 0x7E,
- (byte) 0x93, (byte) 0x7B, (byte) 0x16, (byte) 0x52,
- (byte) 0xC0, (byte) 0xBD, (byte) 0x3B, (byte) 0xB1,
- (byte) 0xBF, (byte) 0x07, (byte) 0x35, (byte) 0x73,
- (byte) 0xDF, (byte) 0x88, (byte) 0x3D, (byte) 0x2C,
- (byte) 0x34, (byte) 0xF1, (byte) 0xEF, (byte) 0x45,
- (byte) 0x1F, (byte) 0xD4, (byte) 0x6B, (byte) 0x50,
- (byte) 0x3F, (byte) 0x00
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC521_FP_G_X = new byte[]{
- (byte) 0x00, (byte) 0xC6, (byte) 0x85, (byte) 0x8E,
- (byte) 0x06, (byte) 0xB7, (byte) 0x04, (byte) 0x04,
- (byte) 0xE9, (byte) 0xCD, (byte) 0x9E, (byte) 0x3E,
- (byte) 0xCB, (byte) 0x66, (byte) 0x23, (byte) 0x95,
- (byte) 0xB4, (byte) 0x42, (byte) 0x9C, (byte) 0x64,
- (byte) 0x81, (byte) 0x39, (byte) 0x05, (byte) 0x3F,
- (byte) 0xB5, (byte) 0x21, (byte) 0xF8, (byte) 0x28,
- (byte) 0xAF, (byte) 0x60, (byte) 0x6B, (byte) 0x4D,
- (byte) 0x3D, (byte) 0xBA, (byte) 0xA1, (byte) 0x4B,
- (byte) 0x5E, (byte) 0x77, (byte) 0xEF, (byte) 0xE7,
- (byte) 0x59, (byte) 0x28, (byte) 0xFE, (byte) 0x1D,
- (byte) 0xC1, (byte) 0x27, (byte) 0xA2, (byte) 0xFF,
- (byte) 0xA8, (byte) 0xDE, (byte) 0x33, (byte) 0x48,
- (byte) 0xB3, (byte) 0xC1, (byte) 0x85, (byte) 0x6A,
- (byte) 0x42, (byte) 0x9B, (byte) 0xF9, (byte) 0x7E,
- (byte) 0x7E, (byte) 0x31, (byte) 0xC2, (byte) 0xE5,
- (byte) 0xBD, (byte) 0x66
- };
-
- // second part of G uncompressed
- public static final byte[] EC521_FP_G_Y = new byte[]{
- (byte) 0x01, (byte) 0x18, (byte) 0x39, (byte) 0x29,
- (byte) 0x6A, (byte) 0x78, (byte) 0x9A, (byte) 0x3B,
- (byte) 0xC0, (byte) 0x04, (byte) 0x5C, (byte) 0x8A,
- (byte) 0x5F, (byte) 0xB4, (byte) 0x2C, (byte) 0x7D,
- (byte) 0x1B, (byte) 0xD9, (byte) 0x98, (byte) 0xF5,
- (byte) 0x44, (byte) 0x49, (byte) 0x57, (byte) 0x9B,
- (byte) 0x44, (byte) 0x68, (byte) 0x17, (byte) 0xAF,
- (byte) 0xBD, (byte) 0x17, (byte) 0x27, (byte) 0x3E,
- (byte) 0x66, (byte) 0x2C, (byte) 0x97, (byte) 0xEE,
- (byte) 0x72, (byte) 0x99, (byte) 0x5E, (byte) 0xF4,
- (byte) 0x26, (byte) 0x40, (byte) 0xC5, (byte) 0x50,
- (byte) 0xB9, (byte) 0x01, (byte) 0x3F, (byte) 0xAD,
- (byte) 0x07, (byte) 0x61, (byte) 0x35, (byte) 0x3C,
- (byte) 0x70, (byte) 0x86, (byte) 0xA2, (byte) 0x72,
- (byte) 0xC2, (byte) 0x40, (byte) 0x88, (byte) 0xBE,
- (byte) 0x94, (byte) 0x76, (byte) 0x9F, (byte) 0xD1,
- (byte) 0x66, (byte) 0x50
- };
-
- // Order of G
- public static final byte[] EC521_FP_R = new byte[]{
- (byte) 0x01, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFA,
- (byte) 0x51, (byte) 0x86, (byte) 0x87, (byte) 0x83,
- (byte) 0xBF, (byte) 0x2F, (byte) 0x96, (byte) 0x6B,
- (byte) 0x7F, (byte) 0xCC, (byte) 0x01, (byte) 0x48,
- (byte) 0xF7, (byte) 0x09, (byte) 0xA5, (byte) 0xD0,
- (byte) 0x3B, (byte) 0xB5, (byte) 0xC9, (byte) 0xB8,
- (byte) 0x89, (byte) 0x9C, (byte) 0x47, (byte) 0xAE,
- (byte) 0xBB, (byte) 0x6F, (byte) 0xB7, (byte) 0x1E,
- (byte) 0x91, (byte) 0x38, (byte) 0x64, (byte) 0x09
- };
-
- // cofactor of G
- public static final short EC521_FP_K = 1;
-
- //sect163r1 from http://www.secg.org/sec2-v2.pdf
- // [short i1, short i2, short i3] f = x^163 + x^i1 + x^i2 + x^i3 + 1
- public static final byte[] EC163_F2M_F = new byte[]{
- (byte) 0x00, (byte) 0x07,
- (byte) 0x00, (byte) 0x06,
- (byte) 0x00, (byte) 0x03
- };
-
- public static final byte[] EC163_F2M_A = new byte[]{
- (byte) 0x07, (byte) 0xB6, (byte) 0x88, (byte) 0x2C,
- (byte) 0xAA, (byte) 0xEF, (byte) 0xA8, (byte) 0x4F,
- (byte) 0x95, (byte) 0x54, (byte) 0xFF, (byte) 0x84,
- (byte) 0x28, (byte) 0xBD, (byte) 0x88, (byte) 0xE2,
- (byte) 0x46, (byte) 0xD2, (byte) 0x78, (byte) 0x2A,
- (byte) 0xE2
- };
-
- public static final byte[] EC163_F2M_B = new byte[]{
- (byte) 0x07, (byte) 0x13, (byte) 0x61, (byte) 0x2D,
- (byte) 0xCD, (byte) 0xDC, (byte) 0xB4, (byte) 0x0A,
- (byte) 0xAB, (byte) 0x94, (byte) 0x6B, (byte) 0xDA,
- (byte) 0x29, (byte) 0xCA, (byte) 0x91, (byte) 0xF7,
- (byte) 0x3A, (byte) 0xF9, (byte) 0x58, (byte) 0xAF,
- (byte) 0xD9
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC163_F2M_G_X = new byte[]{
- (byte) 0x03, (byte) 0x69, (byte) 0x97, (byte) 0x96,
- (byte) 0x97, (byte) 0xAB, (byte) 0x43, (byte) 0x89,
- (byte) 0x77, (byte) 0x89, (byte) 0x56, (byte) 0x67,
- (byte) 0x89, (byte) 0x56, (byte) 0x7F, (byte) 0x78,
- (byte) 0x7A, (byte) 0x78, (byte) 0x76, (byte) 0xA6,
- (byte) 0x54
- };
-
- // second part of G uncompressed
- public static final byte[] EC163_F2M_G_Y = new byte[]{
- (byte) 0x00, (byte) 0x43, (byte) 0x5E, (byte) 0xDB,
- (byte) 0x42, (byte) 0xEF, (byte) 0xAF, (byte) 0xB2,
- (byte) 0x98, (byte) 0x9D, (byte) 0x51, (byte) 0xFE,
- (byte) 0xFC, (byte) 0xE3, (byte) 0xC8, (byte) 0x09,
- (byte) 0x88, (byte) 0xF4, (byte) 0x1F, (byte) 0xF8,
- (byte) 0x83
- };
-
- // order of G
- public static final byte[] EC163_F2M_R = new byte[]{
- (byte) 0x03, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0x48,
- (byte) 0xAA, (byte) 0xB6, (byte) 0x89, (byte) 0xC2,
- (byte) 0x9C, (byte) 0xA7, (byte) 0x10, (byte) 0x27,
- (byte) 0x9B
- };
-
- // cofactor of G
- public static final short EC163_F2M_K = 2;
-
- //sect233r1 from http://www.secg.org/sec2-v2.pdf
- // [short i1, short i2, short i3] f = x^233 + x^i1 + 1
- public static final byte[] EC233_F2M_F = new byte[]{
- (byte) 0x00, (byte) 0x4a
- };
-
- public static final byte[] EC233_F2M_A = new byte[]{
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x01
- };
-
- public static final byte[] EC233_F2M_B = new byte[]{
- (byte) 0x00, (byte) 0x66, (byte) 0x64, (byte) 0x7E,
- (byte) 0xDE, (byte) 0x6C, (byte) 0x33, (byte) 0x2C,
- (byte) 0x7F, (byte) 0x8C, (byte) 0x09, (byte) 0x23,
- (byte) 0xBB, (byte) 0x58, (byte) 0x21, (byte) 0x3B,
- (byte) 0x33, (byte) 0x3B, (byte) 0x20, (byte) 0xE9,
- (byte) 0xCE, (byte) 0x42, (byte) 0x81, (byte) 0xFE,
- (byte) 0x11, (byte) 0x5F, (byte) 0x7D, (byte) 0x8F,
- (byte) 0x90, (byte) 0xAD
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC233_F2M_G_X = new byte[]{
- (byte) 0x00, (byte) 0xFA, (byte) 0xC9, (byte) 0xDF,
- (byte) 0xCB, (byte) 0xAC, (byte) 0x83, (byte) 0x13,
- (byte) 0xBB, (byte) 0x21, (byte) 0x39, (byte) 0xF1,
- (byte) 0xBB, (byte) 0x75, (byte) 0x5F, (byte) 0xEF,
- (byte) 0x65, (byte) 0xBC, (byte) 0x39, (byte) 0x1F,
- (byte) 0x8B, (byte) 0x36, (byte) 0xF8, (byte) 0xF8,
- (byte) 0xEB, (byte) 0x73, (byte) 0x71, (byte) 0xFD,
- (byte) 0x55, (byte) 0x8B
- };
-
- // second part of G uncompressed
- public static final byte[] EC233_F2M_G_Y = new byte[]{
- (byte) 0x01, (byte) 0x00, (byte) 0x6A, (byte) 0x08,
- (byte) 0xA4, (byte) 0x19, (byte) 0x03, (byte) 0x35,
- (byte) 0x06, (byte) 0x78, (byte) 0xE5, (byte) 0x85,
- (byte) 0x28, (byte) 0xBE, (byte) 0xBF, (byte) 0x8A,
- (byte) 0x0B, (byte) 0xEF, (byte) 0xF8, (byte) 0x67,
- (byte) 0xA7, (byte) 0xCA, (byte) 0x36, (byte) 0x71,
- (byte) 0x6F, (byte) 0x7E, (byte) 0x01, (byte) 0xF8,
- (byte) 0x10, (byte) 0x52
- };
-
- // order of G
- public static final byte[] EC233_F2M_R = new byte[]{
- (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x13,
- (byte) 0xE9, (byte) 0x74, (byte) 0xE7, (byte) 0x2F,
- (byte) 0x8A, (byte) 0x69, (byte) 0x22, (byte) 0x03,
- (byte) 0x1D, (byte) 0x26, (byte) 0x03, (byte) 0xCF,
- (byte) 0xE0, (byte) 0xD7
- };
-
- // cofactor of G
- public static final short EC233_F2M_K = 2;
-
- //sect283r1 from http://www.secg.org/sec2-v2.pdf
- // [short i1, short i2, short i3] f = x^283 + x^i1 + x^i2 + x^i3 + 1
- public static final byte[] EC283_F2M_F = new byte[]{
- (byte) 0x00, (byte) 0x0c,
- (byte) 0x00, (byte) 0x07,
- (byte) 0x00, (byte) 0x05
- };
-
- public static final byte[] EC283_F2M_A = new byte[]{
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01
- };
-
- public static final byte[] EC283_F2M_B = new byte[]{
- (byte) 0x02, (byte) 0x7B, (byte) 0x68, (byte) 0x0A,
- (byte) 0xC8, (byte) 0xB8, (byte) 0x59, (byte) 0x6D,
- (byte) 0xA5, (byte) 0xA4, (byte) 0xAF, (byte) 0x8A,
- (byte) 0x19, (byte) 0xA0, (byte) 0x30, (byte) 0x3F,
- (byte) 0xCA, (byte) 0x97, (byte) 0xFD, (byte) 0x76,
- (byte) 0x45, (byte) 0x30, (byte) 0x9F, (byte) 0xA2,
- (byte) 0xA5, (byte) 0x81, (byte) 0x48, (byte) 0x5A,
- (byte) 0xF6, (byte) 0x26, (byte) 0x3E, (byte) 0x31,
- (byte) 0x3B, (byte) 0x79, (byte) 0xA2, (byte) 0xF5
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC283_F2M_G_X = new byte[]{
- (byte) 0x05, (byte) 0xF9, (byte) 0x39, (byte) 0x25,
- (byte) 0x8D, (byte) 0xB7, (byte) 0xDD, (byte) 0x90,
- (byte) 0xE1, (byte) 0x93, (byte) 0x4F, (byte) 0x8C,
- (byte) 0x70, (byte) 0xB0, (byte) 0xDF, (byte) 0xEC,
- (byte) 0x2E, (byte) 0xED, (byte) 0x25, (byte) 0xB8,
- (byte) 0x55, (byte) 0x7E, (byte) 0xAC, (byte) 0x9C,
- (byte) 0x80, (byte) 0xE2, (byte) 0xE1, (byte) 0x98,
- (byte) 0xF8, (byte) 0xCD, (byte) 0xBE, (byte) 0xCD,
- (byte) 0x86, (byte) 0xB1, (byte) 0x20, (byte) 0x53
- };
-
- // second part of G uncompressed
- public static final byte[] EC283_F2M_G_Y = new byte[]{
- (byte) 0x03, (byte) 0x67, (byte) 0x68, (byte) 0x54,
- (byte) 0xFE, (byte) 0x24, (byte) 0x14, (byte) 0x1C,
- (byte) 0xB9, (byte) 0x8F, (byte) 0xE6, (byte) 0xD4,
- (byte) 0xB2, (byte) 0x0D, (byte) 0x02, (byte) 0xB4,
- (byte) 0x51, (byte) 0x6F, (byte) 0xF7, (byte) 0x02,
- (byte) 0x35, (byte) 0x0E, (byte) 0xDD, (byte) 0xB0,
- (byte) 0x82, (byte) 0x67, (byte) 0x79, (byte) 0xC8,
- (byte) 0x13, (byte) 0xF0, (byte) 0xDF, (byte) 0x45,
- (byte) 0xBE, (byte) 0x81, (byte) 0x12, (byte) 0xF4
- };
-
- // order of G
- public static final byte[] EC283_F2M_R = new byte[]{
- (byte) 0x03, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xEF, (byte) 0x90,
- (byte) 0x39, (byte) 0x96, (byte) 0x60, (byte) 0xFC,
- (byte) 0x93, (byte) 0x8A, (byte) 0x90, (byte) 0x16,
- (byte) 0x5B, (byte) 0x04, (byte) 0x2A, (byte) 0x7C,
- (byte) 0xEF, (byte) 0xAD, (byte) 0xB3, (byte) 0x07
- };
-
- // cofactor of G
- public static final short EC283_F2M_K = 2;
-
- //sect409r1 from http://www.secg.org/sec2-v2.pdf
- // [short i1, short i2, short i3] f = x^409 + x^i1 + 1
- public static final byte[] EC409_F2M_F = new byte[]{
- (byte) 0x00, (byte) 0x57
- };
-
- public static final byte[] EC409_F2M_A = new byte[]{
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01
- };
-
- public static final byte[] EC409_F2M_B = new byte[]{
- (byte) 0x00, (byte) 0x21, (byte) 0xA5, (byte) 0xC2,
- (byte) 0xC8, (byte) 0xEE, (byte) 0x9F, (byte) 0xEB,
- (byte) 0x5C, (byte) 0x4B, (byte) 0x9A, (byte) 0x75,
- (byte) 0x3B, (byte) 0x7B, (byte) 0x47, (byte) 0x6B,
- (byte) 0x7F, (byte) 0xD6, (byte) 0x42, (byte) 0x2E,
- (byte) 0xF1, (byte) 0xF3, (byte) 0xDD, (byte) 0x67,
- (byte) 0x47, (byte) 0x61, (byte) 0xFA, (byte) 0x99,
- (byte) 0xD6, (byte) 0xAC, (byte) 0x27, (byte) 0xC8,
- (byte) 0xA9, (byte) 0xA1, (byte) 0x97, (byte) 0xB2,
- (byte) 0x72, (byte) 0x82, (byte) 0x2F, (byte) 0x6C,
- (byte) 0xD5, (byte) 0x7A, (byte) 0x55, (byte) 0xAA,
- (byte) 0x4F, (byte) 0x50, (byte) 0xAE, (byte) 0x31,
- (byte) 0x7B, (byte) 0x13, (byte) 0x54, (byte) 0x5F
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC409_F2M_G_X = new byte[]{
- (byte) 0x01, (byte) 0x5D, (byte) 0x48, (byte) 0x60,
- (byte) 0xD0, (byte) 0x88, (byte) 0xDD, (byte) 0xB3,
- (byte) 0x49, (byte) 0x6B, (byte) 0x0C, (byte) 0x60,
- (byte) 0x64, (byte) 0x75, (byte) 0x62, (byte) 0x60,
- (byte) 0x44, (byte) 0x1C, (byte) 0xDE, (byte) 0x4A,
- (byte) 0xF1, (byte) 0x77, (byte) 0x1D, (byte) 0x4D,
- (byte) 0xB0, (byte) 0x1F, (byte) 0xFE, (byte) 0x5B,
- (byte) 0x34, (byte) 0xE5, (byte) 0x97, (byte) 0x03,
- (byte) 0xDC, (byte) 0x25, (byte) 0x5A, (byte) 0x86,
- (byte) 0x8A, (byte) 0x11, (byte) 0x80, (byte) 0x51,
- (byte) 0x56, (byte) 0x03, (byte) 0xAE, (byte) 0xAB,
- (byte) 0x60, (byte) 0x79, (byte) 0x4E, (byte) 0x54,
- (byte) 0xBB, (byte) 0x79, (byte) 0x96, (byte) 0xA7
- };
-
- // second part of G uncompressed
- public static final byte[] EC409_F2M_G_Y = new byte[]{
- (byte) 0x00, (byte) 0x61, (byte) 0xB1, (byte) 0xCF,
- (byte) 0xAB, (byte) 0x6B, (byte) 0xE5, (byte) 0xF3,
- (byte) 0x2B, (byte) 0xBF, (byte) 0xA7, (byte) 0x83,
- (byte) 0x24, (byte) 0xED, (byte) 0x10, (byte) 0x6A,
- (byte) 0x76, (byte) 0x36, (byte) 0xB9, (byte) 0xC5,
- (byte) 0xA7, (byte) 0xBD, (byte) 0x19, (byte) 0x8D,
- (byte) 0x01, (byte) 0x58, (byte) 0xAA, (byte) 0x4F,
- (byte) 0x54, (byte) 0x88, (byte) 0xD0, (byte) 0x8F,
- (byte) 0x38, (byte) 0x51, (byte) 0x4F, (byte) 0x1F,
- (byte) 0xDF, (byte) 0x4B, (byte) 0x4F, (byte) 0x40,
- (byte) 0xD2, (byte) 0x18, (byte) 0x1B, (byte) 0x36,
- (byte) 0x81, (byte) 0xC3, (byte) 0x64, (byte) 0xBA,
- (byte) 0x02, (byte) 0x73, (byte) 0xC7, (byte) 0x06
- };
-
- // order of G
- public static final byte[] EC409_F2M_R = new byte[]{
- (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0xE2,
- (byte) 0xAA, (byte) 0xD6, (byte) 0xA6, (byte) 0x12,
- (byte) 0xF3, (byte) 0x33, (byte) 0x07, (byte) 0xBE,
- (byte) 0x5F, (byte) 0xA4, (byte) 0x7C, (byte) 0x3C,
- (byte) 0x9E, (byte) 0x05, (byte) 0x2F, (byte) 0x83,
- (byte) 0x81, (byte) 0x64, (byte) 0xCD, (byte) 0x37,
- (byte) 0xD9, (byte) 0xA2, (byte) 0x11, (byte) 0x73
- };
-
- // cofactor of G
- public static final short EC409_F2M_K = 2;
-
- //sect571r1 from http://www.secg.org/sec2-v2.pdf
- // [short i1, short i2, short i3] f = x^571 + x^i1 + x^i2 + x^i3 + 1
- public static final byte[] EC571_F2M_F = new byte[]{
- (byte) 0x00, (byte) 0x0a,
- (byte) 0x00, (byte) 0x05,
- (byte) 0x00, (byte) 0x02,
- };
-
- public static final byte[] EC571_F2M_A = new byte[]{
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01
- };
-
- public static final byte[] EC571_F2M_B = new byte[]{
- (byte) 0x02, (byte) 0xF4, (byte) 0x0E, (byte) 0x7E,
- (byte) 0x22, (byte) 0x21, (byte) 0xF2, (byte) 0x95,
- (byte) 0xDE, (byte) 0x29, (byte) 0x71, (byte) 0x17,
- (byte) 0xB7, (byte) 0xF3, (byte) 0xD6, (byte) 0x2F,
- (byte) 0x5C, (byte) 0x6A, (byte) 0x97, (byte) 0xFF,
- (byte) 0xCB, (byte) 0x8C, (byte) 0xEF, (byte) 0xF1,
- (byte) 0xCD, (byte) 0x6B, (byte) 0xA8, (byte) 0xCE,
- (byte) 0x4A, (byte) 0x9A, (byte) 0x18, (byte) 0xAD,
- (byte) 0x84, (byte) 0xFF, (byte) 0xAB, (byte) 0xBD,
- (byte) 0x8E, (byte) 0xFA, (byte) 0x59, (byte) 0x33,
- (byte) 0x2B, (byte) 0xE7, (byte) 0xAD, (byte) 0x67,
- (byte) 0x56, (byte) 0xA6, (byte) 0x6E, (byte) 0x29,
- (byte) 0x4A, (byte) 0xFD, (byte) 0x18, (byte) 0x5A,
- (byte) 0x78, (byte) 0xFF, (byte) 0x12, (byte) 0xAA,
- (byte) 0x52, (byte) 0x0E, (byte) 0x4D, (byte) 0xE7,
- (byte) 0x39, (byte) 0xBA, (byte) 0xCA, (byte) 0x0C,
- (byte) 0x7F, (byte) 0xFE, (byte) 0xFF, (byte) 0x7F,
- (byte) 0x29, (byte) 0x55, (byte) 0x72, (byte) 0x7A
- };
-
- // G in compressed form / first part of ucompressed
- public static final byte[] EC571_F2M_G_X = new byte[]{
- (byte) 0x03, (byte) 0x03, (byte) 0x00, (byte) 0x1D,
- (byte) 0x34, (byte) 0xB8, (byte) 0x56, (byte) 0x29,
- (byte) 0x6C, (byte) 0x16, (byte) 0xC0, (byte) 0xD4,
- (byte) 0x0D, (byte) 0x3C, (byte) 0xD7, (byte) 0x75,
- (byte) 0x0A, (byte) 0x93, (byte) 0xD1, (byte) 0xD2,
- (byte) 0x95, (byte) 0x5F, (byte) 0xA8, (byte) 0x0A,
- (byte) 0xA5, (byte) 0xF4, (byte) 0x0F, (byte) 0xC8,
- (byte) 0xDB, (byte) 0x7B, (byte) 0x2A, (byte) 0xBD,
- (byte) 0xBD, (byte) 0xE5, (byte) 0x39, (byte) 0x50,
- (byte) 0xF4, (byte) 0xC0, (byte) 0xD2, (byte) 0x93,
- (byte) 0xCD, (byte) 0xD7, (byte) 0x11, (byte) 0xA3,
- (byte) 0x5B, (byte) 0x67, (byte) 0xFB, (byte) 0x14,
- (byte) 0x99, (byte) 0xAE, (byte) 0x60, (byte) 0x03,
- (byte) 0x86, (byte) 0x14, (byte) 0xF1, (byte) 0x39,
- (byte) 0x4A, (byte) 0xBF, (byte) 0xA3, (byte) 0xB4,
- (byte) 0xC8, (byte) 0x50, (byte) 0xD9, (byte) 0x27,
- (byte) 0xE1, (byte) 0xE7, (byte) 0x76, (byte) 0x9C,
- (byte) 0x8E, (byte) 0xEC, (byte) 0x2D, (byte) 0x19
- };
-
- // second part of G uncompressed
- public static final byte[] EC571_F2M_G_Y = new byte[]{
- (byte) 0x03, (byte) 0x7B, (byte) 0xF2, (byte) 0x73,
- (byte) 0x42, (byte) 0xDA, (byte) 0x63, (byte) 0x9B,
- (byte) 0x6D, (byte) 0xCC, (byte) 0xFF, (byte) 0xFE,
- (byte) 0xB7, (byte) 0x3D, (byte) 0x69, (byte) 0xD7,
- (byte) 0x8C, (byte) 0x6C, (byte) 0x27, (byte) 0xA6,
- (byte) 0x00, (byte) 0x9C, (byte) 0xBB, (byte) 0xCA,
- (byte) 0x19, (byte) 0x80, (byte) 0xF8, (byte) 0x53,
- (byte) 0x39, (byte) 0x21, (byte) 0xE8, (byte) 0xA6,
- (byte) 0x84, (byte) 0x42, (byte) 0x3E, (byte) 0x43,
- (byte) 0xBA, (byte) 0xB0, (byte) 0x8A, (byte) 0x57,
- (byte) 0x62, (byte) 0x91, (byte) 0xAF, (byte) 0x8F,
- (byte) 0x46, (byte) 0x1B, (byte) 0xB2, (byte) 0xA8,
- (byte) 0xB3, (byte) 0x53, (byte) 0x1D, (byte) 0x2F,
- (byte) 0x04, (byte) 0x85, (byte) 0xC1, (byte) 0x9B,
- (byte) 0x16, (byte) 0xE2, (byte) 0xF1, (byte) 0x51,
- (byte) 0x6E, (byte) 0x23, (byte) 0xDD, (byte) 0x3C,
- (byte) 0x1A, (byte) 0x48, (byte) 0x27, (byte) 0xAF,
- (byte) 0x1B, (byte) 0x8A, (byte) 0xC1, (byte) 0x5B
- };
-
- // order of G
- public static final byte[] EC571_F2M_R = new byte[]{
- (byte) 0x03, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
- (byte) 0xE6, (byte) 0x61, (byte) 0xCE, (byte) 0x18,
- (byte) 0xFF, (byte) 0x55, (byte) 0x98, (byte) 0x73,
- (byte) 0x08, (byte) 0x05, (byte) 0x9B, (byte) 0x18,
- (byte) 0x68, (byte) 0x23, (byte) 0x85, (byte) 0x1E,
- (byte) 0xC7, (byte) 0xDD, (byte) 0x9C, (byte) 0xA1,
- (byte) 0x16, (byte) 0x1D, (byte) 0xE9, (byte) 0x3D,
- (byte) 0x51, (byte) 0x74, (byte) 0xD6, (byte) 0x6E,
- (byte) 0x83, (byte) 0x82, (byte) 0xE9, (byte) 0xBB,
- (byte) 0x2F, (byte) 0xE8, (byte) 0x4E, (byte) 0x47
- };
-
- // cofactor of G
- public static final short EC571_F2M_K = 2;
-
-
- // transformParameter TRANSFORMATION types
- public static final short TRANSFORMATION_NONE = (short) 0x00;
- public static final short TRANSFORMATION_FIXED = (short) 0x01;
- public static final short TRANSFORMATION_FULLRANDOM = (short) 0x02;
- public static final short TRANSFORMATION_ONEBYTERANDOM = (short) 0x04;
- public static final short TRANSFORMATION_ZERO = (short) 0x08;
- public static final short TRANSFORMATION_ONE = (short) 0x10;
- public static final short TRANSFORMATION_MAX = (short) 0x20;
- public static final short TRANSFORMATION_INCREMENT = (short) 0x40;
- public static final short TRANSFORMATION_INFINITY = (short) 0x80;
- public static final short TRANSFORMATION_COMPRESS = (short) 0x0100;
- public static final short TRANSFORMATION_COMPRESS_HYBRID = (short) 0x0200;
- public static final short TRANSFORMATION_04_MASK = (short) 0x0400;
-
- // toX962 FORM types
- public static final byte X962_UNCOMPRESSED = (byte) 0x00;
- public static final byte X962_COMPRESSED = (byte) 0x01;
- public static final byte X962_HYBRID = (byte) 0x02;
-
- // Supported embedded curves, getCurveParameter
- public static final byte CURVE_default = (byte) 0;
- public static final byte CURVE_external = (byte) 0xff;
-
- // SECG recommended curves over FP
- public static final byte CURVE_secp112r1 = (byte) 1;
- public static final byte CURVE_secp128r1 = (byte) 2;
- public static final byte CURVE_secp160r1 = (byte) 3;
- public static final byte CURVE_secp192r1 = (byte) 4;
- public static final byte CURVE_secp224r1 = (byte) 5;
- public static final byte CURVE_secp256r1 = (byte) 6;
- public static final byte CURVE_secp384r1 = (byte) 7;
- public static final byte CURVE_secp521r1 = (byte) 8;
-
- public static final byte FP_CURVES = (byte) 8;
-
- // SECG recommended curves over F2M
- public static final byte CURVE_sect163r1 = (byte) 9;
- public static final byte CURVE_sect233r1 = (byte) 10;
- public static final byte CURVE_sect283r1 = (byte) 11;
- public static final byte CURVE_sect409r1 = (byte) 12;
- public static final byte CURVE_sect571r1 = (byte) 13;
-
- public static final byte F2M_CURVES = (byte) 13;
-
- public static final short[] FP_SIZES = new short[]{112, 128, 160, 192, 224, 256, 384, 521};
- public static final short[] F2M_SIZES = new short[]{163, 233, 283, 409, 571};
-
- // Class javacard.security.KeyAgreement
- // javacard.security.KeyAgreement Fields:
- public static final byte KeyAgreement_ALG_EC_SVDP_DH = 1;
- public static final byte KeyAgreement_ALG_EC_SVDP_DHC = 2;
- public static final byte KeyAgreement_ALG_EC_SVDP_DH_PLAIN = 3;
- public static final byte KeyAgreement_ALG_EC_SVDP_DHC_PLAIN = 4;
- public static final byte KeyAgreement_ALG_EC_PACE_GM = 5;
- public static final byte KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY = 6;
-
- public static final byte[] KA_TYPES = new byte[]{
- KeyAgreement_ALG_EC_SVDP_DH,
- //KeyAgreement_ALG_EC_SVDP_DH_KDF, //duplicate
- KeyAgreement_ALG_EC_SVDP_DHC,
- //KeyAgreement_ALG_EC_SVDP_DHC_KDF, //duplicate
- KeyAgreement_ALG_EC_SVDP_DH_PLAIN,
- KeyAgreement_ALG_EC_SVDP_DHC_PLAIN,
- KeyAgreement_ALG_EC_PACE_GM,
- KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY
- };
-
- // Class javacard.security.Signature
- // javacard.security.Signature Fields:
- public static final byte Signature_ALG_ECDSA_SHA = 17;
- public static final byte Signature_ALG_ECDSA_SHA_224 = 37;
- public static final byte Signature_ALG_ECDSA_SHA_256 = 33;
- public static final byte Signature_ALG_ECDSA_SHA_384 = 34;
- public static final byte Signature_ALG_ECDSA_SHA_512 = 38;
-
- public static final byte[] SIG_TYPES = new byte[]{
- Signature_ALG_ECDSA_SHA,
- Signature_ALG_ECDSA_SHA_224,
- Signature_ALG_ECDSA_SHA_256,
- Signature_ALG_ECDSA_SHA_384,
- Signature_ALG_ECDSA_SHA_512
- };
-
- public static byte getCurve(short keyLength, byte keyClass) {
- if (keyClass == KeyPair.ALG_EC_FP) {
- switch (keyLength) {
- case (short) 112:
- return CURVE_secp112r1;
- case (short) 128:
- return CURVE_secp128r1;
- case (short) 160:
- return CURVE_secp160r1;
- case (short) 192:
- return CURVE_secp192r1;
- case (short) 224:
- return CURVE_secp224r1;
- case (short) 256:
- return CURVE_secp256r1;
- case (short) 384:
- return CURVE_secp384r1;
- case (short) 521:
- return CURVE_secp521r1;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- } else if (keyClass == KeyPair.ALG_EC_F2M) {
- switch (keyLength) {
- case (short) 163:
- return CURVE_sect163r1;
- case (short) 233:
- return CURVE_sect233r1;
- case (short) 283:
- return CURVE_sect283r1;
- case (short) 409:
- return CURVE_sect409r1;
- case (short) 571:
- return CURVE_sect571r1;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- } else {
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- return 0;
- }
-
- public static short getCurveParameter(byte curve, short param, byte[] outputBuffer, short outputOffset) {
- byte alg = getCurveType(curve);
- switch (curve) {
- case CURVE_secp112r1: {
- EC_FP_P = EC112_FP_P;
- EC_A = EC112_FP_A;
- EC_B = EC112_FP_B;
- EC_G_X = EC112_FP_G_X;
- EC_G_Y = EC112_FP_G_Y;
- EC_R = EC112_FP_R;
- EC_K = EC112_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp128r1: {
- EC_FP_P = EC128_FP_P;
- EC_A = EC128_FP_A;
- EC_B = EC128_FP_B;
- EC_G_X = EC128_FP_G_X;
- EC_G_Y = EC128_FP_G_Y;
- EC_R = EC128_FP_R;
- EC_K = EC128_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp160r1: {
- EC_FP_P = EC160_FP_P;
- EC_A = EC160_FP_A;
- EC_B = EC160_FP_B;
- EC_G_X = EC160_FP_G_X;
- EC_G_Y = EC160_FP_G_Y;
- EC_R = EC160_FP_R;
- EC_K = EC160_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp192r1: {
- EC_FP_P = EC192_FP_P;
- EC_A = EC192_FP_A;
- EC_B = EC192_FP_B;
- EC_G_X = EC192_FP_G_X;
- EC_G_Y = EC192_FP_G_Y;
- EC_R = EC192_FP_R;
- EC_K = EC192_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp224r1: {
- EC_FP_P = EC224_FP_P;
- EC_A = EC224_FP_A;
- EC_B = EC224_FP_B;
- EC_G_X = EC224_FP_G_X;
- EC_G_Y = EC224_FP_G_Y;
- EC_R = EC224_FP_R;
- EC_K = EC224_FP_K;
- EC_S = null;
- break;
- }
- case CURVE_secp256r1: {
- EC_FP_P = EC256_FP_P;
- EC_A = EC256_FP_A;
- EC_B = EC256_FP_B;
- EC_G_X = EC256_FP_G_X;
- EC_G_Y = EC256_FP_G_Y;
- EC_R = EC256_FP_R;
- EC_K = EC256_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp384r1: {
- EC_FP_P = EC384_FP_P;
- EC_A = EC384_FP_A;
- EC_B = EC384_FP_B;
- EC_G_X = EC384_FP_G_X;
- EC_G_Y = EC384_FP_G_Y;
- EC_R = EC384_FP_R;
- EC_K = EC384_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_secp521r1: {
- EC_FP_P = EC521_FP_P;
- EC_A = EC521_FP_A;
- EC_B = EC521_FP_B;
- EC_G_X = EC521_FP_G_X;
- EC_G_Y = EC521_FP_G_Y;
- EC_R = EC521_FP_R;
- EC_K = EC521_FP_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_sect163r1: {
- EC_F2M_F2M = EC163_F2M_F;
- EC_A = EC163_F2M_A;
- EC_B = EC163_F2M_B;
- EC_G_X = EC163_F2M_G_X;
- EC_G_Y = EC163_F2M_G_Y;
- EC_R = EC163_F2M_R;
- EC_K = EC163_F2M_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_sect233r1: {
- EC_F2M_F2M = EC233_F2M_F;
- EC_A = EC233_F2M_A;
- EC_B = EC233_F2M_B;
- EC_G_X = EC233_F2M_G_X;
- EC_G_Y = EC233_F2M_G_Y;
- EC_R = EC233_F2M_R;
- EC_K = EC233_F2M_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_sect283r1: {
- EC_F2M_F2M = EC283_F2M_F;
- EC_A = EC283_F2M_A;
- EC_B = EC283_F2M_B;
- EC_G_X = EC283_F2M_G_X;
- EC_G_Y = EC283_F2M_G_Y;
- EC_R = EC283_F2M_R;
- EC_K = EC283_F2M_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_sect409r1: {
- EC_F2M_F2M = EC409_F2M_F;
- EC_A = EC409_F2M_A;
- EC_B = EC409_F2M_B;
- EC_G_X = EC409_F2M_G_X;
- EC_G_Y = EC409_F2M_G_Y;
- EC_R = EC409_F2M_R;
- EC_K = EC409_F2M_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- case CURVE_sect571r1: {
- EC_F2M_F2M = EC571_F2M_F;
- EC_A = EC571_F2M_A;
- EC_B = EC571_F2M_B;
- EC_G_X = EC571_F2M_G_X;
- EC_G_Y = EC571_F2M_G_Y;
- EC_R = EC571_F2M_R;
- EC_K = EC571_F2M_K;
- EC_W_X = null;
- EC_W_Y = null;
- EC_S = null;
- break;
- }
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- short length = 0;
- switch (param) {
- case PARAMETER_FP:
- if (alg == KeyPair.ALG_EC_FP) {
- length = Util.arrayCopyNonAtomic(EC_FP_P, (short) 0, outputBuffer, outputOffset, (short) EC_FP_P.length);
- }
- break;
- case PARAMETER_F2M:
- if (alg == KeyPair.ALG_EC_F2M) {
- length = Util.arrayCopyNonAtomic(EC_F2M_F2M, (short) 0, outputBuffer, outputOffset, (short) EC_F2M_F2M.length);
- }
- break;
- case PARAMETER_A:
- length = Util.arrayCopyNonAtomic(EC_A, (short) 0, outputBuffer, outputOffset, (short) EC_A.length);
- break;
- case PARAMETER_B:
- length = Util.arrayCopyNonAtomic(EC_B, (short) 0, outputBuffer, outputOffset, (short) EC_B.length);
- break;
- case PARAMETER_G:
- length = toX962(X962_UNCOMPRESSED, outputBuffer, outputOffset, EC_G_X, (short) 0, (short) EC_G_X.length, EC_G_Y, (short) 0, (short) EC_G_Y.length);
- break;
- case PARAMETER_R:
- length = Util.arrayCopyNonAtomic(EC_R, (short) 0, outputBuffer, outputOffset, (short) EC_R.length);
- break;
- case PARAMETER_K:
- length = 2;
- Util.setShort(outputBuffer, outputOffset, EC_K);
- break;
- case PARAMETER_W:
- if (EC_W_X == null || EC_W_Y == null) {
- return 0;
- }
- length = toX962(X962_UNCOMPRESSED, outputBuffer, outputOffset, EC_W_X, (short) 0, (short) EC_W_X.length, EC_W_Y, (short) 0, (short) EC_W_Y.length);
- break;
- case PARAMETER_S:
- if (EC_S == null) {
- return 0;
- }
- length = Util.arrayCopyNonAtomic(EC_S, (short) 0, outputBuffer, outputOffset, (short) EC_S.length);
- break;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- return length;
- }
-
- public static short transformParameter(short transformation, byte[] buffer, short offset, short length) {
- if (transformation == TRANSFORMATION_NONE) {
- return length;
- }
-
- short transformationMask = TRANSFORMATION_FIXED;
- while (transformationMask <= TRANSFORMATION_04_MASK) {
- short transformationPart = (short) (transformationMask & transformation);
- switch (transformationPart) {
- case (short) 0:
- break;
- case TRANSFORMATION_FIXED:
- if (length >= 1) {
- buffer[offset] = (byte) 0xcc;
- buffer[(short) (offset + length - 1)] = (byte) 0xcc;
- }
- break;
- case TRANSFORMATION_FULLRANDOM:
- randomData.generateData(buffer, offset, length);
- break;
- case TRANSFORMATION_ONEBYTERANDOM:
- short first = Util.getShort(buffer, (short) 0); // save first two bytes
-
- randomData.generateData(buffer, (short) 0, (short) 2); // generate position
- short rngPos = Util.getShort(buffer, (short) 0); // save generated position
-
- Util.setShort(buffer, (short) 0, first); // restore first two bytes
-
- if (rngPos < 0) { // make positive
- rngPos = (short) -rngPos;
- }
- rngPos %= length; // make < param length
-
- byte original = buffer[rngPos];
- do {
- randomData.generateData(buffer, rngPos, (short) 1);
- } while (original == buffer[rngPos]);
- break;
- case TRANSFORMATION_ZERO:
- Util.arrayFillNonAtomic(buffer, offset, length, (byte) 0);
- break;
- case TRANSFORMATION_ONE:
- Util.arrayFillNonAtomic(buffer, offset, length, (byte) 0);
- buffer[(short) (offset + length)] = (byte) 1;
- break;
- case TRANSFORMATION_MAX:
- Util.arrayFillNonAtomic(buffer, offset, length, (byte) 1);
- break;
- case TRANSFORMATION_INCREMENT:
- short index = (short) (offset + length - 1);
- byte value;
- do {
- value = buffer[index];
- buffer[index--] = ++value;
- } while (value == (byte) 0 && index >= offset);
- break;
- case TRANSFORMATION_INFINITY:
- Util.arrayFillNonAtomic(buffer, offset, length, (byte) 0);
- length = 1;
- break;
- case TRANSFORMATION_COMPRESS_HYBRID:
- case TRANSFORMATION_COMPRESS:
- if ((short) (length % 2) != 1) {
- // an uncompressed point should have odd length (since 1 byte type, + 2 * coords)
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- short half = (short) ((short) (length - 1) / 2);
- byte yLSB = buffer[(short) (offset + length)];
- byte yBit = (byte) (yLSB & 0x01);
- if (yBit == 1) {
- buffer[offset] = 3;
- } else {
- buffer[offset] = 2;
- }
-
- if (transformationPart == TRANSFORMATION_COMPRESS) {
- length = (short) (half + 1);
- } else {
- buffer[offset] += 4;
- }
- break;
- case TRANSFORMATION_04_MASK:
- buffer[offset] = 4;
- break;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- transformationMask = (short) (transformationMask << 1);
- }
- return length;
- }
-
- public static byte getCurveType(byte curve) {
- return curve <= FP_CURVES ? KeyPair.ALG_EC_FP : KeyPair.ALG_EC_F2M;
- }
-
- @SuppressWarnings("fallthrough")
- public static short toX962(byte form, byte[] outputBuffer, short outputOffset, byte[] xBuffer, short xOffset, short xLength, byte[] yBuffer, short yOffset, short yLength) {
- short size = 1;
- size += xLength;
-
- short offset = outputOffset;
- outputBuffer[offset] = 0;
- switch (form) {
- case X962_UNCOMPRESSED:
- outputBuffer[offset] = 4;
- break;
- case X962_HYBRID:
- outputBuffer[offset] = 4;
- case X962_COMPRESSED: /* fallthrough */
- byte yLSB = yBuffer[(short) (yOffset + yLength)];
- byte yBit = (byte) (yLSB & 0x01);
-
- if (yBit == 1) {
- outputBuffer[offset] += 3;
- } else {
- outputBuffer[offset] += 2;
- }
- break;
- default:
- ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
- }
- offset += 1;
-
- offset = Util.arrayCopyNonAtomic(xBuffer, xOffset, outputBuffer, offset, xLength);
- if (form == X962_HYBRID || form == X962_UNCOMPRESSED) {
- Util.arrayCopyNonAtomic(yBuffer, yOffset, outputBuffer, offset, yLength);
- size += yLength;
- }
-
- return size;
- }
-
-}
diff --git a/src/cz/crcs/ectester/common/cli/Argument.java b/src/cz/crcs/ectester/common/cli/Argument.java
deleted file mode 100644
index e9b6688..0000000
--- a/src/cz/crcs/ectester/common/cli/Argument.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class Argument {
- private String name;
- private String desc;
- private boolean required;
-
- public Argument(String name, String desc, boolean isRequired) {
- this.name = name;
- this.desc = desc;
- this.required = isRequired;
- }
-
-
- public String getName() {
- return name;
- }
-
- public String getDesc() {
- return desc;
- }
-
- public boolean isRequired() {
- return required;
- }
-}
diff --git a/src/cz/crcs/ectester/common/cli/CLITools.java b/src/cz/crcs/ectester/common/cli/CLITools.java
deleted file mode 100644
index 82ab530..0000000
--- a/src/cz/crcs/ectester/common/cli/CLITools.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-import cz.crcs.ectester.common.ec.EC_Category;
-import cz.crcs.ectester.common.ec.EC_Data;
-import cz.crcs.ectester.data.EC_Store;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Options;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CLITools {
-
- /**
- * Print help.
- */
- public static void help(String prog, String header, Options options, String footer, boolean usage) {
- HelpFormatter help = new HelpFormatter();
- help.setOptionComparator(null);
- help.printHelp(Colors.bold(prog), header, options, footer, usage);
- }
-
- private static void help(HelpFormatter help, PrintWriter pw, String cmd, ParserOptions parser, int depth) {
- String description = parser.getDescription() == null ? "" : " | " + parser.getDescription() + " |";
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, String.format("%" + depth + "s" + cmd + ":" + description, " "));
- CLITools.help(help, pw, parser.getParser(), parser.getOptions(), depth + 1);
- }
-
- private static void help(HelpFormatter help, PrintWriter pw, CommandLineParser cli, Options opts, int depth) {
- if (opts.getOptions().size() > 0) {
- help.printOptions(pw, HelpFormatter.DEFAULT_WIDTH, opts, HelpFormatter.DEFAULT_LEFT_PAD + depth, HelpFormatter.DEFAULT_DESC_PAD);
- }
- if (cli instanceof TreeParser) {
- TreeParser tp = (TreeParser) cli;
- for (Argument arg : tp.getArgs()) {
- String argname = arg.isRequired() ? "<" + arg.getName() + ">" : "[" + arg.getName() + "]";
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, String.format("%" + (depth + 1) + "s" + argname + " " + arg.getDesc(), " "));
- }
- tp.getParsers().forEach((key, value) -> {
- pw.println();
- help(help, pw, key, value, depth);
- });
- }
- }
-
- private static void usage(HelpFormatter help, PrintWriter pw, CommandLineParser cli, Options opts) {
- StringWriter sw = new StringWriter();
- PrintWriter upw = new PrintWriter(sw);
- help.printUsage(upw, HelpFormatter.DEFAULT_WIDTH, "", opts);
- if (cli instanceof TreeParser) {
- upw.print(" ");
- TreeParser tp = (TreeParser) cli;
- String[] keys = tp.getParsers().keySet().toArray(new String[tp.getParsers().size()]);
- if (keys.length > 0 && !tp.isRequired()) {
- upw.print("[ ");
- }
-
- for (int i = 0; i < keys.length; ++i) {
- String key = keys[i];
- ParserOptions value = tp.getParsers().get(key);
- upw.print("(" + key);
- usage(help, upw, value.getParser(), value.getOptions());
- upw.print(")");
- if (i != keys.length - 1) {
- upw.print(" | ");
- }
- }
-
- if (keys.length > 0 && !tp.isRequired()) {
- upw.print(" ]");
- }
-
- Argument[] args = tp.getArgs().toArray(new Argument[tp.getArgs().size()]);
- if (args.length > 0) {
- String[] argss = new String[tp.getArgs().size()];
- for (int i = 0; i < args.length; ++i) {
- Argument arg = args[i];
- argss[i] = arg.isRequired() ? "<" + arg.getName() + ">" : "[" + arg.getName() + "]";
- }
- upw.print(" " + String.join(" ", argss));
- }
- }
- pw.println(sw.toString().replaceAll("usage:( )?", "").replace("\n", ""));
- }
-
- /**
- * Print tree help.
- */
- public static void help(String prog, String header, Options baseOpts, TreeParser baseParser, String footer, boolean printUsage) {
- HelpFormatter help = new HelpFormatter();
- help.setOptionComparator(null);
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, header);
- if (printUsage) {
- StringWriter uw = new StringWriter();
- PrintWriter upw = new PrintWriter(uw);
- usage(help, upw, baseParser, baseOpts);
- pw.print("usage: " + Colors.bold(prog));
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, uw.toString());
- upw.close();
- pw.println();
- }
- help(help, pw, baseParser, baseOpts, 1);
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, footer);
- System.out.println(sw.toString());
- }
-
- public static void help(String header, TreeParser baseParser, String footer, String command) {
- ParserOptions opts = baseParser.getParsers().get(command);
- if (opts == null) {
- System.err.println("Command not found: " + command);
- return;
- }
- HelpFormatter help = new HelpFormatter();
- help.setOptionComparator(null);
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, header);
- help(help, pw, command, opts, 1);
- help.printWrapped(pw, HelpFormatter.DEFAULT_WIDTH, footer);
- System.out.println(sw.toString());
- }
-
- /**
- * Print version info.
- */
- public static void version(String description, String license) {
- System.out.println(description);
- System.out.println(license);
- }
-
- /**
- * List categories and named curves.
- */
- public static void listNamed(EC_Store dataStore, String named) {
- Map<String, EC_Category> categories = dataStore.getCategories();
- if (named == null) {
- // print all categories, briefly
- for (EC_Category cat : categories.values()) {
- System.out.println(cat);
- }
- } else if (categories.containsKey(named)) {
- // print given category
- System.out.println(categories.get(named));
- } else {
- // print given object
- EC_Data object = dataStore.getObject(EC_Data.class, named);
- if (object != null) {
- System.out.println(object);
- } else {
- System.err.println("Named object " + named + " not found!");
- }
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/cli/Colors.java b/src/cz/crcs/ectester/common/cli/Colors.java
deleted file mode 100644
index 7601088..0000000
--- a/src/cz/crcs/ectester/common/cli/Colors.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-/**
- * @author Diogo Nunes
- * @author Jan Jancar johny@neuromancer.sk
- * Adapted from https://github.com/dialex/JCDP/
- */
-public class Colors {
- public static boolean enabled = false;
-
- public interface ANSIParam {
- }
-
- public enum Foreground implements ANSIParam {
- BLACK("30"), RED("31"), GREEN("32"), YELLOW("33"), BLUE("34"), MAGENTA("35"), CYAN("36"), WHITE("37"), NONE("");
- private final String code;
-
- Foreground(String code) {
- this.code = code;
- }
-
- @Override
- public String toString() {
- return code;
- }
- }
-
- public enum Background implements ANSIParam {
- BLACK("40"), RED("41"), GREEN("42"), YELLOW("43"), BLUE("44"), MAGENTA("45"), CYAN("46"), WHITE("47"), NONE("");
- private final String code;
-
- Background(String code) {
- this.code = code;
- }
-
- @Override
- public String toString() {
- return code;
- }
- }
-
- public enum Attribute implements ANSIParam {
- CLEAR("0"), BOLD("1"), LIGHT("1"), DARK("2"), UNDERLINE("4"), REVERSE("7"), HIDDEN("8"), NONE("");
- private final String code;
-
- Attribute(String code) {
- this.code = code;
- }
-
- @Override
- public String toString() {
- return code;
- }
- }
-
- private static final String PREFIX = "\033[";
- private static final String SEPARATOR = ";";
- private static final String POSTFIX = "m";
-
- public static String colored(String text, ANSIParam... params) {
- if (!enabled) {
- return text;
- }
- Optional<Foreground> fg = Arrays.stream(params).filter(Foreground.class::isInstance).map(Foreground.class::cast).findFirst();
- Optional<Background> bg = Arrays.stream(params).filter(Background.class::isInstance).map(Background.class::cast).findFirst();
- List<Attribute> attr = Arrays.stream(params).filter(Attribute.class::isInstance).distinct().map(Attribute.class::cast).collect(Collectors.toList());
-
- List<ANSIParam> apply = new LinkedList<>();
- apply.addAll(attr);
- fg.ifPresent(apply::add);
- bg.ifPresent(apply::add);
- List<String> codes = apply.stream().map(Object::toString).collect(Collectors.toList());
- return PREFIX + String.join(SEPARATOR, codes) + POSTFIX + text + PREFIX + Attribute.CLEAR + POSTFIX;
- }
-
- public static String error(String text) {
- return colored(text, Foreground.RED, Attribute.BOLD);
- }
-
- public static String ok(String text) {
- return colored(text, Foreground.GREEN, Attribute.BOLD);
- }
-
- public static String bold(String text) {
- return colored(text, Attribute.BOLD);
- }
-
- public static String underline(String text) {
- return colored(text, Attribute.UNDERLINE);
- }
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/common/cli/ParserOptions.java b/src/cz/crcs/ectester/common/cli/ParserOptions.java
deleted file mode 100644
index 7300cbb..0000000
--- a/src/cz/crcs/ectester/common/cli/ParserOptions.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.Options;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ParserOptions {
- private CommandLineParser parser;
- private Options options;
- private String description;
-
- public ParserOptions(CommandLineParser parser, Options options) {
- this.parser = parser;
- this.options = options;
- }
-
- public ParserOptions(CommandLineParser parser, Options options, String description) {
- this(parser, options);
- this.description = description;
- }
-
- public CommandLineParser getParser() {
- return parser;
- }
-
- public Options getOptions() {
- return options;
- }
-
- public String getDescription() {
- return description;
- }
-}
diff --git a/src/cz/crcs/ectester/common/cli/TreeCommandLine.java b/src/cz/crcs/ectester/common/cli/TreeCommandLine.java
deleted file mode 100644
index d758b78..0000000
--- a/src/cz/crcs/ectester/common/cli/TreeCommandLine.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.ParseException;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.function.BiFunction;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public class TreeCommandLine extends CommandLine {
- private String name = "";
- private TreeCommandLine next;
- private CommandLine cli;
-
- public TreeCommandLine(CommandLine cli, TreeCommandLine next) {
- this.cli = cli;
- this.next = next;
- }
-
- public TreeCommandLine(String name, CommandLine cli, TreeCommandLine next) {
- this(cli, next);
- this.name = name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public String getNextName() {
- if (next != null) {
- return next.getName();
- }
- return null;
- }
-
- public TreeCommandLine getNext() {
- return next;
- }
-
- public boolean isNext(String next) {
- return Objects.equals(getNextName(), next);
- }
-
- public CommandLine getThis() {
- return cli;
- }
-
- public int getDepth() {
- if (next == null) {
- return 0;
- }
- return next.getDepth() + 1;
- }
-
- private <T> T getOption(String opt, BiFunction<CommandLine, String, T> getter, T defaultValue) {
- if (opt.contains(".")) {
- String[] parts = opt.split("\\.", 2);
- if (next != null && parts[0].equals(next.getName())) {
- T result = getter.apply(next, parts[1]);
- if (result != null)
- return result;
- return defaultValue;
- }
- return defaultValue;
- }
- return getter.apply(cli, opt);
- }
-
- @Override
- public boolean hasOption(String opt) {
- return getOption(opt, CommandLine::hasOption, false);
- }
-
- @Override
- public boolean hasOption(char opt) {
- return cli.hasOption(opt);
- }
-
- @Override
- public Object getParsedOptionValue(String opt) throws ParseException {
- if (opt.contains(".")) {
- String[] parts = opt.split("\\.", 2);
- if (next != null && parts[0].equals(next.getName())) {
- return next.getParsedOptionValue(parts[1]);
- }
- return null;
- }
- return cli.getParsedOptionValue(opt);
- }
-
- @Override
- public Object getOptionObject(char opt) {
- return cli.getOptionObject(opt);
- }
-
- @Override
- public String getOptionValue(String opt) {
- return getOption(opt, CommandLine::getOptionValue, null);
- }
-
- @Override
- public String getOptionValue(char opt) {
- return cli.getOptionValue(opt);
- }
-
- @Override
- public String[] getOptionValues(String opt) {
- return getOption(opt, CommandLine::getOptionValues, null);
- }
-
- @Override
- public String[] getOptionValues(char opt) {
- return cli.getOptionValues(opt);
- }
-
- @Override
- public String getOptionValue(String opt, String defaultValue) {
- return getOption(opt, CommandLine::getOptionValue, defaultValue);
- }
-
- @Override
- public String getOptionValue(char opt, String defaultValue) {
- return cli.getOptionValue(opt, defaultValue);
- }
-
- @Override
- public Properties getOptionProperties(String opt) {
- return getOption(opt, CommandLine::getOptionProperties, new Properties());
- }
-
- @Override
- public Iterator<Option> iterator() {
- return cli.iterator();
- }
-
- @Override
- public Option[] getOptions() {
- return cli.getOptions();
- }
-
- public boolean hasArg(int index) {
- return getArg(index) != null;
- }
-
- public String getArg(int index) {
- if (next != null) {
- return next.getArg(index);
- }
- String[] args = cli.getArgs();
- if (index >= args.length) {
- return null;
- }
- if (index < 0 && -index > args.length) {
- return null;
- }
- return index < 0 ? args[args.length + index] : args[index];
- }
-
- @Override
- public String[] getArgs() {
- return cli.getArgs();
- }
-
- @Override
- public List<String> getArgList() {
- return cli.getArgList();
- }
-}
diff --git a/src/cz/crcs/ectester/common/cli/TreeParser.java b/src/cz/crcs/ectester/common/cli/TreeParser.java
deleted file mode 100644
index 657318d..0000000
--- a/src/cz/crcs/ectester/common/cli/TreeParser.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package cz.crcs.ectester.common.cli;
-
-import org.apache.commons.cli.*;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TreeParser implements CommandLineParser {
- private Map<String, ParserOptions> parsers;
- private boolean required;
- private List<Argument> args = Collections.emptyList();
-
- public TreeParser(Map<String, ParserOptions> parsers, boolean required) {
- this.parsers = parsers;
- this.required = required;
- }
-
- public TreeParser(Map<String, ParserOptions> parsers, boolean required, List<Argument> args) {
- this(parsers, required);
- this.args = args;
- }
-
- public Map<String, ParserOptions> getParsers() {
- return Collections.unmodifiableMap(parsers);
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public List<Argument> getArgs() {
- return Collections.unmodifiableList(args);
- }
-
- @Override
- public TreeCommandLine parse(Options options, String[] arguments) throws ParseException {
- return this.parse(options, arguments, null);
- }
-
- public TreeCommandLine parse(Options options, String[] arguments, Properties properties) throws ParseException {
- return this.parse(options, arguments, properties, false);
- }
-
- @Override
- public TreeCommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException {
- return this.parse(options, arguments, null, stopAtNonOption);
- }
-
- public TreeCommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption) throws ParseException {
- DefaultParser thisParser = new DefaultParser();
- CommandLine cli = thisParser.parse(options, arguments, properties, true);
-
- CommandLine subCli = null;
- String[] cliArgs = cli.getArgs();
- String sub = null;
- if (cliArgs.length != 0) {
- sub = cliArgs[0];
-
- List<String> matches = new LinkedList<>();
- String finalSub = sub;
- for (Map.Entry<String, ParserOptions> entry : parsers.entrySet()) {
- if (entry.getKey().equalsIgnoreCase(finalSub)) {
- matches.clear();
- matches.add(finalSub);
- break;
- } else if (entry.getKey().startsWith(finalSub)) {
- matches.add(entry.getKey());
- }
- }
-
- if (matches.size() == 1) {
- sub = matches.get(0);
- ParserOptions subparser = parsers.get(sub);
- String[] remainingArgs = new String[cliArgs.length - 1];
- System.arraycopy(cliArgs, 1, remainingArgs, 0, cliArgs.length - 1);
- subCli = subparser.getParser().parse(subparser.getOptions(), remainingArgs, true);
- } else if (matches.size() > 1) {
- throw new AmbiguousOptionException(sub, matches);
- }
- } else {
- if (required) {
- throw new MissingOptionException(new ArrayList<>(parsers.keySet()));
- }
- }
-
- int maxArgs = args.size();
- long requiredArgs = args.stream().filter(Argument::isRequired).count();
- String reqArgs = String.join(" ", args.stream().filter(Argument::isRequired).map(Argument::getName).collect(Collectors.toList()));
-
- if (subCli instanceof TreeCommandLine) {
- TreeCommandLine subTreeCli = (TreeCommandLine) subCli;
-
- TreeCommandLine lastCli = subTreeCli;
- while (lastCli.getNext() != null) {
- lastCli = lastCli.getNext();
- }
-
- if (lastCli.getArgs().length < requiredArgs) {
- throw new MissingArgumentException("Not enough arguments: " + reqArgs);
- }
- //else if (lastCli.getArgs().length > maxArgs) {
- // throw new MissingArgumentException("Too many arguments.");
- //}
-
- subTreeCli.setName(sub);
- return new TreeCommandLine(cli, subTreeCli);
- } else if (subCli != null) {
- if (subCli.getArgs().length < requiredArgs) {
- throw new MissingArgumentException("Not enough arguments: " + reqArgs);
- } else if (subCli.getArgs().length > maxArgs) {
- throw new MissingArgumentException("Too many arguments.");
- }
-
- TreeCommandLine subTreeCli = new TreeCommandLine(sub, subCli, null);
- return new TreeCommandLine(cli, subTreeCli);
- } else {
- if (cliArgs.length < requiredArgs) {
- throw new MissingArgumentException("Not enough arguments: " + reqArgs);
- }
- //else if (cliArgs.length > maxArgs) {
- // throw new MissingArgumentException("Too many arguments.");
- //}
-
- return new TreeCommandLine(cli, null);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/CustomECFieldF2m.java b/src/cz/crcs/ectester/common/ec/CustomECFieldF2m.java
deleted file mode 100644
index 24ea5aa..0000000
--- a/src/cz/crcs/ectester/common/ec/CustomECFieldF2m.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import java.math.BigInteger;
-import java.security.spec.ECFieldF2m;
-import java.util.Arrays;
-
-/**
- * @author David Hofman
- */
-public class CustomECFieldF2m extends ECFieldF2m {
- private int m;
- private int[] ks;
- private BigInteger rp;
-
- public CustomECFieldF2m(int m, int[] ks) {
- //feed the constructor of the superclass some default, valid data
- //getters will return custom parameters instead
- super(163, new int[] {3, 2, 1});
- this.m = m;
- this.ks = ks.clone();
-
- //causes ArithmeticException if m < 0 or any element of ks < 0
- this.rp = BigInteger.ONE;
- this.rp = this.rp.setBit(m);
- for(int i = 0; i < this.ks.length; ++i) {
- this.rp = this.rp.setBit(this.ks[i]);
- }
- }
-
- @Override
- public int getFieldSize() {
- return m;
- }
-
- @Override
- public int getM() {
- return m;
- }
-
- @Override
- public int[] getMidTermsOfReductionPolynomial() {
- return ks.clone();
- }
-
- @Override
- public BigInteger getReductionPolynomial() {
- return rp;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- } else if (!(o instanceof CustomECFieldF2m)) {
- return false;
- } else {
- return m == ((CustomECFieldF2m) o).m && Arrays.equals(ks, ((CustomECFieldF2m) o).ks);
- }
- }
-
- @Override
- public int hashCode() {
- int hash = m << 5;
- hash += rp == null ? 0 : rp.hashCode();
- return hash;
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/CustomECFieldFp.java b/src/cz/crcs/ectester/common/ec/CustomECFieldFp.java
deleted file mode 100644
index eafcb72..0000000
--- a/src/cz/crcs/ectester/common/ec/CustomECFieldFp.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import java.math.BigInteger;
-import java.security.spec.ECFieldFp;
-
-/**
- * @author David Hofman
- */
-public class CustomECFieldFp extends ECFieldFp {
- private BigInteger p;
-
- public CustomECFieldFp(BigInteger p) {
- //feed the constructor of the superclass some default, valid parameter p
- //getters will return custom (and possibly invalid) data
- super(BigInteger.ONE);
- this.p = p;
- }
-
-
- @Override
- public int getFieldSize() {
- return p.bitCount();
- }
-
- @Override
- public BigInteger getP() {
- return p;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- } else {
- return o instanceof CustomECFieldFp && p.equals(((CustomECFieldFp) o).p);
- }
- }
-
- @Override
- public int hashCode() {
- return p.hashCode();
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/CustomECParameterSpec.java b/src/cz/crcs/ectester/common/ec/CustomECParameterSpec.java
deleted file mode 100644
index cbc15e7..0000000
--- a/src/cz/crcs/ectester/common/ec/CustomECParameterSpec.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import java.math.BigInteger;
-import java.security.spec.ECFieldFp;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.ECPoint;
-import java.security.spec.EllipticCurve;
-
-/**
- * @author David Hofman
- */
-public class CustomECParameterSpec extends ECParameterSpec {
- private EllipticCurve curve;
- private ECPoint g;
- private BigInteger n;
- private int h;
-
- public CustomECParameterSpec(EllipticCurve curve, ECPoint g, BigInteger n, int h) {
- //feed the constructor of the superclass some default, valid data
- //getters will return custom (and possibly invalid) parameters instead
- super(new EllipticCurve(new ECFieldFp(BigInteger.ONE),BigInteger.ZERO,BigInteger.ZERO), new ECPoint(BigInteger.ZERO, BigInteger.ZERO), BigInteger.ONE, 1);
- this.curve = curve;
- this.g = g;
- this.n = n;
- this.h = h;
- }
-
- @Override
- public EllipticCurve getCurve() {
- return curve;
- }
-
- @Override
- public ECPoint getGenerator() {
- return g;
- }
-
- @Override
- public BigInteger getOrder() {
- return n;
- }
-
- @Override
- public int getCofactor() {
- return h;
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/CustomEllipticCurve.java b/src/cz/crcs/ectester/common/ec/CustomEllipticCurve.java
deleted file mode 100644
index 489861c..0000000
--- a/src/cz/crcs/ectester/common/ec/CustomEllipticCurve.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import java.math.BigInteger;
-import java.security.spec.ECField;
-import java.security.spec.ECFieldFp;
-import java.security.spec.EllipticCurve;
-
-/**
- * @author David Hofman
- */
-public class CustomEllipticCurve extends EllipticCurve {
- private ECField field;
- private BigInteger a;
- private BigInteger b;
-
- public CustomEllipticCurve(ECField field, BigInteger a, BigInteger b) {
- //feed the constructor of the superclass some default, valid EC parameters
- //getters will return custom (and possibly invalid) data instead
- super(new ECFieldFp(BigInteger.ONE), BigInteger.ZERO, BigInteger.ZERO);
- this.field = field;
- this.a = a;
- this.b = b;
-
- }
-
- @Override
- public BigInteger getA() {
- return a;
- }
-
- @Override
- public BigInteger getB() {
- return b;
- }
-
- @Override
- public ECField getField() {
- return field;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- } else {
- if (o instanceof CustomEllipticCurve) {
- CustomEllipticCurve otherCurve = (CustomEllipticCurve) o;
- if (field.equals(otherCurve.field) && a.equals(otherCurve.a) && b.equals(otherCurve.b)) {
- return true;
- }
- }
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return field.hashCode() << 6 + (a.hashCode() << 4) + (b.hashCode() << 2);
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Category.java b/src/cz/crcs/ectester/common/ec/EC_Category.java
deleted file mode 100644
index 154403e..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Category.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.cli.Colors;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * A category of EC_Data objects, has a name, description and represents a directory in
- * the cz.crcs.ectester.data package.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Category {
-
- private String name;
- private String directory;
- private String desc;
-
- private Map<String, EC_Data> objects;
-
-
- public EC_Category(String name, String directory) {
- this.name = name;
- this.directory = directory;
- }
-
- public EC_Category(String name, String directory, String desc) {
- this(name, directory);
- this.desc = desc;
- }
-
- public EC_Category(String name, String directory, String desc, Map<String, EC_Data> objects) {
- this(name, directory, desc);
- this.objects = objects;
- }
-
- public String getName() {
- return name;
- }
-
- public String getDirectory() {
- return directory;
- }
-
- public String getDesc() {
- return desc;
- }
-
- public Map<String, EC_Data> getObjects() {
- return Collections.unmodifiableMap(objects);
- }
-
- public <T extends EC_Data> Map<String, T> getObjects(Class<T> cls) {
- Map<String, T> objs = new TreeMap<>();
- for (Map.Entry<String, EC_Data> entry : objects.entrySet()) {
- if (cls.isInstance(entry.getValue())) {
- objs.put(entry.getKey(), cls.cast(entry.getValue()));
- }
- }
- return Collections.unmodifiableMap(objs);
- }
-
- public <T extends EC_Data> T getObject(Class<T> cls, String id) {
- EC_Data obj = objects.get(id);
- if (cls.isInstance(obj)) {
- return cls.cast(obj);
- } else {
- return null;
- }
- }
-
- @Override
- public String toString() {
- StringBuilder out = new StringBuilder();
- out.append("\t- ").append(Colors.bold(name)).append((desc == null || desc.equals("")) ? "" : ": " + desc);
- out.append(System.lineSeparator());
-
- String[] headers = new String[]{"Curves", "Public keys", "Private keys", "KeyPairs", "Results(KA)", "Results(SIG)"};
- Class<EC_Data>[] classes = new Class[]{EC_Curve.class, EC_Key.Public.class, EC_Key.Private.class, EC_Keypair.class, EC_KAResult.class, EC_SigResult.class};
- for (int i = 0; i < headers.length; ++i) {
- Map<String, EC_Data> data = getObjects(classes[i]);
- int size = data.size();
- if (size > 0) {
- out.append(Colors.bold(String.format("\t\t%s: ", headers[i])));
- List<EC_Data> sorted = new ArrayList<>(data.values());
- Collections.sort(sorted);
- for (EC_Data element : sorted) {
- out.append(element.getId());
- size--;
- if (size > 0)
- out.append(", ");
- }
- out.append(System.lineSeparator());
- }
- }
- return out.toString();
- }
-
- @Override
- public boolean equals(Object obj) {
- return obj instanceof EC_Category && Objects.equals(this.name, ((EC_Category) obj).name);
- }
-
- @Override
- public int hashCode() {
- return this.name.hashCode() ^ this.directory.hashCode();
- }
-
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Curve.java b/src/cz/crcs/ectester/common/ec/EC_Curve.java
deleted file mode 100644
index d188551..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Curve.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.util.ByteUtil;
-import javacard.security.KeyPair;
-import org.bouncycastle.math.ec.ECCurve;
-
-import java.math.BigInteger;
-import java.security.spec.*;
-
-/**
- * An Elliptic curve, contains parameters Fp/F2M, A, B, G, R, (K)?.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Curve extends EC_Params {
- private short bits;
- private byte field;
- private String desc;
-
- /**
- * @param bits
- * @param field KeyPair.ALG_EC_FP or KeyPair.ALG_EC_F2M
- */
- public EC_Curve(short bits, byte field) {
- super(field == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M);
- this.bits = bits;
- this.field = field;
- }
-
- public EC_Curve(String id, short bits, byte field) {
- this(bits, field);
- this.id = id;
- }
-
- public EC_Curve(String id, short bits, byte field, String desc) {
- this(id, bits, field);
- this.desc = desc;
- }
-
- public short getBits() {
- return bits;
- }
-
- public byte getField() {
- return field;
- }
-
- public String getDesc() {
- return desc;
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> " + (field == KeyPair.ALG_EC_FP ? "Prime" : "Binary") + " field Elliptic curve (" + String.valueOf(bits) + "b)" + (desc == null ? "" : ": " + desc) + System.lineSeparator() + super.toString();
- }
-
- public EllipticCurve toCurve() {
- ECField field;
- if (this.field == KeyPair.ALG_EC_FP) {
- field = new ECFieldFp(new BigInteger(1, getData(0)));
- } else {
- byte[][] fieldData = getParam(EC_Consts.PARAMETER_F2M);
- int m = ByteUtil.getShort(fieldData[0], 0);
- int e1 = ByteUtil.getShort(fieldData[1], 0);
- int e2 = ByteUtil.getShort(fieldData[2], 0);
- int e3 = ByteUtil.getShort(fieldData[3], 0);
- int[] powers;
- if (e2 == 0 && e3 == 0) {
- powers = new int[]{e1};
- } else {
- powers = new int[]{e1, e2, e3};
- }
- field = new ECFieldF2m(m, powers);
- }
-
- BigInteger a = new BigInteger(1, getParam(EC_Consts.PARAMETER_A)[0]);
- BigInteger b = new BigInteger(1, getParam(EC_Consts.PARAMETER_B)[0]);
-
- return new EllipticCurve(field, a, b);
- }
-
- public ECCurve toBCCurve() {
- if (this.field == KeyPair.ALG_EC_FP) {
- BigInteger p = new BigInteger(1, getParam(EC_Consts.PARAMETER_FP)[0]);
- BigInteger a = new BigInteger(1, getParam(EC_Consts.PARAMETER_A)[0]);
- BigInteger b = new BigInteger(1, getParam(EC_Consts.PARAMETER_B)[0]);
- BigInteger r = new BigInteger(1, getParam(EC_Consts.PARAMETER_R)[0]);
- BigInteger k = new BigInteger(1, getParam(EC_Consts.PARAMETER_K)[0]);
- return new ECCurve.Fp(p, a, b, r, k);
- } else {
- byte[][] fieldData = getParam(EC_Consts.PARAMETER_F2M);
- int m = ByteUtil.getShort(fieldData[0], 0);
- int e1 = ByteUtil.getShort(fieldData[1], 0);
- int e2 = ByteUtil.getShort(fieldData[2], 0);
- int e3 = ByteUtil.getShort(fieldData[3], 0);
- BigInteger a = new BigInteger(1, getParam(EC_Consts.PARAMETER_A)[0]);
- BigInteger b = new BigInteger(1, getParam(EC_Consts.PARAMETER_B)[0]);
- BigInteger r = new BigInteger(1, getParam(EC_Consts.PARAMETER_R)[0]);
- BigInteger k = new BigInteger(1, getParam(EC_Consts.PARAMETER_K)[0]);
- return new ECCurve.F2m(m, e1, e2, e3, a, b, r, k);
- }
- }
-
- public ECParameterSpec toSpec() {
- EllipticCurve curve = toCurve();
-
- byte[][] G = getParam(EC_Consts.PARAMETER_G);
- BigInteger gx = new BigInteger(1, G[0]);
- BigInteger gy = new BigInteger(1, G[1]);
- ECPoint generator = new ECPoint(gx, gy);
-
- BigInteger n = new BigInteger(1, getParam(EC_Consts.PARAMETER_R)[0]);
-
- int h = ByteUtil.getShortInt(getParam(EC_Consts.PARAMETER_K)[0], 0);
- return new ECParameterSpec(curve, generator, n, h);
- }
-
- public static EC_Curve fromSpec(ECParameterSpec spec) {
- EllipticCurve curve = spec.getCurve();
- ECField field = curve.getField();
-
- short bits = (short) field.getFieldSize();
- byte[][] params;
- int paramIndex = 0;
- byte fieldType;
- if (field instanceof ECFieldFp) {
- ECFieldFp primeField = (ECFieldFp) field;
- params = new byte[7][];
- params[paramIndex++] = primeField.getP().toByteArray();
- fieldType = KeyPair.ALG_EC_FP;
- } else if (field instanceof ECFieldF2m) {
- ECFieldF2m binaryField = (ECFieldF2m) field;
- params = new byte[10][];
- params[paramIndex] = new byte[2];
- ByteUtil.setShort(params[paramIndex++], 0, (short) binaryField.getM());
- int[] powers = binaryField.getMidTermsOfReductionPolynomial();
- for (int i = 0; i < 3; ++i) {
- params[paramIndex] = new byte[2];
- short power = (i < powers.length) ? (short) powers[i] : 0;
- ByteUtil.setShort(params[paramIndex++], 0, power);
- }
- fieldType = KeyPair.ALG_EC_F2M;
- } else {
- throw new IllegalArgumentException("ECParameterSpec with an unknown field.");
- }
-
- ECPoint generator = spec.getGenerator();
-
- params[paramIndex++] = curve.getA().toByteArray();
- params[paramIndex++] = curve.getB().toByteArray();
-
- params[paramIndex++] = generator.getAffineX().toByteArray();
- params[paramIndex++] = generator.getAffineY().toByteArray();
-
- params[paramIndex++] = spec.getOrder().toByteArray();
- params[paramIndex] = new byte[2];
- ByteUtil.setShort(params[paramIndex], 0, (short) spec.getCofactor());
-
- EC_Curve result = new EC_Curve(bits, fieldType);
- result.readByteArray(params);
- return result;
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Data.java b/src/cz/crcs/ectester/common/ec/EC_Data.java
deleted file mode 100644
index 14ae1c5..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Data.java
+++ /dev/null
@@ -1,265 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.util.ByteUtil;
-
-import java.io.*;
-import java.util.*;
-import java.util.regex.Pattern;
-
-/**
- * A list of byte arrays for holding EC data.
- * <p>
- * The data can be read from a byte array via <code>readBytes()</code>, from a CSV via <code>readCSV()</code>.
- * The data can be exported to a byte array via <code>flatten()</code> or to a string array via <code>expand()</code>.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class EC_Data implements Comparable<EC_Data> {
- String id;
- int count;
- byte[][] data;
-
- private static final Pattern HEX = Pattern.compile("(0x|0X)?[a-fA-F\\d]+");
-
- EC_Data() {
- }
-
- EC_Data(int count) {
- this.count = count;
- this.data = new byte[count][];
- }
-
- EC_Data(byte[][] data) {
- this.count = data.length;
- this.data = data;
- }
-
- EC_Data(String id, int count) {
- this(count);
- this.id = id;
- }
-
- EC_Data(String id, byte[][] data) {
- this(data);
- this.id = id;
- }
-
- public String getId() {
- return id;
- }
-
- public int getCount() {
- return count;
- }
-
- public byte[][] getData() {
- return data;
- }
-
- public byte[] getData(int index) {
- return data[index];
- }
-
- public boolean hasData() {
- return data != null;
- }
-
- public byte[] flatten() {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- for (byte[] param : data) {
- byte[] length = new byte[2];
- ByteUtil.setShort(length, 0, (short) param.length);
-
- out.write(length, 0, 2);
- out.write(param, 0, param.length);
- }
-
- return out.toByteArray();
- }
-
- public String[] expand() {
- List<String> out = new ArrayList<>(count);
- for (byte[] param : data) {
- out.add(ByteUtil.bytesToHex(param, false));
- }
-
- return out.toArray(new String[out.size()]);
- }
-
- private static byte[] pad(byte[] data) {
- if (data.length == 1) {
- return new byte[]{(byte) 0, data[0]};
- } else if (data.length == 0 || data.length > 2) {
- return data;
- }
- return null;
- }
-
- protected static byte[] parse(String param) {
- byte[] data;
- if (param.startsWith("0x") || param.startsWith("0X")) {
- data = ByteUtil.hexToBytes(param.substring(2));
- } else {
- data = ByteUtil.hexToBytes(param);
- }
- if (data == null)
- return new byte[0];
- if (data.length < 2)
- return pad(data);
- return data;
- }
-
- private boolean readHex(String[] hex) {
- if (hex.length != count) {
- return false;
- }
-
- for (int i = 0; i < count; ++i) {
- this.data[i] = parse(hex[i]);
- }
- return true;
- }
-
- public boolean readCSV(InputStream in) {
- Scanner s = new Scanner(in);
-
- s.useDelimiter("[,;]");
- List<String> data = new LinkedList<>();
- while (s.hasNext()) {
- String field = s.next();
- data.add(field.replaceAll("\\s+", ""));
- }
-
- if (data.isEmpty()) {
- return false;
- }
- for (String param : data) {
- if (!HEX.matcher(param).matches()) {
- return false;
- }
- }
- return readHex(data.toArray(new String[data.size()]));
- }
-
- public boolean readBytes(byte[] bytes) {
- if (bytes == null) {
- return false;
- }
-
- int offset = 0;
- for (int i = 0; i < count; i++) {
- if (bytes.length - offset < 2) {
- return false;
- }
- short paramLength = ByteUtil.getShort(bytes, offset);
- offset += 2;
- if (bytes.length < offset + paramLength) {
- return false;
- }
- data[i] = new byte[paramLength];
- System.arraycopy(bytes, offset, data[i], 0, paramLength);
- offset += paramLength;
- }
- return true;
- }
-
- public boolean readByteArray(byte[][] bytes) {
- if (bytes == null || count != bytes.length) {
- return false;
- }
-
- for (int i = 0; i < count; ++i) {
- data[i] = new byte[bytes[i].length];
- System.arraycopy(bytes[i], 0, data[i], 0, bytes[i].length);
- }
- return true;
- }
-
- public void writeCSV(OutputStream out) throws IOException {
- Writer w = new OutputStreamWriter(out);
- w.write(String.join(",", expand()));
- w.flush();
- }
-
- @Override
- public String toString() {
- return String.join(",", expand());
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof EC_Data) {
- EC_Data other = (EC_Data) obj;
- if (this.id != null || other.id != null) {
- return Objects.equals(this.id, other.id);
- }
-
- if (this.count != other.count)
- return false;
- for (int i = 0; i < this.count; ++i) {
- if (!Arrays.equals(this.data[i], other.data[i])) {
- return false;
- }
- }
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- if (this.id != null) {
- return this.id.hashCode();
- }
- return Arrays.deepHashCode(this.data);
- }
-
- @Override
- public int compareTo(EC_Data o) {
- if (o == this) return 0;
- if (this.id != null && o.id != null) {
-
- int minLength = Math.min(this.id.length(), o.id.length());
- for (int i = 0; i < minLength; i++) {
- if (this.id.charAt(i) != o.id.charAt(i)) {
- String thisEnd = this.id.substring(i);
- String oEnd = o.id.substring(i);
- try {
- int thisIndex = Integer.parseInt(thisEnd);
- int oIndex = Integer.parseInt(oEnd);
- return Integer.compare(thisIndex, oIndex);
- } catch (NumberFormatException ignored) {
- break;
- }
- }
- }
- return this.id.compareTo(o.id);
- } else if (this.id == null && o.id == null) {
- if (Arrays.equals(this.data, o.data)) {
- return 0;
- } else {
- int minCount = (this.count < o.count) ? this.count : o.count;
- for (int i = 0; i < minCount; ++i) {
- byte[] thisData = this.data[i];
- byte[] oData = o.data[i];
- int innerMinCount = (thisData.length < oData.length) ? thisData.length : oData.length;
- for (int j = 0; j < innerMinCount; ++j) {
- if (thisData[j] < oData[j]) {
- return -1;
- } else if (thisData[j] > oData[j]) {
- return 1;
- }
- }
- }
- }
- } else {
- if (this.id == null) {
- return -1;
- } else {
- return 1;
- }
- }
- return 0;
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_KAResult.java b/src/cz/crcs/ectester/common/ec/EC_KAResult.java
deleted file mode 100644
index 4e97950..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_KAResult.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.util.CardUtil;
-
-/**
- * A result of EC based Key agreement operation.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_KAResult extends EC_Data {
- private String ka;
- private String curve;
- private String oneKey;
- private String otherKey;
-
- private String desc;
-
- public EC_KAResult(String ka, String curve, String oneKey, String otherKey) {
- super(1);
- this.ka = ka;
- this.curve = curve;
- this.oneKey = oneKey;
- this.otherKey = otherKey;
- }
-
- public EC_KAResult(String id, String ka, String curve, String oneKey, String otherKey) {
- this(ka, curve, oneKey, otherKey);
- this.id = id;
- }
-
- public EC_KAResult(String id, String ka, String curve, String oneKey, String otherKey, String desc) {
- this(id, ka, curve, oneKey, otherKey);
- this.desc = desc;
- }
-
- public String getKA() {
- return ka;
- }
-
- public byte getJavaCardKA() {
- return CardUtil.getKA(ka);
- }
-
- public String getCurve() {
- return curve;
- }
-
- public String getOneKey() {
- return oneKey;
- }
-
- public String getOtherKey() {
- return otherKey;
- }
-
- public String getDesc() {
- return desc;
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> " + ka + " result over " + curve + ", " + oneKey + " + " + otherKey + (desc == null ? "" : ": " + desc) + System.lineSeparator() + super.toString();
- }
-
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Key.java b/src/cz/crcs/ectester/common/ec/EC_Key.java
deleted file mode 100644
index 754775d..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Key.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.applet.EC_Consts;
-
-/**
- * An abstract-like EC key. Concrete implementations create a public and private keys.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Key extends EC_Params {
-
- private String curve;
- private String desc;
-
- private EC_Key(short mask, String curve) {
- super(mask);
- this.curve = curve;
- }
-
- private EC_Key(short mask, String curve, String desc) {
- this(mask, curve);
- this.desc = desc;
- }
-
- private EC_Key(String id, short mask, String curve, String desc) {
- this(mask, curve, desc);
- this.id = id;
- }
-
- public String getCurve() {
- return curve;
- }
-
- public String getDesc() {
- return desc;
- }
-
- /**
- * An EC public key, contains the W parameter.
- */
- public static class Public extends EC_Key {
-
- public Public(String curve) {
- super(EC_Consts.PARAMETER_W, curve);
- }
-
- public Public(String curve, String desc) {
- super(EC_Consts.PARAMETER_W, curve, desc);
- }
-
- public Public(String id, String curve, String desc) {
- super(id, EC_Consts.PARAMETER_W, curve, desc);
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> EC Public key, over " + getCurve() + (getDesc() == null ? "" : ": " + getDesc()) + System.lineSeparator() + super.toString();
- }
- }
-
- /**
- * An EC private key, contains the S parameter.
- */
- public static class Private extends EC_Key {
-
- public Private(String curve) {
- super(EC_Consts.PARAMETER_S, curve);
- }
-
- public Private(String curve, String desc) {
- super(EC_Consts.PARAMETER_S, curve, desc);
- }
-
- public Private(String id, String curve, String desc) {
- super(id, EC_Consts.PARAMETER_S, curve, desc);
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> EC Private key, over " + getCurve() + (getDesc() == null ? "" : ": " + getDesc()) + System.lineSeparator() + super.toString();
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Keypair.java b/src/cz/crcs/ectester/common/ec/EC_Keypair.java
deleted file mode 100644
index 24ddba7..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Keypair.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.applet.EC_Consts;
-
-/**
- * An EC keypair, contains both the W and S parameters.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Keypair extends EC_Params {
- private String curve;
- private String desc;
-
- public EC_Keypair(String curve) {
- super(EC_Consts.PARAMETERS_KEYPAIR);
- this.curve = curve;
- }
-
- public EC_Keypair(String curve, String desc) {
- this(curve);
- this.desc = desc;
- }
-
- public EC_Keypair(String id, String curve, String desc) {
- this(curve, desc);
- this.id = id;
- }
-
- public String getCurve() {
- return curve;
- }
-
- public String getDesc() {
- return desc;
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> EC Keypair, over " + curve + (desc == null ? "" : ": " + desc) + System.lineSeparator() + super.toString();
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_Params.java b/src/cz/crcs/ectester/common/ec/EC_Params.java
deleted file mode 100644
index e922feb..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_Params.java
+++ /dev/null
@@ -1,234 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.util.ByteUtil;
-
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A list of EC parameters, can contain a subset of the Fp/F2M, A, B, G, R, K, W, S parameters.
- * <p>
- * The set of parameters is uniquely identified by a short bit string.
- * The parameters can be exported to a byte array via <code>flatten()</code> or to a comma delimited
- * string via <code>expand()</code>.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Params extends EC_Data {
- private short params;
-
- public EC_Params(short params) {
- this.params = params;
- this.count = numParams();
- this.data = new byte[this.count][];
- }
-
- public EC_Params(short params, byte[][] data) {
- this.params = params;
- this.count = data.length;
- this.data = data;
- }
-
- public EC_Params(String id, short params) {
- this(params);
- this.id = id;
- }
-
- public EC_Params(String id, short params, byte[][] data) {
- this(params, data);
- this.id = id;
- }
-
- public short getParams() {
- return params;
- }
-
- public byte[][] getParam(short param) {
- if (!hasParam(param)) {
- return null;
- }
- if (Integer.bitCount(param) != 1) {
- return null;
- }
- short paramMask = EC_Consts.PARAMETER_FP;
- byte[][] result = null;
- int i = 0;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (this.params & param & paramMask);
- short shallow = (short) (this.params & paramMask);
- if (masked != 0) {
- if (masked == EC_Consts.PARAMETER_F2M) {
- result = new byte[4][];
- result[0] = data[i].clone();
- result[1] = data[i + 1].clone();
- result[2] = data[i + 2].clone();
- result[3] = data[i + 3].clone();
- break;
- }
- if (masked == EC_Consts.PARAMETER_G || masked == EC_Consts.PARAMETER_W) {
- result = new byte[2][];
- result[0] = data[i].clone();
- result[1] = data[i + 1].clone();
- break;
- }
- result = new byte[1][];
- result[0] = data[i].clone();
- }
- if (shallow == EC_Consts.PARAMETER_F2M) {
- i += 4;
- } else if (shallow == EC_Consts.PARAMETER_G || shallow == EC_Consts.PARAMETER_W) {
- i += 2;
- } else if (shallow != 0) {
- i++;
- }
- paramMask = (short) (paramMask << 1);
- }
- return result;
- }
-
- public boolean setParam(short param, byte[][] value) {
- if (!hasParam(param)) {
- return false;
- }
- if (Integer.bitCount(param) != 1) {
- return false;
- }
- short paramMask = EC_Consts.PARAMETER_FP;
- int i = 0;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (this.params & param & paramMask);
- short shallow = (short) (this.params & paramMask);
- if (masked != 0) {
- if (masked == EC_Consts.PARAMETER_F2M) {
- data[i] = value[0];
- data[i + 1] = value[1];
- data[i + 2] = value[2];
- data[i + 3] = value[3];
- break;
- }
- if (masked == EC_Consts.PARAMETER_G || masked == EC_Consts.PARAMETER_W) {
- data[i] = value[0];
- data[i + 1] = value[1];
- break;
- }
- data[i] = value[0];
- }
- if (shallow == EC_Consts.PARAMETER_F2M) {
- i += 4;
- } else if (shallow == EC_Consts.PARAMETER_G || shallow == EC_Consts.PARAMETER_W) {
- i += 2;
- } else if (shallow != 0) {
- i++;
- }
- paramMask = (short) (paramMask << 1);
- }
- return true;
- }
-
- public boolean hasParam(short param) {
- return (params & param) != 0;
- }
-
- public int numParams() {
- short paramMask = EC_Consts.PARAMETER_FP;
- int num = 0;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- if ((paramMask & params) != 0) {
- if (paramMask == EC_Consts.PARAMETER_F2M) {
- num += 3;
- }
- if (paramMask == EC_Consts.PARAMETER_W || paramMask == EC_Consts.PARAMETER_G) {
- num += 1;
- }
- ++num;
- }
- paramMask = (short) (paramMask << 1);
- }
- return num;
- }
-
- @Override
- public byte[] flatten() {
- return flatten(params);
- }
-
- public byte[] flatten(short params) {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- short paramMask = EC_Consts.PARAMETER_FP;
- int i = 0;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (this.params & params & paramMask);
- short shallow = (short) (this.params & paramMask);
- if (masked != 0) {
- byte[] param = data[i];
- if (masked == EC_Consts.PARAMETER_F2M) {
- //add m, e_1, e_2, e_3
- param = ByteUtil.concatenate(param, data[i + 1]);
- if (!ByteUtil.allValue(data[i + 2], (byte) 0)) {
- param = ByteUtil.concatenate(param, data[i + 2]);
- }
- if (!ByteUtil.allValue(data[i + 3], (byte) 0)) {
- param = ByteUtil.concatenate(param, data[i + 3]);
- }
- if (!(param.length == 4 || param.length == 8))
- throw new RuntimeException("PARAMETER_F2M length is not 8.(should be)");
- }
- if (masked == EC_Consts.PARAMETER_G || masked == EC_Consts.PARAMETER_W) {
- //read another param (the y coord) and put into X962 format.
- byte[] y = data[i + 1];
- param = ByteUtil.concatenate(new byte[]{4}, param, y); //<- ugly but works!
- }
- if (param.length == 0)
- throw new RuntimeException("Empty parameter read?");
-
- //write length
- byte[] length = new byte[2];
- ByteUtil.setShort(length, 0, (short) param.length);
- out.write(length, 0, 2);
- //write data
- out.write(param, 0, param.length);
- }
- if (shallow == EC_Consts.PARAMETER_F2M) {
- i += 4;
- } else if (shallow == EC_Consts.PARAMETER_G || shallow == EC_Consts.PARAMETER_W) {
- i += 2;
- } else if (shallow != 0) {
- i++;
- }
- paramMask = (short) (paramMask << 1);
- }
-
- return (out.size() == 0) ? null : out.toByteArray();
- }
-
- @Override
- public String[] expand() {
- List<String> out = new ArrayList<>();
-
- short paramMask = EC_Consts.PARAMETER_FP;
- int index = 0;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short masked = (short) (params & paramMask);
- if (masked != 0) {
- byte[] param = data[index];
- if (masked == EC_Consts.PARAMETER_F2M) {
- for (int i = 0; i < 4; ++i) {
- out.add(ByteUtil.bytesToHex(data[index + i], false));
- }
- index += 4;
- } else if (masked == EC_Consts.PARAMETER_G || masked == EC_Consts.PARAMETER_W) {
- out.add(ByteUtil.bytesToHex(param, false));
- out.add(ByteUtil.bytesToHex(data[index + 1], false));
- index += 2;
- } else {
- out.add(ByteUtil.bytesToHex(param, false));
- index++;
- }
- }
- paramMask = (short) (paramMask << 1);
- }
- return out.toArray(new String[0]);
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/EC_SigResult.java b/src/cz/crcs/ectester/common/ec/EC_SigResult.java
deleted file mode 100644
index d97ced1..0000000
--- a/src/cz/crcs/ectester/common/ec/EC_SigResult.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.util.CardUtil;
-
-/**
- * A result of EC based Signature operation.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_SigResult extends EC_Data {
- private String sig;
- private String curve;
- private String signKey;
- private String verifyKey;
-
- private String data;
- private String desc;
-
- public EC_SigResult(String sig, String curve, String signKey, String verifyKey, String raw) {
- super(1);
- this.sig = sig;
- this.curve = curve;
- this.signKey = signKey;
- this.verifyKey = verifyKey;
- this.data = raw;
- }
-
- public EC_SigResult(String id, String sig, String curve, String signKey, String verifyKey, String data) {
- this(sig, curve, signKey, verifyKey, data);
- this.id = id;
- }
-
- public EC_SigResult(String id, String sig, String curve, String signKey, String verifyKey, String data, String desc) {
- this(id, sig, curve, signKey, verifyKey, data);
- this.desc = desc;
- }
-
- public String getSig() {
- return sig;
- }
-
- public byte getJavaCardSig() {
- return CardUtil.getSig(sig);
- }
-
- public String getCurve() {
- return curve;
- }
-
- public String getSignKey() {
- return signKey;
- }
-
- public String getVerifyKey() {
- return verifyKey;
- }
-
- public byte[] getSigData() {
- if (data == null) {
- return null;
- } else {
- return parse(data);
- }
- }
-
- public String getDesc() {
- return desc;
- }
-
- @Override
- public String toString() {
- return "<" + getId() + "> " + sig + " result over " + curve + ", " + signKey + " + " + verifyKey + (data == null ? "" : " of data \"" + data + "\"") + (desc == null ? "" : ": " + desc) + System.lineSeparator() + super.toString();
- }
-
-}
diff --git a/src/cz/crcs/ectester/common/ec/RawECPrivateKey.java b/src/cz/crcs/ectester/common/ec/RawECPrivateKey.java
deleted file mode 100644
index 479118f..0000000
--- a/src/cz/crcs/ectester/common/ec/RawECPrivateKey.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.util.ECUtil;
-
-import java.math.BigInteger;
-import java.security.interfaces.ECPrivateKey;
-import java.security.spec.ECParameterSpec;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public class RawECPrivateKey implements ECPrivateKey {
- private BigInteger scalar;
- private ECParameterSpec params;
-
- public RawECPrivateKey(BigInteger scalar, ECParameterSpec params) {
- this.scalar = scalar;
- this.params = params;
- }
-
- @Override
- public BigInteger getS() {
- return scalar;
- }
-
- @Override
- public String getAlgorithm() {
- return "EC";
- }
-
- @Override
- public String getFormat() {
- return "Raw";
- }
-
- @Override
- public byte[] getEncoded() {
- return ECUtil.toByteArray(scalar, params.getOrder().bitLength());
- }
-
- @Override
- public ECParameterSpec getParams() {
- return params;
- }
-}
diff --git a/src/cz/crcs/ectester/common/ec/RawECPublicKey.java b/src/cz/crcs/ectester/common/ec/RawECPublicKey.java
deleted file mode 100644
index 7888854..0000000
--- a/src/cz/crcs/ectester/common/ec/RawECPublicKey.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cz.crcs.ectester.common.ec;
-
-import cz.crcs.ectester.common.util.ECUtil;
-
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.ECPoint;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public class RawECPublicKey implements ECPublicKey {
- private ECPoint point;
- private ECParameterSpec params;
-
- public RawECPublicKey(ECPoint point, ECParameterSpec params) {
- this.point = point;
- this.params = params;
- }
-
- @Override
- public ECPoint getW() {
- return point;
- }
-
- @Override
- public String getAlgorithm() {
- return "EC";
- }
-
- @Override
- public String getFormat() {
- return "Raw";
- }
-
- @Override
- public byte[] getEncoded() {
- return ECUtil.toX962Uncompressed(point, params);
- }
-
- @Override
- public ECParameterSpec getParams() {
- return params;
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java b/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java
deleted file mode 100644
index 5c449db..0000000
--- a/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import cz.crcs.ectester.common.cli.Colors;
-import cz.crcs.ectester.common.test.*;
-
-import java.io.PrintStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * An absctract basis of a TextTestWriter, which outputs in a human readable format, into console.
- * Requires the implementation of:
- * <code>String testableString(Testable t)</code>
- * <code>String deviceString(TestSuite t)</code>
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class BaseTextTestWriter implements TestWriter {
- private PrintStream output;
-
- public static int BASE_WIDTH = 105;
-
- public BaseTextTestWriter(PrintStream output) {
- this.output = output;
- }
-
- @Override
- public void begin(TestSuite suite) {
- output.println("═══ " + Colors.underline("Running test suite:") + " " + Colors.bold(suite.getName()) + " ═══");
- for (String d : suite.getDescription()) {
- output.println("═══ " + d);
- }
- DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
- Date date = new Date();
- output.println("═══ " + Colors.underline("Date:") + " " + dateFormat.format(date));
- output.print(deviceString(suite));
- }
-
- /**
- * @param t
- * @return
- */
- protected abstract String testableString(Testable t);
-
- /**
- * @param suite
- * @return
- */
- protected abstract String deviceString(TestSuite suite);
-
- private String testString(Test t, String prefix, int index) {
- boolean compound = t instanceof CompoundTest;
-
- Result result = t.getResult();
-
- String line = "";
- if (prefix.equals("")) {
- char[] charLine = new char[BASE_WIDTH + 24];
- new String(new char[BASE_WIDTH + 24]).replace("\0", "━").getChars(0, charLine.length - 1, charLine, 0);
- charLine[0] = '■';
- charLine[4] = '┳';
- charLine[BASE_WIDTH + 1] = '┳';
- charLine[BASE_WIDTH + 13] = '┳';
- charLine[BASE_WIDTH + 23] = '┓';
- line = new String(charLine) + System.lineSeparator();
- }
-
- StringBuilder out = new StringBuilder();
- out.append(t.ok() ? Colors.ok(" OK ") : Colors.error("NOK "));
- out.append(compound ? (prefix.equals("") ? "╋ " : "┳ ") : "━ ");
- int width = BASE_WIDTH - (prefix.length() + 6);
- String widthSpec = "%-" + width + "s";
- String desc = ((prefix.equals("")) ? "(" + index + ") " : "") + t.getDescription();
- out.append(String.format(widthSpec, desc));
- out.append(" ┃ ");
- Colors.Foreground valueColor;
- if (result.getValue().ok()) {
- valueColor = Colors.Foreground.GREEN;
- } else if (result.getValue().equals(Result.Value.ERROR)) {
- valueColor = Colors.Foreground.RED;
- } else {
- valueColor = Colors.Foreground.YELLOW;
- }
- out.append(Colors.colored(String.format("%-9s", result.getValue().name()), Colors.Attribute.BOLD, valueColor));
- out.append(" ┃ ");
-
- if (compound) {
- CompoundTest test = (CompoundTest) t;
- out.append(result.getCause());
- out.append(System.lineSeparator());
- Test[] tests = test.getStartedTests();
- for (int i = 0; i < tests.length; ++i) {
- if (i == tests.length - 1) {
- out.append(prefix).append(" ┗ ");
- out.append(testString(tests[i], prefix + " ", index));
- } else {
- out.append(prefix).append(" ┣ ");
- out.append(testString(tests[i], prefix + " ┃ ", index));
- }
-
- if (i != tests.length - 1) {
- out.append(System.lineSeparator());
- }
- }
- } else {
- SimpleTest<? extends BaseTestable> test = (SimpleTest<? extends BaseTestable>) t;
- out.append(testableString(test.getTestable()));
- if (t.getResult().getCause() != null) {
- out.append(" ┃ ").append(t.getResult().getCause().toString());
- }
- }
- return line + out.toString();
- }
-
- @Override
- public void outputTest(Test t, int index) {
- if (!t.hasRun())
- return;
- output.println(testString(t, "", index));
- output.flush();
- }
-
- private String errorString(Throwable error) {
- StringBuilder sb = new StringBuilder();
- sb.append("═══ Exception: ═══").append(System.lineSeparator());
- for (Throwable t = error; t != null; t = t.getCause()) {
- sb.append("═══ ").append(t.toString()).append(" ═══");
- sb.append(System.lineSeparator());
- }
- sb.append("═══ Stack trace: ═══").append(System.lineSeparator());
- for (StackTraceElement s : error.getStackTrace()) {
- sb.append("═══ ").append(s.toString()).append(" ═══");
- sb.append(System.lineSeparator());
- }
- return sb.toString();
- }
-
- @Override
- public void outputError(Test t, Throwable cause, int index) {
- output.println(testString(t, "", index));
- output.print(errorString(cause));
- output.flush();
- }
-
- @Override
- public void end() {
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/BaseXMLTestWriter.java b/src/cz/crcs/ectester/common/output/BaseXMLTestWriter.java
deleted file mode 100644
index 53970dd..0000000
--- a/src/cz/crcs/ectester/common/output/BaseXMLTestWriter.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import cz.crcs.ectester.common.test.*;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.io.OutputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class BaseXMLTestWriter implements TestWriter {
- private OutputStream output;
- private DocumentBuilder db;
- protected Document doc;
- private Node root;
- private Node tests;
-
- public BaseXMLTestWriter(OutputStream output) throws ParserConfigurationException {
- this.output = output;
- this.db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
-
- @Override
- public void begin(TestSuite suite) {
- doc = db.newDocument();
- Element rootElem = doc.createElement("testSuite");
- rootElem.setAttribute("name", suite.getName());
- rootElem.setAttribute("desc", suite.getTextDescription());
- DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
- Date date = new Date();
- rootElem.setAttribute("date", dateFormat.format(date));
-
- root = rootElem;
- doc.appendChild(root);
- root.appendChild(deviceElement(suite));
- tests = doc.createElement("tests");
- root.appendChild(tests);
- }
-
- protected abstract Element testableElement(Testable t);
-
- protected abstract Element deviceElement(TestSuite suite);
-
- private String causeString(Object cause) {
- if (cause == null) {
- return "null";
- } else if (cause instanceof Throwable) {
- StringBuilder sb = new StringBuilder();
- for (Throwable t = (Throwable) cause; t != null; t = t.getCause()) {
- sb.append(t.toString());
- sb.append(System.lineSeparator());
- }
- return sb.toString();
- } else {
- return cause.toString();
- }
- }
-
- private Element resultElement(Result result) {
- Element resultElem = doc.createElement("result");
-
- Element ok = doc.createElement("ok");
- ok.setTextContent(String.valueOf(result.ok()));
- Element value = doc.createElement("value");
- value.setTextContent(result.getValue().name());
- Element cause = doc.createElement("cause");
- cause.setTextContent(causeString(result.getCause()));
-
- resultElem.appendChild(ok);
- resultElem.appendChild(value);
- resultElem.appendChild(cause);
-
- return resultElem;
- }
-
- private Element testElement(Test t, int index) {
- Element testElem;
- if (t instanceof CompoundTest) {
- CompoundTest test = (CompoundTest) t;
- testElem = doc.createElement("test");
- testElem.setAttribute("type", "compound");
- for (Test innerTest : test.getStartedTests()) {
- testElem.appendChild(testElement(innerTest, -1));
- }
- } else {
- SimpleTest<? extends BaseTestable> test = (SimpleTest<? extends BaseTestable>) t;
- testElem = testableElement(test.getTestable());
- }
-
- Element description = doc.createElement("desc");
- description.setTextContent(t.getDescription());
- testElem.appendChild(description);
-
- Element result = resultElement(t.getResult());
- testElem.appendChild(result);
-
- if (index != -1) {
- testElem.setAttribute("index", String.valueOf(index));
- }
-
- return testElem;
- }
-
- @Override
- public void outputTest(Test t, int index) {
- if (!t.hasRun())
- return;
- tests.appendChild(testElement(t, index));
- }
-
- @Override
- public void outputError(Test t, Throwable cause, int index) {
- tests.appendChild(testElement(t, index));
- }
-
- @Override
- public void end() {
- try {
- DOMSource domSource = new DOMSource(doc);
- StreamResult result = new StreamResult(output);
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer transformer = tf.newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
- transformer.transform(domSource, result);
- } catch (TransformerException e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/BaseYAMLTestWriter.java b/src/cz/crcs/ectester/common/output/BaseYAMLTestWriter.java
deleted file mode 100644
index e054563..0000000
--- a/src/cz/crcs/ectester/common/output/BaseYAMLTestWriter.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import cz.crcs.ectester.common.test.*;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.Yaml;
-
-import java.io.PrintStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class BaseYAMLTestWriter implements TestWriter {
- private PrintStream output;
- private Map<String, Object> testRun;
- private Map<String, String> testSuite;
- protected List<Object> tests;
-
- public BaseYAMLTestWriter(PrintStream output) {
- this.output = output;
- }
-
- @Override
- public void begin(TestSuite suite) {
- output.println("---");
- testRun = new LinkedHashMap<>();
- testSuite = new LinkedHashMap<>();
- tests = new LinkedList<>();
- testSuite.put("name", suite.getName());
- testSuite.put("desc", suite.getTextDescription());
-
- DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
- Date date = new Date();
- testRun.put("date", dateFormat.format(date));
- testRun.put("suite", testSuite);
- testRun.put("device", deviceObject(suite));
- testRun.put("tests", tests);
- }
-
- abstract protected Map<String, Object> testableObject(Testable t);
-
- abstract protected Map<String, Object> deviceObject(TestSuite suite);
-
- private Object causeObject(Object cause) {
- if (cause == null) {
- return null;
- } else if (cause instanceof Throwable) {
- StringBuilder sb = new StringBuilder();
- for (Throwable t = (Throwable) cause; t != null; t = t.getCause()) {
- sb.append(t.toString());
- sb.append(System.lineSeparator());
- }
- return sb.toString();
- } else {
- return cause.toString();
- }
- }
-
- private Map<String, Object> resultObject(Result result) {
- Map<String, Object> resultObject = new LinkedHashMap<>();
- resultObject.put("ok", result.ok());
- resultObject.put("value", result.getValue().name());
- resultObject.put("cause", causeObject(result.getCause()));
- return resultObject;
- }
-
- private Map<String, Object> testObject(Test t, int index) {
- Map<String, Object> testObj;
- if (t instanceof CompoundTest) {
- CompoundTest test = (CompoundTest) t;
- testObj = new HashMap<>();
- testObj.put("type", "compound");
- List<Map<String, Object>> innerTests = new LinkedList<>();
- for (Test innerTest : test.getStartedTests()) {
- innerTests.add(testObject(innerTest, -1));
- }
- testObj.put("tests", innerTests);
- } else {
- SimpleTest<? extends BaseTestable> test = (SimpleTest<? extends BaseTestable>) t;
- testObj = testableObject(test.getTestable());
- }
-
- testObj.put("desc", t.getDescription());
- testObj.put("result", resultObject(t.getResult()));
- if (index != -1) {
- testObj.put("index", index);
- }
-
- return testObj;
- }
-
- @Override
- public void outputTest(Test t, int index) {
- if (!t.hasRun())
- return;
- tests.add(testObject(t, index));
- }
-
- @Override
- public void outputError(Test t, Throwable cause, int index) {
- tests.add(testObject(t, index));
- }
-
- @Override
- public void end() {
- DumperOptions options = new DumperOptions();
- options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
- options.setPrettyFlow(true);
- Yaml yaml = new Yaml(options);
-
- Map<String, Object> result = new LinkedHashMap<>();
- result.put("testRun", testRun);
- String out = yaml.dump(result);
-
- output.println(out);
- output.println("---");
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/OutputLogger.java b/src/cz/crcs/ectester/common/output/OutputLogger.java
deleted file mode 100644
index effd1fd..0000000
--- a/src/cz/crcs/ectester/common/output/OutputLogger.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class OutputLogger {
- private OutputStream out;
- private PrintStream print;
-
- public OutputLogger(boolean systemOut, String... filePaths) throws IOException {
- List<OutputStream> streams = new LinkedList<>();
- for (String filePath : filePaths) {
- if (filePath != null) {
- streams.add(new FileOutputStream(filePath));
- }
- }
- if (systemOut) {
- streams.add(System.out);
- }
- this.out = new TeeOutputStream(streams.toArray(new OutputStream[0]));
- this.print = new PrintStream(this.out);
- }
-
- public OutputLogger(String filePath) throws IOException {
- this(true, filePath);
- }
-
- public OutputStream getOutputStream() {
- return this.out;
- }
-
- public PrintStream getPrintStream() {
- return this.print;
- }
-
- public void println() {
- print.println();
- }
-
- public void println(String logLine) {
- print.println(logLine);
- }
-
- public void print(String logLine) {
- print.print(logLine);
- }
-
- public void flush() {
- print.flush();
- }
-
- public void close() {
- print.close();
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/TeeOutputStream.java b/src/cz/crcs/ectester/common/output/TeeOutputStream.java
deleted file mode 100644
index 2401fce..0000000
--- a/src/cz/crcs/ectester/common/output/TeeOutputStream.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TeeOutputStream extends OutputStream {
- private OutputStream[] outputs;
-
- public TeeOutputStream(OutputStream... outputs) {
- this.outputs = outputs;
- }
-
- @Override
- public void write(int b) throws IOException {
- for (OutputStream out : outputs) {
- out.write(b);
- }
- }
-
- @Override
- public void flush() throws IOException {
- for (OutputStream out : outputs) {
- out.flush();
- }
- }
-
- @Override
- public void close() throws IOException {
- for (OutputStream out : outputs) {
- out.close();
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/TeeTestWriter.java b/src/cz/crcs/ectester/common/output/TeeTestWriter.java
deleted file mode 100644
index 58a0a15..0000000
--- a/src/cz/crcs/ectester/common/output/TeeTestWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestSuite;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TeeTestWriter implements TestWriter {
- protected TestWriter[] writers;
-
- public TeeTestWriter(TestWriter... writers) {
- this.writers = writers;
- }
-
- @Override
- public void begin(TestSuite suite) {
- for (TestWriter writer : writers) {
- writer.begin(suite);
- }
- }
-
- @Override
- public void outputTest(Test t, int index) {
- for (TestWriter writer : writers) {
- writer.outputTest(t, index);
- }
- }
-
- @Override
- public void outputError(Test t, Throwable cause, int index) {
- for (TestWriter writer : writers) {
- writer.outputError(t, cause, index);
- }
- }
-
- @Override
- public void end() {
- for (TestWriter writer : writers) {
- writer.end();
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/output/TestWriter.java b/src/cz/crcs/ectester/common/output/TestWriter.java
deleted file mode 100644
index 67aeccb..0000000
--- a/src/cz/crcs/ectester/common/output/TestWriter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cz.crcs.ectester.common.output;
-
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestSuite;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public interface TestWriter {
- /**
- * Begin writing the <code>TestSuite suite</code>.
- * This should reset all the internal state of the writer
- * and prepare it to output tests from <code>suite</code>.
- * It may also write any header part of the output of the
- * writer but doesn't have to.
- *
- * @param suite The <code>TestSuite</code> to start writing.
- */
- void begin(TestSuite suite);
-
- /**
- * @param t
- * @param index
- */
- void outputTest(Test t, int index);
-
- /**
- * @param t
- * @param cause
- * @param index
- */
- void outputError(Test t, Throwable cause, int index);
-
- /**
- *
- */
- void end();
-}
diff --git a/src/cz/crcs/ectester/common/test/BaseTestable.java b/src/cz/crcs/ectester/common/test/BaseTestable.java
deleted file mode 100644
index 3c304d9..0000000
--- a/src/cz/crcs/ectester/common/test/BaseTestable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class BaseTestable implements Testable, Cloneable {
- protected boolean hasRun;
- protected boolean ok;
- protected boolean error;
- protected Object errorCause;
-
- @Override
- public boolean hasRun() {
- return hasRun;
- }
-
- @Override
- public boolean ok() {
- return ok;
- }
-
- @Override
- public boolean error() {
- return error;
- }
-
- @Override
- public Object errorCause() {
- return errorCause;
- }
-
- @Override
- public void reset() {
- hasRun = false;
- ok = false;
- error = false;
- errorCause = null;
- }
-
- @Override
- protected BaseTestable clone() throws CloneNotSupportedException {
- return (BaseTestable) super.clone();
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/CompoundTest.java b/src/cz/crcs/ectester/common/test/CompoundTest.java
deleted file mode 100644
index ba4ad4f..0000000
--- a/src/cz/crcs/ectester/common/test/CompoundTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-import java.util.Arrays;
-import java.util.Objects;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-/**
- * A compound test that runs many Tests and has a Result dependent on all/some of their Results.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CompoundTest extends Test implements Cloneable {
- private Function<Test[], Result> resultCallback;
- private Consumer<Test[]> runCallback;
- private Test[] tests;
- private String description = "";
-
- private final static Consumer<Test[]> RUN_ALL = tests -> {
- for (Test t : tests) {
- t.run();
- }
- };
-
- private final static Consumer<Test[]> RUN_GREEDY_ALL = tests -> {
- for (Test t : tests) {
- t.run();
- if (!t.ok()) {
- break;
- }
- }
- };
-
- private final static Consumer<Test[]> RUN_GREEDY_ANY = tests -> {
- for (Test t : tests) {
- t.run();
- if (t.ok()) {
- break;
- }
- }
- };
-
- private CompoundTest(Function<Test[], Result> resultCallback, Consumer<Test[]> runCallback, Test... tests) {
- this.resultCallback = resultCallback;
- this.runCallback = runCallback;
- this.tests = Arrays.stream(tests).filter(Objects::nonNull).toArray(Test[]::new);
- }
-
- private CompoundTest(Function<Test[], Result> callback, Consumer<Test[]> runCallback, String descripiton, Test... tests) {
- this(callback, runCallback, tests);
- this.description = descripiton;
- }
-
- public static CompoundTest function(Function<Test[], Result> callback, Test... tests) {
- return new CompoundTest(callback, RUN_ALL, tests);
- }
-
- public static CompoundTest function(Function<Test[], Result> callback, Consumer<Test[]> runCallback, Test... tests) {
- return new CompoundTest(callback, runCallback, tests);
- }
-
- public static CompoundTest function(Function<Test[], Result> callback, String description, Test... tests) {
- return new CompoundTest(callback, RUN_ALL, description, tests);
- }
-
- public static CompoundTest function(Function<Test[], Result> callback, Consumer<Test[]> runCallback, String description, Test... tests) {
- return new CompoundTest(callback, runCallback, description, tests);
- }
-
- private static CompoundTest expectAll(Result.ExpectedValue what, Consumer<Test[]> runCallback, Test[] all) {
- return new CompoundTest((tests) -> {
- for (Test test : tests) {
- if (!Result.Value.fromExpected(what, test.ok()).ok()) {
- return new Result(Result.Value.FAILURE, "Some sub-tests did not have the expected result.");
- }
- }
- return new Result(Result.Value.SUCCESS, "All sub-tests had the expected result.");
- }, runCallback, all);
- }
-
- public static CompoundTest all(Result.ExpectedValue what, Test... all) {
- return expectAll(what, RUN_ALL, all);
- }
-
- public static CompoundTest all(Result.ExpectedValue what, String description, Test... all) {
- CompoundTest result = CompoundTest.all(what, all);
- result.setDescription(description);
- return result;
- }
-
- public static CompoundTest greedyAll(Result.ExpectedValue what, Test... all) {
- return expectAll(what, RUN_GREEDY_ALL, all);
- }
-
- public static CompoundTest greedyAll(Result.ExpectedValue what, String description, Test... all) {
- CompoundTest result = CompoundTest.greedyAll(what, all);
- result.setDescription(description);
- return result;
- }
-
- public static CompoundTest greedyAllTry(Result.ExpectedValue what, Test... all) {
- return new CompoundTest((tests) -> {
- int run = 0;
- int ok = 0;
- for (Test test : tests) {
- if (test.hasRun()) {
- run++;
- if (Result.Value.fromExpected(what, test.ok()).ok()) {
- ok++;
- }
- }
- }
- if (run == tests.length) {
- if (ok == run) {
- return new Result(Result.Value.SUCCESS, "All sub-tests had the expected result.");
- } else {
- return new Result(Result.Value.FAILURE, "Some sub-tests did not have the expected result.");
- }
- } else {
- return new Result(Result.Value.SUCCESS, "All considered sub-tests had the expected result.");
- }
- }, RUN_GREEDY_ALL, all);
- }
-
- public static CompoundTest greedyAllTry(Result.ExpectedValue what, String description, Test... all) {
- CompoundTest result = CompoundTest.greedyAllTry(what, all);
- result.setDescription(description);
- return result;
- }
-
- private static CompoundTest expectAny(Result.ExpectedValue what, Consumer<Test[]> runCallback, Test[] any) {
- return new CompoundTest((tests) -> {
- for (Test test : tests) {
- if (Result.Value.fromExpected(what, test.ok()).ok()) {
- return new Result(Result.Value.SUCCESS, "Some sub-tests did have the expected result.");
- }
- }
- return new Result(Result.Value.FAILURE, "None of the sub-tests had the expected result.");
- }, runCallback, any);
- }
-
- public static CompoundTest greedyAny(Result.ExpectedValue what, Test... any) {
- return expectAny(what, RUN_GREEDY_ANY, any);
- }
-
- public static CompoundTest greedyAny(Result.ExpectedValue what, String description, Test... any) {
- CompoundTest result = CompoundTest.greedyAny(what, any);
- result.setDescription(description);
- return result;
- }
-
- public static CompoundTest any(Result.ExpectedValue what, Test... any) {
- return expectAny(what, RUN_ALL, any);
- }
-
- public static CompoundTest any(Result.ExpectedValue what, String description, Test... any) {
- CompoundTest result = CompoundTest.any(what, any);
- result.setDescription(description);
- return result;
- }
-
- public static CompoundTest mask(Result.ExpectedValue[] results, Test... masked) {
- return new CompoundTest((tests) -> {
- for (int i = 0; i < results.length; ++i) {
- if (!Result.Value.fromExpected(results[i], tests[i].ok()).ok()) {
- return new Result(Result.Value.FAILURE, "Some sub-tests did not match the result mask.");
- }
- }
- return new Result(Result.Value.SUCCESS, "All sub-tests matched the expected mask.");
- }, RUN_ALL, masked);
- }
-
- public static CompoundTest mask(Result.ExpectedValue[] results, String description, Test... masked) {
- CompoundTest result = CompoundTest.mask(results, masked);
- result.setDescription(description);
- return result;
- }
-
- public Test[] getTests() {
- return tests.clone();
- }
-
- public Test[] getRunTests() {
- return Arrays.stream(tests).filter(Test::hasRun).toArray(Test[]::new);
- }
-
- public Test[] getStartedTests() {
- return Arrays.stream(tests).filter(Test::hasStarted).toArray(Test[]::new);
- }
-
- public Test[] getSkippedTests() {
- return Arrays.stream(tests).filter((test) -> !test.hasRun()).toArray(Test[]::new);
- }
-
- @Override
- protected void runSelf() {
- runCallback.accept(tests);
- result = resultCallback.apply(tests);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public CompoundTest clone() throws CloneNotSupportedException {
- return (CompoundTest) super.clone();
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/Result.java b/src/cz/crcs/ectester/common/test/Result.java
deleted file mode 100644
index f065f9c..0000000
--- a/src/cz/crcs/ectester/common/test/Result.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * A Result of a Test. Has a Value and an optional String cause.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class Result {
-
- private Value value;
- private Object cause;
-
- public Result(Value value) {
- this.value = value;
- }
-
- public Result(Value value, Object cause) {
- this(value);
- this.cause = cause;
- }
-
- public Value getValue() {
- return value;
- }
-
- public Object getCause() {
- return cause;
- }
-
- public boolean ok() {
- return value.ok();
- }
-
- public boolean compareTo(Result other) {
- if (other == null) {
- return false;
- }
- return value == other.value;
- }
-
- public boolean compareTo(Value other) {
- if (other == null) {
- return false;
- }
- return value == other;
- }
-
- /**
- * A result value of a Test.
- */
- public enum Value {
- SUCCESS(true, "Expected success."),
- FAILURE(false, "Unexpected failure."),
- UXSUCCESS(false, "Unexpected success."),
- XFAILURE(true, "Expected failure."),
- ERROR(false, "Error.");
-
- private boolean ok;
- private String desc;
-
- Value(boolean ok) {
- this.ok = ok;
- }
-
- Value(boolean ok, String desc) {
- this(ok);
- this.desc = desc;
- }
-
- public static Value fromExpected(ExpectedValue expected, boolean successful) {
- switch (expected) {
- case SUCCESS:
- return successful ? SUCCESS : FAILURE;
- case FAILURE:
- return successful ? UXSUCCESS : XFAILURE;
- case ANY:
- return successful ? SUCCESS : XFAILURE;
- }
- return SUCCESS;
- }
-
- public static Value fromExpected(ExpectedValue expected, boolean successful, boolean error) {
- if (error) {
- return ERROR;
- }
- return fromExpected(expected, successful);
- }
-
- public boolean ok() {
- return ok;
- }
-
- public String description() {
- return desc;
- }
- }
-
- /**
- * A possible expected value result of a Test.
- */
- public enum ExpectedValue {
- SUCCESS,
- FAILURE,
- ANY
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/SimpleTest.java b/src/cz/crcs/ectester/common/test/SimpleTest.java
deleted file mode 100644
index d2b3e94..0000000
--- a/src/cz/crcs/ectester/common/test/SimpleTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * @param <T>
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class SimpleTest<T extends BaseTestable> extends Test implements Testable {
- protected T testable;
- protected TestCallback<T> callback;
-
- public SimpleTest(T testable, TestCallback<T> callback) {
- if (testable == null) {
- throw new IllegalArgumentException("testable is null.");
- }
- if (callback == null) {
- throw new IllegalArgumentException("callback is null.");
- }
- this.testable = testable;
- this.callback = callback;
- }
-
- public T getTestable() {
- return testable;
- }
-
- @Override
- protected void runSelf() {
- testable.run();
- result = callback.apply(testable);
- }
-
- @Override
- public SimpleTest clone() throws CloneNotSupportedException {
- SimpleTest clone = (SimpleTest) super.clone();
- clone.testable = testable.clone();
- return clone;
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/Test.java b/src/cz/crcs/ectester/common/test/Test.java
deleted file mode 100644
index 8bf9502..0000000
--- a/src/cz/crcs/ectester/common/test/Test.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-import static cz.crcs.ectester.common.test.Result.Value;
-
-/**
- * An abstract test that can be run and has a Result.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class Test implements Testable, Cloneable {
- protected boolean hasRun;
- protected boolean hasStarted;
- protected Result result;
-
- public Result getResult() {
- return result;
- }
-
- public boolean ok() {
- if (result == null) {
- return true;
- }
- return result.ok();
- }
-
- @Override
- public boolean error() {
- if (result == null) {
- return false;
- }
- return result.compareTo(Value.ERROR);
- }
-
- @Override
- public Object errorCause() {
- if (result == null || !result.compareTo(Value.ERROR)) {
- return null;
- }
- return result.getCause();
- }
-
- @Override
- public boolean hasRun() {
- return hasRun;
- }
-
- public boolean hasStarted() {
- return hasStarted;
- }
-
- @Override
- public void reset() {
- hasRun = false;
- hasStarted = false;
- result = null;
- }
-
- public abstract String getDescription();
-
- @Override
- public Test clone() throws CloneNotSupportedException {
- return (Test) super.clone();
- }
-
- @Override
- public void run() {
- if (hasRun)
- return;
- try {
- hasStarted = true;
- runSelf();
- hasRun = true;
- } catch (TestException e) {
- result = new Result(Value.ERROR, e);
- throw e;
- } catch (Exception e) {
- result = new Result(Value.ERROR, e);
- throw new TestException(e);
- }
- }
-
- protected abstract void runSelf();
-}
diff --git a/src/cz/crcs/ectester/common/test/TestCallback.java b/src/cz/crcs/ectester/common/test/TestCallback.java
deleted file mode 100644
index c5a49f3..0000000
--- a/src/cz/crcs/ectester/common/test/TestCallback.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-import java.util.function.Function;
-
-/**
- * @param <T>
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class TestCallback<T extends Testable> implements Function<T, Result> {
-
-}
diff --git a/src/cz/crcs/ectester/common/test/TestException.java b/src/cz/crcs/ectester/common/test/TestException.java
deleted file mode 100644
index 0b605eb..0000000
--- a/src/cz/crcs/ectester/common/test/TestException.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * A TestException is an Exception that can be thrown during the running of a Testable,
- * or a Test. It means that the Testable/TestSuite encountered an unexpected error
- * and has to terminate.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public class TestException extends RuntimeException {
- public TestException(Throwable e) {
- super(e);
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/TestSuite.java b/src/cz/crcs/ectester/common/test/TestSuite.java
deleted file mode 100644
index b12680a..0000000
--- a/src/cz/crcs/ectester/common/test/TestSuite.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-import cz.crcs.ectester.common.output.TestWriter;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class TestSuite {
- protected String name;
- protected String[] description;
- private TestWriter writer;
- private Test running;
- private int ran = 0;
- private int runFrom = 0;
- private int runTo = -1;
-
- public TestSuite(TestWriter writer, String name, String... description) {
- this.writer = writer;
- this.name = name;
- this.description = description;
- }
-
- /**
- * Run the <code>TestSuite</code>.
- */
- public void run() {
- run(0);
- }
-
- public void run(int from) {
- run(from, -1);
- }
-
- public void run(int from, int to) {
- this.runFrom = from;
- this.runTo = to;
- writer.begin(this);
- try {
- runTests();
- } catch (TestException e) {
- writer.outputError(running, e, ran);
- } catch (Exception e) {
- writer.end();
- throw new TestSuiteException(e);
- }
- writer.end();
- }
-
- /**
- * Run the given test and return it back.
- *
- * @param t The test to run.
- * @return The test that was run.
- * @throws TestException
- */
- protected <T extends Test> T runTest(T t) {
- running = t;
- t.run();
- running = null;
- return t;
- }
-
- /**
- * Run the given test, output it and return it back.
- *
- * @param t The test to run.
- * @return The test that was run.
- * @throws TestException
- */
- protected <T extends Test> T doTest(T t) {
- if (ran >= runFrom && (runTo < 0 || ran <= runTo)) {
- runTest(t);
- writer.outputTest(t, ran);
- }
- ran++;
- return t;
- }
-
- /**
- *
- */
- protected abstract void runTests() throws Exception;
-
- public String getName() {
- return name;
- }
-
- public String[] getDescription() {
- return description;
- }
-
- public String getTextDescription() {
- return String.join(System.lineSeparator(), description);
- }
-
- public String toString() {
- return null;
- }
-
-}
diff --git a/src/cz/crcs/ectester/common/test/TestSuiteException.java b/src/cz/crcs/ectester/common/test/TestSuiteException.java
deleted file mode 100644
index 2d1ea09..0000000
--- a/src/cz/crcs/ectester/common/test/TestSuiteException.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * An unexpected exception was thrown while running a TestSuite, outside Test
- * or a Testable.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public class TestSuiteException extends RuntimeException {
- public TestSuiteException(Throwable e) {
- super(e);
- }
-}
diff --git a/src/cz/crcs/ectester/common/test/Testable.java b/src/cz/crcs/ectester/common/test/Testable.java
deleted file mode 100644
index 7b4545c..0000000
--- a/src/cz/crcs/ectester/common/test/Testable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public interface Testable {
- /**
- * @return Whether this Testable was OK.
- */
- boolean ok();
-
- /**
- * @return Whether an error happened.
- */
- boolean error();
-
- /**
- * @return The cause of an error, if it happened, otherwise null.
- */
- Object errorCause();
-
- /**
- * @return Whether this runnable was run.
- */
- boolean hasRun();
-
- /**
- *
- */
- void reset();
-
- /**
- * Run this Runnable.
- *
- * @throws TestException If an unexpected exception/error is encountered.
- */
- void run();
-}
diff --git a/src/cz/crcs/ectester/common/util/ByteUtil.java b/src/cz/crcs/ectester/common/util/ByteUtil.java
deleted file mode 100644
index 442824a..0000000
--- a/src/cz/crcs/ectester/common/util/ByteUtil.java
+++ /dev/null
@@ -1,193 +0,0 @@
-package cz.crcs.ectester.common.util;
-
-/**
- * Utility class, some byte/hex manipulation, convenient byte[] methods.
- *
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ByteUtil {
-
- /**
- * Get a short from a byte array at <code>offset</code>, big-endian.
- *
- * @return the short value
- */
- public static short getShort(byte[] array, int offset) {
- return (short) (((array[offset] & 0xFF) << 8) | (array[offset + 1] & 0xFF));
- }
-
- /**
- * Get a short from a byte array at <code>offset</code>, return it as an int, big-endian.
- *
- * @return the short value (as an int)
- */
- public static int getShortInt(byte[] array, int offset) {
- return (((array[offset] & 0xFF) << 8) | (array[offset + 1] & 0xFF));
- }
-
- /**
- * Set a short in a byte array at <code>offset</code>, big-endian.
- */
- public static void setShort(byte[] array, int offset, short value) {
- array[offset + 1] = (byte) (value & 0xFF);
- array[offset] = (byte) ((value >> 8) & 0xFF);
- }
-
- /**
- * Compare two byte arrays upto <code>length</code> and get first difference.
- *
- * @return the position of the first difference in the two byte arrays, or <code>length</code> if they are equal.
- */
- public static int diffBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) {
- for (int i = 0; i < length; ++i) {
- byte a = one[i + oneOffset];
- byte b = other[i + otherOffset];
- if (a != b) {
- return i;
- }
- }
- return length;
- }
-
- /**
- * Compare two byte arrays, upto <code>length</code>.
- *
- * @return whether the arrays are equal upto <code>length</code>
- */
- public static boolean compareBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) {
- return diffBytes(one, oneOffset, other, otherOffset, length) == length;
- }
-
- /**
- * Test if the byte array has all values equal to <code>value</code>.
- */
- public static boolean allValue(byte[] array, byte value) {
- for (byte a : array) {
- if (a != value)
- return false;
- }
- return true;
- }
-
- public static byte[] shortToBytes(short value) {
- byte[] result = new byte[2];
- setShort(result, 0, value);
- return result;
- }
-
- public static byte[] shortToBytes(short[] shorts) {
- if (shorts == null) {
- return null;
- }
- byte[] result = new byte[shorts.length * 2];
- for (int i = 0; i < shorts.length; ++i) {
- setShort(result, 2 * i, shorts[i]);
- }
- return result;
- }
-
- /**
- * Parse a hex string into a byte array, big-endian.
- *
- * @param hex The String to parse.
- * @return the byte array from the hex string.
- */
- public static byte[] hexToBytes(String hex) {
- return hexToBytes(hex, true);
- }
-
- /**
- * Parse a hex string into a byte-array, specify endianity.
- *
- * @param hex The String to parse.
- * @param bigEndian Whether to parse as big-endian.
- * @return the byte array from the hex string.
- */
- public static byte[] hexToBytes(String hex, boolean bigEndian) {
- hex = hex.replace(" ", "");
- int len = hex.length();
- StringBuilder sb = new StringBuilder();
-
- if (len % 2 == 1) {
- sb.append("0");
- ++len;
- }
-
- if (bigEndian) {
- sb.append(hex);
- } else {
- for (int i = 0; i < len / 2; ++i) {
- if (sb.length() >= 2) {
- sb.insert(sb.length() - 2, hex.substring(2 * i, 2 * i + 2));
- } else {
- sb.append(hex.substring(2 * i, 2 * i + 2));
- }
-
- }
- }
-
- String data = sb.toString();
- byte[] result = new byte[len / 2];
- for (int i = 0; i < len; i += 2) {
- result[i / 2] = (byte) ((Character.digit(data.charAt(i), 16) << 4)
- + (Character.digit(data.charAt(i + 1), 16)));
- }
- return result;
- }
-
- public static String byteToHex(byte data) {
- return String.format("%02x", data);
- }
-
- public static String bytesToHex(byte[] data) {
- return bytesToHex(data, true);
- }
-
- public static String bytesToHex(byte[] data, boolean addSpace) {
- if (data == null) {
- return "";
- }
- return bytesToHex(data, 0, data.length, addSpace);
- }
-
- public static String bytesToHex(byte[] data, int offset, int len) {
- return bytesToHex(data, offset, len, true);
- }
-
- public static String bytesToHex(byte[] data, int offset, int len, boolean addSpace) {
- if (data == null) {
- return "";
- }
- StringBuilder buf = new StringBuilder();
- for (int i = offset; i < (offset + len); i++) {
- buf.append(byteToHex(data[i]));
- if (addSpace && i != (offset + len - 1)) {
- buf.append(" ");
- }
- }
- return (buf.toString());
- }
-
- public static byte[] concatenate(byte[]... arrays) {
- int len = 0;
- for (byte[] array : arrays) {
- if (array == null)
- continue;
- len += array.length;
- }
- byte[] out = new byte[len];
- int offset = 0;
- for (byte[] array : arrays) {
- if (array == null || array.length == 0)
- continue;
- System.arraycopy(array, 0, out, offset, array.length);
- offset += array.length;
- }
- return out;
- }
-
- public static byte[] prependLength(byte[] data) {
- return concatenate(ByteUtil.shortToBytes((short) data.length), data);
- }
-}
diff --git a/src/cz/crcs/ectester/common/util/CardUtil.java b/src/cz/crcs/ectester/common/util/CardUtil.java
deleted file mode 100644
index 72963cf..0000000
--- a/src/cz/crcs/ectester/common/util/CardUtil.java
+++ /dev/null
@@ -1,534 +0,0 @@
-package cz.crcs.ectester.common.util;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import javacard.framework.ISO7816;
-import javacard.security.CryptoException;
-import javacard.security.KeyPair;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardUtil {
- public static byte getSig(String name) {
- switch (name) {
- case "SHA1":
- return EC_Consts.Signature_ALG_ECDSA_SHA;
- case "SHA224":
- return EC_Consts.Signature_ALG_ECDSA_SHA_224;
- case "SHA256":
- return EC_Consts.Signature_ALG_ECDSA_SHA_256;
- case "SHA384":
- return EC_Consts.Signature_ALG_ECDSA_SHA_384;
- case "SHA512":
- return EC_Consts.Signature_ALG_ECDSA_SHA_512;
- default:
- return EC_Consts.Signature_ALG_ECDSA_SHA;
- }
- }
-
- public static String getSigHashAlgo(byte sigType) {
- switch (sigType) {
- case EC_Consts.Signature_ALG_ECDSA_SHA:
- return "SHA1";
- case EC_Consts.Signature_ALG_ECDSA_SHA_224:
- return "SHA224";
- case EC_Consts.Signature_ALG_ECDSA_SHA_256:
- return "SHA256";
- case EC_Consts.Signature_ALG_ECDSA_SHA_384:
- return "SHA384";
- case EC_Consts.Signature_ALG_ECDSA_SHA_512:
- return "SHA512";
- default:
- return null;
- }
- }
-
- public static String getSigHashName(byte sigType) {
- switch (sigType) {
- case EC_Consts.Signature_ALG_ECDSA_SHA:
- return "SHA1";
- case EC_Consts.Signature_ALG_ECDSA_SHA_224:
- return "SHA224";
- case EC_Consts.Signature_ALG_ECDSA_SHA_256:
- return "SHA256";
- case EC_Consts.Signature_ALG_ECDSA_SHA_384:
- return "SHA384";
- case EC_Consts.Signature_ALG_ECDSA_SHA_512:
- return "SHA512";
- default:
- return null;
- }
- }
-
- public static byte getKA(String name) {
- switch (name) {
- case "DH":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH;
- case "DHC":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC;
- case "DH_PLAIN":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN;
- case "DHC_PLAIN":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC_PLAIN;
- case "PACE_GM":
- return EC_Consts.KeyAgreement_ALG_EC_PACE_GM;
- case "DH_PLAIN_XY":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY;
- default:
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH;
- }
- }
-
- public static String getKexHashName(byte kexType) {
- switch (kexType) {
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DH:
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC:
- return "SHA1";
- default:
- return "NONE";
- }
- }
-
- public static String getSWSource(short sw) {
- switch (sw) {
- case ISO7816.SW_NO_ERROR:
- case ISO7816.SW_APPLET_SELECT_FAILED:
- case ISO7816.SW_BYTES_REMAINING_00:
- case ISO7816.SW_CLA_NOT_SUPPORTED:
- case ISO7816.SW_COMMAND_NOT_ALLOWED:
- case ISO7816.SW_CONDITIONS_NOT_SATISFIED:
- case ISO7816.SW_CORRECT_LENGTH_00:
- case ISO7816.SW_DATA_INVALID:
- case ISO7816.SW_FILE_FULL:
- case ISO7816.SW_FILE_INVALID:
- case ISO7816.SW_FILE_NOT_FOUND:
- case ISO7816.SW_FUNC_NOT_SUPPORTED:
- case ISO7816.SW_INCORRECT_P1P2:
- case ISO7816.SW_INS_NOT_SUPPORTED:
- case ISO7816.SW_LOGICAL_CHANNEL_NOT_SUPPORTED:
- case ISO7816.SW_RECORD_NOT_FOUND:
- case ISO7816.SW_SECURE_MESSAGING_NOT_SUPPORTED:
- case ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED:
- case ISO7816.SW_UNKNOWN:
- case ISO7816.SW_WARNING_STATE_UNCHANGED:
- case ISO7816.SW_WRONG_DATA:
- case ISO7816.SW_WRONG_LENGTH:
- case ISO7816.SW_WRONG_P1P2:
- return "ISO";
- case CryptoException.ILLEGAL_VALUE:
- case CryptoException.UNINITIALIZED_KEY:
- case CryptoException.NO_SUCH_ALGORITHM:
- case CryptoException.INVALID_INIT:
- case CryptoException.ILLEGAL_USE:
- return "CryptoException";
- case ECTesterApplet.SW_SIG_VERIFY_FAIL:
- case ECTesterApplet.SW_DH_DHC_MISMATCH:
- case ECTesterApplet.SW_KEYPAIR_NULL:
- case ECTesterApplet.SW_KA_NULL:
- case ECTesterApplet.SW_SIGNATURE_NULL:
- case ECTesterApplet.SW_OBJECT_NULL:
- return "ECTesterApplet";
- default:
- return "?";
- }
- }
-
- public static String getSW(short sw) {
- int upper = (sw & 0xff00) >> 8;
- int lower = (sw & 0xff);
- switch (upper) {
- case 0xf1:
- return String.format("CryptoException(%d)", lower);
- case 0xf2:
- return String.format("SystemException(%d)", lower);
- case 0xf3:
- return String.format("PINException(%d)", lower);
- case 0xf4:
- return String.format("TransactionException(%d)", lower);
- case 0xf5:
- return String.format("CardRuntimeException(%d)", lower);
- default:
- switch (sw) {
- case ISO7816.SW_APPLET_SELECT_FAILED:
- return "APPLET_SELECT_FAILED";
- case ISO7816.SW_BYTES_REMAINING_00:
- return "BYTES_REMAINING";
- case ISO7816.SW_CLA_NOT_SUPPORTED:
- return "CLA_NOT_SUPPORTED";
- case ISO7816.SW_COMMAND_NOT_ALLOWED:
- return "COMMAND_NOT_ALLOWED";
- case ISO7816.SW_CONDITIONS_NOT_SATISFIED:
- return "CONDITIONS_NOT_SATISFIED";
- case ISO7816.SW_CORRECT_LENGTH_00:
- return "CORRECT_LENGTH";
- case ISO7816.SW_DATA_INVALID:
- return "DATA_INVALID";
- case ISO7816.SW_FILE_FULL:
- return "FILE_FULL";
- case ISO7816.SW_FILE_INVALID:
- return "FILE_INVALID";
- case ISO7816.SW_FILE_NOT_FOUND:
- return "FILE_NOT_FOUND";
- case ISO7816.SW_FUNC_NOT_SUPPORTED:
- return "FUNC_NOT_SUPPORTED";
- case ISO7816.SW_INCORRECT_P1P2:
- return "INCORRECT_P1P2";
- case ISO7816.SW_INS_NOT_SUPPORTED:
- return "INS_NOT_SUPPORTED";
- case ISO7816.SW_LOGICAL_CHANNEL_NOT_SUPPORTED:
- return "LOGICAL_CHANNEL_NOT_SUPPORTED";
- case ISO7816.SW_RECORD_NOT_FOUND:
- return "RECORD_NOT_FOUND";
- case ISO7816.SW_SECURE_MESSAGING_NOT_SUPPORTED:
- return "SECURE_MESSAGING_NOT_SUPPORTED";
- case ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED:
- return "SECURITY_STATUS_NOT_SATISFIED";
- case ISO7816.SW_UNKNOWN:
- return "UNKNOWN";
- case ISO7816.SW_WARNING_STATE_UNCHANGED:
- return "WARNING_STATE_UNCHANGED";
- case ISO7816.SW_WRONG_DATA:
- return "WRONG_DATA";
- case ISO7816.SW_WRONG_LENGTH:
- return "WRONG_LENGTH";
- case ISO7816.SW_WRONG_P1P2:
- return "WRONG_P1P2";
- case CryptoException.ILLEGAL_VALUE:
- return "ILLEGAL_VALUE";
- case CryptoException.UNINITIALIZED_KEY:
- return "UNINITIALIZED_KEY";
- case CryptoException.NO_SUCH_ALGORITHM:
- return "NO_SUCH_ALG";
- case CryptoException.INVALID_INIT:
- return "INVALID_INIT";
- case CryptoException.ILLEGAL_USE:
- return "ILLEGAL_USE";
- case ECTesterApplet.SW_SIG_VERIFY_FAIL:
- return "SIG_VERIFY_FAIL";
- case ECTesterApplet.SW_DH_DHC_MISMATCH:
- return "DH_DHC_MISMATCH";
- case ECTesterApplet.SW_KEYPAIR_NULL:
- return "KEYPAIR_NULL";
- case ECTesterApplet.SW_KA_NULL:
- return "KA_NULL";
- case ECTesterApplet.SW_SIGNATURE_NULL:
- return "SIGNATURE_NULL";
- case ECTesterApplet.SW_OBJECT_NULL:
- return "OBJECT_NULL";
- case ECTesterApplet.SW_Exception:
- return "Exception";
- case ECTesterApplet.SW_ArrayIndexOutOfBoundsException:
- return "ArrayIndexOutOfBoundsException";
- case ECTesterApplet.SW_ArithmeticException:
- return "ArithmeticException";
- case ECTesterApplet.SW_ArrayStoreException:
- return "ArrayStoreException";
- case ECTesterApplet.SW_NullPointerException:
- return "NullPointerException";
- case ECTesterApplet.SW_NegativeArraySizeException:
- return "NegativeArraySizeException";
- default:
- return "unknown";
- }
- }
- }
-
- public static String getSWString(short sw) {
- if (sw == ISO7816.SW_NO_ERROR) {
- return "OK (0x9000)";
- } else {
- String str = getSW(sw);
- return String.format("fail (%s, 0x%04x)", str, sw);
- }
- }
-
- public static String getParams(short params) {
- if (params == 0) {
- return "";
- }
- List<String> ps = new LinkedList<>();
- short paramMask = EC_Consts.PARAMETER_FP;
- while (paramMask <= EC_Consts.PARAMETER_S) {
- short paramValue = (short) (paramMask & params);
- if (paramValue != 0) {
- switch (paramValue) {
- case EC_Consts.PARAMETER_FP:
- ps.add("P");
- break;
- case EC_Consts.PARAMETER_F2M:
- ps.add("2^M");
- break;
- case EC_Consts.PARAMETER_A:
- ps.add("A");
- break;
- case EC_Consts.PARAMETER_B:
- ps.add("B");
- break;
- case EC_Consts.PARAMETER_G:
- ps.add("G");
- break;
- case EC_Consts.PARAMETER_R:
- ps.add("R");
- break;
- case EC_Consts.PARAMETER_K:
- ps.add("K");
- break;
- case EC_Consts.PARAMETER_W:
- ps.add("W");
- break;
- case EC_Consts.PARAMETER_S:
- ps.add("S");
- break;
- }
- }
- paramMask = (short) (paramMask << 1);
- }
-
- if (ps.size() != 0) {
- return "[" + String.join(",", ps) + "]";
- } else {
- return "unknown";
- }
- }
-
- public static String getTransformation(short transformationType) {
- if (transformationType == 0) {
- return "NONE";
- }
- List<String> names = new LinkedList<>();
- short transformationMask = 1;
- while (transformationMask <= EC_Consts.TRANSFORMATION_04_MASK) {
- short transformationValue = (short) (transformationMask & transformationType);
- if (transformationValue != 0) {
- switch (transformationValue) {
- case EC_Consts.TRANSFORMATION_FIXED:
- names.add("FIXED");
- break;
- case EC_Consts.TRANSFORMATION_ONE:
- names.add("ONE");
- break;
- case EC_Consts.TRANSFORMATION_ZERO:
- names.add("ZERO");
- break;
- case EC_Consts.TRANSFORMATION_ONEBYTERANDOM:
- names.add("ONE_BYTE_RANDOM");
- break;
- case EC_Consts.TRANSFORMATION_FULLRANDOM:
- names.add("FULL_RANDOM");
- break;
- case EC_Consts.TRANSFORMATION_INCREMENT:
- names.add("INCREMENT");
- break;
- case EC_Consts.TRANSFORMATION_INFINITY:
- names.add("INFINITY");
- break;
- case EC_Consts.TRANSFORMATION_COMPRESS:
- names.add("COMPRESSED");
- break;
- case EC_Consts.TRANSFORMATION_COMPRESS_HYBRID:
- names.add("HYBRID");
- break;
- case EC_Consts.TRANSFORMATION_04_MASK:
- names.add("MASK(O4)");
- break;
- case EC_Consts.TRANSFORMATION_MAX:
- names.add("MAX");
- break;
- }
- }
- transformationMask = (short) ((transformationMask) << 1);
- }
- if (names.size() != 0) {
- return String.join(" + ", names);
- } else {
- return "unknown";
- }
- }
-
- public static String getKATypeString(byte kaType) {
- switch (kaType) {
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DH:
- return "ALG_EC_SVDP_DH";
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN:
- return "ALG_EC_SVDP_DH_PLAIN";
- case EC_Consts.KeyAgreement_ALG_EC_PACE_GM:
- return "ALG_EC_PACE_GM";
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY:
- return "ALG_EC_SVDP_DH_PLAIN_XY";
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC:
- return "ALG_EC_SVDP_DHC";
- case EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC_PLAIN:
- return "ALG_EC_SVDP_DHC_PLAIN";
- default:
- return "unknown";
- }
- }
-
- public static byte getKAType(String kaTypeString) {
- switch (kaTypeString) {
- case "DH":
- case "ALG_EC_SVDP_DH":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH;
- case "DH_PLAIN":
- case "ALG_EC_SVDP_DH_PLAIN":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN;
- case "PACE_GM":
- case "ALG_EC_PACE_GM":
- return EC_Consts.KeyAgreement_ALG_EC_PACE_GM;
- case "DH_PLAIN_XY":
- case "ALG_EC_SVDP_DH_PLAIN_XY":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY;
- case "DHC":
- case "ALG_EC_SVDP_DHC":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC;
- case "DHC_PLAIN":
- case "ALG_EC_SVDP_DHC_PLAIN":
- return EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC_PLAIN;
- default:
- return 0;
- }
- }
-
- public static byte parseKAType(String kaTypeString) {
- byte kaType;
- try {
- kaType = Byte.parseByte(kaTypeString);
- } catch (NumberFormatException nfex) {
- kaType = getKAType(kaTypeString);
- }
- return kaType;
- }
-
- public static String getSigTypeString(byte sigType) {
- switch (sigType) {
- case EC_Consts.Signature_ALG_ECDSA_SHA:
- return "ALG_ECDSA_SHA";
- case EC_Consts.Signature_ALG_ECDSA_SHA_224:
- return "ALG_ECDSA_SHA_224";
- case EC_Consts.Signature_ALG_ECDSA_SHA_256:
- return "ALG_ECDSA_SHA_256";
- case EC_Consts.Signature_ALG_ECDSA_SHA_384:
- return "ALG_ECDSA_SHA_384";
- case EC_Consts.Signature_ALG_ECDSA_SHA_512:
- return "ALG_ECDSA_SHA_512";
- default:
- return "unknown";
- }
- }
-
- public static byte getSigType(String sigTypeString) {
- switch (sigTypeString) {
- case "ECDSA_SHA":
- case "ALG_ECDSA_SHA":
- return EC_Consts.Signature_ALG_ECDSA_SHA;
- case "ECDSA_SHA_224":
- case "ALG_ECDSA_SHA_224":
- return EC_Consts.Signature_ALG_ECDSA_SHA_224;
- case "ECDSA_SHA_256":
- case "ALG_ECDSA_SHA_256":
- return EC_Consts.Signature_ALG_ECDSA_SHA_256;
- case "ECDSA_SHA_384":
- case "ALG_ECDSA_SHA_384":
- return EC_Consts.Signature_ALG_ECDSA_SHA_384;
- case "ECDSA_SHA_512":
- case "ALG_ECDSA_SHA_512":
- return EC_Consts.Signature_ALG_ECDSA_SHA_512;
- default:
- return 0;
- }
- }
-
- public static byte parseSigType(String sigTypeString) {
- byte sigType;
- try {
- sigType = Byte.parseByte(sigTypeString);
- } catch (NumberFormatException nfex) {
- sigType = getSigType(sigTypeString);
- }
- return sigType;
- }
-
- public static String getKeyTypeString(byte keyClass) {
- switch (keyClass) {
- case KeyPair.ALG_EC_FP:
- return "ALG_EC_FP";
- case KeyPair.ALG_EC_F2M:
- return "ALG_EC_F2M";
- default:
- return "";
- }
- }
-
- public static String getCurveName(byte curve) {
- String result = "";
- switch (curve) {
- case EC_Consts.CURVE_default:
- result = "default";
- break;
- case EC_Consts.CURVE_external:
- result = "external";
- break;
- case EC_Consts.CURVE_secp112r1:
- result = "secp112r1";
- break;
- case EC_Consts.CURVE_secp128r1:
- result = "secp128r1";
- break;
- case EC_Consts.CURVE_secp160r1:
- result = "secp160r1";
- break;
- case EC_Consts.CURVE_secp192r1:
- result = "secp192r1";
- break;
- case EC_Consts.CURVE_secp224r1:
- result = "secp224r1";
- break;
- case EC_Consts.CURVE_secp256r1:
- result = "secp256r1";
- break;
- case EC_Consts.CURVE_secp384r1:
- result = "secp384r1";
- break;
- case EC_Consts.CURVE_secp521r1:
- result = "secp521r1";
- break;
- case EC_Consts.CURVE_sect163r1:
- result = "sect163r1";
- break;
- case EC_Consts.CURVE_sect233r1:
- result = "sect233r1";
- break;
- case EC_Consts.CURVE_sect283r1:
- result = "sect283r1";
- break;
- case EC_Consts.CURVE_sect409r1:
- result = "sect409r1";
- break;
- case EC_Consts.CURVE_sect571r1:
- result = "sect571r1";
- break;
- }
- return result;
- }
-
- public static String getParameterString(short params) {
- String what = "";
- if (params == EC_Consts.PARAMETERS_DOMAIN_F2M || params == EC_Consts.PARAMETERS_DOMAIN_FP) {
- what = "curve";
- } else if (params == EC_Consts.PARAMETER_W) {
- what = "pubkey";
- } else if (params == EC_Consts.PARAMETER_S) {
- what = "privkey";
- } else if (params == EC_Consts.PARAMETERS_KEYPAIR) {
- what = "keypair";
- } else {
- what = getParams(params);
- }
- return what;
- }
-}
diff --git a/src/cz/crcs/ectester/common/util/ECUtil.java b/src/cz/crcs/ectester/common/util/ECUtil.java
deleted file mode 100644
index e8c0a11..0000000
--- a/src/cz/crcs/ectester/common/util/ECUtil.java
+++ /dev/null
@@ -1,485 +0,0 @@
-package cz.crcs.ectester.common.util;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import org.bouncycastle.asn1.*;
-import org.bouncycastle.crypto.digests.SHA1Digest;
-import org.bouncycastle.crypto.signers.PlainDSAEncoding;
-import org.bouncycastle.crypto.signers.StandardDSAEncoding;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.nio.charset.StandardCharsets;
-import java.security.KeyPair;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.ECKey;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.*;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ECUtil {
- private static Random rand = new Random();
-
- public static byte[] toByteArray(BigInteger what, int bits) {
- byte[] raw = what.toByteArray();
- int bytes = (bits + 7) / 8;
- if (raw.length < bytes) {
- byte[] result = new byte[bytes];
- System.arraycopy(raw, 0, result, bytes - raw.length, raw.length);
- return result;
- }
- if (bytes < raw.length) {
- byte[] result = new byte[bytes];
- System.arraycopy(raw, raw.length - bytes, result, 0, bytes);
- return result;
- }
- return raw;
- }
-
- public static byte[] toX962Compressed(byte[][] point) {
- if (point.length != 2) {
- return null;
- }
- byte ybit = (byte) (point[1][point[1].length - 1] % 2);
- return ByteUtil.concatenate(new byte[]{(byte) (0x02 | ybit)}, point[0]);
- }
-
- public static byte[] toX962Compressed(ECPoint point, int bits) {
- if (point.equals(ECPoint.POINT_INFINITY)) {
- return new byte[]{0};
- }
- byte[] x = toByteArray(point.getAffineX(), bits);
- byte marker = (byte) (0x02 | point.getAffineY().mod(BigInteger.valueOf(2)).byteValue());
- return ByteUtil.concatenate(new byte[]{marker}, x);
- }
-
- public static byte[] toX962Compressed(ECPoint point, ECParameterSpec spec) {
- return toX962Compressed(point, spec.getOrder().bitLength());
- }
-
- public static byte[] toX962Uncompressed(ECPoint point, int bits) {
- if (point.equals(ECPoint.POINT_INFINITY)) {
- return new byte[]{0};
- }
- byte[] x = toByteArray(point.getAffineX(), bits);
- byte[] y = toByteArray(point.getAffineY(), bits);
- return ByteUtil.concatenate(new byte[]{0x04}, x, y);
- }
-
- public static byte[] toX962Uncompressed(ECPoint point, ECParameterSpec spec) {
- return toX962Uncompressed(point, spec.getOrder().bitLength());
- }
-
- public static byte[] toX962Hybrid(ECPoint point, int bits) {
- if (point.equals(ECPoint.POINT_INFINITY)) {
- return new byte[]{0};
- }
- byte[] x = toByteArray(point.getAffineX(), bits);
- byte[] y = toByteArray(point.getAffineY(), bits);
- byte marker = (byte) (0x06 | point.getAffineY().mod(BigInteger.valueOf(2)).byteValue());
- return ByteUtil.concatenate(new byte[]{marker}, x, y);
- }
-
- public static byte[] toX962Hybrid(ECPoint point, EllipticCurve curve) {
- return toX962Hybrid(point, curve.getField().getFieldSize());
- }
-
- public static byte[] toX962Hybrid(ECPoint point, ECParameterSpec spec) {
- return toX962Hybrid(point, spec.getCurve());
- }
-
- private static boolean isResidue(BigInteger a, BigInteger p) {
- BigInteger exponent = p.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));
- BigInteger result = a.modPow(exponent, p);
- return result.equals(BigInteger.ONE);
- }
-
- private static BigInteger modSqrt(BigInteger a, BigInteger p) {
- BigInteger q = p.subtract(BigInteger.ONE);
- int s = 0;
- while (q.mod(BigInteger.valueOf(2)).equals(BigInteger.ZERO)) {
- q = q.divide(BigInteger.valueOf(2));
- s++;
- }
-
- BigInteger z = BigInteger.ONE;
- do {
- z = z.add(BigInteger.ONE);
- } while (isResidue(z, p));
-
- BigInteger m = BigInteger.valueOf(s);
- BigInteger c = z.modPow(q, p);
- BigInteger t = a.modPow(q, p);
- BigInteger rExponent = q.add(BigInteger.ONE).divide(BigInteger.valueOf(2));
- BigInteger r = a.modPow(rExponent, p);
-
- while (!t.equals(BigInteger.ONE)) {
- int i = 0;
- BigInteger exponent;
- do {
- exponent = BigInteger.valueOf(2).pow(++i);
- } while (!t.modPow(exponent, p).equals(BigInteger.ONE));
-
- BigInteger twoExponent = m.subtract(BigInteger.valueOf(i + 1));
- BigInteger b = c.modPow(BigInteger.valueOf(2).modPow(twoExponent, p), p);
- m = BigInteger.valueOf(i);
- c = b.modPow(BigInteger.valueOf(2), p);
- t = t.multiply(c).mod(p);
- r = r.multiply(b).mod(p);
- }
- return r;
- }
-
- public static ECPoint fromX962(byte[] data, EllipticCurve curve) {
- if (data == null) {
- return null;
- }
- if (data[0] == 0x04 || data[0] == 0x06 || data[0] == 0x07) {
- int len = (data.length - 1) / 2;
- byte[] xbytes = new byte[len];
- System.arraycopy(data, 1, xbytes, 0, len);
- byte[] ybytes = new byte[len];
- System.arraycopy(data, 1 + len, ybytes, 0, len);
- return new ECPoint(new BigInteger(1, xbytes), new BigInteger(1, ybytes));
- } else if (data[0] == 0x02 || data[0] == 0x03) {
- if (curve == null) {
- throw new IllegalArgumentException();
- }
- byte[] xbytes = new byte[data.length - 1];
- System.arraycopy(data, 1, xbytes, 0, data.length - 1);
- BigInteger x = new BigInteger(1, xbytes);
- BigInteger a = curve.getA();
- BigInteger b = curve.getB();
-
- ECField field = curve.getField();
- if (field instanceof ECFieldFp) {
- BigInteger p = ((ECFieldFp) field).getP();
- BigInteger alpha = x.modPow(BigInteger.valueOf(3), p);
- alpha = alpha.add(x.multiply(a));
- alpha = alpha.add(b);
-
- if (!isResidue(alpha, p)) {
- throw new IllegalArgumentException();
- }
-
- BigInteger beta = modSqrt(alpha, p);
- if (beta.getLowestSetBit() == 0) {
- // rightmost bit is one
- if (data[0] == 0x02) {
- // yp is 0
- beta = p.subtract(beta);
- }
- } else {
- // rightmost bit is zero
- if (data[0] == 0x03) {
- // yp is 1
- beta = p.subtract(beta);
- }
- }
-
- return new ECPoint(x, beta);
- } else if (field instanceof ECFieldF2m) {
- //TODO
- throw new UnsupportedOperationException();
- }
- return null;
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- private static byte[] hashCurve(EC_Curve curve) {
- int bytes = (curve.getBits() + 7) / 8;
- byte[] result = new byte[bytes];
- SHA1Digest digest = new SHA1Digest();
- byte[] curveName = curve.getId().getBytes(StandardCharsets.US_ASCII);
- digest.update(curveName, 0, curveName.length);
- int written = 0;
- while (written < bytes) {
- byte[] dig = new byte[digest.getDigestSize()];
- digest.doFinal(dig, 0);
- int toWrite = Math.min(digest.getDigestSize(), bytes - written);
- System.arraycopy(dig, 0, result, written, toWrite);
- written += toWrite;
- digest.update(dig, 0, dig.length);
- }
- return result;
- }
-
- public static EC_Params fullRandomKey(EC_Curve curve) {
- int bytes = (curve.getBits() + 7) / 8;
- byte[] result = new byte[bytes];
- rand.nextBytes(result);
- BigInteger priv = new BigInteger(1, result);
- BigInteger order = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_R)[0]);
- priv = priv.mod(order);
- return new EC_Params(EC_Consts.PARAMETER_S, new byte[][]{toByteArray(priv, curve.getBits())});
- }
-
- public static EC_Params fixedRandomKey(EC_Curve curve) {
- byte[] hash = hashCurve(curve);
- BigInteger priv = new BigInteger(1, hash);
- BigInteger order = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_R)[0]);
- priv = priv.mod(order);
- return new EC_Params(EC_Consts.PARAMETER_S, new byte[][]{toByteArray(priv, curve.getBits())});
- }
-
- private static BigInteger computeRHS(BigInteger x, BigInteger a, BigInteger b, BigInteger p) {
- BigInteger rhs = x.modPow(BigInteger.valueOf(3), p);
- rhs = rhs.add(a.multiply(x)).mod(p);
- rhs = rhs.add(b).mod(p);
- return rhs;
- }
-
- public static EC_Params fullRandomPoint(EC_Curve curve) {
- EllipticCurve ecCurve = curve.toCurve();
-
- BigInteger p;
- if (ecCurve.getField() instanceof ECFieldFp) {
- ECFieldFp fp = (ECFieldFp) ecCurve.getField();
- p = fp.getP();
- if (!p.isProbablePrime(20)) {
- return null;
- }
- } else {
- //TODO
- return null;
- }
- BigInteger x;
- BigInteger rhs;
- do {
- x = new BigInteger(ecCurve.getField().getFieldSize(), rand).mod(p);
- rhs = computeRHS(x, ecCurve.getA(), ecCurve.getB(), p);
- } while (!isResidue(rhs, p));
- BigInteger y = modSqrt(rhs, p);
- if (rand.nextBoolean()) {
- y = p.subtract(y);
- }
-
- byte[] xArr = toByteArray(x, ecCurve.getField().getFieldSize());
- byte[] yArr = toByteArray(y, ecCurve.getField().getFieldSize());
- return new EC_Params(EC_Consts.PARAMETER_W, new byte[][]{xArr, yArr});
- }
-
- public static EC_Params fixedRandomPoint(EC_Curve curve) {
- EllipticCurve ecCurve = curve.toCurve();
-
- BigInteger p;
- if (ecCurve.getField() instanceof ECFieldFp) {
- ECFieldFp fp = (ECFieldFp) ecCurve.getField();
- p = fp.getP();
- if (!p.isProbablePrime(20)) {
- return null;
- }
- } else {
- //TODO
- return null;
- }
-
- BigInteger x = new BigInteger(1, hashCurve(curve)).mod(p);
- BigInteger rhs = computeRHS(x, ecCurve.getA(), ecCurve.getB(), p);
- while (!isResidue(rhs, p)) {
- x = x.add(BigInteger.ONE).mod(p);
- rhs = computeRHS(x, ecCurve.getA(), ecCurve.getB(), p);
- }
- BigInteger y = modSqrt(rhs, p);
- if (y.bitCount() % 2 == 0) {
- y = p.subtract(y);
- }
-
- byte[] xArr = toByteArray(x, ecCurve.getField().getFieldSize());
- byte[] yArr = toByteArray(y, ecCurve.getField().getFieldSize());
- return new EC_Params(EC_Consts.PARAMETER_W, new byte[][]{xArr, yArr});
- }
-
- public static ECPoint toPoint(EC_Params params) {
- return new ECPoint(
- new BigInteger(1, params.getParam(EC_Consts.PARAMETER_W)[0]),
- new BigInteger(1, params.getParam(EC_Consts.PARAMETER_W)[1]));
- }
-
- public static BigInteger toScalar(EC_Params params) {
- return new BigInteger(1, params.getParam(EC_Consts.PARAMETER_S)[0]);
- }
-
- public static ECPublicKey toPublicKey(EC_Key.Public pubkey) {
- if (pubkey == null) {
- return null;
- }
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, pubkey.getCurve());
- if (curve == null) {
- throw new IllegalArgumentException("pubkey curve not found: " + pubkey.getCurve());
- }
- return new RawECPublicKey(toPoint(pubkey), curve.toSpec());
- }
-
- public static ECPrivateKey toPrivateKey(EC_Key.Private privkey) {
- if (privkey == null) {
- return null;
- }
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, privkey.getCurve());
- if (curve == null) {
- throw new IllegalArgumentException("privkey curve not found: " + privkey.getCurve());
- }
- return new RawECPrivateKey(toScalar(privkey), curve.toSpec());
- }
-
- public static KeyPair toKeyPair(EC_Keypair kp) {
- if (kp == null) {
- return null;
- }
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, kp.getCurve());
- if (curve == null) {
- throw new IllegalArgumentException("keypair curve not found: " + kp.getCurve());
- }
- ECPublicKey pubkey = new RawECPublicKey(toPoint(kp), curve.toSpec());
- ECPrivateKey privkey = new RawECPrivateKey(toScalar(kp), curve.toSpec());
- return new KeyPair(pubkey, privkey);
- }
-
- public static BigInteger recoverSignatureNonce(byte[] signature, byte[] data, BigInteger privkey, ECParameterSpec params, String hashAlgo, String sigType) {
- SignatureIdent sigIdent = SignatureIdent.get(hashAlgo + "with" + sigType);
- if (sigIdent == null) {
- return null;
- }
- return recoverSignatureNonce(signature, data, privkey, params, sigIdent);
- }
-
- public static BigInteger recoverSignatureNonce(byte[] signature, byte[] data, BigInteger privkey, ECParameterSpec params, SignatureIdent sigIdent) {
- // Parse the types out of SignatureIdent.
- String hashAlgo = sigIdent.getHashAlgo();
- String sigType = sigIdent.getSigType();
- if (sigType == null) {
- sigType = sigIdent.toString();
- }
- // We do not know how to reconstruct those nonces so far.
- // sigType.contains("ECKCDSA") || sigType.contains("ECNR") || sigType.contains("SM2")
- if (!sigType.contains("ECDSA")) {
- return null;
- }
- try {
- int bitSize = params.getOrder().bitLength();
- // Hash the data.
- byte[] hash;
- if (hashAlgo == null || hashAlgo.equals("NONE")) {
- hash = data;
- } else {
- MessageDigest md = MessageDigest.getInstance(hashAlgo);
- hash = md.digest(data);
- }
- // Trim bitSize of rightmost bits.
- BigInteger hashInt = new BigInteger(1, hash);
- int hashBits = hashInt.bitLength();
- if (hashBits > bitSize) {
- hashInt = hashInt.shiftRight(hashBits - bitSize);
- }
-
- // Parse signature
- BigInteger[] sigPair;
- if (sigType.contains("CVC") || sigType.contains("PLAIN")) {
- sigPair = PlainDSAEncoding.INSTANCE.decode(params.getOrder(), signature);
- } else {
- sigPair = StandardDSAEncoding.INSTANCE.decode(params.getOrder(), signature);
- }
- BigInteger r = sigPair[0];
- BigInteger s = sigPair[1];
-
- BigInteger rd = privkey.multiply(r).mod(params.getOrder());
- BigInteger hrd = hashInt.add(rd).mod(params.getOrder());
- return s.modInverse(params.getOrder()).multiply(hrd).mod(params.getOrder());
- } catch (NoSuchAlgorithmException | IOException | ArithmeticException ex) {
- ex.printStackTrace();
- return null;
- }
- }
-
- public static EC_Params joinParams(EC_Params... params) {
- List<EC_Params> paramList = new LinkedList<>();
- short paramMask = 0;
- int len = 0;
- for (EC_Params param : params) {
- if (param == null) {
- continue;
- }
- int i = 0;
- for (; i + 1 < paramList.size(); ++i) {
- if (paramList.get(i + 1).getParams() == param.getParams()) {
- throw new IllegalArgumentException();
- }
- if (paramList.get(i + 1).getParams() < param.getParams()) {
- break;
- }
- }
- paramList.add(i, param);
- paramMask |= param.getParams();
- len += param.numParams();
- }
-
- byte[][] res = new byte[len][];
- int i = 0;
- for (EC_Params param : params) {
- for (byte[] data : param.getData()) {
- res[i++] = data.clone();
- }
- }
- return new EC_Params(paramMask, res);
- }
-
- public static EC_Params loadParams(short params, String named, String file) throws IOException {
- EC_Params result = null;
- if (file != null) {
- result = new EC_Params(params);
-
- FileInputStream in = new FileInputStream(file);
- result.readCSV(in);
- in.close();
- } else if (named != null) {
- if (params == EC_Consts.PARAMETER_W) {
- result = EC_Store.getInstance().getObject(EC_Key.Public.class, named);
- } else if (params == EC_Consts.PARAMETER_S) {
- result = EC_Store.getInstance().getObject(EC_Key.Private.class, named);
- }
-
- if (result == null) {
- result = EC_Store.getInstance().getObject(EC_Keypair.class, named);
- }
- }
- return result;
- }
-
- public static ECKey loadKey(short params, String named, String file, AlgorithmParameterSpec spec) throws IOException {
- if (params == EC_Consts.PARAMETERS_KEYPAIR) {
- throw new IllegalArgumentException();
- }
- EC_Params param = loadParams(params, named, file);
- if (param != null) {
- if (params == EC_Consts.PARAMETER_W) {
- return new RawECPublicKey(toPoint(param), (ECParameterSpec) spec);
- } else if (params == EC_Consts.PARAMETER_S) {
- return new RawECPrivateKey(toScalar(param), (ECParameterSpec) spec);
- }
- }
- 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());
- }
-}
diff --git a/src/cz/crcs/ectester/common/util/FileUtil.java b/src/cz/crcs/ectester/common/util/FileUtil.java
deleted file mode 100644
index e6e319b..0000000
--- a/src/cz/crcs/ectester/common/util/FileUtil.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package cz.crcs.ectester.common.util;
-
-import cz.crcs.ectester.common.output.TeeOutputStream;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class FileUtil {
- private static Path appData = null;
- public static String LIB_RESOURCE_DIR = "/cz/crcs/ectester/standalone/libs/jni/";
-
- public static OutputStream openStream(String[] files) throws FileNotFoundException {
- if (files == null) {
- return null;
- }
- List<OutputStream> outs = new LinkedList<>();
- for (String fileOut : files) {
- outs.add(new FileOutputStream(fileOut));
- }
- return new TeeOutputStream(outs.toArray(new OutputStream[0]));
- }
-
- public static OutputStreamWriter openFiles(String[] files) throws FileNotFoundException {
- if (files == null) {
- return null;
- }
- return new OutputStreamWriter(openStream(files));
- }
-
- public static Path getAppData() {
- if (appData != null) {
- return appData;
- }
-
- if (System.getProperty("os.name").startsWith("Windows")) {
- appData = Paths.get(System.getenv("AppData"));
- } else {
- if (System.getProperty("os.name").startsWith("Linux")) {
- String dataHome = System.getenv("XDG_DATA_HOME");
- if (dataHome != null) {
- appData = Paths.get(dataHome);
- } else {
- appData = Paths.get(System.getProperty("user.home"), ".local", "share");
- }
- } else {
- appData = Paths.get(System.getProperty("user.home"), ".local", "share");
- }
- }
- return appData;
- }
-
- public static boolean isNewer(URLConnection jarConn, Path realPath) throws IOException {
- if (realPath.toFile().isFile()) {
- long jarModified = jarConn.getLastModified();
- long realModified = Files.getLastModifiedTime(realPath).toMillis();
- return jarModified > realModified;
- }
- return true;
- }
-
- public static boolean writeNewer(String resourcePath, Path outPath) throws IOException {
- URL reqURL = FileUtil.class.getResource(resourcePath);
- if (reqURL == null) {
- return false;
- }
- URLConnection reqConn = reqURL.openConnection();
- if (isNewer(reqConn, outPath)) {
- Files.copy(reqConn.getInputStream(), outPath, StandardCopyOption.REPLACE_EXISTING);
- }
- reqConn.getInputStream().close();
- return true;
- }
-
- public static Path getLibDir() {
- return getAppData().resolve("ECTesterStandalone");
- }
-
- public static Path getRequirementsDir() {
- return getLibDir().resolve("lib");
- }
-
- public static String getLibSuffix() {
- if (System.getProperty("os.name").startsWith("Windows")) {
- return "dll";
- } else {
- return "so";
- }
- }
-}
diff --git a/src/cz/crcs/ectester/common/util/Util.java b/src/cz/crcs/ectester/common/util/Util.java
deleted file mode 100644
index 5b0cd79..0000000
--- a/src/cz/crcs/ectester/common/util/Util.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cz.crcs.ectester.common.util;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class Util {
- public static long convertTime(long nanos, String timeUnit) {
- switch (timeUnit) {
- default:
- case "nano":
- return nanos;
- case "micro":
- return nanos / 1000;
- case "milli":
- return nanos / 1000000;
- }
- }
-
- public static int getVersion() {
- String version = System.getProperty("java.version");
- if(version.startsWith("1.")) {
- version = version.substring(2, 3);
- } else {
- int dot = version.indexOf(".");
- if(dot != -1) { version = version.substring(0, dot); }
- } return Integer.parseInt(version);
- }
-}
diff --git a/src/cz/crcs/ectester/data/EC_Store.java b/src/cz/crcs/ectester/data/EC_Store.java
deleted file mode 100644
index bcadf80..0000000
--- a/src/cz/crcs/ectester/data/EC_Store.java
+++ /dev/null
@@ -1,405 +0,0 @@
-package cz.crcs.ectester.data;
-
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.common.util.Util;
-import javacard.security.KeyPair;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.ext.EntityResolver2;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import java.util.function.Function;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class EC_Store {
- private DocumentBuilder db;
- private Map<String, EC_Category> categories;
- private static EC_Store instance;
-
- private EC_Store() {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-
- try {
- SchemaFactory scf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Schema sch = scf.newSchema(this.getClass().getResource("/cz/crcs/ectester/data/schema.xsd"));
- dbf.setSchema(sch);
- dbf.setNamespaceAware(true);
- dbf.setIgnoringComments(true);
- dbf.setXIncludeAware(true);
- dbf.setIgnoringElementContentWhitespace(true);
- db = dbf.newDocumentBuilder();
- db.setErrorHandler(new ErrorHandler() {
- @Override
- public void warning(SAXParseException exception) throws SAXException {
- System.err.println("EC_Store | Warning : " + exception);
- }
-
- @Override
- public void error(SAXParseException exception) throws SAXException {
- System.err.println("EC_Store | Error : " + exception);
- }
-
- @Override
- public void fatalError(SAXParseException exception) throws SAXException {
- System.err.println("EC_Store | Fatal : " + exception);
- throw new SAXException(exception);
- }
- });
- db.setEntityResolver(new EntityResolver2() {
- @Override
- public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException {
- return null;
- }
-
- @Override
- public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException {
- InputSource is = new InputSource();
- is.setSystemId(systemId);
-
- InputStream bs;
- // TODO: Figure out if this is correct for the older Java versions or also wrong.
- if (Util.getVersion() <= 8) {
- bs = getClass().getClass().getResourceAsStream("/cz/crcs/ectester/data/" + systemId);
- } else {
- bs = getClass().getResourceAsStream("/cz/crcs/ectester/data/" + systemId);
- }
- is.setByteStream(bs);
- return is;
- }
-
- @Override
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- return null;
- }
- });
-
- parse();
- } catch (ParserConfigurationException | SAXException | IOException e) {
- e.printStackTrace();
- }
- }
-
- private void parse() throws SAXException, ParserConfigurationException, IOException {
-
- InputStream categories = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/categories.xml");
- if (categories == null) {
- throw new IOException();
- }
- Document categoriesDoc = db.parse(categories);
- categories.close();
- categoriesDoc.normalize();
-
- NodeList catList = categoriesDoc.getElementsByTagName("category");
-
- this.categories = new TreeMap<>();
- for (int i = 0; i < catList.getLength(); ++i) {
- Node catNode = catList.item(i);
- if (catNode instanceof Element) {
- Element catElem = (Element) catNode;
- Node name = catElem.getElementsByTagName("name").item(0);
- Node dir = catElem.getElementsByTagName("directory").item(0);
- Node desc = catElem.getElementsByTagName("desc").item(0);
-
- EC_Category category = parseCategory(name.getTextContent(), dir.getTextContent(), desc.getTextContent());
- this.categories.put(name.getTextContent(), category);
- } else {
- throw new SAXException("?");
- }
- }
- }
-
- private EC_Category parseCategory(String name, String dir, String desc) throws ParserConfigurationException, IOException, SAXException {
-
- Map<String, EC_Data> objMap = new TreeMap<>();
-
- InputStream curves = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/curves.xml");
- if (curves != null) {
- Document curvesDoc = db.parse(curves);
- curvesDoc.normalize();
-
- NodeList curveList = curvesDoc.getElementsByTagName("curve");
-
- for (int i = 0; i < curveList.getLength(); ++i) {
- Node curveNode = curveList.item(i);
- if (curveNode instanceof Element) {
- Element curveElem = (Element) curveNode;
- Node id = curveElem.getElementsByTagName("id").item(0);
- Node bits = curveElem.getElementsByTagName("bits").item(0);
- Node field = curveElem.getElementsByTagName("field").item(0);
-
- NodeList descc = curveElem.getElementsByTagName("desc");
- String descs = null;
- if (descc.getLength() != 0) {
- descs = descc.item(0).getTextContent();
- }
-
- byte alg;
- if (field.getTextContent().equalsIgnoreCase("prime")) {
- alg = KeyPair.ALG_EC_FP;
- } else {
- alg = KeyPair.ALG_EC_F2M;
- }
- short bitsize = Short.parseShort(bits.getTextContent());
-
- EC_Curve curve = new EC_Curve(id.getTextContent(), bitsize, alg, descs);
-
- InputStream csv = parseDataElement(dir, curveElem);
- if (!curve.readCSV(csv)) {
- throw new IOException("Invalid csv data." + id.getTextContent());
- }
- csv.close();
-
- objMap.put(id.getTextContent(), curve);
- } else {
- throw new SAXException("?");
- }
- }
- curves.close();
- }
-
- InputStream keys = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/keys.xml");
- if (keys != null) {
- Document keysDoc = db.parse(keys);
- keysDoc.normalize();
-
- NodeList directs = keysDoc.getDocumentElement().getChildNodes();
- for (int i = 0; i < directs.getLength(); ++i) {
- Node direct = directs.item(i);
- if (direct instanceof Element) {
- Element elem = (Element) direct;
-
- NodeList ids = elem.getElementsByTagName("id");
- if (ids.getLength() != 1) {
- throw new SAXException("key no id?");
- }
- String id = ids.item(0).getTextContent();
-
- EC_Params result = parseKeylike(dir, elem);
-
- objMap.put(id, result);
- } else {
- throw new SAXException("?");
- }
- }
- keys.close();
- }
-
- InputStream results = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/results.xml");
- if (results != null) {
- Document resultsDoc = db.parse(results);
- resultsDoc.normalize();
-
- NodeList directs = resultsDoc.getDocumentElement().getChildNodes();
- for (int i = 0; i < directs.getLength(); ++i) {
- Node direct = directs.item(i);
- if (direct instanceof Element) {
- Element elem = (Element) direct;
-
- NodeList ids = elem.getElementsByTagName("id");
- if (ids.getLength() != 1) {
- throw new SAXException("result no id?");
- }
- String id = ids.item(0).getTextContent();
-
- EC_Data result = parseResultlike(dir, elem);
-
- objMap.put(id, result);
- } else {
- throw new SAXException("?");
- }
- }
- results.close();
- }
-
- return new EC_Category(name, dir, desc, objMap);
- }
-
- private EC_Data parseResultlike(String dir, Element elem) throws SAXException, IOException {
- String tag = elem.getTagName();
- Node id = elem.getElementsByTagName("id").item(0);
-
- NodeList descc = elem.getElementsByTagName("desc");
- String descs = null;
- if (descc.getLength() != 0) {
- descs = descc.item(0).getTextContent();
- }
-
- Node curve = elem.getElementsByTagName("curve").item(0);
-
- EC_Data result;
- if (tag.equals("kaResult")) {
- Node ka = elem.getElementsByTagName("ka").item(0);
- Node onekey = elem.getElementsByTagName("onekey").item(0);
- Node otherkey = elem.getElementsByTagName("otherkey").item(0);
-
- result = new EC_KAResult(id.getTextContent(), ka.getTextContent(), curve.getTextContent(), onekey.getTextContent(), otherkey.getTextContent(), descs);
- } else if (tag.equals("sigResult")) {
- Node sig = elem.getElementsByTagName("sig").item(0);
- Node signkey = elem.getElementsByTagName("signkey").item(0);
- Node verifykey = elem.getElementsByTagName("verifykey").item(0);
- NodeList datas = elem.getElementsByTagName("raw");
- String data = null;
- if (datas.getLength() != 0) {
- data = datas.item(0).getTextContent();
- }
-
- result = new EC_SigResult(id.getTextContent(), sig.getTextContent(), curve.getTextContent(), signkey.getTextContent(), verifykey.getTextContent(), data, descs);
- } else {
- throw new SAXException("?");
- }
-
- InputStream csv = parseDataElement(dir, elem);
- if (!result.readCSV(csv)) {
- throw new IOException("Invalid csv data. " + id.getTextContent());
- }
- csv.close();
-
- return result;
- }
-
- private EC_Params parseKeylike(String dir, Element elem) throws SAXException, IOException {
- Node id = elem.getElementsByTagName("id").item(0);
- Node curve = elem.getElementsByTagName("curve").item(0);
-
- NodeList desc = elem.getElementsByTagName("desc");
- String descs = null;
- if (desc.getLength() != 0) {
- descs = desc.item(0).getTextContent();
- }
-
- EC_Params result;
- if (elem.getTagName().equals("pubkey")) {
- result = new EC_Key.Public(id.getTextContent(), curve.getTextContent(), descs);
- } else if (elem.getTagName().equals("privkey")) {
- result = new EC_Key.Private(id.getTextContent(), curve.getTextContent(), descs);
- } else if (elem.getTagName().equals("keypair")) {
- result = new EC_Keypair(id.getTextContent(), curve.getTextContent(), descs);
- } else {
- throw new SAXException("?");
- }
-
- InputStream csv = parseDataElement(dir, elem);
- if (!result.readCSV(csv)) {
- throw new IOException("Invalid CSV data. " + id.getTextContent());
- }
- csv.close();
-
- return result;
- }
-
- private InputStream parseDataElement(String dir, Element elem) throws SAXException {
- NodeList file = elem.getElementsByTagName("file");
- NodeList inline = elem.getElementsByTagName("inline");
-
- InputStream csv;
- if (file.getLength() == 1) {
- csv = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/" + file.item(0).getTextContent());
- } else if (inline.getLength() == 1) {
- csv = new ByteArrayInputStream(inline.item(0).getTextContent().getBytes());
- } else {
- throw new SAXException("?");
- }
- return csv;
- }
-
- public Map<String, EC_Category> getCategories() {
- return Collections.unmodifiableMap(categories);
- }
-
- public EC_Category getCategory(String category) {
- return categories.get(category);
- }
-
- public Map<String, EC_Data> getObjects(String category) {
- EC_Category cat = categories.get(category);
- if (cat != null) {
- return cat.getObjects();
- }
- return null;
- }
-
- public <T extends EC_Data> Map<String, T> getObjects(Class<T> objClass, String category) {
- EC_Category cat = categories.get(category);
- if (cat != null) {
- return cat.getObjects(objClass);
- }
- return null;
- }
-
- public <T extends EC_Data> T getObject(Class<T> objClass, String category, String id) {
- EC_Category cat = categories.get(category);
- if (cat != null) {
- return cat.getObject(objClass, id);
- }
- return null;
- }
-
- public <T extends EC_Data> T getObject(Class<T> objClass, String query) {
- int split = query.indexOf("/");
- if (split < 0) {
- return null;
- }
- return getObject(objClass, query.substring(0, split), query.substring(split + 1));
- }
-
- private static <T extends EC_Data> Map<EC_Curve, List<T>> mapKeyToCurve(Collection<T> data, Function<T, String> getter) {
- Map<EC_Curve, List<T>> curves = new TreeMap<>();
- for (T item : data) {
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, getter.apply(item));
- List<T> curveKeys = curves.getOrDefault(curve, new LinkedList<>());
- curveKeys.add(item);
- curves.putIfAbsent(curve, curveKeys);
- }
- for (List<T> keyList : curves.values()) {
- Collections.sort(keyList);
- }
- return curves;
- }
-
- public static <T extends EC_Key> Map<EC_Curve, List<T>> mapKeyToCurve(Collection<T> keys) {
- return mapKeyToCurve(keys, EC_Key::getCurve);
- }
-
- public static Map<EC_Curve, List<EC_KAResult>> mapResultToCurve(Collection<EC_KAResult> results) {
- return mapKeyToCurve(results, EC_KAResult::getCurve);
- }
-
- public static <T extends EC_Data> Map<String, List<T>> mapToPrefix(Collection<T> data) {
- Map<String, List<T>> groups = new TreeMap<>();
- for (T item : data) {
- String prefix = item.getId().split("/")[0];
- List<T> group = groups.getOrDefault(prefix, new LinkedList<>());
- group.add(item);
- groups.putIfAbsent(prefix, group);
- }
- for (List<T> itemList : groups.values()) {
- Collections.sort(itemList);
- }
- return groups;
- }
-
- public static EC_Store getInstance() {
- if (instance == null) {
- instance = new EC_Store();
- }
- return instance;
- }
-
-}
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous112.csv b/src/cz/crcs/ectester/data/anomalous/anomalous112.csv
deleted file mode 100644
index 6711b71..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous112.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa2d803b165bdb58f5282cd95ae0f,0x5de65e36c0ec85d5908cdce4c978,0x71801c406b1541de2f9e96b0dc55,0x8073044c904d588dde72e51009c8,0x9dda8938ea7144df116677ae5d93,0xa2d803b165bdb58f5282cd95ae0f,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous128.csv b/src/cz/crcs/ectester/data/anomalous/anomalous128.csv
deleted file mode 100644
index 2dcf172..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe617383c9d207ab3a6ea5e83ab21b241,0x6ff1fa365aafec734e23d52b50edd6ba,0x1813525c76d5183ce9053236ab4d5699,0x27b56a1b55ed41fd2d25b8e7680c65fb,0xcd4b59a0a7814bf14ea6deb5d40d5c9,0xe617383c9d207ab3a6ea5e83ab21b241,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous160.csv b/src/cz/crcs/ectester/data/anomalous/anomalous160.csv
deleted file mode 100644
index bc50f6d..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous160.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc1980258d215dfa641705a68dec6398f69cfb7dd,0x539387a1d2901a0d0aa82e18d31e6b6e45c725c2,0x908c9541398e59bcb0679dcfc1d5e3165a4228e6,0x781ad9264fab66e82a9661efe5cfb7ae963ee2bb,0x8dc2f7237e152c3287658738986d1cce2397e8a6,0xc1980258d215dfa641705a68dec6398f69cfb7dd,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous192.csv b/src/cz/crcs/ectester/data/anomalous/anomalous192.csv
deleted file mode 100644
index 35a5c07..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x856728e701179222ea33faa5c3634dc2220f7f8a9a6f1215,0x35db21b91c3044ca550379891307606e9d6b81928a9f09eb,0x80839b7e6774fa9964008017048de3cbaa966a501cb1a5f1,0x78a3df2e57554cd64ac3723d0329c9582a80aac3316ea732,0x7150cc7660022e4b9f4460bc5afbbfa9a11eeb7a40ae5ae6,0x856728e701179222ea33faa5c3634dc2220f7f8a9a6f1215,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous224.csv b/src/cz/crcs/ectester/data/anomalous/anomalous224.csv
deleted file mode 100644
index bf24496..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xed0377332aa665c2d0eaf466a536ddd7d478e66f573eeb8b0973b7a3,0x7fe9c52bb4892ac826d50355f24b6bfb0f4165d2f1dd550e231fa5fb,0xa0b20244694978a19e1910718b57b990542b5fb95c33be692f80e276,0x8225e0f325d74d4b4a729749ef24a0a3edd9c53c7e0bc3cb2cc87466,0x6dfacd713b83267a78a9c2bb0596cc12ddbe0bdfe4008daa277a95b3,0xed0377332aa665c2d0eaf466a536ddd7d478e66f573eeb8b0973b7a3,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous256.csv b/src/cz/crcs/ectester/data/anomalous/anomalous256.csv
deleted file mode 100644
index 24d7454..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8a17b15dd963f53ed8253cb6dd2644819db58d1b1a70a8cf14a6f7ad5c61b7a9,0x7a6c106d27dea9b6c826b5aa585f3ed2dd17b23c8287f0a8de0364baba01b7d7,0x2d42716d40e73c4fe01de111ad155a84350613d8580379b764d207a87242a884,0x3489a3d1ba3181626a6f52badafe4ed68c07efa6ebcff001d78e5c770c3189ba,0x883a994b4dfea1a1fc2b7bffa46a3336e64d5e19bc81e5991bc2a821a2aaf9b1,0x8a17b15dd963f53ed8253cb6dd2644819db58d1b1a70a8cf14a6f7ad5c61b7a9,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous320.csv b/src/cz/crcs/ectester/data/anomalous/anomalous320.csv
deleted file mode 100644
index 96e98e5..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous320.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xac418bcddf4be30b913032dab704fe4b24cf2fec47b36a0463ab5f7e1ab9985e38f4551408f82439,0x9e7dba38d327f78e918193af78700ebab0deecfbd884995dbbbed047ecab7c55c7d3d5fbb6fafd38,0x5eb3a1f211d52c0eb92e47bd151e05d471da8eb18a1ebe0cd4d6e99c50237c56230f69d517188e0b,0x88fb80cc5aa7dc8dfdd8f275d1c5ef9fe0680e3d5cabd08ac22407e3935ac0a15ecfe6690ee37783,0x44810f747b41aedc20a2d022d35a29391522c3843cb36bf73840b56ccca93626a336ab81f613010,0xac418bcddf4be30b913032dab704fe4b24cf2fec47b36a0463ab5f7e1ab9985e38f4551408f82439,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous384.csv b/src/cz/crcs/ectester/data/anomalous/anomalous384.csv
deleted file mode 100644
index 6034b4a..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous384.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfddbf8939f25d39bb926c45a1d3eb5b45ef9af276821fbefbee51174464cdd8b90181d7a111275cf394dd6015589d827,0x7c80b4961ae672c74b5db842293ad567bed30efd6f693143f9bb3d3e1e7587e5b379c36188d3e19c8336a3025f66deb7,0x7aa96bf076ddf659bdcf4c0f2eea1ed80017ead209cc21931e6156171dd8b423edeeab77cc01b30c979993756d398ebd,0xfcf723a7b33621ab6af8e42cf3e5dc7b3143f1df037e82708acfad0fc953f797f31d38e2c651781f5f70aeb0b8abd165,0x259d66287d38573dcc4fa3260e1c0fe6d93c1ed739f91deae1a89d14109f027dd972cba62406f7fca1d0082634f08b2c,0xfddbf8939f25d39bb926c45a1d3eb5b45ef9af276821fbefbee51174464cdd8b90181d7a111275cf394dd6015589d827,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous512.csv b/src/cz/crcs/ectester/data/anomalous/anomalous512.csv
deleted file mode 100644
index ed7ee5b..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous512.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x83503ecb98832514b71d0e9fcfea296a3a8ad4f58661c1d997823213343b1ffb7533cb0d589485fd45527d7af1f3896ee0efc67d008b24d5e6fae51edca998f1,0x3ee9f2b4493b7572e5becbe781655ef6a462d20051cc526d5ae89b45a145eb2b31006ac9cc62fd549d370eccd1cbb4945afada0a258cf6c0505814cbbdf4c1dd,0x7fb55135325e108e20914f6558af59dbe328a04629c576efc86184fdb48402a2968f2eb2d9fa6bc6e19f0ca41fb99984f1278197b3c901c20d9f3fa0a5242952,0x52cd825e32cbc4da7f927b5f7a36f15c4d7b42cb03d426654f8f3526711336f1d18dbe4c8ca8843539d3f416de4039c9fe030d30cba1b292fec155dedf8e5c5b,0x39258758239cde1ff6cf41d2b219585ed533c4a042c7714c2d14247e853668839979e60f82255c0657356912a4113e148efbaec32ecb2b4f489f637d88b868da,0x83503ecb98832514b71d0e9fcfea296a3a8ad4f58661c1d997823213343b1ffb7533cb0d589485fd45527d7af1f3896ee0efc67d008b24d5e6fae51edca998f1,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/anomalous521.csv b/src/cz/crcs/ectester/data/anomalous/anomalous521.csv
deleted file mode 100644
index e0d935e..0000000
--- a/src/cz/crcs/ectester/data/anomalous/anomalous521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x1dcf4a3c1f9ac39550c7eb7bfb1dd6c345658a277d888d9b23273aac2914cde52ee7e8f424767d62fd266d46491d805564f32919b265d784941d61eefa43da0501f,0x14fb5e18b58eaa6e879edb5542e5c1e1140a0cb1df41c49b5d4be6b7abdaf2afd7a22b8bc95711dd9196968677a1edf9a99e60db654ad62755904ee34b592db2838,0x1c543ff6f595aaf4651f0315c95b1f433b9aa3b5be69f300d4a7f4441bb3331781fbc9527b62fe60d4eb7aaedb2cd50ea4a8ad70ab2935bf8e129cf6ffc30ec027c,0x11fd1c6612169a69250632396ec192b97490c6af601f2d0b2ffad81a2a8772c8f8c0ac6cf273335aed6852fda2a3fb0b32a366ad19662513751412d9d2e168c144d,0x11c894ae2c3647cae6ca89b7c090bf19a52781bddbebb2a21b4123cf16445f7bca20aa1fac5a0228c37e8b89c974c5a659810d29afa96f48cdca6ba77baa88fbac,0x1dcf4a3c1f9ac39550c7eb7bfb1dd6c345658a277d888d9b23273aac2914cde52ee7e8f424767d62fd266d46491d805564f32919b265d784941d61eefa43da0501f,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anomalous/curves.xml b/src/cz/crcs/ectester/data/anomalous/curves.xml
deleted file mode 100644
index 5486f35..0000000
--- a/src/cz/crcs/ectester/data/anomalous/curves.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>miyaji128a1</id>
- <bits>128</bits>
- <field>prime</field>
- <file>miyaji128a1.csv</file>
- <desc>First curve in the "Proposed scheme A" section of Atsuko Miyaji's paper.</desc>
- </curve>
- <curve>
- <id>miyaji128a2</id>
- <bits>128</bits>
- <field>prime</field>
- <file>miyaji128a2.csv</file>
- <desc>Second curve in the "Proposed scheme A" section of Atsuko Miyaji's paper.</desc>
- </curve>
- <curve>
- <id>miyaji128b1</id>
- <bits>128</bits>
- <field>prime</field>
- <file>miyaji128b1.csv</file>
- <desc>First curve in the "Proposed scheme B" section of Atsuko Miyaji's paper.</desc>
- </curve>
- <curve>
- <id>miyaji128b2</id>
- <bits>128</bits>
- <field>prime</field>
- <file>miyaji128b2.csv</file>
- <desc>Second curve in the "Proposed scheme B" section of Atsuko Miyaji's paper.</desc>
- </curve>
- <curve>
- <id>anomalous112</id>
- <bits>112</bits>
- <field>prime</field>
- <file>anomalous112.csv</file>
- </curve>
- <curve>
- <id>anomalous128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>anomalous128.csv</file>
- </curve>
- <curve>
- <id>anomalous160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>anomalous160.csv</file>
- </curve>
- <curve>
- <id>anomalous192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>anomalous192.csv</file>
- </curve>
- <curve>
- <id>anomalous224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>anomalous224.csv</file>
- </curve>
- <curve>
- <id>anomalous256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>anomalous256.csv</file>
- </curve>
- <curve>
- <id>anomalous320</id>
- <bits>320</bits>
- <field>prime</field>
- <file>anomalous320.csv</file>
- </curve>
- <curve>
- <id>anomalous384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>anomalous384.csv</file>
- </curve>
- <curve>
- <id>anomalous512</id>
- <bits>512</bits>
- <field>prime</field>
- <file>anomalous512.csv</file>
- </curve>
- <curve>
- <id>anomalous521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>anomalous521.csv</file>
- </curve>
-</curves>
diff --git a/src/cz/crcs/ectester/data/anomalous/miyaji128a1.csv b/src/cz/crcs/ectester/data/anomalous/miyaji128a1.csv
deleted file mode 100644
index 20f2863..0000000
--- a/src/cz/crcs/ectester/data/anomalous/miyaji128a1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x80000000000001a86a91e9356e5fee11,0x1210cb7f8a3466b805b546960dd43f69,0x644a5a3e53a634ee06fa903172806914,0x55b40a8932013efa328cbe8abaf2f4ec,0x44375dc6a29cac1982fbf98c86da2707,0x80000000000001a86a91e9356e5fee11,0x1
diff --git a/src/cz/crcs/ectester/data/anomalous/miyaji128a2.csv b/src/cz/crcs/ectester/data/anomalous/miyaji128a2.csv
deleted file mode 100644
index 4c0f6bc..0000000
--- a/src/cz/crcs/ectester/data/anomalous/miyaji128a2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffe1c2758f379fd46b0d9,0x5e2336fa13c5c6ce7add23893c0dfec7,0x7bf26de6e350dc183c58c09ad8237e00,0x1d8b7c787fdc92d299ec14e7916e5f7d,0x67621e61f115a2544364c1cd52e3cfa7,0xfffffffffffffe1c2758f379fd46b0d9,0x1
diff --git a/src/cz/crcs/ectester/data/anomalous/miyaji128b1.csv b/src/cz/crcs/ectester/data/anomalous/miyaji128b1.csv
deleted file mode 100644
index 678ce90..0000000
--- a/src/cz/crcs/ectester/data/anomalous/miyaji128b1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x800000000000037554ac874c19cdaedf,0x00000000000000000000000000000000,0x000000000000000000000000000000c0,0x635217788a2ff48664a09cb3cdf72b2e,0x5e69c2309032ef3cb1e41b1a245822be,0x800000000000037554ac874c19cdaedf,0x1
diff --git a/src/cz/crcs/ectester/data/anomalous/miyaji128b2.csv b/src/cz/crcs/ectester/data/anomalous/miyaji128b2.csv
deleted file mode 100644
index 73bf5aa..0000000
--- a/src/cz/crcs/ectester/data/anomalous/miyaji128b2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffe2a71fec762d2427ce7,0x00000000000000000000000000000000,0x000000000000000000000000000000c0,0x428e6765064e4a745b2aaae87ef7f0f7,0x3daee1541c98c3d51eec13a1f6177531,0xfffffffffffffe2a71fec762d2427ce7,0x1
diff --git a/src/cz/crcs/ectester/data/anssi/curves.xml b/src/cz/crcs/ectester/data/anssi/curves.xml
deleted file mode 100644
index 0456e67..0000000
--- a/src/cz/crcs/ectester/data/anssi/curves.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>FRP256v1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>frp256v1.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/anssi/frp256v1.csv b/src/cz/crcs/ectester/data/anssi/frp256v1.csv
deleted file mode 100644
index 3e5428d..0000000
--- a/src/cz/crcs/ectester/data/anssi/frp256v1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf1fd178c0b3ad58f10126de8ce42435b3961adbcabc8ca6de8fcf353d86e9c03,0xf1fd178c0b3ad58f10126de8ce42435b3961adbcabc8ca6de8fcf353d86e9c00,0xee353fca5428a9300d4aba754a44c00fdfec0c9ae4b1a1803075ed967b7bb73f,0xb6b3d4c356c139eb31183d4749d423958c27d2dcaf98b70164c97a2dd98f5cff,0x6142e0f7c8b204911f9271f0f3ecef8c2701c307e8e4c9e183115a1554062cfb,0xf1fd178c0b3ad58f10126de8ce42435b53dc67e140d2bf941ffdd459c6d655e1,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/bn/bn158.csv b/src/cz/crcs/ectester/data/bn/bn158.csv
deleted file mode 100644
index 2e3b6b7..0000000
--- a/src/cz/crcs/ectester/data/bn/bn158.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x24240D8241D5445106C8442084001384E0000013,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000011,0x24240D8241D5445106C8442084001384E0000012,0x0000000000000000000000000000000000000004,0x24240D8241D5445106C7E3F07E0010842000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn190.csv b/src/cz/crcs/ectester/data/bn/bn190.csv
deleted file mode 100644
index feb225b..0000000
--- a/src/cz/crcs/ectester/data/bn/bn190.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x240001B0000948001E60004134005F10005DC0003A800013,0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000001001,0x240001B0000948001E60004134005F10005DC0003A800012,0x000000000000000000000000000000000000000000000040,0x240001B0000948001E600040D4005CD0005760003180000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn222.csv b/src/cz/crcs/ectester/data/bn/bn222.csv
deleted file mode 100644
index 89038b3..0000000
--- a/src/cz/crcs/ectester/data/bn/bn222.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x23DC0D7DC02402CDE486F4C00015B5215C0000004C6CE00000000067,0x00000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000101,0x23DC0D7DC02402CDE486F4C00015B5215C0000004C6CE00000000066,0x00000000000000000000000000000000000000000000000000000010,0x23DC0D7DC02402CDE486F4C00015555156000000496DA00000000061,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn254.csv b/src/cz/crcs/ectester/data/bn/bn254.csv
deleted file mode 100644
index de71c5d..0000000
--- a/src/cz/crcs/ectester/data/bn/bn254.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2523648240000001BA344D80000000086121000000000013A700000000000013,0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000002,0x2523648240000001BA344D80000000086121000000000013A700000000000012,0x0000000000000000000000000000000000000000000000000000000000000001,0x2523648240000001BA344D8000000007FF9F800000000010A10000000000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn286.csv b/src/cz/crcs/ectester/data/bn/bn286.csv
deleted file mode 100644
index 46d677e..0000000
--- a/src/cz/crcs/ectester/data/bn/bn286.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x240900D8991B25B0E2CB51DDA534A205391892080A008108000853813800138000000013,0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000002,0x240900D8991B25B0E2CB51DDA534A205391892080A008108000853813800138000000012,0x000000000000000000000000000000000000000000000000000000000000000000000001,0x240900D8991B25B0E2CB51DDA534A205391831FC099FC0FC0007F081080010800000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn318.csv b/src/cz/crcs/ectester/data/bn/bn318.csv
deleted file mode 100644
index bc431fe..0000000
--- a/src/cz/crcs/ectester/data/bn/bn318.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x24009000D800900024075015F015F0075000008F411E808F4000000004E484E4800000000000101B,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000002,0x24009000D800900024075015F015F0075000008F411E808F4000000004E484E4800000000000101A,0x00000000000000000000000000000000000000000000000000000000000000000000000000000001,0x24009000D800900024075015F015F0075000008EE11DC08EE000000004DB84DB8000000000000FE5,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn350.csv b/src/cz/crcs/ectester/data/bn/bn350.csv
deleted file mode 100644
index 237a255..0000000
--- a/src/cz/crcs/ectester/data/bn/bn350.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x23FFB80035FFEE24020A01CAFD738EC3F24B475EBC0AD0F6A0530FD78443FDF01A3FF64084000004E0000013,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x23FFB80035FFEE24020A01CAFD738EC3F24B475EBC0AD0F6A0530FD78443FDF01A3FF64084000004E0000012,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x23FFB80035FFEE24020A01CAFD738EC3F24B475EBC0A70F70052F7D78413FE08173FF7C07E0000042000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn382.csv b/src/cz/crcs/ectester/data/bn/bn382.csv
deleted file mode 100644
index 955882a..0000000
--- a/src/cz/crcs/ectester/data/bn/bn382.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x240026400F3D82B2E42DE125B00158405B710818AC00000840046200950400000000001380052E000000000000000013,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x240026400F3D82B2E42DE125B00158405B710818AC00000840046200950400000000001380052E000000000000000012,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x240026400F3D82B2E42DE125B00158405B710818AC000007E0042F008E3E00000000001080046200000000000000000D,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/bn/bn414.csv b/src/cz/crcs/ectester/data/bn/bn414.csv
deleted file mode 100644
index 0c7eb66..0000000
--- a/src/cz/crcs/ectester/data/bn/bn414.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x240024000D7EE23F2823CA035D31B144364C75E59AEFFF60544845142000765EFFF7C0000021138004DFFFFFD900000000000013,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x240024000D7EE23F2823CA035D31B144364C75E59AEFFF60544845142000765EFFF7C0000021138004DFFFFFD900000000000012,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x240024000D7EE23F2823CA035D31B144364C75E59AEFFF605447E513F00070607FF82000001F9080041FFFFFDF0000000000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn446.csv b/src/cz/crcs/ectester/data/bn/bn446.csv
deleted file mode 100644
index a0a525e..0000000
--- a/src/cz/crcs/ectester/data/bn/bn446.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2400000000000000002400000002D00000000D800000021C0000001800000000870000000B0400000057C00000015C000000132000000067,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101,0x2400000000000000002400000002D00000000D800000021C0000001800000000870000000B0400000057C00000015C000000132000000066,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010,0x2400000000000000002400000002D00000000D800000021C00000017A0000000870000000AD400000054C000000156000000126000000061,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn478.csv b/src/cz/crcs/ectester/data/bn/bn478.csv
deleted file mode 100644
index 9c2640a..0000000
--- a/src/cz/crcs/ectester/data/bn/bn478.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x23FFFFFFFFFFFFFEDFFFFFFFEE0001B3600000006BFFF5DB835FFF5D28085442328002888F96F2944D7DED781430FFD780065FFF010020FFFD900013,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x23FFFFFFFFFFFFFEDFFFFFFFEE0001B3600000006BFFF5DB835FFF5D28085442328002888F96F2944D7DED781430FFD780065FFF010020FFFD900012,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x23FFFFFFFFFFFFFEDFFFFFFFEE0001B3600000006BFFF5DB835FFF5D2807F442328002888F9872944D7E0578112F7FD780062FFF07001F7FFDF0000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn510.csv b/src/cz/crcs/ectester/data/bn/bn510.csv
deleted file mode 100644
index 9dc79b3..0000000
--- a/src/cz/crcs/ectester/data/bn/bn510.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2400000000000000003F000000000001B0002958000000000237000C0F0000084000F8100151A400073800242D00001380019440000000000888000000000013,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101,0x2400000000000000003F000000000001B0002958000000000237000C0F0000084000F8100151A400073800242D00001380019440000000000888000000000012,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010,0x2400000000000000003F000000000001B0002958000000000237000C0F000007E000F8100151A40006E400242D000010800181E000000000073800000000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn542.csv b/src/cz/crcs/ectester/data/bn/bn542.csv
deleted file mode 100644
index 1a50175..0000000
--- a/src/cz/crcs/ectester/data/bn/bn542.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2400090000D80009000024000090001B01B1B051090510001B00D8001B0510D8A2084511080008D000090510005110800108138025380001B00000084000001380000013,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x2400090000D80009000024000090001B01B1B051090510001B00D8001B0510D8A2084511080008D000090510005110800108138025380001B00000084000001380000012,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x2400090000D80009000024000090001B01B1B051090510001B00D8001B0510D8A207E510FC0008700009051000510FC000FC108025080001B0000007E00000108000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn574.csv b/src/cz/crcs/ectester/data/bn/bn574.csv
deleted file mode 100644
index 1d547c7..0000000
--- a/src/cz/crcs/ectester/data/bn/bn574.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2400023FFFFB7FFF4C00002400167FFFEE01AEE014423FAEFFFB5C000A200050FFFF2808400041FFFE73FFF7C000210000000000001380004DFFFD90000000000000000000000013,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x2400023FFFFB7FFF4C00002400167FFFEE01AEE014423FAEFFFB5C000A200050FFFF2808400041FFFE73FFF7C000210000000000001380004DFFFD90000000000000000000000012,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x2400023FFFFB7FFF4C00002400167FFFEE01AEE014423FAEFFFB5C000A200050FFFF2807E0003EFFFE85FFF820001F80000000000010800041FFFDF000000000000000000000000D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn606.csv b/src/cz/crcs/ectester/data/bn/bn606.csv
deleted file mode 100644
index f488ab2..0000000
--- a/src/cz/crcs/ectester/data/bn/bn606.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x23FFFFFFFFFFFEE00000000000036000000241AFFB7FFFFFF275E0024000001B1440000D94482DF27FFFC9AEDF0000000036512100245142137FFFFFB75D7BD900000000000000246C844E13,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002,0x23FFFFFFFFFFFEE00000000000036000000241AFFB7FFFFFF275E0024000001B1440000D94482DF27FFFC9AEDF0000000036512100245142137FFFFFB75D7BD900000000000000246C844E12,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x23FFFFFFFFFFFEE00000000000036000000241AFFB7FFFFFF275E0024000001B1440000D9447CDF27FFFC9AEE08000000036511F8024513F107FFFFFB75D81DF00000000000000246C7E420D,0x01
diff --git a/src/cz/crcs/ectester/data/bn/bn638.csv b/src/cz/crcs/ectester/data/bn/bn638.csv
deleted file mode 100644
index cb54f9b..0000000
--- a/src/cz/crcs/ectester/data/bn/bn638.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x23FFFFFDC000000D7FFFFFB8000001D3FFFFF942D000165E3FFF94870000D52FFFFDD0E00008DE55C00086520021E55BFFFFF51FFFF4EB800000004C80015ACDFFFFFFFFFFFFECE00000000000000067,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101,0x23FFFFFDC000000D7FFFFFB8000001D3FFFFF942D000165E3FFF94870000D52FFFFDD0E00008DE55C00086520021E55BFFFFF51FFFF4EB800000004C80015ACDFFFFFFFFFFFFECE00000000000000066,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010,0x23FFFFFDC000000D7FFFFFB8000001D3FFFFF942D000165E3FFF94870000D52FFFFDD0E00008DE55600086550021E555FFFFF54FFFF4EAC000000049800154D9FFFFFFFFFFFFEDA00000000000000061,0x01
diff --git a/src/cz/crcs/ectester/data/bn/curves.xml b/src/cz/crcs/ectester/data/bn/curves.xml
deleted file mode 100644
index c5ca22f..0000000
--- a/src/cz/crcs/ectester/data/bn/curves.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>bn158</id>
- <bits>158</bits>
- <field>prime</field>
- <file>bn158.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn190</id>
- <bits>190</bits>
- <field>prime</field>
- <file>bn190.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn222</id>
- <bits>222</bits>
- <field>prime</field>
- <file>bn222.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn254</id>
- <bits>254</bits>
- <field>prime</field>
- <file>bn254.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn286</id>
- <bits>286</bits>
- <field>prime</field>
- <file>bn286.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn318</id>
- <bits>318</bits>
- <field>prime</field>
- <file>bn318.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn350</id>
- <bits>350</bits>
- <field>prime</field>
- <file>bn350.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn382</id>
- <bits>382</bits>
- <field>prime</field>
- <file>bn382.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn414</id>
- <bits>414</bits>
- <field>prime</field>
- <file>bn414.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn446</id>
- <bits>446</bits>
- <field>prime</field>
- <file>bn446.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn478</id>
- <bits>478</bits>
- <field>prime</field>
- <file>bn478.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn510</id>
- <bits>510</bits>
- <field>prime</field>
- <file>bn510.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn542</id>
- <bits>542</bits>
- <field>prime</field>
- <file>bn542.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn574</id>
- <bits>574</bits>
- <field>prime</field>
- <file>bn574.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn606</id>
- <bits>606</bits>
- <field>prime</field>
- <file>bn606.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
- <curve>
- <id>bn638</id>
- <bits>638</bits>
- <field>prime</field>
- <file>bn638.csv</file>
- <desc>Barreto-Naehrig curve from eprint 2010/429.</desc>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP160r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP160r1.csv
deleted file mode 100644
index a6734e9..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP160r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe95e4a5f737059dc60dfc7ad95b3d8139515620f,0x340e7be2a280eb74e2be61bada745d97e8f7c300,0x1e589a8595423412134faa2dbdec95c8d8675e58,0xbed5af16ea3f6a4f62938c4631eb5af7bdbcdbc3,0x1667cb477a1a8ec338f94741669c976316da6321,0xe95e4a5f737059dc60df5991d45029409e60fc09,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP160t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP160t1.csv
deleted file mode 100644
index b045237..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP160t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe95e4a5f737059dc60dfc7ad95b3d8139515620f,0xe95e4a5f737059dc60dfc7ad95b3d8139515620c,0x7a556b6dae535b7b51ed2c4d7daa7a0b5c55f380,0xb199b13b9b34efc1397e64baeb05acc265ff2378,0xadd6718b7c7c1961f0991b842443772152c9e0ad,0xe95e4a5f737059dc60df5991d45029409e60fc09,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP192r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP192r1.csv
deleted file mode 100644
index d7fcf54..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP192r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc302f41d932a36cda7a3463093d18db78fce476de1a86297,0x6a91174076b1e0e19c39c031fe8685c1cae040e5c69a28ef,0x469a28ef7c28cca3dc721d044f4496bcca7ef4146fbf25c9,0xc0a0647eaab6a48753b033c56cb0f0900a2f5c4853375fd6,0x14b690866abd5bb88b5f4828c1490002e6773fa2fa299b8f,0xc302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP192t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP192t1.csv
deleted file mode 100644
index 45ed451..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP192t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc302f41d932a36cda7a3463093d18db78fce476de1a86297,0xc302f41d932a36cda7a3463093d18db78fce476de1a86294,0x13d56ffaec78681e68f9deb43b35bec2fb68542e27897b79,0x3ae9e58c82f63c30282e1fe7bbf43fa72c446af6f4618129,0x97e2c5667c2223a902ab5ca449d0084b7e5b3de7ccc01c9,0xc302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP224r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP224r1.csv
deleted file mode 100644
index 411ff99..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP224r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff,0x68a5e62ca9ce6c1c299803a6c1530b514e182ad8b0042a59cad29f43,0x2580f63ccfe44138870713b1a92369e33e2135d266dbb372386c400b,0xd9029ad2c7e5cf4340823b2a87dc68c9e4ce3174c1e6efdee12c07d,0x58aa56f772c0726f24c6b89e4ecdac24354b9e99caa3f6d3761402cd,0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP224t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP224t1.csv
deleted file mode 100644
index d0e2610..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP224t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff,0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0fc,0x4b337d934104cd7bef271bf60ced1ed20da14c08b3bb64f18a60888d,0x6ab1e344ce25ff3896424e7ffe14762ecb49f8928ac0c76029b4d580,0x374e9f5143e568cd23f3f4d7c0d4b1e41c8cc0d1c6abd5f1a46db4c,0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP256r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP256r1.csv
deleted file mode 100644
index f88728d..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP256r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377,0x7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9,0x26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6,0x8bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27e1e3bd23c23a4453bd9ace3262,0x547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997,0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP256t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP256t1.csv
deleted file mode 100644
index 9c21eac..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP256t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377,0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5374,0x662c61c430d84ea4fe66a7733d0b76b7bf93ebc4af2f49256ae58101fee92b04,0xa3e8eb3cc1cfe7b7732213b23a656149afa142c47aafbc2b79a191562e1305f4,0x2d996c823439c56d7f7b22e14644417e69bcb6de39d027001dabe8f35b25c9be,0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP320r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP320r1.csv
deleted file mode 100644
index a5ea90d..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP320r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e27,0x3ee30b568fbab0f883ccebd46d3f3bb8a2a73513f5eb79da66190eb085ffa9f492f375a97d860eb4,0x520883949dfdbc42d3ad198640688a6fe13f41349554b49acc31dccd884539816f5eb4ac8fb1f1a6,0x43bd7e9afb53d8b85289bcc48ee5bfe6f20137d10a087eb6e7871e2a10a599c710af8d0d39e20611,0x14fdd05545ec1cc8ab4093247f77275e0743ffed117182eaa9c77877aaac6ac7d35245d1692e8ee1,0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP320t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP320t1.csv
deleted file mode 100644
index cda7844..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP320t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e27,0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e24,0xa7f561e038eb1ed560b3d147db782013064c19f27ed27c6780aaf77fb8a547ceb5b4fef422340353,0x925be9fb01afc6fb4d3e7d4990010f813408ab106c4f09cb7ee07868cc136fff3357f624a21bed52,0x63ba3a7a27483ebf6671dbef7abb30ebee084e58a0b077ad42a5a0989d1ee71b1b9bc0455fb0d2c3,0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP384r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP384r1.csv
deleted file mode 100644
index 4469585..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP384r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53,0x7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f8aa5814a503ad4eb04a8c7dd22ce2826,0x4a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d57cb4390295dbc9943ab78696fa504c11,0x1d1c64f068cf45ffa2a63a81b7c13f6b8847a3e77ef14fe3db7fcafe0cbd10e8e826e03436d646aaef87b2e247d4af1e,0x8abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff99129280e4646217791811142820341263c5315,0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP384t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP384t1.csv
deleted file mode 100644
index 8a9a6ac..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP384t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53,0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec50,0x7f519eada7bda81bd826dba647910f8c4b9346ed8ccdc64e4b1abd11756dce1d2074aa263b88805ced70355a33b471ee,0x18de98b02db9a306f2afcd7235f72a819b80ab12ebd653172476fecd462aabffc4ff191b946a5f54d8d0aa2f418808cc,0x25ab056962d30651a114afd2755ad336747f93475b7a1fca3b88f2b6a208ccfe469408584dc2b2912675bf5b9e582928,0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP512r1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP512r1.csv
deleted file mode 100644
index 20299d6..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP512r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3,0x7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca,0x3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723,0x81aee4bdd82ed9645a21322e9c4c6a9385ed9f70b5d916c1b43b62eef4d0098eff3b1f78e2d0d48d50d1687b93b97d5f7c6d5047406a5e688b352209bcb9f822,0x7dde385d566332ecc0eabfa9cf7822fdf209f70024a57b1aa000c55b881f8111b2dcde494a5f485e5bca4bd88a2763aed1ca2b2fa8f0540678cd1e0f3ad80892,0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/brainpoolP512t1.csv b/src/cz/crcs/ectester/data/brainpool/brainpoolP512t1.csv
deleted file mode 100644
index 4a7c891..0000000
--- a/src/cz/crcs/ectester/data/brainpool/brainpoolP512t1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3,0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f0,0x7cbbbcf9441cfab76e1890e46884eae321f70c0bcb4981527897504bec3e36a62bcdfa2304976540f6450085f2dae145c22553b465763689180ea2571867423e,0x640ece5c12788717b9c1ba06cbc2a6feba85842458c56dde9db1758d39c0313d82ba51735cdb3ea499aa77a7d6943a64f7a3f25fe26f06b51baa2696fa9035da,0x5b534bd595f5af0fa2c892376c84ace1bb4e3019b71634c01131159cae03cee9d9932184beef216bd71df2dadf86a627306ecff96dbb8bace198b61e00f8b332,0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069,0x1
diff --git a/src/cz/crcs/ectester/data/brainpool/curves.xml b/src/cz/crcs/ectester/data/brainpool/curves.xml
deleted file mode 100644
index 2cb7fc5..0000000
--- a/src/cz/crcs/ectester/data/brainpool/curves.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>brainpoolP160r1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>brainpoolP160r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP160t1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>brainpoolP160t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP192r1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>brainpoolP192r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP192t1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>brainpoolP192t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP224r1</id>
- <bits>224</bits>
- <field>prime</field>
- <file>brainpoolP224r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP224t1</id>
- <bits>224</bits>
- <field>prime</field>
- <file>brainpoolP224t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP256r1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>brainpoolP256r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP256t1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>brainpoolP256t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP320r1</id>
- <bits>320</bits>
- <field>prime</field>
- <file>brainpoolP320r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP320t1</id>
- <bits>320</bits>
- <field>prime</field>
- <file>brainpoolP320t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP384r1</id>
- <bits>384</bits>
- <field>prime</field>
- <file>brainpoolP384r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP384t1</id>
- <bits>384</bits>
- <field>prime</field>
- <file>brainpoolP384t1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP512r1</id>
- <bits>512</bits>
- <field>prime</field>
- <file>brainpoolP512r1.csv</file>
- </curve>
- <curve>
- <id>brainpoolP512t1</id>
- <bits>512</bits>
- <field>prime</field>
- <file>brainpoolP512t1.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/categories.xml b/src/cz/crcs/ectester/data/categories.xml
deleted file mode 100644
index 0776b99..0000000
--- a/src/cz/crcs/ectester/data/categories.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<categories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="schema.xsd">
- <!-- Standard curves -->
- <category>
- <name>anomalous</name>
- <directory>anomalous</directory>
- <desc>These prime field curves have the same order as the field order. Some are from https://dspace.jaist.ac.jp/dspace/bitstream/10119/4464/1/73-61.pdf.</desc>
- </category>
- <category>
- <name>brainpool</name>
- <directory>brainpool</directory>
- <desc>ECC Brainpool Standard Curves and Curve Generation v. 1.0 19.10.2005</desc>
- </category>
- <category>
- <name>nist</name>
- <directory>nist</directory>
- <desc>RECOMMENDED ELLIPTIC CURVES FOR FEDERAL GOVERNMENT USE July 1999</desc>
- </category>
- <category>
- <name>secg</name>
- <directory>secg</directory>
- <desc>SEC 2: Recommended Elliptic Curve Domain Parameters version 2.0 January 27, 2010</desc>
- </category>
- <category>
- <name>anssi</name>
- <directory>anssi</directory>
- <desc>Agence nationale de la sécurité des systèmes d'information: Publication d'un paramétrage de courbe elliptique visant des applications de passeport électronique et de l'administration électronique française. 21 November 2011</desc>
- </category>
- <category>
- <name>GOST</name>
- <directory>gost</directory>
- <desc>GOST R 34.10-2001: RFC5832</desc>
- </category>
- <category>
- <name>x962</name>
- <directory>x962</directory>
- <desc>ANSI X9.62 example curves.</desc>
- </category>
- <category>
- <name>Barreto-Naehrig</name>
- <directory>bn</directory>
- <desc>Barreto-Naehrig curves from: A Family of Implementation-Friendly BN Elliptic Curves - https://eprint.iacr.org/2010/429.pdf.</desc>
- </category>
- <category>
- <name>MNT</name>
- <directory>mnt</directory>
- <desc>MNT (Miyaji, Nakabayashi, and Takano) example curves from: New explicit conditions of elliptic curve traces for FR-reduction - https://dspace.jaist.ac.jp/dspace/bitstream/10119/4432/1/73-48.pdf.</desc>
- </category>
- <category>
- <name>other</name>
- <directory>other</directory>
- <desc>An assortment of some other curves.</desc>
- </category>
-
- <!-- Custom curves -->
- <category>
- <name>invalid</name>
- <directory>invalid</directory>
- <desc>Invalid curves and points on them for common standard named curves.</desc>
- </category>
- <category>
- <name>twist</name>
- <directory>twist</directory>
- <desc>Points on quadratic twists of common standard named curves.</desc>
- </category>
- <category>
- <name>degenerate</name>
- <directory>degenerate</directory>
- <desc>Points on degenerate curves for common standard named curves.</desc>
- </category>
- <category>
- <name>cofactor</name>
- <directory>cofactor</directory>
- <desc>Curves of order n * p, with p prime and n in {2,4,8,16,32,64,128}. Generator of order p, with points on the subgroup of order n.</desc>
- </category>
- <category>
- <name>composite</name>
- <directory>composite</directory>
- <desc>Composite order curves, with points of very small order pre-generated. Also curves with order of a product of two large primes.</desc>
- </category>
- <category>
- <name>wrong</name>
- <directory>wrong</directory>
- <desc>Wrong field curves and other wrong parameters. These should definitely give an error when used. Since the "prime" used for the field is not prime, and the field polynomials are also not irreducible. Simply put these parameters don't specify a valid elliptic curve.</desc>
- </category>
- <category>
- <name>test</name>
- <directory>test</directory>
- <desc>Test vectors</desc>
- </category>
- <category>
- <name>wycheproof</name>
- <directory>wycheproof</directory>
- <desc>Test cases from google Wycheproof project: https://github.com/google/wycheproof</desc>
- </category>
- <category>
- <name>supersingular</name>
- <directory>supersingular</directory>
- <desc>Some supersingular curves, over F_p with order equal to p + 1.</desc>
- </category>
- <category>
- <name>misc</name>
- <directory>misc</directory>
- <desc>Miscellaneous data.</desc>
- </category>
-</categories> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p128.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p128.csv
deleted file mode 100644
index 58459f6..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb0b4005fd28fe7fb494b680e5ad7e1f5,0x6409a6ac9e446c1fa2c1432cbbd17c23,0x646e70d0490d799b8664d791cf34c9a8,0x1b3bdc3ea1be0329a69f6bb398437628,0x2fb05dc71eba40937f233c8d5d672ebb,0x1616800bfa51fcff7618e79d118d6b1,0x80 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p16.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p16.csv
deleted file mode 100644
index 181c47c..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p16.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf723fda094465e1328ca65dfe04ae01b,0x5c1145c56795ae08d3f96d7451db5389,0x3eafb22339feab41ab6069ec1188ea7d,0x6ec8bbabff3e264c59d152c03a29fb26,0x8c8e8e721c8817528cd243667d023095,0xf723fda094465e13cb5a5cc981c945f,0x10 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p2.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p2.csv
deleted file mode 100644
index d9857d8..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf07c2775c51f358b8bdab54821aaa5ab,0x54e4afb6f93de32081be13f858262bc7,0xe13c739a7fe7f62812babb3cba8c6b1f,0x43cefc1ddc7d6936b0db49ecb4b8c4d9,0x52579151eb2779295b75cd7226895abb,0x783e13bae28f9ac60c18591fe953fbf7,0x2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p32.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p32.csv
deleted file mode 100644
index 9673835..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p32.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8d4ee802a67d0de73b9ec4f1a70227b7,0x70b4c15289f93fbc9247509fc9085396,0x04dfb7818caa18da2a60b50f0056a62b,0x09907655c9579e02b30534529dc0031a,0x365f28ab09d64508b47519fea58f4035,0x46a77401533e86f405231d0d851b3d9,0x20 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p4.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p4.csv
deleted file mode 100644
index 44363ad..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x94d9020b666fbb599609485472a9246f,0x8220ebe30c27e10f945b0c2cdfe6dcaa,0x1914928b1a349161061165128629ea88,0x6a1a526fe3d4f719082872b2d149a90f,0x423351dae6533a1a916b151cd0783165,0x25364082d99beed620f8082db41374e7,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p56467.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p56467.csv
deleted file mode 100644
index 193f6a7..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p56467.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe8e100a50b479105f40c312de4bc7127,0x854c8cdc7389dbb3da8a949ce4598ebe,0x4e592cbd1471bba6dec1106cfa99f969,0x7a6c7f7f8305853831d7c99dd23b03aa,0xa3ad04379cb4789bd64e7d99a7874e0b,0x00010e47ea4c399c7ddb49c9915c3b5d,0xdc93 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p64.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p64.csv
deleted file mode 100644
index 35a5ecc..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p64.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc3d6db041a0c509309d706a52a9ae20d,0x6234008af9a67b1a0cf123a38a46d0fb,0x65ca327cc79249fd9b4f3a1c15890787,0x57c0a37da59815687f752f724f015b21,0x9136e347e107c2f5face9abd739f6a82,0x30f5b6c1068314251fbe0d341f0c569,0x40 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p65521.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p65521.csv
deleted file mode 100644
index 80a1eb3..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p65521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdc068a34e30288e08b495798af63ebc7,0xdc068a34e3027b1ccb5209bee1c3ebc7,0xdc054fb5cb170758f9fe7d1b5f63ebc7,0xc0d6edec3ac87edf8499d1885fd03e7b,0x81cb302f36ecd3ff93cd6314ce059e14,0x0000dc136f586930b2b948e64bb6e653,0xfff1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p65535.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p65535.csv
deleted file mode 100644
index 54da6cc..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p65535.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdd94e89ef3fba74afc2a67cb91546a93,0x6cf4828ab4960df2b9fcab3990e3959a,0x80a5c32206c83f769c5ed3e4f5b2ea4e,0xd7a4bb4b7e9ad9e81895caeaeac8b739,0x45ebc51cf353974b02b36b9912de041b,0x0000dd95c634ba30617af48fd4eb321b,0xffff \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor128p8.csv b/src/cz/crcs/ectester/data/cofactor/cofactor128p8.csv
deleted file mode 100644
index 94d4b4e..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor128p8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe65f3e99554260c832ee6c21ec3ac437,0x0ff5c77f9c00ad42c58878e9510a059e,0x0652b998c3bfeefe20afc97a2b6595f4,0xc8a6fef9cbda700c097a1c3ddcaf3d0d,0x602bc0de98577bf266432e60fabe4946,0x1ccbe7d32aa84c191817ef7e51812989,0x8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p16.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p16.csv
deleted file mode 100644
index 4d82274..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p16.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x85836f09b17d1ec0cdeda21b55485e18dd968323,0x5480f9557c649a8e30f1e1256d07b0e32483ac68,0x0ecd880812f41c97be8b5daf1865725753b2ba37,0x16e1dd32469e75aa72a1dc48b78587b18e4f9874,0x70920054032065a09fad53a3ca69de634634a421,0x85836f09b17d1ec0cdecfe96b46937bbf135dab,0x10 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p2.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p2.csv
deleted file mode 100644
index 54717af..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd3622579d76435736f05756763249bb0facdc4a3,0xa645cc4161eb7cd8839b6e26c3efb6734b5bdc65,0xb1900e655c426daea7b80fecdd77ba19a9bb473c,0x2cfbf234e0d99ce44fdaedd2ec2e01558e6d7fd7,0x1495986fef15ada29c39866ac03ddc934589dffc,0x69b112bcebb21ab9b782a0dac36ea8fa7be5fd1b,0x2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p32.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p32.csv
deleted file mode 100644
index 75238ea..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p32.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x91634da0ec681dd6ba65beaf596d82b262b4cded,0x747c9302638253325e847cb5f0cf71134e672ec5,0x68ac504eba7a475a52b2bff92b5b77fb16f124b8,0x721dbbff58bc41dff64da7bd7a45d9892f659306,0x6d353cfdf9570402ccd11b9651a2d4be5d4f1853,0x48b1a6d076340eeb5d33371825941b3e0012e99,0x20 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p4.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p4.csv
deleted file mode 100644
index 760dbef..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x93ab454ad26dae3b521d5b61a48c94cab3c4aa9d,0x4b2d384edb6b10bdaf4c608cc5aff078c4c58e38,0x35bc442cc9f7fe4317cf36d4f411c98f26956527,0x216d191d642aab59fca4ec18b95e11a298da5a00,0x09d9b5f44253719aeb44d3986c40ee3d9c9d86c9,0x24ead152b49b6b8ed4874ccca8f78da90add8ceb,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p56467.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p56467.csv
deleted file mode 100644
index f5355bf..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p56467.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9e1cee7f5d94e89ef3fd2495a5f441e4d0089761,0x652a7627dced8c162fe2550b47f3a0244e378343,0x534fba94f02ffd658a31473600f5ec9a105f8e9a,0x045ac019464f3462ea668abafb5e4132b3143015,0x2a7ee80b1b2077e5efe8be68363b96326db5379d,0x0000b781d03d6dbd8c8ac3d780a2924dcec0bfb7,0xdc93 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p64.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p64.csv
deleted file mode 100644
index 4cdcfdc..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p64.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfe2a2fe87bef6a429245c029cf205f06e16cd249,0xc42dc19e1c0c0b0dd27758d2787d526b25ad89b5,0xf72edb299fab1b613708d4165ededab65350fe6c,0x104a825944921b469704babb2727e5f8a829f2e1,0x8b955a5059e68cc0e932bbdb90fe81730c8e4d19,0x3f8a8bfa1efbda90a4917c6c340f970a5fce9c3,0x40 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p65521.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p65521.csv
deleted file mode 100644
index 10e3605..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p65521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9e1cee7f5d94e89ef3fbf9957f0cd8e42c99184b,0x9035f448a33d8ea2e07bb4d25235f9b537cda8ad,0x95c5b09f7e391ba56198394f6bef2f78d1988c6e,0x57fa57b33a0bf68349a6458cc4c31bdba1537923,0x1f1a0a3d7250ecd7aaccb90be7a5748099c7b398,0x00009e2632bc569dfbe0b62653897822ea67197d,0xfff1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p65535.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p65535.csv
deleted file mode 100644
index bd47372..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p65535.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9e1cee7f5d94e89ef3fc6e6bc13cd2ed3d5b1a59,0x75cb167293650be7c3be3dedb92f06f1d0200135,0x218e827ae606230fe9b076bf8beb5421cb467839,0x55ab2088b77a9f79e050a9f0de962090d1de4157,0x0add088122fda90ecb2e84eded3aba2bf6db1e2b,0x00009e1d8c9cea31d2d0c6cc6e17012be1873f03,0xffff \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor160p8.csv b/src/cz/crcs/ectester/data/cofactor/cofactor160p8.csv
deleted file mode 100644
index 60ca98e..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor160p8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe40476bfeb2a3fd21ad80c102aad29f61cec5eaf,0x544ccbf7202e6b6d27fc19a3587eecc4ec665430,0x86690f7849e1707b28c24b718e7ffa36b55677b5,0x836cee7bcecb29d171c4bd9a1b4943e8159e4708,0xa0add6ab4a0729fd2719e5767abfc4d4c49ff802,0x1c808ed7fd6547fa435b03ffd3b931cccc8c098f,0x8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t128.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t128.csv
deleted file mode 100644
index c748587..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x02391521a0d15b5eee4cae4cb3628d79479cb15700,0x004095708f687ea59f768ee27e167117b9401c223e,0x01925be8ca3bbee060bd2041c5fe0652be1f2d8942,0x024e103317a95c4d6c5b731c67d87688dd15a3cf7d,0x1000000000000000000001b01bb79598eedfebcf,0x80
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t16.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t16.csv
deleted file mode 100644
index decdad3..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t16.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x0574f63f2c0fc757663ccda72b2ec8a37e7c84dfbc,0x03816a247d9618c4d1431793a2b9aaa8c5235ba047,0x074e2cfe3199fe1d5fb2cd8cc2e9aa8bf82ec4e90a,0x02942efd0f0619aaabd77de3f48da81138ab6dccc6,0x7fffffffffffffffffffbd3a47e6e6c2e2d09335,0x10
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t2.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t2.csv
deleted file mode 100644
index d837a28..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x020e850e21d5bfce24ff184c220ea69b20bad05c65,0x0547b079a38b6094672f6cb5adefa94ba1a29d977b,0x0156bee74ac2552ee999cff24e1d7c471ffc17d0c7,0x04a955c7e3b3534d9fd168d9fbffea3acca23c1fdd,0x400000000000000000001e699c7714c35b242f43b,0x2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t32.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t32.csv
deleted file mode 100644
index 2b88982..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t32.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x04a4e7bb96ff9007b4be8097c5c4e36701e3f22aa8,0x020d55ea20c74a09f86cc1b2ecf2d073f46ad9b7fa,0x05f7347502518870fc7419e2d0e3170d5b04333a48,0x05951c6d70c789d60bd25b2519416dc756da26d320,0x3fffffffffffffffffffe88d1f6ec2029eaf4f9d,0x20
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t4.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t4.csv
deleted file mode 100644
index 61f7b03..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x027b506a68264c13994a74473ebd0506ce33921b00,0x0483681d34fdc0544a690cd8363ef6876bc9df5b09,0x051d0095b0d49e8b9b2e38a49ab58abb28b8301349,0x0427559b4db514f0659cbc45a1a785ff3c32f0d0c5,0x1fffffffffffffffffffff89941a8461c966379ad,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t64.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t64.csv
deleted file mode 100644
index 6d3ee91..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t64.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x041a27de41f0e09c7cd4ff65fe10d472c9ca652ea1,0x00b27568b80c64d610ffdde6b3f520df0e0c499aa8,0x04f3cce508325c822a5e04044014d785e9b55ef95e,0x010021cb58589ea7cc7a8caea926276eb32db24b45,0x1ffffffffffffffffffff192d95b4d882a5ee3b9,0x40
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor163t8.csv b/src/cz/crcs/ectester/data/cofactor/cofactor163t8.csv
deleted file mode 100644
index 349e874..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor163t8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa3,0x8,0x2,0x1,0x0183b7c0268ef09222560b602c9444aeb218a9b1c8,0x0035948fa062ffab3e7e63de769fec1407c6b85c6c,0x04d3aaef5f5075d1bbf92e9a5393af45b6946e2074,0x041df30932c95f4732fd59593e11aef8bb46ef3b6c,0x100000000000000000000762c81022ff40e2843f1,0x8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor192p2.csv b/src/cz/crcs/ectester/data/cofactor/cofactor192p2.csv
deleted file mode 100644
index 4de7049..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor192p2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x79cb22319472d019a08f7ae4f99c3edea2f167773210eab7,0x2b1afa29b6e9f7e148f7eb306ae942a506546c7129d56a3f,0x704d348ecd838ed800911bab3298aeebbf1c03b5489bca5d,0x61fc509a9d967735e8f18b0a4ba323134989c7711f44c35b,0x4fe31f28e2ee2a41f6fd661e417d32832bee6f3e164b167e,0x3ce59118ca39680cd047bd72595564c3953a773f01833de3,0x02 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor192p4.csv b/src/cz/crcs/ectester/data/cofactor/cofactor192p4.csv
deleted file mode 100644
index 645f031..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor192p4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8cceb84c81521937bef0925a3aaf09195a59c3f99ae06135,0x6ad5a0b617af4ac05f668ae0236f0a485290c36ef609efb5,0x3289c9a3f4f0364147634d40c2f7604e4bc98773daefc954,0x314789e7e4e448b000d235cc51251e70cd8c92c11d1858f9,0x74459b81d5322dc2c631d3ba964e8b4c8f1e4196939a5579,0x2333ae132054864defbc24965da70e7dbdb87ba264315991,0x04 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor192p8.csv b/src/cz/crcs/ectester/data/cofactor/cofactor192p8.csv
deleted file mode 100644
index ee39445..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor192p8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa9a93bb887865d349841624bd8281c589a8e0196ae724eed,0x1b8b108f729cc205fb0ec88825d7d696e3df62ed328bd535,0x81078fdf85b1ee56ea3e27f6dedcca6f5eb9b645f536dc68,0x37369946896227fce5bfe8f760ba827080caa6700d8d8aaa,0x7f54e11bf72549866571fb70b383b6d1451973c11e3fd082,0x1535277710f0cba693082c4985a9197e9e759aa3571eb787,0x08 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t128.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t128.csv
deleted file mode 100644
index 48505d4..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x010ce87b92d6866c18d14efba7025388574f670476169b09929bbe2b7a4a,0x001ab1f0aecfe5ee45923aad73ea5fa24b554f91ff41a8fd5529d55e76f8,0x009d7d0edc1868aa15931051f8b084e25e8b0f2098994483cab3737c021e,0x01f663c194c41dd386976d105acd3be135ceb5f0d69f932565bc4706e2a9,0x3ffffffffffffffffffffffffffffd7489d946218417d25b50e07c781,0x80 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t16.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t16.csv
deleted file mode 100644
index d838407..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t16.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x017e449f630dcabb0206c5d3d788c030f5b817f7a9b37e9a851aa511e3b9,0x0134978d6868f9c83bfee60f609e31efa87910ccbe160ef2096fe06dc179,0x00bbcfcfdfb70ec830fb88d68d78dbbceaacd5d072194bf584e5e13c82a7,0x0177b6ab31a325d0e23664224bef711cdf9c2abb9f4016777519ead3c1be,0x1ffffffffffffffffffffffffffffec2ff067f4db9e97b04f2f6e5cac3,0x10 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t2.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t2.csv
deleted file mode 100644
index 61a945f..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x019a6dad09843e156188ee96105aa483897804180dc3f47e9ffed7b51d76,0x00bc002063484a714b1ca2a677fe17fb6c27843689568889c6d3088efce0,0x0117230ce450dd966713f13cfab77972da6680aaad37bc6409b4d153b36a,0x0071b5d13375216cf1e0ddc0bd2b243bad4a91f55c724b7d68af2db21602,0xfffffffffffffffffffffffffffff7359ae340ea86da4edade0cf53e23,0x2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t32.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t32.csv
deleted file mode 100644
index 4f14dfe..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t32.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x013c676464927c22282b42616b5d5e09a85468727495eae00e57afd170b8,0x009c6a29ca055f2c9b6714f529a83151c68f44bdbdf86d2f87a40cd8d8ec,0x01d12094657da0b94c14ab67b1ce85c4b16042e29b65ace2e448f4b3b8fd,0x012862bf9015dc35bf721429723ebf870cd026aff3acdc4282d0ff8f847f,0xfffffffffffffffffffffffffffffe6f9adb7f42e7c7ed65369ce8495,0x20 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t4.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t4.csv
deleted file mode 100644
index 1972de2..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x01d16ca19fdddd29cbef9f7d8edcd5bd5a2e51b1331f456d9a7c07ee40ef,0x00b59ca10c75cab015f7932ea7791a90d0edecba979a8ddaeca053d802b8,0x0163e7db23aacfce4573c1c72a8e09d064a5b99e3975ddbeb38ea66dd115,0x012a42b5d1b9614640705e86637fd3d5df1e988d843feab2df701ed0d2b3,0x8000000000000000000000000000061aa6c6684ad065bd4087bc36316d,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t64.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t64.csv
deleted file mode 100644
index df9e357..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t64.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x003037f3c3b8be56c1b40f21898a14c0506810a2c2edee866d98d155bafe,0x010c0d410fef2163d820cf726df422e57f28ecb380587a8a166217b49fbf,0x01d00a40f4a7da1dfc8f87b8fc9981beebec0a5336452a7732c3216a5d71,0x0077dc35e9d9a730d80a7f5e22e8df145ea82ee8bd7bc178a9d14f3d6e4f,0x7fffffffffffffffffffffffffffff58ae3a5ab58e4794d5a0d31a0df,0x40 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/cofactor233t8.csv b/src/cz/crcs/ectester/data/cofactor/cofactor233t8.csv
deleted file mode 100644
index 43f6705..0000000
--- a/src/cz/crcs/ectester/data/cofactor/cofactor233t8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9,0x4a,0x0,0x0,0x01c2ddc23a454bacf481ab17cd223d5b9b452c50de07c65c4eb3bb2a6c2f,0x01db7ca30cf0915e8ee53c3ba32371bc73a73f4f499839257a861f6123f8,0x0101da5b2520f16fba2d08f3687db69862ecfec9aa3cd81e3a53120c596c,0x0095d00741d7dc2119cb427b8a0dd77a2bcaef233086dd7704a438e0294e,0x3ffffffffffffffffffffffffffffc34eca9e37b884d13683d26dc874f,0x8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/cofactor/curves.xml b/src/cz/crcs/ectester/data/cofactor/curves.xml
deleted file mode 100644
index 30204e8..0000000
--- a/src/cz/crcs/ectester/data/cofactor/curves.xml
+++ /dev/null
@@ -1,225 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
-
- <curve>
- <id>cofactor128p2</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p2.csv</file>
- </curve>
- <curve>
- <id>cofactor128p4</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p4.csv</file>
- </curve>
- <curve>
- <id>cofactor128p8</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p8.csv</file>
- </curve>
- <curve>
- <id>cofactor128p16</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p16.csv</file>
- </curve>
- <curve>
- <id>cofactor128p32</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p32.csv</file>
- </curve>
- <curve>
- <id>cofactor128p64</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p64.csv</file>
- </curve>
- <curve>
- <id>cofactor128p128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p128.csv</file>
- </curve>
- <curve>
- <id>large/cofactor128p56467</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p56467.csv</file>
- </curve>
- <curve>
- <id>large/cofactor128p65521</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p65521.csv</file>
- </curve>
- <curve>
- <id>large/cofactor128p65535</id>
- <bits>128</bits>
- <field>prime</field>
- <file>cofactor128p65535.csv</file>
- </curve>
- <curve>
- <id>large/cofactor160p56467</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p56467.csv</file>
- </curve>
- <curve>
- <id>large/cofactor160p65521</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p65521.csv</file>
- </curve>
- <curve>
- <id>large/cofactor160p65535</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p65535.csv</file>
- </curve>
-
- <curve>
- <id>cofactor160p2</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p2.csv</file>
- </curve>
- <curve>
- <id>cofactor160p4</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p4.csv</file>
- </curve>
- <curve>
- <id>cofactor160p8</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p8.csv</file>
- </curve>
- <curve>
- <id>cofactor160p16</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p16.csv</file>
- </curve>
- <curve>
- <id>cofactor160p32</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p32.csv</file>
- </curve>
- <curve>
- <id>cofactor160p64</id>
- <bits>160</bits>
- <field>prime</field>
- <file>cofactor160p64.csv</file>
- </curve>
-
- <curve>
- <id>cofactor192p2</id>
- <bits>192</bits>
- <field>prime</field>
- <file>cofactor192p2.csv</file>
- </curve>
- <curve>
- <id>cofactor192p4</id>
- <bits>192</bits>
- <field>prime</field>
- <file>cofactor192p4.csv</file>
- </curve>
- <curve>
- <id>cofactor192p8</id>
- <bits>192</bits>
- <field>prime</field>
- <file>cofactor192p8.csv</file>
- </curve>
-
- <curve>
- <id>cofactor163t2</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t2.csv</file>
- </curve>
- <curve>
- <id>cofactor163t4</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t4.csv</file>
- </curve>
- <curve>
- <id>cofactor163t8</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t8.csv</file>
- </curve>
- <curve>
- <id>cofactor163t16</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t16.csv</file>
- </curve>
- <curve>
- <id>cofactor163t32</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t32.csv</file>
- </curve>
- <curve>
- <id>cofactor163t64</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t64.csv</file>
- </curve>
- <curve>
- <id>cofactor163t128</id>
- <bits>163</bits>
- <field>binary</field>
- <file>cofactor163t128.csv</file>
- </curve>
-
- <curve>
- <id>cofactor233t2</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t2.csv</file>
- </curve>
- <curve>
- <id>cofactor233t4</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t4.csv</file>
- </curve>
- <curve>
- <id>cofactor233t8</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t8.csv</file>
- </curve>
- <curve>
- <id>cofactor233t16</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t16.csv</file>
- </curve>
- <curve>
- <id>cofactor233t32</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t32.csv</file>
- </curve>
- <curve>
- <id>cofactor233t64</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t64.csv</file>
- </curve>
- <curve>
- <id>cofactor233t128</id>
- <bits>233</bits>
- <field>binary</field>
- <file>cofactor233t128.csv</file>
- </curve>
-</curves>
diff --git a/src/cz/crcs/ectester/data/cofactor/keys.xml b/src/cz/crcs/ectester/data/cofactor/keys.xml
deleted file mode 100644
index d6058f0..0000000
--- a/src/cz/crcs/ectester/data/cofactor/keys.xml
+++ /dev/null
@@ -1,742 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE keys [
- <!ENTITY secg SYSTEM "cofactor/secg_keys.xml">
- ]>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
-
- <pubkey>
- <id>cofactor128p2/0</id>
- <inline>0x1274cf343b12c9de044a312c7e0d88b1,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p2</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p4/0</id>
- <inline>0x4e5a1eb60f6d2cb5c24f6ea54a675cd6,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p4/1</id>
- <inline>0x71223b82022305c5eb81f5c3ae3f785a,0x79fc820c0eecef0bca540a3e723583ff</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p8/0</id>
- <inline>0x31eb5f732057b0ea57eed55f4259d85d,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p8</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p8/1</id>
- <inline>0x2e7bb6ad57bbcbef6dc2bf4245a38c12,0x61d860ec5fe722872c35dfa1ef84a307</inline>
- <curve>cofactor/cofactor128p8</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p8/2</id>
- <inline>0x901934de82c48d1058c67c605a9a390b,0x335c2e8e79a171506a99490d3332a110</inline>
- <curve>cofactor/cofactor128p8</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p16/0</id>
- <inline>0x89578c4527e2d5e8a95905e30f0889e3,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p16</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p16/1</id>
- <inline>0x99efc5bd2e9adc1c00919ddf5bf7ace0,0x082767ef35dad2259725c77e68bf8a69</inline>
- <curve>cofactor/cofactor128p16</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p16/2</id>
- <inline>0x5e2f995dad72a38bd8c9f9a7f465ce6f,0xc6dc35c4d28a668f8240ef6ac2536b14</inline>
- <curve>cofactor/cofactor128p16</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p16/3</id>
- <inline>0xe719245896fb0737d55085e208aafec2,0xf672a92221d12ed6ec4657ca767a7f06</inline>
- <curve>cofactor/cofactor128p16</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p32/0</id>
- <inline>0x097191ee5ded1c36f2ec6bba78e7e6ea,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p32</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p32/1</id>
- <inline>0x527a9d644ebae128748327d1961c3985,0x4edca8a611b16dee95eeea363724062d</inline>
- <curve>cofactor/cofactor128p32</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p32/2</id>
- <inline>0x5faf8263ac8c51084b0aff1bd428f092,0x2680273ff79343d47280c69168973cf5</inline>
- <curve>cofactor/cofactor128p32</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p32/3</id>
- <inline>0x0351f0e0b0de971c953918934f59c8c0,0x424957e4a6756cc1e55d36489cff3d8b</inline>
- <curve>cofactor/cofactor128p32</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p32/4</id>
- <inline>0x5c5e4942cf366e1b04bed7b1ca3bd4a9,0x3549e46c6696ed157ccc74adc65683ae</inline>
- <curve>cofactor/cofactor128p32</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/0</id>
- <inline>0x1d360b7f2f805be59aedeaae2813ee1f,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/1</id>
- <inline>0x87c97b7182f883ded6560cd78264ad5b,0x468dbd5fe82135ea24a71059341f16cb</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/2</id>
- <inline>0x9498a4ec5caf6d7d8638dc6d79ae30d7,0x4a8412b51a48b34c6f33047052979ebf</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/3</id>
- <inline>0x7bd10415384645d1dfe4c84e8f05c301,0x37878a8d0088d16cf88f49c07c13147b</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/4</id>
- <inline>0x9781df3d77ae756e8cb031303f7332a1,0xb0014e02d54b017e4069401fc41a9a23</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p64/5</id>
- <inline>0xb8fde1c676a1ceab9ad6597f9763c79f,0x5490d7c81d8ddece1a4081a743910b46</inline>
- <curve>cofactor/cofactor128p64</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/0</id>
- <inline>0x485b34188824c54f115f31891c18795c,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/1</id>
- <inline>0x1e75df97d9c90de9338ea741cc6fa72e,0x80308fe46db0ed0486bb204c97cb0891</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/2</id>
- <inline>0x789c0de0acc72fa82609c27b1ff26031,0x38eaf5e148dd91fe151cc072ce4945be</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/3</id>
- <inline>0xace50433b400257c911cbcc175bf03a1,0x6f0cd218b21a252a289d49981a554232</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/4</id>
- <inline>0x0144308e82b8c4edd3b02a535fcd9b11,0x241c16e9c41948dd249741b623ae6f46</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/5</id>
- <inline>0x17c76910a9acbde84033e2fcc629350a,0x462e9fa1f47d82b3e82c813368ffe005</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor128p128/6</id>
- <inline>0x2f633a2a7176d5e89e53db656761884d,0x04806528aae79ad5953f985f703fe3ed</inline>
- <curve>cofactor/cofactor128p128</curve>
- <desc>cofactor order = 128</desc>
- </pubkey>
-
- <pubkey>
- <id>cofactor160p2/0</id>
- <inline>0x5fa441bf614740860b6eb17c525fadf7fda8a8dd,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p2</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p4/0</id>
- <inline>0x023deee1d84150a62b98aa5bfc199af554653515,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p4/1</id>
- <inline>0x029177e40c5fa71b99189487dd216c20878ddc2b,0x8208f20780b73baa1c19aec658707b070b675de2</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p8/0</id>
- <inline>0x05e55a12fb3fc534266721e50921b87175ba6058,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p8</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p8/1</id>
- <inline>0xcabc8915d9a3ec3918425a100c46455dac4a69b9,0x899e34cfb8138627bddf44123ec5875bbe77607a</inline>
- <curve>cofactor/cofactor160p8</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p8/2</id>
- <inline>0xabe45c362bd99dc1d473ece28afe13c21fa4d759,0x7fcb17eb63260522d911eca08a4f6174163e2869</inline>
- <curve>cofactor/cofactor160p8</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p16/0</id>
- <inline>0x1e20529f2293f0a08cc722d7fa8e56ddd4eb3b8a,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p16</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p16/1</id>
- <inline>0x8076835b64ee29e80caacb94a09fbf465bb283d2,0x0a772fb6cdfc5ca2a6ce58ce77c36c3e572319f2</inline>
- <curve>cofactor/cofactor160p16</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p16/2</id>
- <inline>0x438873cc4cfe75ea5e4cd253a999bd383679643e,0x5aeea5de1639443278f0ef03d196cb87b9818886</inline>
- <curve>cofactor/cofactor160p16</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p16/3</id>
- <inline>0x76f900fcc2c879c8c78e3a2c25ff0322d3dc1234,0x0a1980eaf1f4d35f736087a4b7df844c61665c03</inline>
- <curve>cofactor/cofactor160p16</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p32/0</id>
- <inline>0x8cff23fa9830f93cb2d46aa5f91e6f53080fa5b7,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p32</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p32/1</id>
- <inline>0x776031adf083c2373e49d38f6e4fff890a723b20,0x7fb4468b1937d569889b9aa06e0e4ec66032a07f</inline>
- <curve>cofactor/cofactor160p32</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p32/2</id>
- <inline>0x80808ea2da912ddd3ef23c2b4a7a5f7a0c49d97f,0x0c4664470b36a7873650c0ce856eccf5c715202e</inline>
- <curve>cofactor/cofactor160p32</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p32/3</id>
- <inline>0x6489b721683b235b1e195df3fc588b8469a53f92,0x745764261684c3056725df16a14ae71a9ce669f8</inline>
- <curve>cofactor/cofactor160p32</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p32/4</id>
- <inline>0x755a0b8b58e0d8f18998e2c2b7b9ab09792323d6,0x90e7c831aba6c27762bef58bf07b782334da565d</inline>
- <curve>cofactor/cofactor160p32</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/0</id>
- <inline>0x46b72d87edddeea2fa3ef32725fcf8c1e19bf40d,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/1</id>
- <inline>0x3e92edd49a08c7dc03badf986f0902292f15856d,0x7658a601d3aceb0b3273011d1211b8df18027f78</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/2</id>
- <inline>0xa863b1077481ae1da7e782b56ef378aa79d94da0,0xf7b8ccdfee7605bf1b858f427480a15cb2b82728</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/3</id>
- <inline>0x45a971943d80ce3f1f29ac86536c0e189ae98dc7,0x6e4488a53ee6cbea7ecec826a8f89f9334e90c7a</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/4</id>
- <inline>0x53499915b1a061db0216f7c871780abfb86c576e,0x44c57b310461b57c2d20c12dbeb64475e122e1a4</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor160p64/5</id>
- <inline>0x3fabbf2a3612a89fb5940661b4acc7589cc7fce3,0xb5489c892a82a2f4e5bced433a3c4685b9ae0d07</inline>
- <curve>cofactor/cofactor160p64</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
-
-
- <pubkey>
- <id>cofactor163t2/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x0132720c6aa3f2ca65d18f2de81e5e6b8ad4a3ef9d</inline>
- <curve>cofactor/cofactor163t2</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t4/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x00b93d46bc80b487e7738644e85bb6d29c2dca2600</inline>
- <curve>cofactor/cofactor163t4</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t4/1</id>
- <inline>0x003de55d59f7c71d1560c04954a897294b584c8840,0x069a5e172cea516563b7289330fcadd1b3a9a08ea5</inline>
- <curve>cofactor/cofactor163t4</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t8/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x0569879d9674b06578f62ec2f341ddd3b648dfdf51</inline>
- <curve>cofactor/cofactor163t8</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t8/1</id>
- <inline>0x04558236ae8cbb8b7f551db9b7ffeba4d05a6925f8,0x07af55a9913a11785b3cd3f8b92d5968273bdbc6a7</inline>
- <curve>cofactor/cofactor163t8</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t8/2</id>
- <inline>0x0180ead5cc93652110c10254291c060a6039102f2f,0x01c27f76b0e8f6c445ec14041ad6bf528133b0f5ba</inline>
- <curve>cofactor/cofactor163t8</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t16/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x04274cf55c49c32ca4c0e30b891e03b3b1c6597df0</inline>
- <curve>cofactor/cofactor163t16</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t16/1</id>
- <inline>0x045a5eb7dd5d3a66c37ccc17d1c2cc278c52341311,0x00d335cb03f5cffe4aae83eca0142719ba056b3b91</inline>
- <curve>cofactor/cofactor163t16</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t16/2</id>
- <inline>0x02491353f117e84d3bccfdec06dc80881bf4962916,0x07a0e8a86cb7b13b4e7dff9c5a6c2cec2dfe43bd3c</inline>
- <curve>cofactor/cofactor163t16</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t16/3</id>
- <inline>0x06ef9e3bc176cc3e4f22734c6b1403a52fcb4f5ded,0x05b854eba0ed2c1b1ba58db768391935bc45008aed</inline>
- <curve>cofactor/cofactor163t16</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t32/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x0409969efb468e8f07954a3b4bf7610a0d8b5d4753</inline>
- <curve>cofactor/cofactor163t32</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t32/1</id>
- <inline>0x0718ffc297e2a28c40b1a99a1243788908bf234788,0x072c98ada87c3d2bd169ebb13484046487389c0aac</inline>
- <curve>cofactor/cofactor163t32</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t32/2</id>
- <inline>0x05398dacbc3685efa32fb8073f653a13454bdd84d1,0x04a3c63e84d6c2612d29cc73f8025c678c40fc238b</inline>
- <curve>cofactor/cofactor163t32</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t32/3</id>
- <inline>0x04ef69ff0767053e16dc764753dce52e4abd2008af,0x06179a3827cc46bc431e38960d33b9d55d6c589059</inline>
- <curve>cofactor/cofactor163t32</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t32/4</id>
- <inline>0x02ee97f9a7d793ce62c74af97a9f096a7572ba69b9,0x000f6d594c47c324daa0e08324367fe6570dea1bf3</inline>
- <curve>cofactor/cofactor163t32</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x068c5445c03a59d697573b09ae0804e2891bb98208</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/1</id>
- <inline>0x07ebc6a2d17da53c7eb2d1db5b1c8f4bc09cbe0c9a,0x00d8dad45ee9b10d1b9c65e33779a9915dab1bcdca</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/2</id>
- <inline>0x06c2e736395e30d258e1d55e99754b13cb95df5a77,0x02c927a236717ee2a0023c2932b581b30e1198ba52</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/3</id>
- <inline>0x02d043a910ce708b391974f4bf2d948b2ff9404ac1,0x0173d5211bd148c51a5356125b4e1037287ca76dbf</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/4</id>
- <inline>0x00b16f32c64daa847ecbb91ec3df09320b898753e8,0x0386287097ae6bc4fe440c21855dd51cbb063cfa01</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t64/5</id>
- <inline>0x02d3b0a084b4c191d61cccb9906b072946e8167c7c,0x041c5c739372f85d9801de81ceae8610d1d46baa0b</inline>
- <curve>cofactor/cofactor163t64</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x06be374502a948489de2e7d8d82cb6b62a493b77a0</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/1</id>
- <inline>0x06c8d7f80b6c2dfbb970c103dbe4823ddadbbc2d44,0x051d1ae93f3798b7d07dc5a42ae10b9ddbe6a27f9e</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/2</id>
- <inline>0x070bb18c1a173b81a08312cea7ae8be4e5085bd4e4,0x0196906f241cadfdad35b1e38754b01c1baf7f20da</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/3</id>
- <inline>0x02e6190b983edeed23a75c7905e625e9d4d5aab337,0x009be2cfb9d400f20f1ad38963fa756d3beea8b5f1</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/4</id>
- <inline>0x01ddf5cb0517f268ac0446ec605c6c9e2f47cad1ad,0x06ff8b935fb64abcaadf9528c164278c4861190399</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/5</id>
- <inline>0x03ead0b91adc1e11c6f1aea37993d4aa233f722f16,0x03566f6678f3f63004c084469330c55a54e47152ed</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor163t128/6</id>
- <inline>0x0597fab16d4fd300694e45e02ce97126d6abfdf527,0x013f75f2b43c53296f06fc584b02ab9b7e5eda28aa</inline>
- <curve>cofactor/cofactor163t128</curve>
- <desc>cofactor order = 128</desc>
- </pubkey>
-
- <pubkey>
- <id>cofactor233t2/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x00a5237785bb2d49881f043553257d8600988d9603b43b4c2d74539a7ab3</inline>
- <curve>cofactor/cofactor233t2</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t4/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x01e70983b7039468a1b58b757d8343c7612f847f51f357ccca6a4c38e774</inline>
- <curve>cofactor/cofactor233t4</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t4/1</id>
- <inline>0x01b2130e54e0b949f46bb1a356e4da9b117168171c95bd8f8606dbb841f0,0x00df888613dd7319af9881c87b3b96586a6ea0bc8763e460d1cfad59beeb</inline>
- <curve>cofactor/cofactor233t4</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t8/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x0087c295986f53382f7f1d4c8f268bdde12c5e2b641e53f84b5c2feb209a</inline>
- <curve>cofactor/cofactor233t8</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t8/1</id>
- <inline>0x00a84d10e99cdacf913bc463c64fe963874bd43f7b6285b3328c584f379d,0x0116083d4b7d721cab9f8e28687946775cbe53013974f0d64da6a3753871</inline>
- <curve>cofactor/cofactor233t8</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t8/2</id>
- <inline>0x0030b705cd14925afbc424bba3ca2d306e1919228fbdeb69722d778d2fd1,0x01b57b56dfd941a990349cfbe4738049158da63038002b8b66b1958a3f28</inline>
- <curve>cofactor/cofactor233t8</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t16/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x00c6ff713492ad9d63db4627a4f8d0d67388d85ea20ba5ef234a43ec98d4</inline>
- <curve>cofactor/cofactor233t16</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t16/1</id>
- <inline>0x000054b1aeb9f6ec672eda79ea63d50afd64379da32c67b393613e5380a5,0x0007a5bcc9d28b17b3ee8b6c01146b418134d653dac30b9f141cadb8bdf3</inline>
- <curve>cofactor/cofactor233t16</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t16/2</id>
- <inline>0x0076e03623260120f8abb528fa31087853a445dd4f4761aa4927d0c435e5,0x011d084efa87e9d129153bcdbc50177015ecfa822ae7b9bcc229b9f57987</inline>
- <curve>cofactor/cofactor233t16</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t16/3</id>
- <inline>0x01e334dd359ca817a6b667a95c1c408387869583a7aad103d90dab7f07ab,0x0136e465f537139aad625893172512a06d242474c623003e5f90dd244997</inline>
- <curve>cofactor/cofactor233t16</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t32/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x00e85ccaafcd345663cb65ccf38555c68183f25b6ec0e436f8f236fe8636</inline>
- <curve>cofactor/cofactor233t32</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t32/1</id>
- <inline>0x00027d98a3ee381684443b18bdabf2a8e83b6e99bad701208a688115e418,0x01f167acce102a713f0256da2c6ef68d9162cb45b99bd0d3a579c6996545</inline>
- <curve>cofactor/cofactor233t32</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t32/2</id>
- <inline>0x00644243499f513d3541244f49419eaeb3714b641da3fe566d2c1fd04f4e,0x00c6f0694379c25b852bb8e71785912fc3b73275061da6f0e91f50d6aa48</inline>
- <curve>cofactor/cofactor233t32</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t32/3</id>
- <inline>0x01eea9c0d7203865aba9d5ef5c8688c8f028222bd8c553ea2a37549ec1af,0x0049a7cf8f926869ebc36e2ff636e5eb7cb1d0406a6e43902bb921859883</inline>
- <curve>cofactor/cofactor233t32</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t32/4</id>
- <inline>0x01880fb8975f5024c34bd78dd2d5fbedb724ee288940c6a4ae50c3fe88c2,0x00118b407d962d2c4359f639258526d6c8ed8a1db93034ff34d877b31dd1</inline>
- <curve>cofactor/cofactor233t32</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x01a08b13e17f2467daaf4c4f62a397f2393b19c0bfff1dd767f6c8d94860</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/1</id>
- <inline>0x0124da33fe559716da4d8fe52bb54490159f2bc3a9c8c832a4cd321db26d,0x01744c31a30ab6b516f3a96f173aef281fbd80d3f35976b50619ffc878c8</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/2</id>
- <inline>0x01f956c2aef1da18bc8c21a45e6161dac74aeb8ffc63528c5ddad8d73000,0x00b82ff8a8c62906f80294833d65c8d1e6d6fd1942cd05d88db9c7a7afed</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/3</id>
- <inline>0x00f3c42ae0ad4315728635a4fe24ba2a51102a3c4e94bcfbad165a534820,0x005abed4d9649b656824d041650b2bc027db10fe4a7314ea73ae8add6c34</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/4</id>
- <inline>0x01d94d241b3b5a14e420f845a5835555efd8b4ac7a859a6b811309a6c525,0x00c2f035151644c52617a436b6aeabb8e50ef6e12fa5b1bd1102c913c72d</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t64/5</id>
- <inline>0x00ebc7a88e760c7932108e6c925b8e8a40cf0f809f2144e772f059cef16c,0x015fe6fec0e1558cf4cc5c73d7d0a8973eb5f7be65cc537c8055e2142c45</inline>
- <curve>cofactor/cofactor233t64</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x0018948e6063085fbc0a661dc0d06bc45c2bbab443e9d983753886b918ea</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 2</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/1</id>
- <inline>0x01e41de7ac8dabaa1e873fd528d3c5e462890f60a444a12e1f87902a5f80,0x01148ae9d64a4223ba0bd24d642a6b2cdbbc1358fccd78eea473019a3aa8</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 4</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/2</id>
- <inline>0x00e62c29001164bd807f1984bc2d9df15f979f42acf6d10ca6df31ebd8f8,0x00b5e5a686e3a8f87db3c03223322e3d6d0b67ac1d959e3b43a5d66cc734</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 8</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/3</id>
- <inline>0x019cf3cd40ee9c3feff8d301ce3b949691d4a1415b89f6e4d2f9799c2071,0x012c90d7c0d2b2a6677cd1015e7611334098c557181080d1e3c4832b7e46</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 16</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/4</id>
- <inline>0x00c9fe0dc85e72812aa285b889786c323d2c55de71cf8aa3706c4d5819e1,0x018770dd46a7914c7e8ba6f9babe7a43d489237331fa5d5be1f4a8478d93</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 32</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/5</id>
- <inline>0x01a9d88c20ae689f118efc37e85699a87826c224470f2ed075d377505765,0x01d3d88eca62c36c83300658c35cf4c50fb62e4d38b890462db90a7b0892</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 64</desc>
- </pubkey>
- <pubkey>
- <id>cofactor233t128/6</id>
- <inline>0x014ab29589292a78426bd618c99c520a950119e2642302c02e29e4507ccc,0x01ce0273b2fe1e3bdc53116d670ce682d73d0988dc124169dfadd1d1f727</inline>
- <curve>cofactor/cofactor233t128</curve>
- <desc>cofactor order = 128</desc>
- </pubkey>
-
- &secg;
-
- <pubkey>
- <id>pq/cofactor128/1</id>
- <inline>0x73ca0050dff0de43cff4a026d8aa4baa,0xebd7490611fe3886fe5a8083d344edd0</inline>
- <curve>composite/pq/composite128/1</curve>
- <desc>cofactor order = 0x000000003c1be1d1dd7edf84b8013495</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor128/2</id>
- <inline>0x6ef5b1d42abdbd6f44bcf4d64504927c,0x73e82c27b93032b7a7a15111d1569bb3</inline>
- <curve>composite/pq/composite128/2</curve>
- <desc>cofactor order = 0x000000000000000000000003f76917eb</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor160/1</id>
- <inline>0x0818df9ccebf5b3fd422d00393d346b314e48f98,0x75bde540b81b5bf0ab45c86fbff7bb2e7ec833cb</inline>
- <curve>composite/pq/composite160/1</curve>
- <desc>cofactor order = 0x00000000000000000d4d7041e1dbf10b42f48c4f</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor160/2</id>
- <inline>0x706deef87d4593bbeaa70bc2609e1d8c0e2e0c10,0x64df2537d395da2e0cb8c7e340426b64699cf325</inline>
- <curve>composite/pq/composite160/2</curve>
- <desc>cofactor order = 0x00000000000000000000000af2407f270b81f45f</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor192/1</id>
- <inline>0x6366613b66339fa580f390d630ccf9b535437229aa8b61cd,0x1b975fa3848bd68f34f6a08b7cf190bcaeaf9782270e2413</inline>
- <curve>composite/pq/composite192/1</curve>
- <desc>cofactor order = 0x00000000000000000000035efd8bad55038e6bd22db8b805</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor192/2</id>
- <inline>0x6366613b66339fa580f390d630ccf9b535437229aa8b61cd,0x2abab8c0e803a3612c7a7fbcb47e06fd8ef42a7a7d8c380f</inline>
- <curve>composite/pq/composite192/2</curve>
- <desc>cofactor order = 0x00000000000000000000000000302b72431ff070e7e06799</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor224/1</id>
- <inline>0x97e540c8fc6f9603f25b1689895e5fe738565013675b1bd6c0e16a4b,0x66d0bbe7ee9b0e9e7e1d43b6a47e1d5550c696433c58ee06b94e8615</inline>
- <curve>composite/pq/composite224/1</curve>
- <desc>cofactor order = 0x0000000000000000000006a99de2a928e8f227e7a2ed33a555f24ef5</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor224/2</id>
- <inline>0x1b189f3372946c9cbb421a60bc3a0a06d16cf3ce043781ada561834c,0x57e00f270dbc56c6c86946dcb6c6ab12133d168609c588b6960c357f</inline>
- <curve>composite/pq/composite224/2</curve>
- <desc>cofactor order = 0x00000000000000000000000000000000001824ec370e405bfb5024db</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor256/1</id>
- <inline>0xda63037417b6151b844b2367428f52692f31f14a6654edc58edb5864d0e85ff7,0x8191a142a1c4f913e146af089b1cbe12a803473d207e93697afd1a83818e08be</inline>
- <curve>composite/pq/composite256/1</curve>
- <desc>cofactor order = 0x000000000000000220d23234534b240aac0efa70a3bc44e046c2431ad5a32d27</desc>
- </pubkey>
- <pubkey>
- <id>pq/cofactor256/2</id>
- <inline>0x7b258197e20de13053c3384efd34c3f17172d8ee22c4e23491ca2f867383d8de,0x4aa05d30077ed1bfa45301348e6ab9b1d436f1755c6747c958d4dc24fcb6996c</inline>
- <curve>composite/pq/composite256/2</curve>
- <desc>cofactor order = 0x000000000000000000000000000000000000000000000000743bc7ea193d40db</desc>
- </pubkey>
-
- <pubkey>
- <id>large/cofactor128p56467/0</id>
- <inline>0x8afd6cc280e0be7163bb6f285a7c6391,0xae64e0f1afc7bd5c75e2f36a7d85f668</inline>
- <curve>cofactor/large/cofactor128p56467</curve>
- <desc>cofactor order = 0xdc93</desc>
- </pubkey>
- <pubkey>
- <id>large/cofactor128p65521/0</id>
- <inline>0x70e43816ed51388caa54a68b6c500352,0xab05b43e2cde6086b12350abe79b9175</inline>
- <curve>cofactor/large/cofactor128p65521</curve>
- <desc>cofactor order = 0xfff1</desc>
- </pubkey>
- <pubkey>
- <id>large/cofactor128p65535/0</id>
- <inline>0x39d6ea56c3eb6382d2d7a9d327a191fd,0x3ebb3f4626d05df38572af3ae5fa60f2</inline>
- <curve>cofactor/large/cofactor128p65535</curve>
- <desc>cofactor order = 0xffff</desc>
- </pubkey>
- <pubkey>
- <id>large/cofactor160p56467/0</id>
- <inline>0x574d8a01e5ce61862b1f9504f81abe454ae30cf3,0x5c099446c1d7c24df133f85ecc0baa27a687c8e5</inline>
- <curve>cofactor/large/cofactor160p56467</curve>
- <desc>cofactor order = 0xdc93</desc>
- </pubkey>
- <pubkey>
- <id>large/cofactor160p65521/0</id>
- <inline>0x2567137bf265849618b13057f22ead81753bb39d,0x746c2fc9f040cf8ceeac2015f07522e9616bd094</inline>
- <curve>cofactor/large/cofactor160p65521</curve>
- <desc>cofactor order = 0xfff1</desc>
- </pubkey>
- <pubkey>
- <id>large/cofactor160p65535/0</id>
- <inline>0x0b16071db6d90823611ad35ed728b4f9a9abff9e,0x852a227d06c50d603cc4d8592770f535766927a2</inline>
- <curve>cofactor/large/cofactor160p65535</curve>
- <desc>cofactor order = 0xffff</desc>
- </pubkey>
-</keys>
diff --git a/src/cz/crcs/ectester/data/cofactor/secg_keys.xml b/src/cz/crcs/ectester/data/cofactor/secg_keys.xml
deleted file mode 100644
index 9634e9d..0000000
--- a/src/cz/crcs/ectester/data/cofactor/secg_keys.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect163k1/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000001</inline>
- <curve>secg/sect163k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect163k1/1</id>
- <inline>0x07759edd174e24fd20b34e6d43e51230f0f7f892ab,0x05e4bf4321769ea3f4dc92abe028069f8db0fc0dc1</inline>
- <curve>secg/sect163k1</curve>
- <desc>order = 0x800000000000000000004021145c1981b33f14bde</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect163r1/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x009917a2556e1856bc7ea9a472cd01bfb889b95835</inline>
- <curve>secg/sect163r1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect163r1/1</id>
- <inline>0x05a78dd5973d0d39a5970d49b7a13df98558981dcb,0x0340755fa31149f5bf1dd4bf1fa3ef38432babbe13</inline>
- <curve>secg/sect163r1</curve>
- <desc>order = 0x7fffffffffffffffffffe91556d1385394e204f36</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect163r2/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x02c25b85badf8927593d21c366da89c03969f34da5</inline>
- <curve>secg/sect163r2</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect163r2/1</id>
- <inline>0x00b8a6683b6d99c044e1086e4eef5d2bd80fd2df41,0x04f6dfa693e7017de96c6e002871b72b3eb6d77b83</inline>
- <curve>secg/sect163r2</curve>
- <desc>order = 0x80000000000000000000525fcefce182548469866</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect233k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect233k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect233k1</curve>
- <desc>order = 4</desc>
-</pubkey>
-<!--
-<pubkey>
- <id>sect233k1/2</id>
- <inline>0x01c90d47aff1ed1172eb861cbc5f11ade07f775b1fdd89b1665c464a97d9,0x002b41324d806a174953fb4ccf8bbeb4fd36cef6f30ccc93618dd282a8e0</inline>
- <curve>secg/sect233k1</curve>
- <desc>order = 0x100000000000000000000000000000d3ab7722b79a8ddf635abe2e757be</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/3</id>
- <inline>0x01f477bff0fda3ecd2fa1dff08045717ccf615189375e2437f539c1e1687,0x019f18a66f38eda89284e3979b2aa6ae034cc4a6c7999080815af028bafe</inline>
- <curve>secg/sect233k1</curve>
- <desc>order = 0x200000000000000000000000000001a756ee456f351bbec6b57c5ceaf7c</desc>
-</pubkey>
--->
-
-<pubkey>
- <id>sect233r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x0187f85627b97874e747ee31e06d71caaeea52f21253e5f946d061da9138</inline>
- <curve>secg/sect233r1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect233r1/1</id>
- <inline>0x00fe7bac18bdc41b4adbabaaa5dd95e7a170b63bb3519b5d897205fe779f,0x0109d0b6ef40d7f05129ee664be44ae57393716c0233857db6a3358926f7</inline>
- <curve>secg/sect233r1</curve>
- <desc>order = 0x2000000000000000000000000000027d2e9ce5f14d244063a4c079fc1ae</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect239k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect239k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect239k1</curve>
- <desc>order = 4</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect239k1/2</id>
- <inline>0x2e97f4bf96f4598e4dbbba188895e14b068d9c21ab8e261ffc7d43abc0f2,0x16e86c56595addfdaad811d4bc01df886838cb761332a5bd65f846d63dd3</inline>
- <curve>secg/sect239k1</curve>
- <desc>order = 0x400000000000000000000000000000b4f3fd8cf96dd23e383b5001c8f14a</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/3</id>
- <inline>0x718e787b457b7baf3b58bf38c42dd3347802801386fbbe78c4dd5ea31cc0,0x180ad3b3a1182279d21cdd1de3067572c5fe64c3641cc171515c68128cb9</inline>
- <curve>secg/sect239k1</curve>
- <desc>order = 0x80000000000000000000000000000169e7fb19f2dba47c7076a00391e294</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect283k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect283k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<pubkey>
- <id>sect283k1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/sect283k1</curve>
- <desc>order = 4</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect283k1/2</id>
- <inline>0x07801fcb7c8e5dd6f8c21c60dd7c13cd472dedffe20c3331d084eb4ba32f7b4b13a3510c,0x01960ead4b2a835d27a626fab5fc6e779b511c680a5e6af9b42d67228261a2add4220335</inline>
- <curve>secg/sect283k1</curve>
- <desc>order = 0x3ffffffffffffffffffffffffffffffffffd35c5da0eaee4cbbfeff288a3c0c3c2c78c2</desc>
-</pubkey>
-<pubkey>
- <id>sect283k1/3</id>
- <inline>0x00896ce7c7065cc160ca721127910f598edc8b1e9be077d4756f31aee5705a00302d2e1d,0x0381c6394dbf16cf75f9e79c830e57e5a398ba77258e6d224692940eb925ec0b78ece889</inline>
- <curve>secg/sect283k1</curve>
- <desc>order = 0x7ffffffffffffffffffffffffffffffffffa6b8bb41d5dc9977fdfe511478187858f184</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect283r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x072bcc9c5792b1ebe81983089fb6f835a2fd220a304424ca17c082ae17442aede9b9b3f6</inline>
- <curve>secg/sect283r1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect283r1/1</id>
- <inline>0x0743efa0a997ab11f696f61403759fa6dac093afe26160fa6d4620dc10c73ecbd07d868d,0x013abc297e8c6568601a70a323208d22730b654374643683bb913daaf0910ff492cfb1c5</inline>
- <curve>secg/sect283r1</curve>
- <desc>order = 0x7ffffffffffffffffffffffffffffffffffdf20732cc1f92715202cb60854f9df5b660e</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect409k1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect409k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<pubkey>
- <id>sect409k1/1</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect409k1</curve>
- <desc>order = 4</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect409k1/2</id>
- <inline>0x013b10b72703d774f4873f985742cce57b9377e5f89049e493eac66748870f718ae0f3ae227b6d75f7e5f810d91da79f985cefdc,0x001aea0d33e0ae234db866482308cbc579e9c7cab1fad1b62dac2a3ea16bec7ca504da1d86370fc748d1ddbc443c8a920c7b9d14</inline>
- <curve>secg/sect409k1</curve>
- <desc>order = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffcbf0765a9d440801d88aafabda7c7cf94b696b90771c03cbf9e</desc>
-</pubkey>
-<pubkey>
- <id>sect409k1/3</id>
- <inline>0x00a6cc45b0ed549286beb3f391467dcd5106fed4fb850e0ca45ac7a5291fa1f73c2ebd66b5eb2fc6c3ad93a225c20e29d76172e1,0x019c34bda5074fe8c75e1017d8b64a87766467083fb6e17a4fc57ca39c6801a31eb71e824fa225922e361db0946c4a3e7445468d</inline>
- <curve>secg/sect409k1</curve>
- <desc>order = 0x1fffffffffffffffffffffffffffffffffffffffffffffffffff97e0ecb53a881003b1155f57b4f8f9f296d2d720ee380797f3c</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect409r1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x009935f7e4768ee2ef22f9b4a29f53cb5d93ab2ed0ad7ce57c1b2649fde895950cf6576773326c528a48e27b872accf0bc25d5ef</inline>
- <curve>secg/sect409r1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--
-<pubkey>
- <id>sect409r1/1</id>
- <inline>0x01f8a55ff6e55b1d023eca11efc629aedba15e7683f948a84ef6e3746470b2fe9f9c694f862714ec8dbb35ae8e5b760f488ae84a,0x00c0bbc113adacdb9815bb210178b081ef4b40c949fe52345ad21eab210667cc10b5ac0e60d7bb44fee1d6c544b3cc3a18ad0a23</inline>
- <curve>secg/sect409r1</curve>
- <desc>order = 0x20000000000000000000000000000000000000000000000000003c555ad4c25e6660f7cbf48f8793c0a5f0702c99a6fb34422e6</desc>
-</pubkey>
--->
-
-<pubkey>
- <id>sect571k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect571k1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<pubkey>
- <id>sect571k1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/sect571k1</curve>
- <desc>order = 4</desc>
-</pubkey>
-<!--<pubkey>
- <id>sect571k1/2</id>
- <inline>0x0311efd68e031548397fd197f3c9ea9ef2048b3835bbb52c06cc89fa29a609be1a4215805132ed6c30ed743e6221f34c5d43acd3777c88a42578a7b02d2a9af488c138b206832707,0x01692831faeb78797365873933fd9c5f5223d2bceba37aa6a4f6d128973e3263b124300568f039541e51c6214409523179aaecdf76e789921d84e12991113eacd03727d4c9754920</inline>
- <curve>secg/sect571k1</curve>
- <desc>order = 0x400000000000000000000000000000000000000000000000000000000000000000000002630a1c3e334c7c9672351b722fe82716c61b097cbac72703d23bd68b9fcef1ec6f82002</desc>
-</pubkey>
-<pubkey>
- <id>sect571k1/3</id>
- <inline>0x0519146e2a901338dce58310d786d30fd6806c620f6a7a9ba4389534dcdf16c6becdacb853fad56e4b048465b4037450468fb9bc6259448ce84a92fd8bfe9c3663dad3da48089517,0x05671e892895ca17683107f21da7741a3fdf47e546dfc6b6d2ed83c970ac88c33b7b522b0a1fe9a7dda46a7075d4881e88b9fc7f3a2002883f6c7d651f9c94252340b59b8abc0aeb</inline>
- <curve>secg/sect571k1</curve>
- <desc>order = 0x800000000000000000000000000000000000000000000000000000000000000000000004c614387c6698f92ce46a36e45fd04e2d8c3612f9758e4e07a477ad173f9de3d8df04004</desc>
-</pubkey>-->
-
-<pubkey>
- <id>sect571r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0732d556640c20b5dd739a058dffd58268d41c59135429eb041d7aa1255902e6362c4800a874ab0b60536b58460cd20c06f0340e3594a7f771bedfc10ce39b64699b08443b761c43</inline>
- <curve>secg/sect571r1</curve>
- <desc>order = 2</desc>
-</pubkey>
-<!--
-<pubkey>
- <id>sect571r1/1</id>
- <inline>0x01e4b7514be19101ec1d9f032bdba65dd1d73465bc1425e3847f44b7b2c78669358ab7bb34dec5202db32c0e65f8f4e0c5c0db8ae19537307ba6391dfa7831375b1b3957d403477a,0x00f04eb4a9ce0f18f879143faea24107682602d9319105a62c2758da491014ae34280a32830a1e239d0e89b3a3ff60acb640afc01aa56dcb8344423f0ad9f071af3d95d7675578fc</inline>
- <curve>secg/sect571r1</curve>
- <desc>order = 0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffccc39c31feab30e6100b3630d0470a3d8fbb39422c3bd27aa2e9acdd0705d3765fd09c8e</desc>
-</pubkey>-->
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_128.csv b/src/cz/crcs/ectester/data/composite/carmichael_128.csv
deleted file mode 100644
index 400abca..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8d4731c77d3462993d75627d4ea254ef,0x7374f7d098c61f64d0dcd328b537e22c,0x3658ca99638dc513932535134f48536b,0x7d5beaa13395695173e3371b7638347a,0x6f1c533a21abb60316bb9529528910c4,0x8d4731c77d346297e54306afea3730a1,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_192.csv b/src/cz/crcs/ectester/data/composite/carmichael_192.csv
deleted file mode 100644
index 7c21982..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8b72c1f15aacdcc4c3d881b3e14fa5e07f614ffd25613c95,0x4de73fecdd02978832f2025306474f85af670aa44735bec4,0x55fa4ea6cbf5241ff5c3734bef8db6399fa45ffbf6450f45,0x0236516a5b59cd7871ed1403e820f07d1795483b5c1cc7c7,0x137236f344d2e6e51476662acc70a2247f81d4801b0b9fa4,0x8b72c1f15aacdcc4c3d881b2a6256f87e98d12e5385af0b9,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_224.csv b/src/cz/crcs/ectester/data/composite/carmichael_224.csv
deleted file mode 100644
index d72a30c..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x929fe6161bc19ea029efb679c883576d18d69b5b3a3870eaf80d49a3,0x159ef3437e3d7297247f6ad693c1d80f069cb9eb98a0c679668e5ff9,0x6448a16b4ed54d4532e4145cb5fa9a0cd623232d350f706742aeac8c,0x816e1a2510e83da094374558ba2df28976404fcff6c18bfb5eb8cbf9,0x78f245d80d0e1e18e73272fef47911883ae1ab2af985f93f06dbc002,0x929fe6161bc19ea029efb679c881d967bd62678011c1949852a0b119,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_256.csv b/src/cz/crcs/ectester/data/composite/carmichael_256.csv
deleted file mode 100644
index fea4281..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x974a679ba3168a019e1f069aac82c999e2612f1957052c56607e8002ef36be53,0x51f15e6797f0a4f0f049b1aedb340118e9584727c5668fe856ad8e2fa111f12d,0x4e7c9daa52715b65db00a3f85ec87bf6a8cc1c312845fc302fc724eb0067d82e,0x6737dcaa9b8198f73599b700e6b3bfda05731528b620f9080799fd6d491be926,0x0f71d01a2ac0f12fe6db25cc420578e9acb729d007580b139cb4897d6421517c,0x974a679ba3168a019e1f069aac82c9986c8ed1c88f1d90e54250abfb0a363941,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_384.csv b/src/cz/crcs/ectester/data/composite/carmichael_384.csv
deleted file mode 100644
index 3002514..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_384.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa10402c0f3ab3f57b7ddf22e1b7054a8b2a292e3466496d060a5264d9fe29e2fc22347b3b6c21cdf7cba591fd00abd29,0x3dafe0a9c8fb6540cfb52253c08d63742c122062d031f96b0d901d27c9a91d9cefc6d5df27b9f56664860d02b98bc00c,0x3ae6993a790b7e73d67d1cd3a1376c08b9effb7a43211cd169d4e5871bdf096827d953a9f1a98ad11748b22dadf28f07,0x2f2843692b78f89332597df8bec5f5c55767af145ade2c4ad6a4e08fc772c5b7e2bab7d1cb054ebee4367739fe5d5e5c,0x6940f0d9cd2276b4c909e730cdb909a8742a2abee52fe157ca7401d1d825f57145a3cc20522910b28b90cffc38d64e9b,0xa10402c0f3ab3f57b7ddf22e1b7054a8b2a292e3466496d056717d18f11d70554d3bff46c2b156dc594b563cf7ce93d1,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_512.csv b/src/cz/crcs/ectester/data/composite/carmichael_512.csv
deleted file mode 100644
index 59d0b03..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_512.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9c4dc6f1cd53c38d5af75215620fb6d643257fb1f658d3e5d3b5412dee1bce65b734e62f7a592cda1f6218a11d07f791503e00190b94521255c291e59a069367,0x624745292ab68c1d121cc5f7bda57be0be0fc2461c212494d44f4d522bf797f31c47ba99b44c7145313aebe5bb03893ed11cfc926082e51426cc2b4347746aa5,0x456e5b484249ffa61273c26a91941dd9f1153b4e972df10cfe7c32c64f8aa6ac0f9ec02b63dec7daff1f30eb1a5ac7b641671092f723175f092f13e5f41f1399,0x4348b5167f4f5d7c3d1265d5f08e08db97cd506b9b2e546d94065220597e79291c2c2ece0f6b904a2a8c39f3adc6706724b56dc26804e19e5fefce5a7763d241,0x61bc72b13f6954704e8d219c2d1a20824dc759503f49b8aed3de1acb1761d68a68fbc93064ba12cac87344690be9027e763e3889ae561904c68bc586407018db,0x9c4dc6f1cd53c38d5af75215620fb6d643257fb1f658d3e5d3b5412dee1bce670a65fd73b857d9d8111f52eb305cfc13d96ca09cdc88e257b289d02d3239d259,0x01
diff --git a/src/cz/crcs/ectester/data/composite/carmichael_521.csv b/src/cz/crcs/ectester/data/composite/carmichael_521.csv
deleted file mode 100644
index 47ec1c3..0000000
--- a/src/cz/crcs/ectester/data/composite/carmichael_521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011ebb4ebb42f370324a2b937a20c443f110e1e3c40ecb3eb63af873d0c86e7cce05e5416605f1fcfc8296c879bbea344084007bb8fc2c704d85fc4b7fcdc0a4a001,0x00be420c826bac034b4b24ba623a2551510f6663babc95d6741dd68ab05adf6cf2624b1d47fb76c7b0b3edae8c436befe0b5d536525bd662e911529d00c05437e1db,0x0087789843e5da542f34b7c9737db3f6dbaf515788f355b0e2e36d66eb65d1a183a95a88fb9ffa27807961581ed69473046df573baab472fca6a361228bf326fa7f7,0x00457d321b63688cff7ddb0c04fb4bec1b0da6b5af8cac11b9d6fdce431e80d4b48947329078a7c1c5ca9aeb351a2514f89ef8215adaad9af4f581df098fa088aba6,0x00c286d2f1e48e58787c83878624b273db0fa6c3de13e59e326c0f783a40056dd3623688156396986179d5ee97cf9df846ac7a3180a27a23a45cbb400d9553d8a659,0x11ebb4ebb42f370324a2b937a20c443f110e1e3c40ecb3eb63af873d0c86e7cce1752f780ce79d0886704c8603b16dbb491481c1b6682865a9b7f83440515fbe561,0x01
diff --git a/src/cz/crcs/ectester/data/composite/composite128.csv b/src/cz/crcs/ectester/data/composite/composite128.csv
deleted file mode 100644
index 66b7011..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc8bb039faeca04585e1d5864fbc05f6b,0x90af1043a837133b556495fe1e080b7c,0x916d1eaf6cc9eee0f86e5bd6313ba6fc,0xacb0cfa25821e758258ee3c7ddd37cbf,0x1fcb4b9c5c3f9a902f19130755c802b9,0xc8bb039faeca045765097266c32b334f,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite128_pq.csv b/src/cz/crcs/ectester/data/composite/composite128_pq.csv
deleted file mode 100644
index 8aea6b2..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128_pq.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xee6b3964632807cf11b8b9dba1b4f099,0x1fd6f78c0303652c5b7de184a4744f98,0x2da1b3253571565989f3b72b865a3e27,0x7c23e2a7e80b6586a1f9e1c9d4fbadc2,0xe987ee5eb715e2eb8cc8ad77311cfe0a,0xee6b3964632807cd9c885b5658f1a7c7,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite128_pq1.csv b/src/cz/crcs/ectester/data/composite/composite128_pq1.csv
deleted file mode 100644
index a551487..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128_pq1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xee6b3964632807cf11b8b9dba1b4f099,0x1fd6f78c0303652c5b7de184a4744f98,0x2da1b3253571565989f3b72b865a3e27,0x6ef5b1d42abdbd6f44bcf4d64504927c,0x73e82c27b93032b7a7a15111d1569bb3,0x000000000000000000000003f76917eb,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite128_pq2.csv b/src/cz/crcs/ectester/data/composite/composite128_pq2.csv
deleted file mode 100644
index 69181df..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128_pq2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xee6b3964632807cf11b8b9dba1b4f099,0x1fd6f78c0303652c5b7de184a4744f98,0x2da1b3253571565989f3b72b865a3e27,0x73ca0050dff0de43cff4a026d8aa4baa,0xebd7490611fe3886fe5a8083d344edd0,0x000000003c1be1d1dd7edf84b8013495,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite128_rg0.csv b/src/cz/crcs/ectester/data/composite/composite128_rg0.csv
deleted file mode 100644
index 2e039f4..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128_rg0.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xee6b3964632807cf11b8b9dba1b4f099,0x1fd6f78c0303652c5b7de184a4744f98,0x2da1b3253571565989f3b72b865a3e27,0x6ef5b1d42abdbd6f44bcf4d64504927c,0x73e82c27b93032b7a7a15111d1569bb3,0xee6b3964632807cd9c885b5658f1a7c7,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite128_small.csv b/src/cz/crcs/ectester/data/composite/composite128_small.csv
deleted file mode 100644
index fbcbdca..0000000
--- a/src/cz/crcs/ectester/data/composite/composite128_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc8bb039faeca04585e1d5864fbc05f6b,0x90af1043a837133b556495fe1e080b7c,0x916d1eaf6cc9eee0f86e5bd6313ba6fc,0x746fa441b3a54d3c531bd59d119f400d,0x73aff68dbd96e1485cd2de0f6389cc70,0x00000000000000000000000000000003,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160.csv b/src/cz/crcs/ectester/data/composite/composite160.csv
deleted file mode 100644
index a78d77c..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9b0bafb73969e379b49753fa1b3cc65e9ca73adf,0x93091909c640bcdf66f470c1627ec776e9f625cc,0x69c34611c6d4cb088365ae95bf2d7d9c97aaf224,0x34e7895542e4986cd2884d9b6571cf0a955bba12,0x8ae9489212982d059b483d08a9dac6587ad67d8e,0x9b0bafb73969e379b496b7f060d2e76956ba8504,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160_pq.csv b/src/cz/crcs/ectester/data/composite/composite160_pq.csv
deleted file mode 100644
index 3f43b50..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160_pq.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x919cf0a89ca7a8ea2f61156ea4b3100a2a357477,0x75cd1f1c32f1e5d2b2d54db103b22d296de34722,0x3177d3e2f79c884a0b1a6e74d9843c3a52e794de,0x46239bb42c524f45764e8edba8c958203d185886,0x6bce8ab48c9b4d0ab4083122ea9684173f9b07a9,0x919cf0a89ca7a8ea2f626ab2ab86ff4a074a5d51,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160_pq1.csv b/src/cz/crcs/ectester/data/composite/composite160_pq1.csv
deleted file mode 100644
index debd466..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160_pq1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x919cf0a89ca7a8ea2f61156ea4b3100a2a357477,0x75cd1f1c32f1e5d2b2d54db103b22d296de34722,0x3177d3e2f79c884a0b1a6e74d9843c3a52e794de,0x706deef87d4593bbeaa70bc2609e1d8c0e2e0c10,0x64df2537d395da2e0cb8c7e340426b64699cf325,0x00000000000000000000000af2407f270b81f45f,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160_pq2.csv b/src/cz/crcs/ectester/data/composite/composite160_pq2.csv
deleted file mode 100644
index efd7475..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160_pq2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x919cf0a89ca7a8ea2f61156ea4b3100a2a357477,0x75cd1f1c32f1e5d2b2d54db103b22d296de34722,0x3177d3e2f79c884a0b1a6e74d9843c3a52e794de,0x0818df9ccebf5b3fd422d00393d346b314e48f98,0x75bde540b81b5bf0ab45c86fbff7bb2e7ec833cb,0x00000000000000000d4d7041e1dbf10b42f48c4f,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160_rg0.csv b/src/cz/crcs/ectester/data/composite/composite160_rg0.csv
deleted file mode 100644
index e6a1a95..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160_rg0.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x919cf0a89ca7a8ea2f61156ea4b3100a2a357477,0x75cd1f1c32f1e5d2b2d54db103b22d296de34722,0x3177d3e2f79c884a0b1a6e74d9843c3a52e794de,0x706deef87d4593bbeaa70bc2609e1d8c0e2e0c10,0x64df2537d395da2e0cb8c7e340426b64699cf325,0x919cf0a89ca7a8ea2f626ab2ab86ff4a074a5d51,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite160_small.csv b/src/cz/crcs/ectester/data/composite/composite160_small.csv
deleted file mode 100644
index 2adaa8b..0000000
--- a/src/cz/crcs/ectester/data/composite/composite160_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9b0bafb73969e379b49753fa1b3cc65e9ca73adf,0x93091909c640bcdf66f470c1627ec776e9f625cc,0x69c34611c6d4cb088365ae95bf2d7d9c97aaf224,0x68684425389f5552a24b7c205e19da7a0c10a1cb,0x825ecf13c08f314cd6ad5eae73044c71e9876409,0x0000000000000000000000000000000000000003,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192.csv b/src/cz/crcs/ectester/data/composite/composite192.csv
deleted file mode 100644
index a9fbe1f..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xabe758cde9fc09b714f543b4acac1550c09297279d4d2a1f,0x41e9bf05575d991e1e3393fc1746f2eb49e7f9b34867343e,0x54c5db9d913d1afeabce6e11ea623f8536dd6eef8eb5dfff,0xa8ee9eaafc61a1ae53da6815a644a95ccfa6c9c10de617f8,0x396ebe9cb965a02dd72f7a4f96dfc48c6ac74b49a93216d1,0xabe758cde9fc09b714f543b5567a1cda695faff0d96cbf46,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192_pq.csv b/src/cz/crcs/ectester/data/composite/composite192_pq.csv
deleted file mode 100644
index 47b8a13..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192_pq.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa261fff62647eebf810a404f0c80a971dd7c7838fdc52b5b,0x87502ebb62d26e1eca06c434f8ef069dfb2c287d6183750c,0x4ad6ce1f16e1bfc3d40f0027d787aeadb53846d69099a883,0x253e1db7210418abfe1de82c0053098e90bb15ad4f20096f,0x962c565cb0dd62b6a04be33ec7b20a1b3e7f23e24d48c6c2,0xa261fff62647eebf810a404f23ba4db93199e2e02ccffdfd,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192_pq1.csv b/src/cz/crcs/ectester/data/composite/composite192_pq1.csv
deleted file mode 100644
index 664d35e..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192_pq1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa261fff62647eebf810a404f0c80a971dd7c7838fdc52b5b,0x87502ebb62d26e1eca06c434f8ef069dfb2c287d6183750c,0x4ad6ce1f16e1bfc3d40f0027d787aeadb53846d69099a883,0x6366613b66339fa580f390d630ccf9b535437229aa8b61cd,0x2abab8c0e803a3612c7a7fbcb47e06fd8ef42a7a7d8c380f,0x00000000000000000000000000302b72431ff070e7e06799,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192_pq2.csv b/src/cz/crcs/ectester/data/composite/composite192_pq2.csv
deleted file mode 100644
index 33fe0f3..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192_pq2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa261fff62647eebf810a404f0c80a971dd7c7838fdc52b5b,0x87502ebb62d26e1eca06c434f8ef069dfb2c287d6183750c,0x4ad6ce1f16e1bfc3d40f0027d787aeadb53846d69099a883,0x6366613b66339fa580f390d630ccf9b535437229aa8b61cd,0x1b975fa3848bd68f34f6a08b7cf190bcaeaf9782270e2413,0x00000000000000000000035efd8bad55038e6bd22db8b805,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192_rg0.csv b/src/cz/crcs/ectester/data/composite/composite192_rg0.csv
deleted file mode 100644
index a55a994..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192_rg0.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa261fff62647eebf810a404f0c80a971dd7c7838fdc52b5b,0x87502ebb62d26e1eca06c434f8ef069dfb2c287d6183750c,0x4ad6ce1f16e1bfc3d40f0027d787aeadb53846d69099a883,0x6366613b66339fa580f390d630ccf9b535437229aa8b61cd,0x2abab8c0e803a3612c7a7fbcb47e06fd8ef42a7a7d8c380f,0xa261fff62647eebf810a404f23ba4db93199e2e02ccffdfd,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite192_small.csv b/src/cz/crcs/ectester/data/composite/composite192_small.csv
deleted file mode 100644
index a90364d..0000000
--- a/src/cz/crcs/ectester/data/composite/composite192_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xabe758cde9fc09b714f543b4acac1550c09297279d4d2a1f,0x41e9bf05575d991e1e3393fc1746f2eb49e7f9b34867343e,0x54c5db9d913d1afeabce6e11ea623f8536dd6eef8eb5dfff,0x94863540fdd9e8f415df79e18aee4bdd0914127581b6bb15,0x3aa760e488d12f8f93b10da531e1dbc033db25729119839f,0x000000000000000000000000000000000000000000000003,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224.csv b/src/cz/crcs/ectester/data/composite/composite224.csv
deleted file mode 100644
index 7902f2b..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe6cacc569ea2a63aea0409959625c8f8238b0ddc2565046db20390ed,0x20484bda40fdcade9ff6f9147076e2824e5f0d057a4a95cfb1b9312d,0x14cacbe6ad4a700a3f6a44cdc0a60d6fd0a4f2052c5b9ae5661fd964,0x92eddfe929f73cd4088dc865bbbc33e7828c7d9c9cd7e978d226aba0,0x944111a52330a4986388b10e709ff9b1408f361cd353bed31c43ad4c,0xe6cacc569ea2a63aea04099596266ee5ef526d9cf5034d56ebedb660,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224_pq.csv b/src/cz/crcs/ectester/data/composite/composite224_pq.csv
deleted file mode 100644
index ffa2cc1..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224_pq.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa0dccd401872aa37c279e2469a08d97d559addb6fc870a1766f80e6f,0x393797f1d924dc63c761d4497086d09284a922a5517c07f93f3a075c,0x54f4673322854dafc1241b66192134ea9e18f8849c45660b793abb97,0x4f3b94b4e9234f3611bfe74d69ad06178e06c5f56fa100233f0d43e1,0x0eb042a295465c53ca6e01ff8c2cf4d029bf6d4a646fed830468d73a,0xa0dccd401872aa37c279e2469a0791ea2f15e32a10632ec07cf3ff97,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224_pq1.csv b/src/cz/crcs/ectester/data/composite/composite224_pq1.csv
deleted file mode 100644
index 6a01e2d..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224_pq1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa0dccd401872aa37c279e2469a08d97d559addb6fc870a1766f80e6f,0x393797f1d924dc63c761d4497086d09284a922a5517c07f93f3a075c,0x54f4673322854dafc1241b66192134ea9e18f8849c45660b793abb97,0x1b189f3372946c9cbb421a60bc3a0a06d16cf3ce043781ada561834c,0x57e00f270dbc56c6c86946dcb6c6ab12133d168609c588b6960c357f,0x00000000000000000000000000000000001824ec370e405bfb5024db,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224_pq2.csv b/src/cz/crcs/ectester/data/composite/composite224_pq2.csv
deleted file mode 100644
index f8bc6df..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224_pq2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa0dccd401872aa37c279e2469a08d97d559addb6fc870a1766f80e6f,0x393797f1d924dc63c761d4497086d09284a922a5517c07f93f3a075c,0x54f4673322854dafc1241b66192134ea9e18f8849c45660b793abb97,0x97e540c8fc6f9603f25b1689895e5fe738565013675b1bd6c0e16a4b,0x66d0bbe7ee9b0e9e7e1d43b6a47e1d5550c696433c58ee06b94e8615,0x0000000000000000000006a99de2a928e8f227e7a2ed33a555f24ef5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224_rg0.csv b/src/cz/crcs/ectester/data/composite/composite224_rg0.csv
deleted file mode 100644
index 835676d..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224_rg0.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa0dccd401872aa37c279e2469a08d97d559addb6fc870a1766f80e6f,0x393797f1d924dc63c761d4497086d09284a922a5517c07f93f3a075c,0x54f4673322854dafc1241b66192134ea9e18f8849c45660b793abb97,0x1b189f3372946c9cbb421a60bc3a0a06d16cf3ce043781ada561834c,0x57e00f270dbc56c6c86946dcb6c6ab12133d168609c588b6960c357f,0xa0dccd401872aa37c279e2469a0791ea2f15e32a10632ec07cf3ff97,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite224_small.csv b/src/cz/crcs/ectester/data/composite/composite224_small.csv
deleted file mode 100644
index ea18b96..0000000
--- a/src/cz/crcs/ectester/data/composite/composite224_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe6cacc569ea2a63aea0409959625c8f8238b0ddc2565046db20390ed,0x20484bda40fdcade9ff6f9147076e2824e5f0d057a4a95cfb1b9312d,0x14cacbe6ad4a700a3f6a44cdc0a60d6fd0a4f2052c5b9ae5661fd964,0xb4fbabc7cf96b62b08edbaa2df53346bbb871c121bbb35e771c74db5,0x61cf8b556f068f45ec69963964a0e8ab72c1fa0be48e2ea886235956,0x00000000000000000000000000000000000000000000000000000003,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256.csv b/src/cz/crcs/ectester/data/composite/composite256.csv
deleted file mode 100644
index 7769ef2..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdc42862158cdcfc8fbe8c4ec28b02e0e12624ebc15f6486163df218253e1b953,0x01f355375dac7e69cc12c22ce747782bf998252f1c9c9c983273bc2b7e721461,0x22098140e10d5d88bcc96a558500a022d0252bfbe438d3475ef2d90261fe3b1f,0x3826ea1bacb3a90c653302db7fb7e6db4ea8d4f62e68eff73272d79fe61cfd8b,0x4ecd7019f52f3103f7810639f13cfc82fa52b47ad37d29a316bc052fbedde067,0xdc42862158cdcfc8fbe8c4ec28b02e0f78ce34249a0454ca049ad0ef7c2fcfea,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256_pq.csv b/src/cz/crcs/ectester/data/composite/composite256_pq.csv
deleted file mode 100644
index 380f756..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256_pq.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf75e78a6e2acb23d6317e57258287c00597e24881e0686039d0badb77b4e6b21,0x1aafadea1da31b45bbc02da735cc341f9cf9915884eb9cd31441520ead906b38,0x0f7f209988b0eada7190201ace3b3972d6ce3cbadac9933716d08645a7c31c63,0x4c4765a35cb2de9cc548d4dd47778b70395d023c4bf112f4bc820431502384e9,0x25bffa1f9ae1af10177f32abf13d3f607e78415c89676eeb13330098c9794503,0xf75e78a6e2acb23d6317e57258287c021fa26f10c359320ee8758b4e1f2c605d,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256_pq1.csv b/src/cz/crcs/ectester/data/composite/composite256_pq1.csv
deleted file mode 100644
index 9ac845f..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256_pq1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf75e78a6e2acb23d6317e57258287c00597e24881e0686039d0badb77b4e6b21,0x1aafadea1da31b45bbc02da735cc341f9cf9915884eb9cd31441520ead906b38,0x0f7f209988b0eada7190201ace3b3972d6ce3cbadac9933716d08645a7c31c63,0x7b258197e20de13053c3384efd34c3f17172d8ee22c4e23491ca2f867383d8de,0x4aa05d30077ed1bfa45301348e6ab9b1d436f1755c6747c958d4dc24fcb6996c,0x000000000000000000000000000000000000000000000000743bc7ea193d40db,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256_pq2.csv b/src/cz/crcs/ectester/data/composite/composite256_pq2.csv
deleted file mode 100644
index b8b5e9b..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256_pq2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf75e78a6e2acb23d6317e57258287c00597e24881e0686039d0badb77b4e6b21,0x1aafadea1da31b45bbc02da735cc341f9cf9915884eb9cd31441520ead906b38,0x0f7f209988b0eada7190201ace3b3972d6ce3cbadac9933716d08645a7c31c63,0xda63037417b6151b844b2367428f52692f31f14a6654edc58edb5864d0e85ff7,0x8191a142a1c4f913e146af089b1cbe12a803473d207e93697afd1a83818e08be,0x000000000000000220d23234534b240aac0efa70a3bc44e046c2431ad5a32d27,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256_rg0.csv b/src/cz/crcs/ectester/data/composite/composite256_rg0.csv
deleted file mode 100644
index 0c2d123..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256_rg0.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf75e78a6e2acb23d6317e57258287c00597e24881e0686039d0badb77b4e6b21,0x1aafadea1da31b45bbc02da735cc341f9cf9915884eb9cd31441520ead906b38,0x0f7f209988b0eada7190201ace3b3972d6ce3cbadac9933716d08645a7c31c63,0x93d1f4d02d6f0d2ea7b80f7095e70e731bcf66fb8118e7698a16eab45aadcaa4,0x51dccaa47e35062383e4878625bf2116be5413c34a1b964c7547f65297f0bc04,0xf75e78a6e2acb23d6317e57258287c021fa26f10c359320ee8758b4e1f2c605d,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite256_small.csv b/src/cz/crcs/ectester/data/composite/composite256_small.csv
deleted file mode 100644
index 58c0a75..0000000
--- a/src/cz/crcs/ectester/data/composite/composite256_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdc42862158cdcfc8fbe8c4ec28b02e0e12624ebc15f6486163df218253e1b953,0x01f355375dac7e69cc12c22ce747782bf998252f1c9c9c983273bc2b7e721461,0x22098140e10d5d88bcc96a558500a022d0252bfbe438d3475ef2d90261fe3b1f,0x8ca20dd1fa045339a171513fb1daa25fa7439e4b97c129c6039e4b9abbac1532,0xb565bde8fe9831f0bce07d70784dc1b7064c443b54b5e96408c1942e30437cc3,0x0000000000000000000000000000000000000000000000000000000000000005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite384.csv b/src/cz/crcs/ectester/data/composite/composite384.csv
deleted file mode 100644
index 4e9d058..0000000
--- a/src/cz/crcs/ectester/data/composite/composite384.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x91520c5e44d7a5e9c673943d2fc502d2b35a1c9edc6189da10277423d7381fd4671fc706ff1dce6f8513317842fb655b,0x6c64adff869b4e0b9f0dd35945b24e3ab389232b1e506a71306e389dddbf43ec6c73d290fab04976da246fd77a7e28dd,0x4004c33e4f8b4de57064543802ca11810c79aa9990796d5750dba07f3e4e98f3dd18b3abe052208741149c3ad0fe6f56,0x39bf2e7d67ad506e074e04c1b73a4add511b0579cdae07bd6c025c703ee31ff33c0445c2cb10e465f0f453d996751e4e,0x667ec38866be3e87229e31e6dabc2444e2603e8118c0316e592571e9a904423e4792c18c0360ae57fcdaec87901d2e0b,0x91520c5e44d7a5e9c673943d2fc502d2b35a1c9edc6189db347c42a7d0924b7cd1414d57f582a4b96177c911e9bb3ddd,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite384_small.csv b/src/cz/crcs/ectester/data/composite/composite384_small.csv
deleted file mode 100644
index 00b643b..0000000
--- a/src/cz/crcs/ectester/data/composite/composite384_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x91520c5e44d7a5e9c673943d2fc502d2b35a1c9edc6189da10277423d7381fd4671fc706ff1dce6f8513317842fb655b,0x6c64adff869b4e0b9f0dd35945b24e3ab389232b1e506a71306e389dddbf43ec6c73d290fab04976da246fd77a7e28dd,0x4004c33e4f8b4de57064543802ca11810c79aa9990796d5750dba07f3e4e98f3dd18b3abe052208741149c3ad0fe6f56,0x5136c182f03241ec87e6eec1728c1fb2d6b2ddcd4d9abf2a110c337419c4ec7cc8386b7b9ea9f5cb18b0f3c2a78e6489,0x9130cb73f8064fddb24d8c6a216b57fe99df93bcc82c93343617a5246ca1643fe57a06d6112a1791d1bd3643fbd9c041,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite521.csv b/src/cz/crcs/ectester/data/composite/composite521.csv
deleted file mode 100644
index 8681273..0000000
--- a/src/cz/crcs/ectester/data/composite/composite521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01c230ff4a64e33ad6da8361c7e2bf2a85e4ad5e88f8e3e8e7e3c42a6b9c9883b3690e2f82b38a684e823a257b3d5c4c2d7c34bfcb937fe5658c77247b28bc90c6af,0x00852cf32173a9b3a8a2316bbe6ba0b98efcc41247a17a8aead02ccc7cb90870daccd10a44e9385abf0d0ae175fa03c0facab1d2069b79795f36d10ce25430676805,0x0174e20e49d5970117cdfc61c0a0ae062519c0c4d577f42e0d3f1cd443732b8e62deb34922a4a6d85b8b7f6df61dadffec95c17babbfaf5c57598033be0b1a44e32f,0x01b1dbc5bd175cbd8699895698b10d047853679f048261094854134de1d6a81ffdd1cc31ede64293c9bee543ad2113c164bd1da92f5c3aa7ba7f0378bdb58251d870,0x0188b8c020cc1504eedb4fb859e40b8031cb26d9273efa2578bf7da01db994cf2a5cf2780b9a7ff6d33210b962ae20c56f71b7fa2b36deef33d7d675c6136acd73c1,0x1c230ff4a64e33ad6da8361c7e2bf2a85e4ad5e88f8e3e8e7e3c42a6b9c9883b36ec447771e871c188d3f04a4e407f1d659335dd0e351bd7f3f76a639726d6dc0d2,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/composite521_small.csv b/src/cz/crcs/ectester/data/composite/composite521_small.csv
deleted file mode 100644
index 15df9c8..0000000
--- a/src/cz/crcs/ectester/data/composite/composite521_small.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01c230ff4a64e33ad6da8361c7e2bf2a85e4ad5e88f8e3e8e7e3c42a6b9c9883b3690e2f82b38a684e823a257b3d5c4c2d7c34bfcb937fe5658c77247b28bc90c6af,0x00852cf32173a9b3a8a2316bbe6ba0b98efcc41247a17a8aead02ccc7cb90870daccd10a44e9385abf0d0ae175fa03c0facab1d2069b79795f36d10ce25430676805,0x0174e20e49d5970117cdfc61c0a0ae062519c0c4d577f42e0d3f1cd443732b8e62deb34922a4a6d85b8b7f6df61dadffec95c17babbfaf5c57598033be0b1a44e32f,0x00a4b42ad90c0e3f7e342d8d661b4d5162ab7928b4938ab660b2e6fea3213c5d4b420123f65141a8eb7b4a46173bfce6ea1577df94f6f934f72d459c4dd3c0ef038e,0x003316c4b6c5c6b3ab3eee7f1ff365cce6045fdc43d4e6c64efa7789f2626676b47b488e6612d291d60d4a788ddd2e8b1aa8bfff02e105a285532a20ac08fa1088e7,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/curves.xml b/src/cz/crcs/ectester/data/composite/curves.xml
deleted file mode 100644
index 34ad33a..0000000
--- a/src/cz/crcs/ectester/data/composite/curves.xml
+++ /dev/null
@@ -1,668 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>whole/composite128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128.csv</file>
- <desc>r = order = 0x03 * 0x05 * 0x3b * 0x3a107e02cd073c8e24bf55730f1733</desc>
- </curve>
- <curve>
- <id>whole/composite160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160.csv</file>
- <desc>r = order = 0x02 * 0x03 * 0x6b * 0x1ee99b75143833bbc11d409601c25f9566a001</desc>
- </curve>
- <curve>
- <id>whole/composite192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192.csv</file>
- <desc>r = order = 0x02 * 0x03 * 0x05 * 0x13 * 0x19bc3c00e2a7ad9e40d12e5d9e29a2b5ce80b3a3e84295</desc>
- </curve>
- <curve>
- <id>whole/composite224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224.csv</file>
- <desc>r = order = 0x02 * 0x03 * 0x1d * 0x1538e6a6dc906d724a7bf51c77bce9d46865bd92d8bca01f887405</desc>
- </curve>
- <curve>
- <id>whole/composite256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256.csv</file>
- <desc>r = order = 0x02 * 0x05 * 0x11 * 0x1382cadcdd2b90b90b81eda82433bf574b5d8f5654dcc62341c7e967f2e811</desc>
- </curve>
- <curve>
- <id>whole/composite384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>composite384.csv</file>
- <desc>r = order = 0x05 * 0x0b * 0x3d *
- 0xb16aa7dc50145337cf1b2f38018ccb5cf44c22a2f7d7c22bbe5c572d2cb9a04cb1081357c6a1c97cc39ab62596867
- </desc>
- </curve>
- <curve>
- <id>whole/composite521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>composite521.csv</file>
- <desc>r = order = 0x02 * 0x05 * 0x1f *
- 0x4a5aac4fac3ea253b66c3e650f5173b30467f28b8e841d37ce69bb0831a5939ad3dd082b750577ec4592d4d58916c87a9b732d8ddae435c26f8f779d2467f50f
- </desc>
- </curve>
-
- <curve>
- <id>small/composite128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128_small.csv</file>
- <desc>r = 0x03</desc>
- </curve>
- <curve>
- <id>small/composite160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160_small.csv</file>
- <desc>r = 0x03</desc>
- </curve>
- <curve>
- <id>small/composite192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192_small.csv</file>
- <desc>r = 0x03</desc>
- </curve>
- <curve>
- <id>small/composite224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224_small.csv</file>
- <desc>r = 0x03</desc>
- </curve>
- <curve>
- <id>small/composite256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256_small.csv</file>
- <desc>r = 0x05</desc>
- </curve>
- <curve>
- <id>small/composite384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>composite384_small.csv</file>
- <desc>r = 0x05</desc>
- </curve>
- <curve>
- <id>small/composite521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>composite521_small.csv</file>
- <desc>r = 0x05</desc>
- </curve>
-
- <curve>
- <id>pq/composite128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128_pq.csv</file>
- <desc>r = 0x03f76917eb * 0x3c1be1d1dd7edf84b8013495</desc>
- </curve>
- <curve>
- <id>pq/composite128/1</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128_pq1.csv</file>
- <desc>r = 0x03f76917eb</desc>
- </curve>
- <curve>
- <id>pq/composite128/2</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128_pq2.csv</file>
- <desc>r = 0x3c1be1d1dd7edf84b8013495</desc>
- </curve>
-
- <curve>
- <id>rg0/composite128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>composite128_rg0.csv</file>
- <desc>|G| divides r(so [r]G = infinity), but r != |G| = 0x03f76917eb</desc>
- </curve>
-
- <curve>
- <id>pq/composite160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160_pq.csv</file>
- <desc>r = 0x0af2407f270b81f45f * 0x4d7041e1dbf10b42f48c4f</desc>
- </curve>
- <curve>
- <id>pq/composite160/1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160_pq1.csv</file>
- <desc>r = 0x0af2407f270b81f45f</desc>
- </curve>
- <curve>
- <id>pq/composite160/2</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160_pq2.csv</file>
- <desc>r = 0x4d7041e1dbf10b42f48c4f</desc>
- </curve>
-
- <curve>
- <id>rg0/composite160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>composite160_rg0.csv</file>
- <desc>|G| divides r(so [r]G = infinity), but r != |G| = 0x0af2407f270b81f45f</desc>
- </curve>
-
- <curve>
- <id>pq/composite192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192_pq.csv</file>
- <desc>r = 0x302b72431ff070e7e06799 * 0x35efd8bad55038e6bd22db8b805</desc>
- </curve>
- <curve>
- <id>pq/composite192/1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192_pq1.csv</file>
- <desc>r = 0x302b72431ff070e7e06799</desc>
- </curve>
- <curve>
- <id>pq/composite192/2</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192_pq2.csv</file>
- <desc>r = 0x35efd8bad55038e6bd22db8b805</desc>
- </curve>
-
- <curve>
- <id>rg0/composite192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>composite192_rg0.csv</file>
- <desc>|G| divides r(so [r]G = infinity), but r != |G| = 0x302b72431ff070e7e06799</desc>
- </curve>
-
- <curve>
- <id>pq/composite224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224_pq.csv</file>
- <desc>r = 0x1824ec370e405bfb5024db * 0x6a99de2a928e8f227e7a2ed33a555f24ef5</desc>
- </curve>
- <curve>
- <id>pq/composite224/1</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224_pq1.csv</file>
- <desc>r = 0x1824ec370e405bfb5024db</desc>
- </curve>
- <curve>
- <id>pq/composite224/2</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224_pq2.csv</file>
- <desc>r = 0x6a99de2a928e8f227e7a2ed33a555f24ef5</desc>
- </curve>
-
- <curve>
- <id>rg0/composite224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>composite224_rg0.csv</file>
- <desc>|G| divides r(so [r]G = infinity), but r != |G| = 0x1824ec370e405bfb5024db</desc>
- </curve>
-
- <curve>
- <id>pq/composite256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256_pq.csv</file>
- <desc>r = 0x743bc7ea193d40db * 0x220d23234534b240aac0efa70a3bc44e046c2431ad5a32d27</desc>
- </curve>
- <curve>
- <id>pq/composite256/1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256_pq1.csv</file>
- <desc>r = 0x743bc7ea193d40db</desc>
- </curve>
- <curve>
- <id>pq/composite256/2</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256_pq2.csv</file>
- <desc>r = 0x220d23234534b240aac0efa70a3bc44e046c2431ad5a32d27</desc>
- </curve>
-
- <curve>
- <id>rg0/composite256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>composite256_rg0.csv</file>
- <desc>|G| divides r(so [r]G = infinity), but r != |G| = 0x743bc7ea193d40db</desc>
- </curve>
-
- <curve>
- <id>pp/carmichael128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>carmichael_128.csv</file>
- <desc>r = Carmichael pseudoprime = 0x2ddbfe0f1f7 * 0x5bb7fc1e3ed * 0x8993fa2d5e3</desc>
- </curve>
- <curve>
- <id>pp/carmichael192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>carmichael_192.csv</file>
- <desc>r = Carmichael pseudoprime = 0x730ea70deea47eeb * 0xe61d4e1bdd48fdd5 * 0x1592bf529cbed7cbf</desc>
- </curve>
- <curve>
- <id>pp/carmichael224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>carmichael_224.csv</file>
- <desc>r = Carmichael pseudoprime = 0x2e6e4205e9ea74ebefd * 0x5cdc840bd3d4e9d7df9 * 0x8b4ac611bdbf5ec3cf5</desc>
- </curve>
- <curve>
- <id>pp/carmichael256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>carmichael_256.csv</file>
- <desc>r = Carmichael pseudoprime = 0x129e94800bf86bd2d04ce1 * 0x253d290017f0d7a5a099c1 *
- 0x37dbbd8023e9437870e6a1
- </desc>
- </curve>
- <curve>
- <id>pp/carmichael384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>carmichael_384.csv</file>
- <desc>r = Carmichael pseudoprime = 0x78b4fa97e97300a5c46b32fb522cf76f * 0xf169f52fd2e6014b88d665f6a459eedd *
- 0x16a1eefc7bc5901f14d4198f1f686e64b
- </desc>
- </curve>
- <curve>
- <id>pp/carmichael512</id>
- <bits>512</bits>
- <field>prime</field>
- <file>carmichael_512.csv</file>
- <desc>r = Carmichael pseudoprime = 0x2f6e41969c169b4e97b0a1c46ca4fb3a8f294afaefb *
- 0x5edc832d382d369d2f614388d949f6751e5295f5df5 * 0x8e4ac4c3d443d1ebc711e54d45eef1afad7be0f0cef
- </desc>
- </curve>
- <curve>
- <id>pp/carmichael521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>carmichael_521.csv</file>
- <desc>r = Carmichael pseudoprime = 0x170ac4fd154250e674f9ac6e0c29a214c6d6553e4f11 *
- 0x2e1589fa2a84a1cce9f358dc185344298dacaa7c9e21 * 0x45204ef73fc6f2b35eed054a247ce63e5482ffbaed31
- </desc>
- </curve>
-
- <curve>
- <id>varying/160/first/1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/2a.csv</file>
- <desc>r = 2 bit prime = 2</desc>
- </curve>
- <curve>
- <id>varying/160/first/2</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/2b.csv</file>
- <desc>r = 2 bit prime = 3</desc>
- </curve>
- <curve>
- <id>varying/160/first/3</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/3.csv</file>
- <desc>r = 3 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/4</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/4.csv</file>
- <desc>r = 4 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/5</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/5.csv</file>
- <desc>r = 5 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/6</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/6.csv</file>
- <desc>r = 6 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/7</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/7.csv</file>
- <desc>r = 7 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/8</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/8.csv</file>
- <desc>r = 8 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/10</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/10.csv</file>
- <desc>r = 10 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/12</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/12.csv</file>
- <desc>r = 12 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/14</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/14.csv</file>
- <desc>r = 14 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/16</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/16.csv</file>
- <desc>r = 16 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/20</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/20.csv</file>
- <desc>r = 20 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/25</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/25.csv</file>
- <desc>r = 25 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/32</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/32.csv</file>
- <desc>r = 32 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/48</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/48.csv</file>
- <desc>r = 48 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/64</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/64.csv</file>
- <desc>r = 64 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/70</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/70.csv</file>
- <desc>r = 70 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/80</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/80.csv</file>
- <desc>r = 80 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/90</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/90.csv</file>
- <desc>r = 90 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/96</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/96.csv</file>
- <desc>r = 96 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/112</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/112.csv</file>
- <desc>r = 112 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/128</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/128.csv</file>
- <desc>r = 128 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/135</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/135.csv</file>
- <desc>r = 135 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/140</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/140.csv</file>
- <desc>r = 140 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/144</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/144.csv</file>
- <desc>r = 144 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/146</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/146.csv</file>
- <desc>r = 146 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/148</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/148.csv</file>
- <desc>r = 148 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/150</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/150.csv</file>
- <desc>r = 150 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/first/152</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/152.csv</file>
- <desc>r = 152 bit prime</desc>
- </curve>
- <curve>
- <id>varying/160/cofactor/152</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/first/152_cofactor.csv</file>
- <desc>r = 152 bit prime, with correct cofactor</desc>
- </curve>
-
- <curve>
- <id>varying/160/second/140</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/140.csv</file>
- <desc>r = 140 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/141</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/141.csv</file>
- <desc>r = 141 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/142</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/142.csv</file>
- <desc>r = 142 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/143</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/143.csv</file>
- <desc>r = 143 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/144</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/144.csv</file>
- <desc>r = 144 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/145</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/145.csv</file>
- <desc>r = 145 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/146</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/146.csv</file>
- <desc>r = 146 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/147</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/147.csv</file>
- <desc>r = 147 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/148</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/148.csv</file>
- <desc>r = 148 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/149</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/149.csv</file>
- <desc>r = 149 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/150</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/150.csv</file>
- <desc>r = 150 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/151</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/151.csv</file>
- <desc>r = 151 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/152</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/152.csv</file>
- <desc>r = 152 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/153</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/153.csv</file>
- <desc>r = 153 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/154</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/154.csv</file>
- <desc>r = 154 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/155</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/155.csv</file>
- <desc>r = 155 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/156</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/156.csv</file>
- <desc>r = 156 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/157</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/157.csv</file>
- <desc>r = 157 bit prime.</desc>
- </curve>
- <curve>
- <id>varying/160/second/158</id>
- <bits>160</bits>
- <field>prime</field>
- <file>varying/160/second/158.csv</file>
- <desc>r = 158 bit prime.</desc>
- </curve>
-
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/keys.xml b/src/cz/crcs/ectester/data/composite/keys.xml
deleted file mode 100644
index da770d8..0000000
--- a/src/cz/crcs/ectester/data/composite/keys.xml
+++ /dev/null
@@ -1,568 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <pubkey>
- <id>composite128/1</id>
- <inline>0x746fa441b3a54d3c531bd59d119f400d,0x73aff68dbd96e1485cd2de0f6389cc70</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 3</desc>
- </pubkey>
- <pubkey>
- <id>composite128/2</id>
- <inline>0x6e9dc37af66af0045d7a2e414d4bfb89,0x40b01d2f36c9a5b2a1cb28386dd12470</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 5</desc>
- </pubkey>
- <pubkey>
- <id>composite128/3</id>
- <inline>0x32076e371a48d82777ce851969439ab8,0xb049b7d6ba6f2d9c6ce240bc689d3556</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 15</desc>
- </pubkey>
- <pubkey>
- <id>composite128/4</id>
- <inline>0xc819a68e95796650cd7d11e8ad65806f,0x280e9c9b7e5d9a5e07653ee2afac83e7</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 59</desc>
- </pubkey>
- <pubkey>
- <id>composite128/5</id>
- <inline>0x66f66346d87e2214bf1bfc3331628c81,0x8c1a74b09bbbb515b027d89dcc1cecb2</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 177</desc>
- </pubkey>
- <pubkey>
- <id>composite128/6</id>
- <inline>0xa546a97bd17378bd6e5c42c4ab857cac,0x13b99be68904a968a8d4ca6feab23f40</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 295</desc>
- </pubkey>
- <pubkey>
- <id>composite128/7</id>
- <inline>0x6ae9f873a9da27b41e676d3514c96e56,0x8f6479493be1835cee6b9f29df21f74f</inline>
- <curve>composite/whole/composite128</curve>
- <desc>order = 885</desc>
- </pubkey>
-
- <pubkey>
- <id>composite160/1</id>
- <inline>0x37efeffb592df52c0080de1a5074505fb9bd7d6f,0x0000000000000000000000000000000000000000</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 2</desc>
- </pubkey>
- <pubkey>
- <id>composite160/2</id>
- <inline>0x68684425389f5552a24b7c205e19da7a0c10a1cb,0x825ecf13c08f314cd6ad5eae73044c71e9876409</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 3</desc>
- </pubkey>
- <pubkey>
- <id>composite160/3</id>
- <inline>0x61602e67d8e17442afb37c07ea9fff2beb6c5b63,0x525e64d325c225855df22c141ab48292e2f8f937</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 4</desc>
- </pubkey>
- <pubkey>
- <id>composite160/4</id>
- <inline>0x041fea694918a16ede5e6c32e24f52f7827b7942,0x0c4005ad4b02d3f04ba662cca7c5ae4de9a9ba1e</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 6</desc>
- </pubkey>
- <pubkey>
- <id>composite160/5</id>
- <inline>0x896db2058ec6de5bf0c3d4729449c161f3a6513c,0x168828b2d35afa6ae22cfb88470444ecfe31565a</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 12</desc>
- </pubkey>
- <pubkey>
- <id>composite160/6</id>
- <inline>0x5addb1c0c2b73b1c3bfa6ee1d4fa55c3d6cb79c8,0x18cf3b6fc6ac06a6af69817234799a7bed594e16</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 107</desc>
- </pubkey>
- <pubkey>
- <id>composite160/7</id>
- <inline>0x2a8b120fa9fb0901280068fac4c7343c91707974,0x3c64f73118aa3e6263f988428d4f8e931c835dbd</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 214</desc>
- </pubkey>
- <pubkey>
- <id>composite160/8</id>
- <inline>0x09814e9b98b521aa510d24e2eb68484f9cd4f446,0x030f959368478d906bd830105e1e645f9a3e7aa7</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 321</desc>
- </pubkey>
- <pubkey>
- <id>composite160/9</id>
- <inline>0x475d0927fdea77619a4c0f3d7f78fa17b1a82ebf,0x0f9ef6e4b67034f84f2568cf93bcd6244f99befb</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 428</desc>
- </pubkey>
- <pubkey>
- <id>composite160/10</id>
- <inline>0x441a137ed2bbe1397492bacec4d8d98e54e88fcd,0x1ba3217b753b1fd483ebd0eb6ce6642ab8f9b1d1</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 642</desc>
- </pubkey>
- <pubkey>
- <id>composite160/11</id>
- <inline>0x8fcb8221093a80fe3ab7ee7ce952ae78e21177c3,0x29c944efc6e04c8a3393470be6eff62e250795c8</inline>
- <curve>composite/whole/composite160</curve>
- <desc>order = 504</desc>
- </pubkey>
-
- <pubkey>
- <id>composite192/1</id>
- <inline>0x8220bcea81992c46bc57e0dae661eeff29e66d64b33253c5,0x000000000000000000000000000000000000000000000000</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 2</desc>
- </pubkey>
- <pubkey>
- <id>composite192/2</id>
- <inline>0x94863540fdd9e8f415df79e18aee4bdd0914127581b6bb15,0x3aa760e488d12f8f93b10da531e1dbc033db25729119839f</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 3</desc>
- </pubkey>
- <pubkey>
- <id>composite192/3</id>
- <inline>0x0cdf12ec0389daa5dc4fb9a877082e7acc4d7054d7eb320d,0x2a135f63802b9bb9064ffe6d319942ada312b0a06a506c68</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 5</desc>
- </pubkey>
- <pubkey>
- <id>composite192/4</id>
- <inline>0x3d2cf1aa8ef6db0076b8e026f5f5eeb612bed45c2bf57796,0x40b1b1c78925a90c4f9c994ee9ac8a97ce8e1e5613676ec1</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 6</desc>
- </pubkey>
- <pubkey>
- <id>composite192/5</id>
- <inline>0x069f245ec322d6ed422f18b4df1b2728bcff22a08c160de7,0x792466cd587549a3ffb4dbe491d54e5df25494ba9be83472</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 9</desc>
- </pubkey>
- <pubkey>
- <id>composite192/6</id>
- <inline>0x649ddaeba68589618a326232704a4324957c8191fd558c60,0x9461496a59b680b82f199144c29323e061273efa62a60faf</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 10</desc>
- </pubkey>
- <pubkey>
- <id>composite192/7</id>
- <inline>0x319a75780c9090f769b69b082ad16dbce0e8bdbc16d04cd5,0x76b03040b524f21b3dd5008995459ca8ed35dae3722c7035</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 15</desc>
- </pubkey>
- <pubkey>
- <id>composite192/8</id>
- <inline>0x77acef779d8562b4492309adf946f5970bb83190ad76a2e3,0x3e98d9c7b72a8bfd5c6f6a7c07478df003d273b1326caa6c</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 18</desc>
- </pubkey>
- <pubkey>
- <id>composite192/9</id>
- <inline>0x1e90f09d5328536457f6d9fe58444f086e32229007ef12fc,0x26407fbfba9f796afa97ea2c2e986d3343d711015b220f44</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 19</desc>
- </pubkey>
- <pubkey>
- <id>composite192/10</id>
- <inline>0xa2e5982912dd423cfb745a01088e540b41e19ba84107cddc,0xaa29fc9dd974238b9daf73997d3c4dd331584d87356f9549</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 30</desc>
- </pubkey>
- <pubkey>
- <id>composite192/11</id>
- <inline>0x670c2e74df1cf4f473ab37ef685b2a915858863bc9c67868,0x2edc6b47a9fbe500c2f4f4b79bb44b229dd99194aca26d5a</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 38</desc>
- </pubkey>
- <pubkey>
- <id>composite192/12</id>
- <inline>0x14c936965c39188192d431aaf96f37e0d398b5a858933b3c,0x19c6526df20625d92445007603f19dd120702351869f9ae3</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 45</desc>
- </pubkey>
- <pubkey>
- <id>composite192/13</id>
- <inline>0x595694d6d70b13b372b2f1b4daf5ffd391513d9542b0d600,0x099f0ac0ce38d9920f3c59a63433230f4f945716c8d246f9</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 57</desc>
- </pubkey>
- <pubkey>
- <id>composite192/14</id>
- <inline>0x09cf293ad9517ef1932fb81a4800d60a768356fd2980ae77,0x1b12ab568cb4ac07593bb7cd6bc8a9364bac3c345419026f</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 90</desc>
- </pubkey>
- <pubkey>
- <id>composite192/15</id>
- <inline>0x9424bf6ba15758fc88df622be2a7055ebd34bb0e8e89c945,0x2611aaf3752880c39238f669d910ca591358e5aa06f95119</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 95</desc>
- </pubkey>
- <pubkey>
- <id>composite192/16</id>
- <inline>0x4289f802fa238ded56eda2164532f205cdde5b9ba58b8226,0xa2e1cdff2ae8312f4882ff44e4ef1d9e16be424fecd624e3</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 114</desc>
- </pubkey>
- <pubkey>
- <id>composite192/17</id>
- <inline>0x5cabb4f80e166127067104af1327a8531c053ec510702d6a,0x2fdd3945ffdde5e5389ff43ec323031f9c39b795fbb9f41b</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 171</desc>
- </pubkey>
- <pubkey>
- <id>composite192/18</id>
- <inline>0x9a6f5c897b695025e86d74043bf6a5a2bdf38ea7e2fe8f0e,0x4367779cadb1f8a193ac73dc51293aa0e94e930456e89692</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 190</desc>
- </pubkey>
- <pubkey>
- <id>composite192/19</id>
- <inline>0x30f786b7a6a3292c40a1a2ac6934646595787c4f003a08c3,0x84e4b9970c123d1f5188fca8f27152d377d85f2352543992</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 285</desc>
- </pubkey>
- <pubkey>
- <id>composite192/20</id>
- <inline>0x042d015cd6633de4ed1700c346774ae17263b3e284b43162,0x7c27c4593d37115d93bfd33797ae73f0805117b032289e46</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 342</desc>
- </pubkey>
- <pubkey>
- <id>composite192/21</id>
- <inline>0x9f62978f1018599e5139fa6560fe3a39c108674f361b1389,0x884e25851a5de235df686fbb870e6b7b81accb8bbc63cd15</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 570</desc>
- </pubkey>
- <pubkey>
- <id>composite192/22</id>
- <inline>0x29d846d8f363bc58149fdf6eaced9dbc7692a0942f6ecabb,0x784af0c66238ef9cdf900eee2fdce8081d2aa59dd327c8c3</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 855</desc>
- </pubkey>
- <pubkey>
- <id>composite192/23</id>
- <inline>0x3c6d33801293213a71f4a7d9b1091cabb89bcf7fc266084e,0x80eb1f866a3774c45811feaee8cda2f020e5aec70a2b5233</inline>
- <curve>composite/whole/composite192</curve>
- <desc>order = 1710</desc>
- </pubkey>
-
- <pubkey>
- <id>composite224/1</id>
- <inline>0x14f89a6ef687659649fd6e0e6cb1f7f27c0f9f94fc872e7f54a9c856,0x00000000000000000000000000000000000000000000000000000000</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 2</desc>
- </pubkey>
- <pubkey>
- <id>composite224/2</id>
- <inline>0xb4fbabc7cf96b62b08edbaa2df53346bbb871c121bbb35e771c74db5,0x61cf8b556f068f45ec69963964a0e8ab72c1fa0be48e2ea886235956</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 3</desc>
- </pubkey>
- <pubkey>
- <id>composite224/3</id>
- <inline>0x5b98ef6f104d0cc4159cc793d52713bafbc2b37a9f64af8f962b1c5a,0x7935aef16b1cb800beca9ab322aa8ecf8281f870057a8e1fbdd72490</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 4</desc>
- </pubkey>
- <pubkey>
- <id>composite224/4</id>
- <inline>0x3abe85a7ef34758c487373eb1f193a86f2b073b23a42ab3753596308,0xca9743c8ebf2fe6ceb300b93e0742ebe5f594b2ed84dba7f42f7aedc</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 6</desc>
- </pubkey>
- <pubkey>
- <id>composite224/5</id>
- <inline>0x3b931bbe008a038b5a5b03cf34c4102ba919579bd0a81f066193ab76,0x794f623ed1525010559240ad899b19a841bbbb818a64f32fc28c9931</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 8</desc>
- </pubkey>
- <pubkey>
- <id>composite224/6</id>
- <inline>0x6ca8b206ce077be28ff56c18295508ade9fce4a051d4975d61ee84d0,0x1f5720ccc870e31e83eb58f7c7c5ada471f7502ae5b2d87a69109df7</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 12</desc>
- </pubkey>
- <pubkey>
- <id>composite224/7</id>
- <inline>0x45437959ee88358cd8ee9902139cf6c9eee124c8ee199bd1a1ecc2da,0x756ad18b140d6a13a010fc21f1c4cf45a67eeb4c3dd4b202e9ae775f</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 16</desc>
- </pubkey>
- <pubkey>
- <id>composite224/8</id>
- <inline>0xd2074198f477e79a92918d4a5bc0ba104de4b0369104a8b51012595d,0x5025127d318e3c34e4fbbefb397874a3ed50a9cfd6ca455d4be02125</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 24</desc>
- </pubkey>
- <pubkey>
- <id>composite224/9</id>
- <inline>0x4513ad86e9415caae932018d67c869dbbe001cd53e64d82d205f4e2a,0x130dbd3e71618ddb0464bf3e894c30e1dd3bc25bb01e09e5b50a001d</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 29</desc>
- </pubkey>
- <pubkey>
- <id>composite224/10</id>
- <inline>0x2f4f470b72c093667e3f433a5189988adbb0fe1ae36482c3eeecf8a4,0xc1ac6c167ff41b0842f6470bac49d2a518da6c4c456c5657be15dec6</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 32</desc>
- </pubkey>
- <pubkey>
- <id>composite224/11</id>
- <inline>0x58741bd7ac127ecf8aa7c9fd78d22d81f8c10bb971bb77c015f69cd6,0x52e914fc15edb4af4a53ebeaf8466d2b7cf1bfe4a78c036a8faa5cdf</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 48</desc>
- </pubkey>
- <pubkey>
- <id>composite224/12</id>
- <inline>0x7a06eeb07784de6a15d1322243b4edbe24eb9d24869e1d9b7b883686,0xba5f157579eda39cc85cf04cd48f710133716a0fa0f5a48c3948381c</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 58</desc>
- </pubkey>
- <pubkey>
- <id>composite224/13</id>
- <inline>0x67d78ae1eaa30a898a3497c0cff43675be6d8cd4e41971661e8622b8,0x2e7337490aa8220d721167f7d047952af1d68615b07619607c771f5d</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 87</desc>
- </pubkey>
- <pubkey>
- <id>composite224/</id>
- <inline>0x30eea9b5158e7ba9ba6a2a955942e3324c6539a70e78270abe43f7fd,0xb3eb76bbcac6cd68e28688d70f431d26147bbb380bf1938d8038418e</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 96</desc>
- </pubkey>
- <pubkey>
- <id>composite224/14</id>
- <inline>0x4a27a6d15ecdfa776161aa180a4cd2de898610aac1b274f7a85d7ef1,0xd92847404473b63060e1514fe6a431130a79512c867d89eda0e3c674</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 116</desc>
- </pubkey>
- <pubkey>
- <id>composite224/15</id>
- <inline>0x6a7ed0907ecee744da1a57ec48ff6cfc0d8d77c67a585fd9750081e6,0x96106e57beafd660a8622f6341967fd4565ce9f4f09793cc3f287316</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 174</desc>
- </pubkey>
- <pubkey>
- <id>composite224/16</id>
- <inline>0x52c53640843d85f9945b18452a96e48816bbb52c76d012b3bd197f79,0x9630aba4de01758e0aaddef1de1cfb070af629f80c3ad3bb21e3cce5</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 232</desc>
- </pubkey>
- <pubkey>
- <id>composite224/17</id>
- <inline>0x88166b34bee1151dc0589da4bed6da8c6a2e9d4c78eb4ef21c5a9efd,0xbb92af84b1faffb9cbd516316e2c58dabd3867c5ac4dccb4b3d7c25c</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 348</desc>
- </pubkey>
- <pubkey>
- <id>composite224/18</id>
- <inline>0x02edb51c0bc83b37cc89d2a7eab42719f0c847d61334022b6ca765c6,0xe08729140e552810499c414488de5751769d595940be05992e1e2977</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 464</desc>
- </pubkey>
- <pubkey>
- <id>composite224/19</id>
- <inline>0x96967cf6b0ae919e50f815ac8ebcc35d0625b518d3fd095224b3c70a,0xd7d51361df21536593163d588bb4843a3ea53bfb114e43afa5eae2fb</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 696</desc>
- </pubkey>
- <pubkey>
- <id>composite224/20</id>
- <inline>0xb2b0a8e35a9597549a98a150f2b2a311feb560c99923e5ad23befcfa,0x6275928b50ccfd639b81c77c65a8d016c7ea4a035975e871dd10ef5d</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 928</desc>
- </pubkey>
- <pubkey>
- <id>composite224/21</id>
- <inline>0xd22b61d5ba5ee04d963bedcbb11165c23990b7053e5d9aef656eb078,0xa000d64563591df0b2f9e270247bca57b242e70f58ed57b4a8acec2e</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 1392</desc>
- </pubkey>
- <pubkey>
- <id>composite224/22</id>
- <inline>0x1f126f0463995cd293799fc58cb3efa1459a539cbd2d88c8d7283cfc,0x51175df02b5884fce8bfd17a7a97ccf12a5fdfdec4c297b301e477cc</inline>
- <curve>composite/whole/composite224</curve>
- <desc>order = 2784</desc>
- </pubkey>
-
- <pubkey>
- <id>composite256/1</id>
- <inline>0xadd83091be650ca4d78b81c1ae2851a9197a5fe33a136d368ecbb1fe06200764,0x0000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 2</desc>
- </pubkey>
- <pubkey>
- <id>composite256/2</id>
- <inline>0x8ca20dd1fa045339a171513fb1daa25fa7439e4b97c129c6039e4b9abbac1532,0xb565bde8fe9831f0bce07d70784dc1b7064c443b54b5e96408c1942e30437cc3</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 5</desc>
- </pubkey>
- <pubkey>
- <id>composite256/3</id>
- <inline>0x7f25698dc1a9a0810dbd97e1918ea4a78f20783ce3ed4133df0fe6f66fe29c3f,0x0eff3a76e05d5e24b6b57c13f704ea2a54750502000c9d3f04d1ad932cfb6d3e</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 10</desc>
- </pubkey>
- <pubkey>
- <id>composite256/4</id>
- <inline>0x8b6be31db337293200eb7a6a2ac144374223a4f76ea7b003eb789d0622cbc806,0xd9556692a39eb79d29c0a019d94f88737edd90006f55ecdc1ac204c81eb0c32b</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 17</desc>
- </pubkey>
- <pubkey>
- <id>composite256/5</id>
- <inline>0x497170999460d32516062fa49929789e645a46e2db216e83a7f738d2c5c482d6,0xa1666de87f4f0de0ed523a962d386349d87b4e40c7c6db555e52e33da3de738b</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 34</desc>
- </pubkey>
- <pubkey>
- <id>composite256/6</id>
- <inline>0x409a4d05651cfa87af444fa58f9d3fa3d5bbd25a8c9f7a6be200b5255bb06bac,0x3a08b088284a3da5c59246379b9b7aa36a86917f58c390cc49d2172e33d5c094</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 85</desc>
- </pubkey>
- <pubkey>
- <id>composite256/7</id>
- <inline>0x5ebd412e2785d08f2fd0403a3df2d028a4c33c887637d75ce05543cb6c33f172,0xa3f76e00200df483e710db5724c08ef01f813959ae3205b5e4e3c7a051d303b8</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 170</desc>
- </pubkey>
- <pubkey>
- <id>composite256/8</id>
- <inline>0x756ab6f97c43c68c38c8070766c3d86df422f8bc9c8e5ff8e8fee0af683b58e0,0x08746e1b87c5e8e582fa8a4e13b5971728af1e6c6f74a28478b0a606357c17b4</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 289</desc>
- </pubkey>
- <pubkey>
- <id>composite256/9</id>
- <inline>0x0e02b7a9def8eb46986ad908a49109267beb19e331bc399eb036ec087c2081c5,0xa1e1fff1a84a3b131c072f76c1ed54293f5d82dc5c9c78c9984786648d172cb2</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 578</desc>
- </pubkey>
- <pubkey>
- <id>composite256/10</id>
- <inline>0x5330e8ad3035f2b256091a362313ae5b7f183d11c3fce1528443cf2626911e09,0xb3abb61c1ac189a3980f8c6dfc4330997096dca089273000a7302682b40ff6bc</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 1445</desc>
- </pubkey>
- <pubkey>
- <id>composite256/11</id>
- <inline>0x31f4f374d564ec73cd4e066ec84cdfa89be9389c2c0e557d0226af8f4a960768,0xba1b2169c90ea6cf612db29e4142c1483f9268012114148e28d35969669a7549</inline>
- <curve>composite/whole/composite256</curve>
- <desc>order = 2890</desc>
- </pubkey>
-
- <pubkey>
- <id>composite384/1</id>
- <inline>0x5136c182f03241ec87e6eec1728c1fb2d6b2ddcd4d9abf2a110c337419c4ec7cc8386b7b9ea9f5cb18b0f3c2a78e6489,0x9130cb73f8064fddb24d8c6a216b57fe99df93bcc82c93343617a5246ca1643fe57a06d6112a1791d1bd3643fbd9c041</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 5</desc>
- </pubkey>
- <pubkey>
- <id>composite384/2</id>
- <inline>0x20070cc3e17bf1c770ef297b679c54d6454a3cd5effd94e236677b10e3e8075a8a9902ecd71e930f19fda4d79931502d,0x04a21190dbba4b6efe62640887256163ba5c9fa706aad74f1bfebdc27ca6f9e2f9b37bf9abf2c72803968799e2c7e702</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 11</desc>
- </pubkey>
- <pubkey>
- <id>composite384/3</id>
- <inline>0x6d24691bacf187946f24885f2bec9a6b09239f4b7d93651c8c62f0221ba695baa5f70c49028ca5bc462289edcec081fe,0x7489fb2fd719c84ab0a12eed6f5f45fabb7c19d49d9d185a4d4efcffc9d2110a1b5a04961251f1ab19908662c8dadc9a</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 55</desc>
- </pubkey>
- <pubkey>
- <id>composite384/4</id>
- <inline>0x0c5dccdb9c83f4d3cad69213b80f2c969210a228b85dce49c8a31ad08cf232118c6eb03d3b7e3d7bc8add230c24d184b,0x6316b45ee6832912cf3d54fc1fb73de47753ed225074cf76ebcdecb5f0c797e166b90767e2f267a4ea6b43cf6cde23c1</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 61</desc>
- </pubkey>
- <pubkey>
- <id>composite384/5</id>
- <inline>0x32a43b215a94626d6f28974d5622469ebbdb7a54fef268267066fa3199f343f044248f39bf6ef10bdfffa6cb80155bb7,0x3d6a14e4bfec02b2306649a6da4fbbac157cecb3faa6cc9e62b5a469ea7f17a6f5e66a7c6753eee3f9cb7bdd4d0f8a4c</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 305</desc>
- </pubkey>
- <pubkey>
- <id>composite384/6</id>
- <inline>0x5baac92f9d31ffd1cf982566f6d4bc239350ffae1f6b068ec07fb200795f4a902978d080a70d5908bd8ee283723ee196,0x164584fff8bb749bb781eedc62f9a39f658490969d24bff24b5c91f7af7eb7dd967b0066daf54678788f241b67d1a78b</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 671</desc>
- </pubkey>
- <pubkey>
- <id>composite384/7</id>
- <inline>0x3b2d81fd9001d4b208e9d6312553bc3c2ca0853145dd882188b4b197152faca8f1194826c745f74c90d96594dcc0794b,0x8fef63c95e804b6ab0bbe7142bb56ecaa24737e8f97466d68f0c9ca7c230480b28d958d69277fcbcd77f6a566423ddec</inline>
- <curve>composite/whole/composite384</curve>
- <desc>order = 3355</desc>
- </pubkey>
-
- <pubkey>
- <id>composite521/1</id>
- <inline>0x01221fb007e1c2f7413b4d79a0265baf9d9ea2850e9e262b28ef5ead6f5f505d05cf731a891a443e7c1a35c867d7a3de4118f76d1cb68f6479eb85fe87fc9c6be098,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 2</desc>
- </pubkey>
- <pubkey>
- <id>composite521/2</id>
- <inline>0x00a4b42ad90c0e3f7e342d8d661b4d5162ab7928b4938ab660b2e6fea3213c5d4b420123f65141a8eb7b4a46173bfce6ea1577df94f6f934f72d459c4dd3c0ef038e,0x003316c4b6c5c6b3ab3eee7f1ff365cce6045fdc43d4e6c64efa7789f2626676b47b488e6612d291d60d4a788ddd2e8b1aa8bfff02e105a285532a20ac08fa1088e7</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 5</desc>
- </pubkey>
- <pubkey>
- <id>composite521/3</id>
- <inline>0x0039ccb35a071951bda5c9c40edb1fbfa365ce59a2a89ee37739708d748cc66bb19cbcfa30cc4ef6bfbb48728e930d940e30c64b6d77c0e64c79c1bad49540084662,0x00d7016bd5016c8ba9601ec3dd44f77b8ff7bb3aaa6c358ac78bf931f7f4d140e4de1912c343bfe7956ab0b29aa9ec0922008d025e9895a8141bd7c88f913e745e29</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 10</desc>
- </pubkey>
- <pubkey>
- <id>composite521/4</id>
- <inline>0x00426f8691e7f8afc0f7443206d3d44779b96c942714386733853530d3af4944e1ad38c7c1047f50e2bf8db7dfc0d4a8803976da934eaaa19e478ee026736ae8ac6d,0x00c97e0d2dedcd7b601430f1b8959c26c24918f6c9bd803bfe8cc015e7285956f878f27a33c91f64fec051f478cadcb7ed80c21127a7916d1e2c88ee921f1f65cf94</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 25</desc>
- </pubkey>
- <pubkey>
- <id>composite521/5</id>
- <inline>0x001550be76b460f82f2fbf3ebfd9709c50c07ec18c250c01b7d934eda2bcf3b78f648b7dd813cfd58a3f12ab35ad015c03ed0e14af6ef1560706dd59fafc32ecd5aa,0x00eb5368f5c53f70d88bbb1f31afe0d730aac4523b998043b2029a441528f7ae3483773117184e8d2efc875fe5447b0eb4ffb781bb014c67505434477fc4d6e343cd</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 31</desc>
- </pubkey>
- <pubkey>
- <id>composite521/6</id>
- <inline>0x016bad260ce10570e179138810152059e4ed8d1a6f5d8f8f2697ff98e8a1d8400cb5fb2334e5ccd88c3933add314e1f94b67ce99a4594da7754b39d58262c2275827,0x004a9b47353f119a01bb8dff6f63b58499a83c20a6fb8cbf84e717e35643c23eefef157891ca720b332355b70ee265bad5e057958ee42ab6a0f0675aa85caaad4a8d</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 50</desc>
- </pubkey>
- <pubkey>
- <id>composite521/7</id>
- <inline>0x01320c8762348be979ddf729b42a3839bd8e6a99923b3bab663dbb298f470d0e3aac375a1d1aa7119ec5b2e82c7921f192bea4ac81b7259af3a417135e82ad56aa4b,0x01c0be727f0480ea5137efc3fd201fca223ecd58d34dcc31cbfd6b7909b3033bb7d65e006e4dfe7c80f2a75d0bb5256986077d16cdd3c4d74bddfedc700c5be39541</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 62</desc>
- </pubkey>
- <pubkey>
- <id>composite521/8</id>
- <inline>0x0097c707694d550fe1533a9ce461e0317206385ee961cc3c646cbe84afc17a426023c8dd1e8db9df81bfd01b8cd123fd381c7fffd375f1776eb69994c94d67088ddc,0x00f3c16b5bb57044a555c5c89dc0fe1d2dec3406a645e66811d9a466a687884133cb9863394ddb19e2888d1f311d88060b0601f960d8a2ba86f67b4e1c8dad61326b</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 155</desc>
- </pubkey>
- <pubkey>
- <id>composite521/9</id>
- <inline>0x014ae6ee5a69767d8abb24d62d0435807e36d9c42572eeb2a7d2852837f68d62dd97c4ae4ed4b47f1208e9b80c0e285b69db277be2072e104b1892892be5e09d1d6a,0x0008a34156d7f671159b1bd85ab0413092fb16de8a6ea9ddae20c427262d2636b926339bf1ad1a2a1518aba13d3ce858f7b232971ebdb3b54b61e1273defd0c20ba7</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 310</desc>
- </pubkey>
- <pubkey>
- <id>composite521/10</id>
- <inline>0x00f6d940ce18d53a7706999da53c40cb8e4581a73069ae4358747257a169ab1532474b43e506603fcbd743b63b48551faa3bcac5fb1a40ca2b3f49f369fec36b7c7d,0x00f881dbc0ab0b74c20db84810eb476b1fb852398e87f8d909873f0b73cce0166baf43f07487a7a35a172000f5050c8531b108afb03c2654fa4a81b0538b58c4ddb1</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 775</desc>
- </pubkey>
- <pubkey>
- <id>composite521/11</id>
- <inline>0x0012538aae315d49a9b443382a19de468f57c7ff2494ecbaa54e927d3affb6d1d6503cb3acfbb0feee44caeb7fbef8804ac073c709a90eb3c7464a6644c9c5581e9b,0x01afeb2c9e1b519804e3a73364953368f915e6abc765adbd3ec7cfc2b808b1b4b46d575a664d06b4b455850cf295fd69eb823ca069cd2de90542db1496ad9095fad4</inline>
- <curve>composite/whole/composite521</curve>
- <desc>order = 1550</desc>
- </pubkey>
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/10.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/10.csv
deleted file mode 100644
index 5fa842a..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/10.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb1c8eb4d314d22f1bdb2294eaed063e64f580611,0x6a1a4b89dc64200e98c46af58e8d7d0a52aba862,0xa0c9a0d9070ceefcaa3f2324668d6e3e9a3bf8f7,0x4b517e44056658e1f778d6c1075eefc644eaae5e,0x15ca498bd6ab9519c5be6f29882cbc68e47479cd,0x0000000000000000000000000000000000000337,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/112.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/112.csv
deleted file mode 100644
index 633ccd5..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/112.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9f3386530aa0a8009acbbe9caa919f72c8d5730f,0x33f8b03510268eb1ca33c2996ddacec1b314c5a6,0x4d9b3a2737345fe43069f306eabdc123e8e847b2,0x803f5afafe7ccb0433355eaf7a1aa1e93d1161b0,0x702c66bf3f3235fbcf3e2a7bf3bf56a69169d1c1,0x000000000000c978cb903a08ddcef1daa40de1f5,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/12.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/12.csv
deleted file mode 100644
index 62bb1a0..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/12.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa7d15a5258f4f3855cb22ce8d00571133e8ad0f3,0x61f9830a932a4cdd257061624f3b820e9b91db6e,0x758ee90aa5d7fe797c4817d0c2011f062a263429,0x4f448e668102ec49a2042cf2c15f9879d2d14068,0x05043866b8c4d47377f25942b075e835b121ceeb,0x0000000000000000000000000000000000000c25,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/128.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/128.csv
deleted file mode 100644
index 5f8c532..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb13f0d997960752db0a77c95ade4843941645c87,0x7acba0516ea114053bc3e8fa026857990e610d4b,0x7f9755351f5279758bde2b9739c5f907d159ff26,0x08010035ebd4107beb815893817f2b00f7911d96,0x932569a7385306a3b33e4669100feda47db97168,0x00000000c85d322721a790e50860fee459f6292f,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/135.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/135.csv
deleted file mode 100644
index 232abff..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/135.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd3f3289b14ab182f38b78fab5dbaf3674c02597d,0xb8880d01c2b44c8a27805524913e438e6458411d,0x89482f3814165014cc30b134849ead387c7ad048,0xc44043b00f6f65000cb63a22fbbb0785985d0699,0x6097e0e529330900f844ccd27a69a96b16509c16,0x0000006c7fcc23ea5ce765d52954b58745d67e81,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/14.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/14.csv
deleted file mode 100644
index c8df53e..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/14.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xbdf7ada7a57600f5d5b371b51218a619536cebc7,0x799707863618aaaffb5d46ca3427d6cfecdc6476,0x590f7e7193a997a2b60ab8e31107f1832473290b,0x795684e5a9816c14dff9c8b509c8c87afa3bbbc3,0xaabbea132ba2097d8025a5387aed8482147c530a,0x0000000000000000000000000000000000003437,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/140.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/140.csv
deleted file mode 100644
index 4d59858..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/140.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcf8ecac9bc992d2df7ba9015b5bdcbdf2d1c2aa9,0xa067f72ab472977a150f4684df8e9ccee909489f,0x080cac1702258fce0fbafbdb4f861ad4554a05c6,0xa4601066e4fcb7308022ac922a3a1475197e723e,0x0a210871677b6b921846b4ff0c055cd93f2aa275,0x00000fe55175f2c1fc9827ef4997357705b40a5d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/144.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/144.csv
deleted file mode 100644
index e8c6492..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/144.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc4bfe673203f80fd04c89a5942c18074bcc2a719,0x9d4a0edafeb576559fe95f1dfde0e006a9e0f6fb,0x2c075927ef142a14c84de72b208e8b5ee1d762b0,0x5a808971a0093ceadb15cf76068c5e7c3c4269b1,0x27a0f2741a55767ef3175461120c5f42a5b54f4f,0x0000d9935a273b9b1402519925d6a6a8b4f9342b,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/146.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/146.csv
deleted file mode 100644
index f656c72..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/146.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xbdf7ada7a57600f5d5b371b51218a619536cebc7,0x799707863618aaaffb5d46ca3427d6cfecdc6476,0x590f7e7193a997a2b60ab8e31107f1832473290b,0x4ccf365eda5a0e85438b6df2bf57d668cf5d8192,0x702b5f386587f0d85e6cf56b511de035b62c4379,0x0003a3606233edce56cac59bd01e622561e99e77,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/148.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/148.csv
deleted file mode 100644
index b292889..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/148.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa7d15a5258f4f3855cb22ce8d00571133e8ad0f3,0x61f9830a932a4cdd257061624f3b820e9b91db6e,0x758ee90aa5d7fe797c4817d0c2011f062a263429,0x356da5d90cef81adb97a8cc3e95861fc156ab6c3,0x63ea1cb827821f6d3599e303594a4e21911971a3,0x000dd1818cc0197085816a97b6056c3917bb32d9,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/150.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/150.csv
deleted file mode 100644
index c1bf12e..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/150.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb1c8eb4d314d22f1bdb2294eaed063e64f580611,0x6a1a4b89dc64200e98c46af58e8d7d0a52aba862,0xa0c9a0d9070ceefcaa3f2324668d6e3e9a3bf8f7,0x39ce0be4410100e1349fae8ec18fabb91f1816dd,0x3a44dee9ecb21038fb8c3e987e285f09b456bdc7,0x00374d1df48d00aa21837b6f9717173eb656c659,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/152.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/152.csv
deleted file mode 100644
index 24a03ba..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/152.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc9d72249375ff1884a80e426e79315f02fb6904f,0x003ce7e6420986df1c87895fe1b83ed86f93cf10,0x7ed71b8a343a6d4da4220123d2b3405d9e4f813f,0x3f30626d74214324e1ee6c97341abe2a9b2bdd07,0x17fb8a3dc06dc7680485871fc3ed4f8e8e662778,0x00e7b588f02d33982511ca6ab8485259bf119a2f,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/152_cofactor.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/152_cofactor.csv
deleted file mode 100644
index 7861bbd..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/152_cofactor.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc9d72249375ff1884a80e426e79315f02fb6904f,0x003ce7e6420986df1c87895fe1b83ed86f93cf10,0x7ed71b8a343a6d4da4220123d2b3405d9e4f813f,0x3f30626d74214324e1ee6c97341abe2a9b2bdd07,0x17fb8a3dc06dc7680485871fc3ed4f8e8e662778,0x00e7b588f02d33982511ca6ab8485259bf119a2f,0xdf
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/16.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/16.csv
deleted file mode 100644
index fd76ff7..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/16.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc4bfe673203f80fd04c89a5942c18074bcc2a719,0x9d4a0edafeb576559fe95f1dfde0e006a9e0f6fb,0x2c075927ef142a14c84de72b208e8b5ee1d762b0,0x364591432aca4ab7e451866819263e32f57fa052,0x634d15df260f3bb8e92cd0d4940d176e2d97bddc,0x000000000000000000000000000000000000e77f,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/20.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/20.csv
deleted file mode 100644
index 940d10c..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/20.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcf8ecac9bc992d2df7ba9015b5bdcbdf2d1c2aa9,0xa067f72ab472977a150f4684df8e9ccee909489f,0x080cac1702258fce0fbafbdb4f861ad4554a05c6,0x4c4356d56316d6556e7b427a3e1aacd1c1805a8a,0x3d55e3b1904c5e66c75b00710068ffaec4a60ddb,0x00000000000000000000000000000000000d0eb3,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/25.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/25.csv
deleted file mode 100644
index 318099b..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/25.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd3f3289b14ab182f38b78fab5dbaf3674c02597d,0xb8880d01c2b44c8a27805524913e438e6458411d,0x89482f3814165014cc30b134849ead387c7ad048,0x593ddf0087b88e469110d12067c86b00bb6f219d,0x968f74b30717f0ca56749382ba5aece4182b35d6,0x0000000000000000000000000000000001f4168b,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/2a.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/2a.csv
deleted file mode 100644
index 670f4bc..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/2a.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7b6d7f82beae015788a67ad391bb68ad720ba991,0x6f222dd4f5ec04fdb0202f461d10c3fa1cec6d45,0x2792a26122d154d68bdb523330a06cc252894165,0x50fa49d7061feaeec4f4f4592744d26decd6243a,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000002,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/2b.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/2b.csv
deleted file mode 100644
index 216827b..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/2b.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa0ba653351a6fe7af0eeb9d45eb4f5bab12e453f,0x6e2ca1be3773179e400bb31f783013138cf62eae,0x1db941d201e9dae19f2eaaef2735a46fb9948ee3,0x070fe9bde5d37d7adc7af71cdabdf99ba76b2941,0x9ad498be6e81114c204ac11300fbdd6a3ef8d2cd,0x0000000000000000000000000000000000000003,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/3.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/3.csv
deleted file mode 100644
index 18ec491..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/3.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd41869824871ccc03ff87bd99c9a6d2eb7c557bd,0x80b0b37638bd5678af01089dbc13a8674ad96422,0x4c2d8f41681795f138af380c86c98e1d6ee2f3a4,0x6597db8eade96de1d5a546172358d578985e4802,0xa8f85050990cbd2d365b4ef44ead757bfb9af8b5,0x0000000000000000000000000000000000000007,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/32.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/32.csv
deleted file mode 100644
index fddfeee..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/32.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb13f0d997960752db0a77c95ade4843941645c87,0x7acba0516ea114053bc3e8fa026857990e610d4b,0x7f9755351f5279758bde2b9739c5f907d159ff26,0x4ce786a838268215724f1edae0ddec658ef20e6a,0xaeaa4f03aefbbf5fbaeb393ca859d8f27ca56a32,0x00000000000000000000000000000000e2768a75,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/4.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/4.csv
deleted file mode 100644
index a5b9e09..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb12cff876adc5a923ed34fcd10143de02f8e0369,0x6cb241142b8fb14f45608aec44a325ad195044b5,0xa7cb4cbde8d7792bee9d4856d80df54cdc925b1f,0x07527e2751335207ab0ddb4d5692c7d9219990f5,0x1d1cd5f91fce22653562dd0534ddb861e7005cb6,0x000000000000000000000000000000000000000d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/48.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/48.csv
deleted file mode 100644
index 202a15b..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/48.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9f3386530aa0a8009acbbe9caa919f72c8d5730f,0x33f8b03510268eb1ca33c2996ddacec1b314c5a6,0x4d9b3a2737345fe43069f306eabdc123e8e847b2,0x0f1ca7149bc1933e1e7efdc55c325df7ad4ba562,0x3b689e90dec0b6c85d679d970278d0f9fa30f013,0x0000000000000000000000000000ca49f6d457c1,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/5.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/5.csv
deleted file mode 100644
index 5f0597c..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/5.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe13cc8432dad5ed8a4d2893803957c1e109e0c8f,0x7102ce05e08a10ffe665313cece127f5ff590473,0x2dcb47653c268fc7b0f767ae66fcefc98055399c,0x2c4b06f7428dda4532fbea727c7b1f84782e9762,0x4406bb147b080724d2be46eb15327dd350d7307a,0x000000000000000000000000000000000000001f,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/6.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/6.csv
deleted file mode 100644
index 9c1528f..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/6.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe9e74933088156a9f60b0f23253fe21ce259d783,0x6a01bdfb7c22fa778456edc767d0f61895561f27,0x27591495bbaf4845cf807f59d3091b0ec830b080,0xb956503ece30bccd9dc08bc76da995e390b2d0ea,0x30ca629aa64506f2b5e6c71fe7dea2c4284d1a2a,0x000000000000000000000000000000000000003d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/64.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/64.csv
deleted file mode 100644
index 94a2709..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/64.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xba824697c3ac48fbf53bdc6997a10f2e9e9d24fd,0x00878d8c00cc5b137d7ee7f3defe3ee2d614112e,0x439154313b1e0b63a3cf445a67af1f2f9442238c,0x33e0dfbcd3bdbd0a3d98254c8c706852ac9160ec,0xb0895e2997ef93d8b9500068855afeff515284c3,0x000000000000000000000000ee49fe4c5b77e201,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/7.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/7.csv
deleted file mode 100644
index 170b180..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/7.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb7a0a5730514d83583a708acd53a492d970022bd,0x6ee6d2a43a4daf1c0190aaf2384644b59b1c7f11,0x1835fc673409a0265da795eb4d0ad15358b3369a,0x0fee93a779b05c49623527d2a0af78315efbded6,0xb75b77ea3261bf5713cdec1cdd7251dff38232d6,0x0000000000000000000000000000000000000065,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/70.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/70.csv
deleted file mode 100644
index 1dbf9c0..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/70.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcc0786de97196a16f433bd40cd1932999867b103,0x7a58470e1615f4676bfc6fc57d71c99285a56919,0xa047dff6287d28be79b09ce6a398b57e8c2a97e9,0x570bda529a23c0a651113cdb5083439d3a6fd30c,0x9d71ecbe74fb180d08a7bdbb77e6aad40d2146b7,0x00000000000000000000003ba788abd620e775e7,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/8.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/8.csv
deleted file mode 100644
index 232df05..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/8.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc9d72249375ff1884a80e426e79315f02fb6904f,0x003ce7e6420986df1c87895fe1b83ed86f93cf10,0x7ed71b8a343a6d4da4220123d2b3405d9e4f813f,0x083e1d65a5ebcf6f98f2202ea5bfe021db0ce40e,0x16947d2cf97c654222c015b6ff56b9471f9518a9,0x00000000000000000000000000000000000000df,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/80.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/80.csv
deleted file mode 100644
index da082ef..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/80.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd84ff9bc6df5a2f01d087f4c5e35ae905eb55e13,0xa50dbf4c40d4455f045c249b655b146d5d07a8a3,0xd6aed5bd031f7c3af319cdf03d45ee1b2e5c72ae,0x3a2b110757656c93362455ad480d38207b826d38,0x9cf1881da1e1f10777900f8c18996e8fbd3e470f,0x00000000000000000000e74bbc29baa61aca49d1,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/90.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/90.csv
deleted file mode 100644
index d67e673..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/90.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcc0786de97196a16f433bd40cd1932999867b103,0x7a58470e1615f4676bfc6fc57d71c99285a56919,0xa047dff6287d28be79b09ce6a398b57e8c2a97e9,0x353f1f34902fb9c28b62c145369afa64b301e48c,0x0fd9c5d52882c2af8b99b5209bd80e44839c2e2e,0x0000000000000000036b917bc29fe57e7df01d13,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/first/96.csv b/src/cz/crcs/ectester/data/composite/varying/160/first/96.csv
deleted file mode 100644
index 5dd2d5c..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/first/96.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xba824697c3ac48fbf53bdc6997a10f2e9e9d24fd,0x00878d8c00cc5b137d7ee7f3defe3ee2d614112e,0x439154313b1e0b63a3cf445a67af1f2f9442238c,0x5fb9809c2f608e2fb788c735d0233b2dd1cbc243,0x4e71dd0a87b3d4ff1689a77829ba527781f21cbd,0x0000000000000000c85f0b3dd7355b3a516de59b,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/140.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/140.csv
deleted file mode 100644
index 08f5ba1..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/140.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcb0fbd7d31f129c9445949ac2a53313dc664dcf5,0xbac859aab1168154552b678c5710381db579e093,0xa6bba8fe9ce31053ef6df534c0f51abf7f2b84f6,0x89ddb9394b1e7aa83435762bd9fb10b382112c9d,0x0195f79a927f4933fc96fd11d22f645fd2a6165e,0x00000d27f195fd2b5a2ce76e0a0883493af40f29,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/141.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/141.csv
deleted file mode 100644
index 896493f..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/141.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xad848c5b6dd0a0a4069abc227c1067e0181b2737,0x19ee65c4d27dbb11e6209ca476e192d09b2d1c63,0x764d165a2dade5d7a08a76111d7fbbc2d11ef0e0,0x5bcd89823c97b60ad38738fe720f185f3b40b45e,0x09a715128167a9c88c740460bd69458fa9d4fe46,0x00001998e626a1aed4c95d9d4b4c2b7a7f7a9db7,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/142.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/142.csv
deleted file mode 100644
index cc5fd67..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/142.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb5d6a607a39940bc0048f4aa5ccdc4d5a5ce610d,0x2a1ae87f817fa325f32f2e0105f282027b2ba43f,0x659ed881b0d7116353d5f7a915d2f19e893d69aa,0x1b334db8e98df484ad04272df15f3e86d39ef22e,0x4cd77e9caad63bd4607eb0ed55e6beb23ff450ac,0x00003a204ba60e40fa9b658d3a1a8b2a9bc3cf59,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/143.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/143.csv
deleted file mode 100644
index 9c4861e..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/143.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd4b9159c7fc2792372543d143613b52f59998f97,0x2d42a2dfc137411a8c70ade2bdf0592b40943710,0x05e4b77414fb3c55c130f2bcaef25f3d151bd099,0x5a756a4341b6a3e22dead483df6f181e8b9a2a11,0xcd4da9413d50e4d5215e6bbcf6d5a7b0e3a3daad,0x000072ff5242224738c7ce5b71bc1f89fd2b4b37,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/144.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/144.csv
deleted file mode 100644
index db68fad..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/144.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb1782dbf5f2c4021d8b9b5b363c82e0ca3b6777d,0x6076e1773b2c55518400dc32e80be429edcb965a,0x42ea1ee077a97b47a0e1e768e6926639b66ce893,0x9c662a05f65b34ddc7f87b6b7684a07b898a1c34,0x2845b2b399e0159f6096acb982ef4db0914088c9,0x0000c87bb99f30317e9dac369288e804184aa599,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/145.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/145.csv
deleted file mode 100644
index 08c8c4f..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/145.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb527a5bd64b0565b27ff7cf9602983f1614fffa3,0x19d78ae1d883b88aa6f0f7858d4e1be5a8f7e3fb,0x209c90f1e463fe85994da3a49bf1573b51174a1a,0x19d11cc60298336167b838b1980f7220c4a38ae4,0x370c05e2d1b3f2da9f0c7613a156c079ede829a7,0x0001dbc7f60ad202d5d0beea6a46ba5e0cfdb415,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/146.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/146.csv
deleted file mode 100644
index 3afd1a0..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/146.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xee5432006a4e6cbe37b806adb8caa4ea3db20871,0x8840485629c0217fe0c06136960a8ee0ff052cf6,0x4c2d28b41bf1195979928396a38349fba3f8790c,0x7d220bdba9cccd7ac1eff4c0faa15943df8c5661,0xafac34dd20bc52fc5d591ba7b3ba61804573cea7,0x0003e4f1ab7695bf568e94399144ba99087b8b43,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/147.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/147.csv
deleted file mode 100644
index 895acfe..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/147.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd4af3495a36eaecf01f5333d4ed9c0557e7d290f,0x8009417988238ec78161b22a5193683dd3a30db1,0x78194aed072799ea84118a326f19db81c96cc133,0x43c7510009f2a50acf960aee86f8e5f4680bb399,0x63e3c2609b3cb63a0bfabe048d4910b98806f986,0x000768a687b40a678e8b32a197c56a5e8e73c2e9,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/148.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/148.csv
deleted file mode 100644
index 0e2221f..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/148.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb4b26d3a176014e5e78384429e7cfb7fc54e5977,0x3314626f01d24d21beda9d48df49e3ecbc7cb71e,0x3756db6c83ddaa8e67c67e58359cc9a9cf0fd855,0x8622b6abfae956ec4340565a8441e3829553dc9d,0x548d45e6ed7673b271076e14c3d6e56b58edbc95,0x000c1b3ad6efad76b6c3bc52edecbe9558da19c5,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/149.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/149.csv
deleted file mode 100644
index 2fb41e3..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/149.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xceceeaa7a8152749b1ecf9bc92f6fdc6e9b6090d,0x8ae42228a534ba5893260370f28090fb64e9946e,0x638476b65f061b9519065ca3dee37d03ee253b6f,0xca0c26fa582635625744d77e72134099aacc7d51,0x22342b88baf41bb6d4b8d61f9e7e2d767838ae49,0x001aa507af8faa15cf84906cef78d950265b459d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/150.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/150.csv
deleted file mode 100644
index e38fe99..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/150.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb7adb7da47532691380d279b714329a18c73bf5b,0x62b5535930b3b6291724d2931c6d6e77b9e7603e,0xa6e5735c172868621e282c8606f0f7bf69196b98,0x936da9db53a9cdf04603e3e74dfd597e17159c47,0x0e57b546f6b8fce730f9eb62a15047533b0866e5,0x0038dbb1f277473e654a9df7571e61d3d954144d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/151.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/151.csv
deleted file mode 100644
index 9b665bc..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/151.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb43604e48b105f7a9a3b48c7bfd6d3e0ac093e29,0x444d3467678862170058dd92531a9e2bbe28ca79,0x89c6c1006cf8d019db1813b81549d7ddeff6bfd0,0x48faa03d1bd1142749c886ff0ed8cf990cfae57e,0x7188beb85a7c04ca83328b66f74d284b8d4ab1c5,0x006b0a1bda4f09218bf0b0c4db0eda6a4452e5e5,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/152.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/152.csv
deleted file mode 100644
index 854a93f..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/152.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd998f399cb387874de3a6a56d1babc55720e5abf,0x9c8f7ea6edb66b2570d884fd8eb6b7bfa832fe5a,0xa2a58c9670ac7a17713263ccf56187f4b3a9538c,0x37a374fcc33795ab48f2c5cefb55059e4047a5bd,0x688bb2276ffbdb652f5a9adb8f6861fa58f0a348,0x00ddee9ca918b3fc62cc35c868f2841bce9f9587,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/153.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/153.csv
deleted file mode 100644
index 90ff712..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/153.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcb5e3c67cebdcab6da9abee717934147f573e455,0x8528cb57477cb9daf1b39f210ec4305e38d59af9,0x625bc0553d8acf552224e9ef4a0d680bd097af1a,0x7cd27cf687a0f4cb8b192d2a301dc155e382a51a,0x79b81b30498366d71e34a6e73d7fc1acb70d887e,0x0199f05982a2c1179cef17249652a9866f31ffe5,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/154.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/154.csv
deleted file mode 100644
index 1c45df7..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/154.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc790ce0bbeb04fc50f56ffa90ac697664b33a0c5,0x3c27b2c2fef3181c1b7b342f5d0b141e9b1fa083,0x643c56c57d4dd643ce041ea26bf84ad607b768cf,0x03ac9106b43aefc2474993dc00ca435526e62dbd,0x218216a290e95e1d06ce4a633604067084226b3e,0x03458579e5bfbe29004061a83bdcbf9f03b740df,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/155.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/155.csv
deleted file mode 100644
index a3dcc8c..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/155.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb291f1d68a548cb930da845e4dddde4a459fca55,0x3ff55740d89a34a571572edfd9603ac231420227,0x17109ebf052464e986afe2008ae70355b585b07d,0x27d235656b6608a9df667f7ee99f76e9c6001d8d,0x1cf7d6d12b86ef2fd9b9fb032ab38a902d28fcb2,0x062857c99ad6c70f36a668b6cb0b39ca3859ee3d,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/156.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/156.csv
deleted file mode 100644
index 7614b13..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/156.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb5753cb547a5fe317e9e85a7b0ecf7bcc8358b89,0x39c31f1f78b01c7ab7010de50026f25884ecfac1,0x5acf7eaab9c2bbb84dfdcf6253983c75e3f892a9,0x8c109fac40ecf79c874b1347c89bdd0b1e32bd58,0x198bc391b21d8be4e9b47250a86f03d3bfb4cd61,0x0df5537067f9138da74724f682ce1971c0319dff,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/157.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/157.csv
deleted file mode 100644
index 06cd933..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/157.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd7e7392c25ed14a0c4f61532461ebb36e8aac95d,0xbfa946439770d5832c224072c35a523550c63470,0x6cc6a5296eae2706bd6acfff1c6ca1e20be17f15,0x30fafbc8479b28fe86fe336f67035094e74deaaa,0x3621025307234ee276a45b78f101f88353d1ddf9,0x1ed7e39897b42784ae6c29501574867ebf7c3d5b,0x01
diff --git a/src/cz/crcs/ectester/data/composite/varying/160/second/158.csv b/src/cz/crcs/ectester/data/composite/varying/160/second/158.csv
deleted file mode 100644
index c35a628..0000000
--- a/src/cz/crcs/ectester/data/composite/varying/160/second/158.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa686fb6e6f34c9e85dc6ae22a1d84a17b547b82d,0xa5c25d0cf5bd6443f3342843108b9b4b795be6ca,0x59c73b85c6591dd41f185e6cb009a3068717197b,0x4dc987eec93319f036dea2ec3d2ae58639c44574,0x6799aaad16a911c57f9643c38fe3cabf2e41644b,0x378253cf7a66edf81f41bedf086cec98847ad68b,0x01
diff --git a/src/cz/crcs/ectester/data/degenerate/brainpool.xml b/src/cz/crcs/ectester/data/degenerate/brainpool.xml
deleted file mode 100644
index 3dd2f54..0000000
--- a/src/cz/crcs/ectester/data/degenerate/brainpool.xml
+++ /dev/null
@@ -1,362 +0,0 @@
-<pubkey>
- <id>brainpoolP160r1/0</id>
- <inline>0x0000000000000000000000000000000000000000,0xe95e4a5f737059dc60dfc7ad95b3d8139515620e</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/1</id>
- <inline>0x0000000000000000000000000000000000000000,0x3290e9c18a987fec8da975f2433060ce9a5d67a4</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/2</id>
- <inline>0x0000000000000000000000000000000000000000,0xb70d585c2b880eb1dfdf91e77b37f1b755c8f73d</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/3</id>
- <inline>0x0000000000000000000000000000000000000000,0xd6dcfdaf8654e853148d03b11a346873bda99f78</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/4</id>
- <inline>0x0000000000000000000000000000000000000000,0x132024d2fa2b15b992fd336077f7da8644367c84</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 82977018063719683</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/5</id>
- <inline>0x0000000000000000000000000000000000000000,0x5cad9ba4b9e18c1d1167683b8d2e89340cb7391f</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>degenerate order = 136095069548351808925828417</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/gen</id>
- <inline>0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000003</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP192r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xc302f41d932a36cda7a3463093d18db78fce476de1a86296</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xc2d59e85f6c3b8e1f01fc05f5185f332c44928215c7713b2</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x5e649a10e22dbb7f226426a753c977dc23ed974d33107dde</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x87c26e71982b23eb6e9df053ad929f67dbd26566729d303e</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>degenerate order = 51326679042491</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x28bd61f0833fb3c4106cbba35c74280bdb897ffb4ef1663d</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>degenerate order = 2218130291019312052925190546351456293022253</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000007</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP224r1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0fe</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/1</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x5d0ee8269faa5766328ef18457528c874c408f5dd8b9991c005894ae</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/2</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x9fae816f63ae358d9ab07d30aed377ca63572c8b1cb1f982af33496c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/3</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x1dfa7dc36ec72696d874d99b8b09013ce924820fdecaa1bd9cd09b7e</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/4</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x5267eb8a73ff20d570e131f6a0a33558c3a85cbecb51d7e4f4104132</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/5</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x92d82ad4ea31d2c90853b5a0da3f3dd233ebfbee9ef3e4eb4269846f</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/6</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xc09fd12cf48c63d65e152f6a208bb2ab4eb003e1d9ddeb17d599a54c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 1091</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/7</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x6af88537440e290df74852480f628ce983f542958c08768592e44dfa</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 2713</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/8</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x6e85c24f03a0dbdd4e4ddfe8a3c7b335f7bfeb83d6fecf3a9c1c23e6</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 6553</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/9</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xb60e89dbc1fedacb81b2e172db5ec0b7ad6b797786582113b56d6955</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 1322801685354439</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/10</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x6634b0f61120124365dc719bc583a9821a027bea6dd3b6366d216be3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>degenerate order = 13036179062997789943375385313119191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/gen</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000003</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP256r1/0</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5376</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/1</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x88dbe84830c188e78ac83f1107fbd561631bdc35d59ec7fb8ed568b12eb8dbab</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/2</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x295770494572e605f3a972816bf9c65701efe08c180da9736ad216400553b2ea</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/3</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x817663dd4fecc333507f8d78f9605b24196d7e212d0184f277768751c2ec4c46</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 1667</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/4</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x716b3a9abe12db2eeb97c18ecb121d31eed98538c62d35fc5a28ba9b930d4ae5</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 149459</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/5</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x2ddf09c88fb6f4d0ffa124121cc3a3cd34254e45a2361f4ba3c2cef5e9098d5f</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 17543087</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/6</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x029af8201d9619fb12bc9238dbeeed0629fc221438893b6ca92b44d7459a9bfb</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>degenerate order = 3059213862715144055733503214373292934438943635608167530247</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/gen</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP320r1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e26</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/1</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x762fa9e1988fdb911a91a2ee9938e0c667364417df5b2a1d470dfcb2386fc42bec7c67b3595dcd8e</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/2</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x04fe1e15fa803fdb486be596b00abc53feb2eeeb9081d5b2a539e333646138d298d36b588bfbd041</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/3</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x595c3f8fddf0bca7f722d69a59d0cf269bea1e5f1e5b0ed7ad0ae6341a30ef8733865deb5996bb37</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/4</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x85de1d0bfec99e087e3315a045261dfa7ad55e035575d61d858c7b4dc807df052b2dbfa803374020</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 196907</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/5</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x044664f95553a4e4204b3c584eed7eb3c91ae92c8ee7dc9ee37e7cc067b58688c42fa8f26f3ad828</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 146208281456251399783</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/6</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0d728bc8ccd9b7fd249f959dad0b57ff028e7858deff4cf9c9d65b11e3b5bbd01b6f568be5910dd6</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>degenerate order = 2307908307480288228542246803936276549862379769663891118114524423</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP320r1/gen</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000005</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP384r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec52</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x70269a7b61909d9fbdc89c77a359c168b31f40d488f4a817f2811d0aeda71aec407ecb8d2d561af30e52ab55bb126ae9</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x3ef4b5a9b5525a600cdfd481ff13dbeacb9f25f29af360d0e9bed208a4b650f9a26bbe89248d3bf7bc5cfd1bf1108054</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x8ca0a25e4fbf0d7b69585acdd9cb26f2cc2e6036061a960c9f342c0c2f2bef9ce8d410df3da73f2955f82dc6cfede0f6</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x7ca77491eca28a1dd1667da80aa95ecbe84ba9e379e12d1d30482790c43dcd59a0e0e2e8fad09dac4ead54b18e4911b2</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/5</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x34d6057691520ed040a958956ee8821efffa9f4827f8507b9f7d86ffdccee6a09a866839b9b631fae9b330ece487a1fb</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 734647</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/6</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x8c1e0c36b3dd4de379143acb43f078cb211543f95d85405fbcc2474f6c88701d5aece6c92d8d21e2b7b42be1e7da67b3</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 27093605140967</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/7</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x7d712d6ebcceb876c1f40263ad5c952cf2264c660c17d4567a24dfb776cd94182560094ab0f1353341851079bfdf99bd</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 3012146720727260651</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/8</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x84cf53d9ffa36b9300dcf53a1db4030f5afba0c2b5299685620432993772359358ccef721662b7d6b679207517b52817</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>degenerate order = 13857381403312519376221497559214358876512960238914501360589056738895920081</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP384r1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>brainpoolP512r1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f2</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/1</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x177c47f1f2bd3306efe5a93ed046a559abbb32424d5887e6c3f49c23c907c5a3b68aee1d7ae4247ba3491698c3c7c4dd9e105383f58984e45b4104cce042417b</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/2</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x9b9e9905d13f35cc5b6578523e0380be922803fa98bcde94c920aca572a8fb4a432520b51b0f9eb3d854aa14aa5ef9fcc4ac08bf06eaec4b98ffdf90244f67d7</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/3</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x77b03a217034dd2adcbcbfbdfe879b4ce1f0ecdd6025d1c3da80bef3e905a34bfdcb88362d553219b025cb8123698296c437411ecba452db94d829729def073e</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 329430728783919403</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/4</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x890e0b1d03bd78442f0144b752cce879cec7a069497a83a6dac714a37221fa282ef147385b796653c2b98c87c003a7285ee98f69ed3df135c6a59adf8f17be5a</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 18335424362847464339</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/5</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x25c0f1328c75876e338e66fb112cd47e8936c41b57dbf2c97de9c6bf300fb035bbcb20fb44046e6172c00939075da436b9c7d84941a9b98219fced6d9e17da64</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 120179186709126902983513742993</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/6</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x1d93c72f487fc4ad34cb0c522dda3a7067b1b5c11175fc90ebbd086f639cad2d30d345e5596a93136e48aad4226cdb1a320e4b0aa68da2ca62cd5fe51c601f8e</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>degenerate order = 14435454750020088047685444818571282397270727096595623715684950293729763357371155607979</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP512r1/gen</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-
diff --git a/src/cz/crcs/ectester/data/degenerate/cofactor.xml b/src/cz/crcs/ectester/data/degenerate/cofactor.xml
deleted file mode 100644
index 647515b..0000000
--- a/src/cz/crcs/ectester/data/degenerate/cofactor.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>cofactor128p4/0</id>
- <inline>0x00000000000000000000000000000000,0x94d9020b666fbb599609485472a9246e</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/1</id>
- <inline>0x00000000000000000000000000000000,0x2d3a81f8b8d96e6db96a04fb6cf432de</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/2</id>
- <inline>0x00000000000000000000000000000000,0x639272497e0865cea0e17677b6bc5575</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/3</id>
- <inline>0x00000000000000000000000000000000,0x072aba3ae7aeb770332600a630e503d1</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 5297</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/4</id>
- <inline>0x00000000000000000000000000000000,0x17b45a35afdff5c5150a7c0a7ee34825</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 31134053800693</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/5</id>
- <inline>0x00000000000000000000000000000000,0x6fd5d6e491bf5a15eb1d38554caad86c</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>degenerate order = 28564500657606656383</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/gen</id>
- <inline>0x00000000000000000000000000000000,0x00000000000000000000000000000005</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>cofactor160p4/0</id>
- <inline>0x0000000000000000000000000000000000000000,0x93ab454ad26dae3b521d5b61a48c94cab3c4aa9c</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/1</id>
- <inline>0x0000000000000000000000000000000000000000,0xbad87d0931716ec918e43e76b57971cc613e153</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 4</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/2</id>
- <inline>0x0000000000000000000000000000000000000000,0x4428069aa7ac1865eb52c5b4c885ec832d89b36d</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/3</id>
- <inline>0x0000000000000000000000000000000000000000,0x6eb71aefce923ebf8b07c6f1f59b1c30d43b74ae</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 23</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/4</id>
- <inline>0x0000000000000000000000000000000000000000,0x3c5ff8c94b31b46f92575e0b77b0366afe24dfc1</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 11443</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/5</id>
- <inline>0x0000000000000000000000000000000000000000,0xd8e2287382e057de70e1f45f70d8dad85d27025</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 352281613501590816479</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/5</id>
- <inline>0x0000000000000000000000000000000000000000,0x36911d265f6d795a2efd10c20aae0f3ec5f815f4</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>degenerate order = 757721821606925858951</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/gen</id>
- <inline>0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000002</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>cofactor192p4/0</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x8cceb84c81521937bef0925a3aaf09195a59c3f99ae06134</inline>
- <curve>cofactor/cofactor192p4</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>cofactor192p4/1</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x63ca4f21e0e4f6a833f914468e00e4d817f472d54aca5a64</inline>
- <curve>cofactor/cofactor192p4</curve>
- <desc>degenerate order = 4</desc>
-</pubkey>
-<pubkey>
- <id>cofactor192p4/2</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x7ce088c401bfc705e70da9928c04ed6e1bf100c26b253028</inline>
- <curve>cofactor/cofactor192p4</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>cofactor192p4/3</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000100000</inline>
- <curve>cofactor/cofactor192p4</curve>
- <desc>degenerate order = 172629492300688965054638881592440218548130640356589228457</desc>
-</pubkey>
-<pubkey>
- <id>cofactor192p4/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000002</inline>
- <curve>cofactor/cofactor192p4</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/degenerate/keys.xml b/src/cz/crcs/ectester/data/degenerate/keys.xml
deleted file mode 100644
index 498cf26..0000000
--- a/src/cz/crcs/ectester/data/degenerate/keys.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE keys [
- <!ENTITY secg SYSTEM "degenerate/secg.xml">
- <!ENTITY brainpool SYSTEM "degenerate/brainpool.xml">
- <!ENTITY cofactor SYSTEM "degenerate/cofactor.xml">
- ]>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <!--
- This is messy and what not, but Java XML api doesn't support
- the XInclude selector necessary to make this work nicely, so XInclude is out...
- -->
- &secg;
- &brainpool;
- &cofactor;
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/degenerate/secg.xml b/src/cz/crcs/ectester/data/degenerate/secg.xml
deleted file mode 100644
index 2cf81e7..0000000
--- a/src/cz/crcs/ectester/data/degenerate/secg.xml
+++ /dev/null
@@ -1,628 +0,0 @@
-<pubkey>
- <id>secp112r1/0</id>
- <inline>0x0000000000000000000000000000,0xdb7c2abf62e35e668076bead208a</inline>
- <curve>secg/secp112r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/1</id>
- <inline>0x0000000000000000000000000000,0x75087e0bcdb604d9ca3a0998a8f6</inline>
- <curve>secg/secp112r1</curve>
- <desc>degenerate order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/2</id>
- <inline>0x0000000000000000000000000000,0x9ceca7fd3423a8580f4d8be19b71</inline>
- <curve>secg/secp112r1</curve>
- <desc>degenerate order = 452873</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/3</id>
- <inline>0x0000000000000000000000000000,0x250b6a43ac8a790cf22b7cdb36bd</inline>
- <curve>secg/secp112r1</curve>
- <desc>degenerate order = 213692946505768378488901547</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/gen</id>
- <inline>0x0000000000000000000000000000,0x0000000000000000000000000005</inline>
- <curve>secg/secp112r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp128r1/0</id>
- <inline>0x00000000000000000000000000000000,0xfffffffdfffffffffffffffffffffffe</inline>
- <curve>secg/secp128r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/1</id>
- <inline>0x00000000000000000000000000000000,0x0a50650222aa47d2cd1077082c2b77a1</inline>
- <curve>secg/secp128r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/2</id>
- <inline>0x00000000000000000000000000000000,0x5acdd440659ebf4945f5e131da2097c4</inline>
- <curve>secg/secp128r1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/3</id>
- <inline>0x00000000000000000000000000000000,0x86ba614538631a14c10485c80d2e52aa</inline>
- <curve>secg/secp128r1</curve>
- <desc>degenerate order = 2700653704464143955832110573370478657</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/gen</id>
- <inline>0x00000000000000000000000000000000,0x00000000000000000000000000000003</inline>
- <curve>secg/secp128r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp160r2/0</id>
- <inline>0x0000000000000000000000000000000000000000,0xfffffffffffffffffffffffffffffffeffffac72</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/1</id>
- <inline>0x0000000000000000000000000000000000000000,0x9ba48cba5ebcb9b6bd33b92830b2a2e0e192f10a</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/2</id>
- <inline>0x0000000000000000000000000000000000000000,0x508a8264d56922add3cd40482649d840497476e8</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/3</id>
- <inline>0x0000000000000000000000000000000000000000,0x36aec30a63930538841d0324a54aecf4f89bf859</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/4</id>
- <inline>0x0000000000000000000000000000000000000000,0xd2204d87c083aa9062de5c195c88de10d5f82f39</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/5</id>
- <inline>0x0000000000000000000000000000000000000000,0xaf2fb7626db439a172b14b80a13f4f871d0aaf97</inline>
- <curve>secg/secp160r2</curve>
- <desc>degenerate order = 61588775277324185343602394973294691093621473</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/gen</id>
- <inline>0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000002</inline>
- <curve>secg/secp160r2</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp160r1/0</id>
- <inline>0x0000000000000000000000000000000000000000,0xffffffffffffffffffffffffffffffff7ffffffe</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/1</id>
- <inline>0x0000000000000000000000000000000000000000,0x5286e47bcbf86e7587ca6053773787924c765eb8</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/2</id>
- <inline>0x0000000000000000000000000000000000000000,0x6c391d32e5649a5a9fdd84584abc45d0e3604ad0</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/3</id>
- <inline>0x0000000000000000000000000000000000000000,0x26c2e1fa26e422ee36b7cdf067cd73278d1d2da4</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 115901</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/4</id>
- <inline>0x0000000000000000000000000000000000000000,0xffcb6408974e4377c57bd619ef22e839bc025fe1</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 6030259</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/5</id>
- <inline>0x0000000000000000000000000000000000000000,0x14cc0ef773488d788c437edb4e462689cb9e6004</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 104179991</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/6</id>
- <inline>0x0000000000000000000000000000000000000000,0xbdaa241dd40b0d7df97b00b41170fcb4a6fdabf9</inline>
- <curve>secg/secp160r1</curve>
- <desc>degenerate order = 176070659401435712181211511</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/gen</id>
- <inline>0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000003</inline>
- <curve>secg/secp160r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp192r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xfffffffffffffffffffffffffffffffefffffffffffffffe</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x2f9fe7a38e825c1f01de3418bc1d118d66ed4626e89a9b62</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x9fbf41aed6e2e0ef99359b0316f6645402f602a520af5e3f</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 149309</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x8c89aea49b8b009d7f0d0e3af71bdd9bba9fbde0fabc5f9e</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 11393611</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xbfc817a4572bbd90b5a1b7bdcc3f2822d79fc8445541b033</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 108341181769254293</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/5</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xef8804cd3326d6354ecc3ec957019d8fde73325cf7ffd877</inline>
- <curve>secg/secp192r1</curve>
- <desc>degenerate order = 288626509448065367648032903</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000b</inline>
- <curve>secg/secp192r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp192k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xfffffffffffffffffffffffffffffffffffffffeffffee36</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xbb85691939b869c1d087f601554b96b80cb4f55b35f433c2</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x52bc2dde06d9be0fca70e761d5f395852750edf7e5ded184</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x0e79be49b05f5ac28e2ac611eeafb14a4c75900d643ff5fe</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xc06c0ad9b66541332b54f95c96021bfb6d6edfccc3c01c6a</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 1295233555201613</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/5</id>
- <inline>0x000000000000000000000000000000000000000000000000,0xf73770178fa1a34019c04218683af4621b41b80e9669f2a5</inline>
- <curve>secg/secp192k1</curve>
- <desc>degenerate order = 10489845818524887021689201254173392444641</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000003</inline>
- <curve>secg/secp192k1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp224r1/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xffffffffffffffffffffffffffffffff000000000000000000000000</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/1</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x94353937171b8337606664f1900be8995691cf49934d5551cc5ace29</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/2</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xa2bd9c773c593dd8031caa9a1d9f6483b4731af7167d6d795e0d9e9f</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/3</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xf15055c151148708a733ec4650e58279fb849e792c4af526f029729a</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/4</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xef92abfcfef7401f48b092a12e1abd4834f0de67a8fabccfec740794</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 257</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/5</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x3acd587a1347c0b6b0e94dc195e63cae7bd568649255ea00f8c3f844</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 641</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/6</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x7515e65e8ab6e99753c979b6b111d4dd7f9a5cc17ef79d43924b38a9</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 65537</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/7</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x872df407d9718cf23e4a9b3da9226accec9cf29f4fb1d287f222c841</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 274177</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/8</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x3012a7ffd8177bfdc61e62209414d3ec85bf25334e231f9dec255211</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 6700417</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/9</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0xf366138e28cf4ac57586d5759a79949fa71225114a8925cf21a2ae35</inline>
- <curve>secg/secp224r1</curve>
- <desc>degenerate order = 67280421310721</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/gen</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000016</inline>
- <curve>secg/secp224r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp256r1/0</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xffffffff00000001000000000000000000000000fffffffffffffffffffffffe</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/1</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x4d6ea8928adb86cf62388a8e0ef623312e68c59bdef3e53fd964598eb819acce</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/2</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x0dc5b3bf9607f9854b836abbd19428f556a1cea2ebb7a71e3e71710ffa4f2b0e</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/3</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x04b8252e44493fb6f06c6b88e3c665c9f0d470cc964557955b267519f531a262</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/4</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xd18ddce5e27dd6a457c4ab955e351bb61b4d8d796ef679744fc0554baa8d8fc2</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 257</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/5</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xa319d26b19bcd46157ff4f68c57b3a3f780dd35a9df3dd4a4991ea6fffa0d54e</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 641</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/6</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xc0875c9f1d579d82da2e2e3bf14cb1f836852a2349501fd82ded6f8e772301c7</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 1531</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/7</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xef45524f9bdfa9473bb8020719dbc64297b7f80ea1939fb69041e799d3d5c977</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 65537</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/8</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x69214c4575b40595c02c63b57fb6de6ce6bb01e34c4a7a4cfa38fa917d3b5f74</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 490463</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/9</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xc01fe1a04efa7f9e140ccea80e206c138fa68f40900d0b75b36241e4a05f8d40</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 6700417</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/10</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xcf8f641aa234fe4b4e4d2620abc597a13300e19bcfa247ec3c33123ce7d719cb</inline>
- <curve>secg/secp256r1</curve>
- <desc>degenerate order = 835945042244614951780389953367877943453916927241</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/gen</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000006</inline>
- <curve>secg/secp256r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp256k1/0</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2e</inline>
- <curve>secg/secp256k1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/1</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x851695d49a83f8ef919bb86153cbcb16630fb68aed0a766a3ec693d68e6afa40</inline>
- <curve>secg/secp256k1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/2</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0xa2ab335e7a5b9784e9425431411a8f02a1e39029745c0d2567e7b217154fe2cb</inline>
- <curve>secg/secp256k1</curve>
- <desc>degenerate order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/3</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x68105a205ec4e9ceb2b1dd5285ab623cf09e207bad567e15482d24e582ff833f</inline>
- <curve>secg/secp256k1</curve>
- <desc>degenerate order = 13441</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/4</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x212e9abc82e8709493c087cd14e2ebd253ecf3cd0abd68a2b7b766fcc2aa4ca6</inline>
- <curve>secg/secp256k1</curve>
- <desc>degenerate order = 205115282021455665897114700593932402728804164701536103180137503955397371</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/gen</id>
- <inline>0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000003</inline>
- <curve>secg/secp256k1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp384r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffe</inline>
- <curve>secg/secp384r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp384r1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xad23fbead5a22478b4da040e57fea836a345078a37cb2c7045c3daf1de0db10dbda32da13fd3da4dcf3d95150e3522c8</inline>
- <curve>secg/secp384r1</curve>
- <desc>degenerate order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp384r1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x83eb94214f07c841569b4da60430f7fc19aef03de2d2812d91ae40f9b2a7f5a83262b640fa4b31995a93869f71109783</inline>
- <curve>secg/secp384r1</curve>
- <desc>degenerate order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp384r1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xb3538721ea2a7edbae6973a8efb8f5109f49af10882e02239c90c7581c7f00f4cd892daede62ca75dd89971cedb618f0</inline>
- <curve>secg/secp384r1</curve>
- <desc>degenerate order = 807145746439</desc>
-</pubkey>
-<pubkey>
- <id>secp384r1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xab5c6abb2811893a9a7c4d0331e755786b1555daa209b805aec474a742d0cfd02c511e764f764543b394c6c7f89865e5</inline>
- <curve>secg/secp384r1</curve>
- <desc>degenerate order = 19173790298027098165721053155794528970226934547887232785722672956982046098136719667167519737147526097</desc>
-</pubkey>
-<pubkey>
- <id>secp384r1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013</inline>
- <curve>secg/secp384r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
-
-<pubkey>
- <id>secp521r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/1</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0032749246cef38c558b84265cbe9454c5b08624d5cb14a69636a701122712fcae5faafa042ad6c33247520b119fd582bcd5a02f43e801348f88f734ddb0b41f5b39</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/2</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01257bef538f850baff583c2dccc5da15be046297570d85a4dfa580a1fe9534b616321c5fb944fe9a7927ad420147aba2b6793e1a7ec25556c21ba0c60d1f29f7e93</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/3</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01f2f4b8697ed47692e132c92228e98f0dfe1d7b868852a7d76cf9f5c08ade0dfb5033be7c9dca15b8aa68fab9a01b35abd28b490ae8f8fcfa1a2bd50bcecbca89bc</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/4</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x001836c4a3a70b921586e1194e0a17cb438619edb43846933957b7a9dc09d0f447c6a0d3163cf3a5bc8ba2b4a55658e70602dc3512021d48ece14cd625e7ac7f5985</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/5</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01736df798237091ff59864f3fd212e01b6c496869bdc020beabf83bf656abf6fcce4c6286ea5caf1002401e1f272b1321850ad1d38e9e66abd68be0e79ad6834daa</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/6</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x011d3bf2a0312f01791ff702149a1616abb9e7cfa93f1ec4c7b9612c5204dfa8a76fcbb24a370774a2f615d98caf2964f87658de9c619b778343275a257cde6c7bab</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/7</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0085a52672e46236148b9485bcede803ffab149344b77a389c7537bb94b9df1b3a3854192fa512c6da411653f93d8db663fd4586beef48cd05208f38870fcd763f59</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/8</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01f5a1f4766a51e254ac60b54635b79f5830543199fdb957c0e161640a0f74a3fa85cced7857f26bd4be935b06d9fa535d9948f3bcbf1d2dadff3125c8807a21a6d6</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/9</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00dc13e71619071f58005d54b6b16682be219d85946ea9d199f81591f795003a508b5ea8e7a392450bc2da15673d0deb35d56ac9c10ab0887a1bdcbfd0c86d9d0213</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/10</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 521</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/11</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00309b3c9a4b45feef07448138eccff629e43e28acdb4fec0e08b0dff64e7292a076a9c733f209232968d60a7d9b7c08026865300f0c355f92021e9238b0558b483f</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 1613</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/12</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00662f3ca82bbfc958876666a9902a96f3437fb0999c8fa28490d8a51c89a1822d576ec48085e14bd55b6cf5cd89903cbe83b3eeef30ec38e1c885222ffc954e8b84</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 2731</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/13</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00f50e74a0ed52f6181c9a1c070de5f693c3d409e4e3bb668935b45d2a2cffcd4daabc6797d8914f18cdd44a13de1b71ca14fea6e611848495ced1f719395eed453f</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 8191</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/14</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0156f644f4d1c482f9c79e122733067cac22834fdb56ddec5e486bbd2e61bda8ec451cce3db115e8424793bc754744fc448b8100015a4f6b8a46b5dd38efec521841</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 42641</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/15</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x018c5c75b44635605ab7f529f86851e323612933fe10cbc72a806c2bafb86e85d254246e1c7468466cc8663cd1cc3aa44ff15ad808e729df4e75fb23da6374d48e8b</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 51481</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/16</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0043c1af0a225ffebeb76cf2d98e0480691871125d1c65304789110f60941a8e3b6265fbe338f584569f0245984050cc94afc190bcc1abc143c557609644cf10f3cf</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 61681</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/17</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00391b1adb891ad8156a8056781c9f665eb51cd4fa6837fc2a7d7d31f7161a7b94b52a7697f24e956b4eec6956d483f52efad14f581360bc8091544932bc14767a3a</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 409891</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/18</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01757c67f02f8b94f08642e00d4032a721d13a34243686fbb4cec8c0472bbda45fba8ab338b4afd7bac07260b4e8a21a8997eaee01cb5928f605ce0587138fde3e8c</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 858001</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/19</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x009297636ecc72ad872103c99fd3ed0ee94d24af2051d87d77a96df45b52ff26df768d8ddc0ce6e53d24ac482f9b3cc7b6ebf25601a47ce9ba95052a5dc80e4c79e5</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 5746001</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/20</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0130713f9de95587ba4272d1a5e996beee9530e10bd5c15e3e531a9f7ae59e0587106db1802309f49b5812e8811aa667d0ce9b838d814e984caf2833e2144dfc57b7</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 7623851</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/21</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00d08a1bd1285c19d86a1a4fd85f378bcd09a83addfdcc7e392fa9d8f9fa00b3d4af8887aff110f565c50cbc3b99bd7e5d55e051eeea5772cafb6bcec9e936de4955</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 34110701</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/22</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00791d7f3bf9c19a1b61f8f262a2e60a22fa9adfdcc0d6afeffab8068fbd91bc079188ba0365c0fe86c92073e244294a0da331ba36ccd01dcf323e92b16d11ca2b39</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 308761441</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/23</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0066fd8474256e396de2160ee4590caccdec49c5d099e12c7e405315a92dfb21e8277549d8d291744d79b841e8e1e86d5273fe07d3f56fed6f1c1220c2c217c289ef</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 2400573761</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/24</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01e5be0afc4fa36bc186c73de3ab924e6572d2b239887cf028af290befab2b168e7333f78a80f66525d5bd1534c8fab6b002c5ce2ac2279c1dc0f356dc199ff98c42</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 65427463921</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/25</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x019d8298bbd7449ff8e27bb3cd2243c182bd8dee40b287e903b1da711cf8f90f21b8ab497aba68fa6f252998a16eea60f6ec0a747f58dbf34e5e4544e7b392fb96ce</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 108140989558681</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/26</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01243fb23685cf51dcab5d05385275f63fd3eb2225aeb2ae3e0e0260d09e84c6a7f655ece1b14e54b17aa512c55ed94168a203bf70c908e1934f8b6fc04f971cdbfc</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 145295143558111</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/27</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x01f803543c1ed5ed182210105552c99b8df0b740f67423a960cd35327914efbf2ae2d4debd0116ffa6d726f9727123f3a2083c8f4633a6a6531afcea86b72a301c6c</inline>
- <curve>secg/secp521r1</curve>
- <desc>degenerate order = 173308343918874810521923841</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/gen</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003</inline>
- <curve>secg/secp521r1</curve>
- <desc>generator of Fp^*</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/gost/curves.xml b/src/cz/crcs/ectester/data/gost/curves.xml
deleted file mode 100644
index 2b83c5e..0000000
--- a/src/cz/crcs/ectester/data/gost/curves.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>gost256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>gost256.csv</file>
- </curve>
- <curve>
- <id>gost512</id>
- <bits>512</bits>
- <field>prime</field>
- <file>gost512.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/gost/gost256.csv b/src/cz/crcs/ectester/data/gost/gost256.csv
deleted file mode 100644
index baea45a..0000000
--- a/src/cz/crcs/ectester/data/gost/gost256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8000000000000000000000000000000000000000000000000000000000000431,0x7,0x5fbff498aa938ce739b8e022fbafef40563f6e6a3472fc2a514c0ce9dae23b7e,0x2,0x8e2a8a0e65147d4bd6316030e16d19c85c97f0a9ca267122b96abbcea7e8fc8,0x8000000000000000000000000000000150fe8a1892976154c59cfc193accf5b3,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/gost/gost512.csv b/src/cz/crcs/ectester/data/gost/gost512.csv
deleted file mode 100644
index 5b24d59..0000000
--- a/src/cz/crcs/ectester/data/gost/gost512.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15df1d852741af4704a0458047e80e4546d35b8336fac224dd81664bbf528be6373,0x7,0x1cff0806a31116da29d8cfa54e57eb748bc5f377e49400fdd788b649eca1ac4361834013b2ad7322480a89ca58e0cf74bc9e540c2add6897fad0a3084f302adc,0x24d19cc64572ee30f396bf6ebbfd7a6c5213b3b3d7057cc825f91093a68cd762fd60611262cd838dc6b60aa7eee804e28bc849977fac33b4b530f1b120248a9a,0x2bb312a43bd2ce6e0d020613c857acddcfbf061e91e5f2c3f32447c259f39b2c83ab156d77f1496bf7eb3351e1ee4e43dc1a18b91b24640b6dbb92cb1add371e,0x4531acd1fe0023c7550d267b6b2fee80922b14b2ffb90f04d4eb7c09b5d2d15da82f2d7ecb1dbac719905c5eecc423f1d86e25edbe23c595d644aaf187e6e6df,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160r1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160r1.xml
deleted file mode 100644
index 7656432..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160r1.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP160r1/0</id>
- <inline>0x894d9e10149c98c022afc786a3fb26210e06d93a,0x0000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/1</id>
- <inline>0x9984071eef5d7b8c4f96dd362e433997b88cf6e1,0x2d3c20ed70cefd90958534812d52f906f58a6ab3</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/2</id>
- <inline>0xb8849e1aadcf9b18b046434d65ba404497269900,0x513009e61436086226834aed25961cd394b4a43b</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/3</id>
- <inline>0x9edf4a8dfb69c86debde46ba1f6cf25d43685c7b,0xcbed40ca882c722d386e73b02a3d890049840874</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/4</id>
- <inline>0x6325aa5ec04487a81541de5d22453001f5ad01d5,0x44b571e97f37126ba485ddcd252d0634d2d843cc</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/5</id>
- <inline>0xbfd8d69af9eed0322065eb0961cf5907377432d3,0x4f4197f929e9cdcac255b4eb650bde0128f942eb</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/6</id>
- <inline>0x3c1fa149b4f369132eefea61bc84ae1b1cd7a8a8,0x2d273bf9821167b70100159e51b37a2e6e302ff7</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/7</id>
- <inline>0x199fa81ba76725c8af63d7596354a854ddd14e21,0x62afff80ea9beb0bd51c63e0c651061e075740f4</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/8</id>
- <inline>0xa6d14438de03e68095f391617473535e75dee040,0x52b33a6968939859860d694cc4ea5f7a92d58b23</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/9</id>
- <inline>0xe286e171bf0f6cc5b43c131bd12c15453ef9d706,0x9b375b2d2b1456099acbcb5419627237ebfe7fbd</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/10</id>
- <inline>0xe012ec90a409bd34f28bcf11bcbbcd78ecf43efa,0xd3b9e2b17ac32befa317845341e9b0d4be3a919c</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/11</id>
- <inline>0x761752bfc3bceed608938b859eb2732147ab2c13,0x329af4d24db5c4efc290cb5156945a0c4b2b7ecb</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/12</id>
- <inline>0x610085821c690d91fa1cd4ea3fae4a6d9f1663df,0x1b1373c5d34aba0bb3d2f22596ac92af73af3a27</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/13</id>
- <inline>0x8ba114f427a68851cfd5d73c37db77efd0712968,0x964045047ed8b65c17554f11985114f35b34da12</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/14</id>
- <inline>0x6de205f04e3ffe710edcedd6ebd35b5279e56ce3,0x3e78149b1034d44d874b3ce275f6719249e75cf8</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/15</id>
- <inline>0xa42c01212f0c7889d2bd80da38e795b1b51e97d1,0x51a974f5bfacd11c39b9eb62af6ca08e0d25620c</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/16</id>
- <inline>0x5699ff94f28628b37b35afce2cfbe033946ec7b8,0x063f5d424359563aeb46cee26d8ba5e1bcc1e052</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/17</id>
- <inline>0x177fe80405787eb17a88cf0adcf833ef682acf2d,0xca4beeb92561c6b6cc2ff5a839276aec668ee988</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/18</id>
- <inline>0xcef60bc4e4adaee1f5632c57101d792fc00d7835,0xc8ce42feab09a92765babb8ee9165b74159e11b0</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/19</id>
- <inline>0x58e1746e11dea0c87bd5e8ebef55624c578aa482,0xe4cc88ec4839e8e95587e9b6515487a7fd12d052</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/20</id>
- <inline>0x0301528c0245255342671904c643decf32a7a233,0x802721fa4911239d28825fc50d5bd85496d69305</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/21</id>
- <inline>0x0c4dab799a81f3397c487bafde8133e324244d5c,0x099d70a4f7bb2c62d34dd835f7da5df1ec31058d</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/22</id>
- <inline>0x619957de020463bd0bf899aa604a9f702300ffc2,0xe272af463ec5a41e1d3092e3fcb567b6d4a7f355</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/23</id>
- <inline>0x37d52ba134c6d63d0e5c05a144c1486986506341,0x8c3721bd91c7e2a99ea3f03db9c03f77d5f9529c</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/24</id>
- <inline>0xa23b78bc0678f1f9e9a0de1fdd2f098590d51a09,0x8ce2e7ec776e70626194bc9c2d713ae783ed3bbd</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/25</id>
- <inline>0x16d4a2c0f575e96dcf2bedfa05da8859d84eb3e9,0x13d94c3f90f7705bdd883ef42b69fdc223b86a2a</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/26</id>
- <inline>0x4158e838553edc1fe48f83d1f1a074dd293701fb,0xe40382c1963158cb1fe4aa32057731738748d0b0</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/27</id>
- <inline>0xb691bea752d761e837e7512f2a191ea36bb0eeca,0x7161a0528ff5dbbc01858917887198c0258b9a7a</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/28</id>
- <inline>0x08987c8fdcf194692bba9468ee6153bd561befef,0x76dda0681cf1b07f7cea5a233ff6cda45eaddd42</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/29</id>
- <inline>0x1727cbcb02fbec471703cd0b7558eba8e206b4e1,0xc85295dfcda6993aece5a428e55d4e40ee2c0aa5</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/30</id>
- <inline>0xdf1ffb84e573d940df790fe5f714aae6c7e25c2f,0x08b70760193ea02b29769b31be869fc6a500aeee</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/31</id>
- <inline>0xe587493739610f80271465996a21be584289dceb,0xd659fe93e7e64a989bb121fbf4be6b750ccd57f8</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/32</id>
- <inline>0x90e81eca72f64fe0fb7d169888e1699253553e26,0x3d917a3f8abac5f63f74e028f7e46dea9fb3338b</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/33</id>
- <inline>0xe129347f7007742e748bade2447d4d58429a21b5,0x1a253c83a7893b3836acaa441ab6cd4cc33f2a1f</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/34</id>
- <inline>0x459eaf5a03eeb846b73441f66119ad69d426c213,0x4a20935ae5b91d27867e80213a8810c1ef3da630</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/35</id>
- <inline>0x6f81d4fc14867e7814fc4687e53a4ff0360f1417,0xab48960d2fc924c6b618edf22d8ac82bc5957a9d</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/36</id>
- <inline>0x6064390da187e8a6566eb24c8b3c2ae41e438388,0xa963896f58bb00679243ff54a9bfe6ad76f74f5e</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/37</id>
- <inline>0x33b6f5805cdc046be9976c686c546c10e58dbc10,0xa7c433f2dd7671a8312642227754bd2c98df8007</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/38</id>
- <inline>0xcbe8fa9fdeefc7c18d7ec5c349bfc1d35140e71a,0x8b1a8be74a8ed863091831f5fe0a717a6e086728</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/39</id>
- <inline>0xc043c07052391c33af708a9b2c8ae9d41edaed0d,0x13004da1543e7e951f1d367e322908bf0f5e31af</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/40</id>
- <inline>0x4d55a23dd8da29f49de10385e052503223b57b2a,0x05d42f9e7b85df543c1d7583a6712af2d4cde554</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/41</id>
- <inline>0xa2dd251c0fa3bcd9196af650fb2f20faadc54b92,0xdaf7a56f50a6b651aede5ee58c51fdba894805c3</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/42</id>
- <inline>0xaa936cc52698a66a21b20c9f630d3e081216d0b2,0xa8b6402311432c9357e5d3ad01771e32f417baa2</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/43</id>
- <inline>0x64977b60eaefabd73d238d0bfe99a6b42aab0029,0x0202d8d421cdc97bd18be388c1e4423b92ca5e09</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/44</id>
- <inline>0x727b12b51a7e4f312aefe2f7483eeb7985381737,0xb833594ec5062d61ba92317a9e96422e5ca5c268</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/45</id>
- <inline>0x9cb06c43605f73fe824f05dff7b155a6e7daea3f,0xde9b977104267fae8ee5eced0313ddac0f13530c</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/46</id>
- <inline>0x9a9bc64d9f3185ac59334573146a1d8f9adfff7b,0xd8d7c5ca53246346a39b2d1b088ba3aea25e60ae</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/47</id>
- <inline>0x78ff3cb85f740861222048d3c5cb2636efaecb37,0x6202522b4c0dca0c659011f272dbddda33abaa45</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/48</id>
- <inline>0x5e10f73370d8299761ae9ada47fc188b21c56768,0x6dc2f8e927bcd921260b9bd04146360b61ffba80</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/49</id>
- <inline>0x47c3cc0fb94e1650d5bbae930a1b1a8ac7e004c4,0x61be1f78ba3281bc77331d2c85270c49969b6c82</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/50</id>
- <inline>0x547c539387d14dc854eaebff413defa9e8e039b6,0x1272b1b0246d581d6fc3bf303c8c775f089fb1a4</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/51</id>
- <inline>0x586ca7a915885ab766d18e13d0120fbace9eb715,0x3d8f066e95aca8190d60bafaa1d8f3a034956214</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/52</id>
- <inline>0x12b1c8bfe16e061c22d58e2bb1c412b04179d5f1,0x20bf00b50f46cfb627ae9ca6da54dfcce4487262</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/53</id>
- <inline>0x0040892221b8291a17a70fef729b3d0958db3300,0xe613aa9e4991281f8618ebb73003aff70df87a14</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP160r1/54</id>
- <inline>0x5440002083ce239da4933d543c4a6c2b4043d9d0,0x664f5bc313fae27ba1bb2e45ab4d5788938d1945</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/55</id>
- <inline>0x4af82c74a3420119e5a6cad2beac7299d1ff0b76,0xb53733e9a63a9df9ce745ba7282a91dcd4df63db</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160r1/56</id>
- <inline>0x3d270e44f2a93d28ce6cdf6788f312cabfdfe80d,0xd3560c22ac8c24f223d3cf6592350549071b4830</inline>
- <curve>brainpool/brainpoolP160r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160t1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160t1.xml
deleted file mode 100644
index ffac676..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP160t1.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP160t1/0</id>
- <inline>0xb265f59e1b0919204f5a67f045e0281e31a64330,0x0000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/1</id>
- <inline>0xbad1ad5795aff62c028a2a0b14f294d8d7253cfb,0xd7277925b796f1a729dd90134c9be44c76bddde1</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/2</id>
- <inline>0x903e7f4e3efd8bb7d6fad0100ea8968959726e29,0xb0622b152f2bf72647ca3e16cdecc2c5dd38e95e</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/3</id>
- <inline>0xba20dc14e97a14a9d2743a35b4b5023b6582ddd6,0x97f4ecd2c7ed1a181d7dcaad9a8dfba2627bd1ac</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/4</id>
- <inline>0x46bbd6f89ebdf72fb3bf0e25bcfa85573b9cbc4d,0x1cc9b95057118d629974014ab97fee976cb6a644</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/5</id>
- <inline>0xa8258acb99d033b99c3f802e9edf35cf684a83c6,0x20821127699f4412a926b1b1692fd70cb7f2197b</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/6</id>
- <inline>0x65936b9218d775a0b084abec939b441155f15eb6,0xe21feae03996c9c5e41d5d5f6c12b0942f7f4742</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/7</id>
- <inline>0x824396b656f501ef76483c7c8b0e8a9fe1698cf8,0x615f360413c351b0cb37ff85d0ed7f761ecfdff0</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/8</id>
- <inline>0x54069d7439ddf523bec363ccbcc3b3b9ddc3816e,0x76acc37db767888b8439b37a28c651b82eef92eb</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/9</id>
- <inline>0x85a588944f51e30bcea7b557758bfe195d6f1055,0xbf0e537448e814109b17b4600e71908928decf6a</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/10</id>
- <inline>0xc05e8f63f52020b968fa4229731fca67490f1979,0x485f9c0b89a4cf2e0ed9123a223a251c701ba64a</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/11</id>
- <inline>0xce0d89e196623a4adfe1c377dc74b7e71336140e,0xbe8e6f92690b7f768b5d67253b51cbe39f5ed93b</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/12</id>
- <inline>0x35381803523061ebd45b6268958d21d120eef1b1,0xcfeafb09372602ec342e87070deb1ffb31dca992</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/13</id>
- <inline>0x9c4db9cee9af857670ff28e2fb42bf365d45aea5,0x71e92555b13dcc2156df509582e9e92d80d1c12d</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/14</id>
- <inline>0x9511622fe5971c679b79b1cdd3c5160fd7a586f1,0x185763fa5455b5350541396131bbc44f06afab62</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/15</id>
- <inline>0x6c2ba6e6c174dc096d54aed59c160515bd0c3ee6,0x3cc0d162958bbe3d7ed5cad41aaec6b4dd832ee6</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/16</id>
- <inline>0x4316b570b3a7cca7c5217a381b049048779027b4,0x12e11b01211a1986321839e6e515a2cfe77d4cc8</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/17</id>
- <inline>0xd6a314554c83b0763961f4e82b7e6e7be510d1c6,0x9417a56417b736a3213c018ec9eff9c681e91bc3</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/18</id>
- <inline>0x78d4da0415467ecc8c505b9720d5db307160ecb6,0x329843734d0d070aad8ed355c6e588064a5fdfbe</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/19</id>
- <inline>0x90020ba1103ff191a230ac87b8a59aed7ef66989,0x3f9dd4074412671f86ba32555b11856860a46adf</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/20</id>
- <inline>0x289ef46440744a260a692ad25dcf5ef771702d22,0xb5b373dd91ae8df303647c2498e1ec5799ef7702</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/21</id>
- <inline>0x5debf8d4ea83b412e0627d02770398761ba24ae4,0xdf42aad8673d5506b291e002dd6b44431c2009c2</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/22</id>
- <inline>0xa67632776ec47848ca157da9cfdc8d2505653290,0x9f1992ebcc53dd70922a328c725c37e8bbba12ad</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/23</id>
- <inline>0x9f71c6ac01953b2a2f2e2b02464cc04bd536e224,0x1583cb03f46c2df176313f1e4c1c96e5a2b1b0a0</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/24</id>
- <inline>0x2fce7880165e85827ccafffbc5617e588062cc09,0x723ec86a2e1f00e71948ff310e0ed36c8360a789</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/25</id>
- <inline>0x516d83d9796c5eff67946579eb43952a28ce62d2,0xd74d4f09858f23e52d595a94129191256fd9d319</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/26</id>
- <inline>0xce13e56f96d74090aaa716306ae10bf15b633e2d,0x4281a37d52106b3d0e4758c663ed5369d5f863df</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/27</id>
- <inline>0x9902830338496e4e2ff394e0c10410982afdd2ef,0x0383c77a02e3c3add14c241cd6db01ae8bbabc94</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/28</id>
- <inline>0x9a021286e03c976237b8a9911a19d470a9fb8444,0xc496f11b1f999d90c6d35d3e5b17c48f0cff033e</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/29</id>
- <inline>0x8513633addc0f4e4c46e612fb24e327ef236a91a,0x4d92c0892f3b36f048fabe017e93d2536182b54c</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/30</id>
- <inline>0x64b6c0636a49597e9717e6ff73d54b0bf552e823,0xc69a5bfc782f03caac0d3a2259321b1ed6be0555</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/31</id>
- <inline>0x960d3135e35071082b44311321e472cc8d443720,0xb43cc5120bbbcb53c84a1e752290c663cff638d8</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/32</id>
- <inline>0x2796cfd55b8ced83874685c200f3c75a29682d63,0xbdab52393c2dab2d0d5d76bdf2867125072c7686</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/33</id>
- <inline>0x6bb85f2943d4b5a12daa1f05ab5f569c6cf9cb99,0x1fe0590a69be6712a64cc218bda9c74a6ac1660a</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/34</id>
- <inline>0x30024ce62fd02ae61bdde675f9a30417546193a3,0x40a5457929f54378e1982c848bbe2de656180c4f</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/35</id>
- <inline>0x4d14797830c934ccab1c4a03722ed2696f06c89b,0x14d4b4daf8d6ca0e03fb05df45113a719c182ab9</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/36</id>
- <inline>0xe0bdd6e52077b751bc8705a832eda90706ed27ec,0xe2ea689df8f77a8e2839d8b17f8501d5a3cdf8e7</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/37</id>
- <inline>0x00466fa585d429d7c810945310ffaec7fd08f77e,0x6681a71c0ddc36ba776081b0bbb04af90d1ef459</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/38</id>
- <inline>0x0efa98dc9008d32500f01781c2c1a5b69f80f6c3,0x5a8cf27b9732b4399e6bce12c238524667881c03</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/39</id>
- <inline>0x16be36e0c6694df109b1fcc89e583528551f794f,0xcfbf5a4e42faefbdb0ba76e3323535a431af0ef3</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/40</id>
- <inline>0x85dfac7e92f7df004c2eac13a28f641acca2e19b,0x8e0530d93dc7e8014c6bffa3257024fb90acae5b</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/41</id>
- <inline>0xcec5ad185a118e567adf7911680764df3f6c0f2c,0x09b82c5f305bd8edfd410a1b3c2779f972ccc09b</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/42</id>
- <inline>0x54438e195870386136e77779733b08a5022fd31e,0xc2d253f02afead8b832e1a194c672b387c37ce32</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/43</id>
- <inline>0x31df8ea728ff26c25bcdf2a86869c9ec5177f333,0xdf674331bb0d574f4e81254a959719b1c1af3411</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/44</id>
- <inline>0x8cd061c66968662440a233ddc7d5db9746f6525d,0xbad449707d8fdd44dc615be08aba8dc548a97bbf</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/45</id>
- <inline>0x114da4256c4888f958647d87510ca1c414658f2a,0x8795fa899c06b7854ccd4a5662bcdf6464acb103</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/46</id>
- <inline>0xcd95cabe7cac9f97e78c71874e1e55582abc8d1f,0x39bda67e419e88e9e0699382a9b06e8e55832c81</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/47</id>
- <inline>0xc42ec16ae4adabd7d6ce97126e1924c546fe42be,0x5ad405b6d007c2630153c6849ea41f5a2f4a896a</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/48</id>
- <inline>0x4bb5f7dd79f1351c95ba15e7851576b8b0e50ece,0xd568e084f7445a56abea486b553acc65fe748248</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/49</id>
- <inline>0x52aa7073486691ba516127ab1c13b21a176357e2,0xbc6e4fd35662a1652aa325e946af493271dfcfcc</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/50</id>
- <inline>0x6d251784bd9d58c62031f6ee3db8e24ac2dabb52,0x6e8b916cb3dbb1852d0d511c0f061324a47f5a35</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/51</id>
- <inline>0x74f1764a2147f1b41ee2b1c1ed1dfab5e994c312,0xe0462277e176e99cac25ad63cbd56d60c2f9bf51</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/52</id>
- <inline>0x11ce683f3b7d0883de1a6956a851e092f9d71790,0xc1df7109a18bfe4c50651f6050dfc28b7f190f34</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/53</id>
- <inline>0xb847351d4006e913b81cc7bdefd738748e40908b,0xe49d04a92448b8d046cf7063f04355ad2f949c6d</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP160t1/54</id>
- <inline>0x6d17b06757c690a1ae9f411261be16f402eb9413,0x4b2fd210f79990027d8ee78fedf9c467110a76f5</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/55</id>
- <inline>0x90ab4fc73c706f7778072637ff7fa3694bbfce62,0x0eb9d9dbff4167652d410e235e9fed3acb02d955</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP160t1/56</id>
- <inline>0x0b7e4c6697993fa4f9fc88a5f5bf7e5bffdc8554,0xbb9fcd7e5b68d86cd841959a88a6294b725b0607</inline>
- <curve>brainpool/brainpoolP160t1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192r1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192r1.xml
deleted file mode 100644
index 4ceb20c..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192r1.xml
+++ /dev/null
@@ -1,386 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP192r1/0</id>
- <inline>0x1029223ec3c300675f8f95ba0f75c102dc13aecebb3c7f1e,0x000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/1</id>
- <inline>0xb15577f3977e50bb7d9300202d519aefd101851543c0c44d,0x1746720fc0757dabd61a6eb92a7211a794b126b1538a0f06</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/2</id>
- <inline>0x6e64566eee0334cc4207c34151293040df7cf1940dba4e37,0xa2122efbf8995da2cf9d19d15c6bff9474345a9317ff4c75</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/3</id>
- <inline>0x1274ecb694a4c8ef27d72f8f07a0440557f0b3257238253e,0xa909adcee06bb0289a816941164cd34054d7e5aa2df420ec</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/4</id>
- <inline>0x86b17d741f06b94d53734adde6933988d91875ca51ae3fbb,0x444901ccb84f66914dac159521ebe1b376da9b4058b7c046</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/5</id>
- <inline>0x91f9ee514f7ba95b02f6a6a421e5c407aa98750f4800c489,0x075bc5be4e76df961ee39cde63e78e49969b2e4e08741a8e</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/6</id>
- <inline>0x828b7cc24c6966c12cc0c824d9c09b11038bfeeb05b8ea7c,0xb858494fa44223aa3a2d8b6e89cc336d68119440c9bfbd29</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/7</id>
- <inline>0x37ec6d8e01e437ee2c2953953f652f6d1bb0e88ac1dcd853,0x944bd29c6ce02ab2bbd9b76cb66de718aa8123e6a1b38082</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/8</id>
- <inline>0x1a02a7db60e5e57eb10c1ca73b20bf8d7463cdfaae90c253,0x1e89c931547d1f062b5f21cd0452f60d08506ff168edc9c0</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/9</id>
- <inline>0xb67b7743a398bad12ba96609dc6dfce85aefb72b06467317,0x7fe9865844f7cbc88530afac9f2decb03a7137fafa1a0592</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/10</id>
- <inline>0x5a5d55fc075c0c397ceff122da1081c1bb62d4db3453784d,0x9fc912a5d78a4479cc707e90c1e9885c9d82dc4e02134efb</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/11</id>
- <inline>0x1a0b804737a8a37f36603708f832a4125d37dbf946596d64,0xb24acf1f4745e94df30c1a6d3547ea017a98b9a9aba1cec8</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/12</id>
- <inline>0x9dc7e5ed61170d0d71d75e67b816567a8b3c2388b21cfe80,0x97f8f10b66754b17f01288b59609dd6f19336adcd62c530e</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/13</id>
- <inline>0xbd6c11aac47b16183f17dbc5cc56dc1e17425ae15d80c7b3,0x35d94e8cc1b7108755a059171247c684ceaa50cdb128e533</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/14</id>
- <inline>0x84c63c7a3fbbb2356572c9315becb213d99eae25e5a1bad9,0x48e1a8d5f4fdb14fbe01b308ca4cb55aa1d0846156325a89</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/15</id>
- <inline>0x845207489b6de5cee64457ef24a5271ff6328fe2d001c3af,0xa1b7037d9734f0ebfea351711ce09a4339512dd43f1e8491</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/16</id>
- <inline>0x5c804ebb83f1552e1db61678235424685faa6697c439095c,0x11849bfca427a13992eb5f52f90173ed5142a90ebd88f59d</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/17</id>
- <inline>0x6486cf40ddebd2a4f4fa04fdeda47d21b5df06f92d447043,0xbcf8a05c7c9519527c40dfc04ab44b4d9aa8b3872a769f25</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/18</id>
- <inline>0x5048544008f26af6c876ee5e2675959edaebd7c7772443e6,0x513342cdb3ceaa7f2343987be6b938a598c915d53dcca539</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/19</id>
- <inline>0x95d14bf6631c2a3cb6f1e0abbb073d42ecd98769daa25520,0xbc18c1d9d7137a4b65305532b6b4f32ec10d9b3a5503441f</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/20</id>
- <inline>0x7071ee9ad97fce07f0002f3662be0a6e5ca13b14c559f745,0x5699a2d2afce7363db96d79667c977cdcf57ca9fe0551807</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/21</id>
- <inline>0xb775ff62b4cfd5938855b327ba4ed92b20102215b80593e7,0x01822fab9134b819adae394b401fdc995080542e1b131aad</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/22</id>
- <inline>0x4c903b4ae5d81cf41350704a199a780ed2923d0479483d99,0x1e68e89dfe820d07f762d68c6711917c8d14766671089420</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/23</id>
- <inline>0xaa3a36633dcda6e645a3b63a2448e6465bd97a29fb7e7078,0xb6c4f82a4ff15ae22971a4292160dfa031cf860d1a464db3</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/24</id>
- <inline>0x67da360f24c7faba96709035d293b9fbd787bed02fb2d2e1,0x672b6d38b361803e7770b5db1dc4820db1e191554e1ec369</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/25</id>
- <inline>0x669f856c70abc6c99faf039f4e72f4d05ebb19bbfd715c20,0x722bf159ccf6f8c1cc9b1c4ea18ae2334fb2a83585f6d3d3</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/26</id>
- <inline>0x51262d2d0d43887a4913ebde0505c6f945d72588e786493e,0x0947b3447c161eeb65c5d2ea0ce25f8538a3be5e9612580c</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/27</id>
- <inline>0x3186d449ba039134c93d086a1f50fb44b5990b5a16d3cbec,0x70346bac8d0f69bf1ecbb1cbaac5255ba77ed32a96b0d40b</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/28</id>
- <inline>0x805b097bb52a187f96a47f7f0a50fb4e17dace4a835842d7,0xbed6cee2a4b09d6fec21a950685d526351d0bca06508a387</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/29</id>
- <inline>0xb45a0f6b473405a64ae461f8e6b00ae1797aa999f6ffbf9b,0x95d8d4e675e37ccab62a5e48bbd8b79a5fac0457dfc12905</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/30</id>
- <inline>0x15a84e9e962845ca410896d0be7af6000843bcef32f3ee5c,0x777e43237a935de6752786dce20fd9bc6c90abf2e7141caa</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/31</id>
- <inline>0x5bc34a8164315d9804382584f76867bbd23987e216fb497b,0x50200d928a6db22d699128ba15db782aff59612915f03a79</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/32</id>
- <inline>0x744cd6686a60ee494fb166b4803b96bc41a481eb5401f93f,0x4e5bc33649900d38c972f3578da5087d5a7e0a795b0bda99</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/33</id>
- <inline>0x31101e78d938f04c699594471df590e34bec3a3f60d562f0,0x2c93ceab1a91a104e791f32051965120be3567bbe1408d21</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/34</id>
- <inline>0x8db5e5aa72524898d997a8c323f5ce624f8290c66392337b,0x6ba3508ba617f8140411af3941e4c49e8d30876a39cb535c</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/35</id>
- <inline>0x29b2f11b4bce1871c2a868c1d73420f661ef66ade21d06ae,0x32a4e204f21eb1fd231f44a85aa7a68e91fbc8e87f37b3c3</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/36</id>
- <inline>0xaf47dbd8dd16436fe219911b3beb7db09d168419a8108168,0x1a50e03d7320ed569e9aad11c371bb265ed8f007b1119440</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/37</id>
- <inline>0xb8ccda20a8477cc17fb1be2eb7b760043e878b43dc93b54a,0xa076f4bdcaa2fb2f3db4d8020fb9a8e59f28afad22f30f73</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/38</id>
- <inline>0x25a39cac216b1e99fe5c1fee4f44d3a957735370d7593d1d,0x132c3844ae6964060dc0dbb5f4cf6267767a9964322a584f</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/39</id>
- <inline>0x3f5490e65d84390154f6f824dfb65c17c1d59d15544dc5da,0x40653405b2eb41813ad6d0cb76a4abf891eeaf2eb63f2280</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/40</id>
- <inline>0x7eda2937809578e25161a202656b9c64a557479e70867d63,0x51cf9dc581e0db786bf082aa616cf8f3f43a37ba4925bc9f</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/41</id>
- <inline>0xbe28f2c028623f3b2cb5f52d796fcbd6de65a8f9428bf7b3,0x06c186203b8cb15ce01d002cf9f47fcce9f67939131ce3dd</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/42</id>
- <inline>0xa462a2d0518a33ff4243368f580b5e1407104dec9b2b9be2,0x94656975b9cb1a43f147c4bdcc11e091e246a4b4a0fc43fe</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/43</id>
- <inline>0x7b4d9fec7cf3c75fd6b4ee318af46dc3a311ea1326def27e,0x1d2781ff9ef0116cac6cbe088e2e7deb7c8a4c61f97bf92c</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/44</id>
- <inline>0x8b294a89e936f3dbfe352d2af170c39cbd415abc1785115e,0x5b8c0eca2773f27640b1f2f32f346cb18e9d500f59a93462</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/45</id>
- <inline>0x15efdb54b0bb99b14502c8c37bfddf450dffbfcb7796c276,0xc177559e66acd3dd96a436d0e0ed7f450a6dfe78a420ba52</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/46</id>
- <inline>0x623fc843c7e25bdbc0e8b72dec9ac33370fe3331bbec307a,0x15f53f91fef0263004bc4f130f5959fefb1ba62781c13607</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/47</id>
- <inline>0xbf100381d53f3ab48bb9d9c483506501a0c569b78eae0a5f,0x9f47969adbe4a62a1207de041f7d9264aea14172c7f2a710</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/48</id>
- <inline>0x9b02af2631dc64b0ea34bc5292eaff3654e44c6537588f3f,0x1f8396fb6192d410ed3d318ba0605b744f81e25a9e02cdc5</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/49</id>
- <inline>0x9c41123c9364284fe2e38c7c52df8750a00c7c34af452a1b,0xa2c912fa813c142846c54ed792faec145f83bd6ce38b8fc7</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/50</id>
- <inline>0xadc8682bb933ca2fc52aa6243139ad5a6c3155e4e2805f39,0x57fafaa2436ceffafb910c0e6807d5c1afb0603dd7cbe043</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/51</id>
- <inline>0x3c46eaee8b165483c1eca4f71d04f941b4cdcc1d433512a8,0x8da044476ce651395564ef0eccc4f9427009ab899bb311bf</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/52</id>
- <inline>0x19723a1425b73e94184e02228049e6d9b1b496f37b8631a0,0x315c6f316c5b2447896dc082706c0f307d5539c1b1b0bf29</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/53</id>
- <inline>0x6b7b2b2fca6e07ce919c2268d32bb08a6e9c471b21636af5,0x59b882404b8809554feaed5c158e6a5a4e7f34c4a862f186</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/54</id>
- <inline>0x9dccd8ade3f39344d240d34fa4277c3f5b09a7d3139fc547,0x459cfd70612ee399449bb2ad3e0bd5cb024f0bf6d35c7706</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/55</id>
- <inline>0x4e46443d6265c7d35fe8faae6cce8fc1bd4935d9437b857c,0x726787ebb22614ff8805a30ce37470c73a7e6044a9c6b71c</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/56</id>
- <inline>0x6152805a62d2ba015dac702fe4688efb34a5ca3c11b88e5b,0x0349428b8179e041affa4311ead89de00d508fc7d3c8d9fb</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/57</id>
- <inline>0xa9ad3c63edb9c4def7b531ecd70018deed85f997a2449821,0x5adb4055f1ddf206afdf67f5f6d1afff34337890edf7a301</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/58</id>
- <inline>0x8c4265da8542a7641a5f13f64e7e3fcf184bfa140c530989,0xb77bbedc243271f30c74fd605ab71befb35e775a01d8a82b</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/59</id>
- <inline>0x0940d62366df60884cb2d482a00ef24d4195d2242c65e29f,0x90c75f89c3809dd80be41e8c72265d6c8f21db8294cf970b</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/60</id>
- <inline>0x0129bca166096f206be151fa2e61dfd89c0da5abb093f373,0x545b00cb1201b786fe6361e1bd606819707b2b929a70c5a5</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP192r1/61</id>
- <inline>0x952940885d62715784f5501451fe20f56825f449830b8e1a,0xa2786768d1b25f41c2d1a9d219faa70284b4bbe583bf006b</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/62</id>
- <inline>0x6e1bfe4453e3d7fffb26abd47a8eba7eeb601cea9b56f136,0x0549d43dafbe9b0651d9aff2fcfdc07e94c4ce07a8c75595</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192r1/63</id>
- <inline>0x5fa6f0d37e8ab6d27aa6214bb7f4a68feb979ad8d2ce1f48,0x29a93d6ef731d6ba7ae62173d9927012ecb52cf23c45f0d6</inline>
- <curve>brainpool/brainpoolP192r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192t1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192t1.xml
deleted file mode 100644
index fe06dcf..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP192t1.xml
+++ /dev/null
@@ -1,386 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP192t1/0</id>
- <inline>0x43c1702ee270b8ea46ac8d4b7753b460fcf2eda21ed1dfe3,0x000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/1</id>
- <inline>0x1c65e811d73cafed72949e33ed39c278455f8278319764e8,0x44f676947311481951fa5f39a7ab374d7b8025c139be0b01</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/2</id>
- <inline>0x7a2ffa8bd457c75cc65054681f8654c02e245095133f112a,0x9de5731523a93b30d09825cc3cf1115fd66dc256aba9768f</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/3</id>
- <inline>0x1acee38f18f6fc9d7e9601c967b63f26730b9388ba8a3962,0x610f69e3635e432e4f80f58f97fb50df6f39ed2ea53ef93a</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/4</id>
- <inline>0x7c248be7227f4ac3bd87e1d50b2aa8ff17439412a6496a67,0x25940efd8caaa3d1c7e2c17417fd8e1a17776e7b4e548913</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/5</id>
- <inline>0xb626a718d740e7721386c1ce6e3333b22f94545c78e8e853,0x735f5d94fcdabfcb1ff00a666985065256a484f31c971f57</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/6</id>
- <inline>0x74bea9eabaf114c94832c711bf140f90aeb7bccb8c0403bc,0x172c62e3a40206ff783965ab0881197f7871b192d0e083b9</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/7</id>
- <inline>0x527d2c89c88315e0fec2eb1fc01c7ded6005dfe0252736c9,0x3a6549c5912a52a56b645b064cf42a4cf6f49171ae119e44</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/8</id>
- <inline>0x27784d2c0ae6832992bcb510afa1b1d7c6e01a65b747b43c,0x18bd07113f4e3650d096413ffb18a20e9d7926780949514e</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/9</id>
- <inline>0x9deaedb6443a3ed3a3a877ae46adcc3ad13de06ff51691c3,0x9f5cda33536bf1d2275ca40d54496ada460adf6ab95bfd4f</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/10</id>
- <inline>0xc2049637c200361da69aeb14062f348517b25ccf5a7509a3,0x5e367ca0c822597be67d68b9455c185a8fe66ed8b4da9ed0</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/11</id>
- <inline>0x327564e530f5ee66648e2cfb0ac9acc35d55564c4ef0aff4,0x65f039304b4212fdadc7fb953487cefb7c0e0df9d78baa09</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/12</id>
- <inline>0x4b89795869d99bd618194cc6e0de1ec1fdf8275fcadf6b90,0x282b6cfee5cf7a2badfdad7229ae0fa8826542ca2bb9de0d</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/13</id>
- <inline>0x67f88890251a28897b858628019558c9d67a68059d92a392,0x3ab545dbfea97c2e1142b03eb4ca0adadcca28a763322bb3</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/14</id>
- <inline>0x5e0fda8efa952383c9f6a8059cc488e85173c4fe38ada13f,0x33fc7a834339c19336caee373a5d98536306e6b8b754fecf</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/15</id>
- <inline>0x67f2b88434c930d73d04e89dc2d5c3dacfe5e688668fabe3,0x3a4a1f9d1cfd892a55ae8a183e6113dd2526c68787022ae0</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/16</id>
- <inline>0x9fcbdcffa06d54348a7188f1b75a20d5198ae7613b8557ff,0x2dfe693124b4da805b9796a86e49f96351be6fcdcc2fba09</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/17</id>
- <inline>0x989cecff8c50b7624299caaefb38d76e757935ed9395a087,0xa3835aff007d2814218635a432f7f18c5a05fd3b5497a8fb</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/18</id>
- <inline>0x4c777d69d26ef59ef2bddcd6892484e48b9442dd20019934,0x2268f09a3918e577f2e21fc258d122339747fcf54b1ed6df</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/19</id>
- <inline>0xa36994e6ac2956b2e4175f4882211029c7824af41d37bb98,0x82c6e6d3236317f71c5c10b7643badefaeff6c757c5c46b8</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/20</id>
- <inline>0x7afac617f22b8d9fe4364bcb519207c378326698c397637c,0x493aa698360796e4ea81841d875d938a60dce2b88b733c39</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/21</id>
- <inline>0x731bf4d77ee01538806d4441e292ce757f43517efe59df2a,0x5e1b963966aee40ca3855ced9bec71a0700db95da5353e6e</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/22</id>
- <inline>0xb27da04e86b15e19af0d9e6060fe71dff8c6fd17c5572aaf,0x12d89638df7011757344ad32842a460519f6356e24f98b83</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/23</id>
- <inline>0x7b1c48196314d36ae28d8c0c2d5f177808e5b9bdcf610045,0xa92fdce84d6dfd1123d4e8017682c981081a85d977bae0d6</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/24</id>
- <inline>0x039701cde7695ba5f45b70dd3698004daaca12eb6365be6b,0x7888943d187330eed979330f7bb597b145c96d944d93bfff</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/25</id>
- <inline>0x9a7a6974a5604ba4e146907aa875864ca94575becd9a98f3,0xb63b76fc08aedfbcc1683b9a91c2e4659e4ca961329ee883</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/26</id>
- <inline>0x4071814de464ec43ad9c6dafa60316ca24a0c8c82d37ab2d,0x1813fbc09079caaad22edd112f05087fa954ede9f118fac6</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/27</id>
- <inline>0x6f4e604f269d67f4bcf6863d793c6dec34ec7a32a1fda44e,0x7106ccccc5d5e6edaa49f5754d9d4372b32736653cdcfdda</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/28</id>
- <inline>0x825ec65670b82edce053a27a19ecd4ceb0f3cd1fcd33bde3,0x9a61e61c6b998ab682ab0ef0fffabc95a2ea1347b7366fd8</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/29</id>
- <inline>0x165b0bcf612e6a15a02ed608af632b2187fdce5b62edcaea,0x3ddef32c8ce4eee1881a1ec994f870dd9b4ba415f8cedc60</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/30</id>
- <inline>0x837b1a876f3242c3b74af0e7207f2acc73782558d5dcb327,0x39c1cb2a9e559dcf4912b16ddaf9d5338be98c45a52031fb</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/31</id>
- <inline>0xbf881ba677cef460d1992cc1f15d95f2fec64b771777afd4,0xabc7aa840c3363759152631e2df6582cc674b6bae642c934</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/32</id>
- <inline>0x9f7608ed0232b6364f378603ab3a822e341c88b9989f86f0,0x9b9475f46923407ccaaca29f9f113097e06ad2b01312a09e</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/33</id>
- <inline>0x050e3ceed3ec28c2cb201c954698f1c0092c7ac6b5a42a46,0x94c9ef437dfda2ee40fce97a8949a3b9cea5452122def043</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/34</id>
- <inline>0xadcb9a9b3f378a3d5d826c1802e05313fd7cff13a3fcef39,0x4b508ba13db1107f33148595af42d719a3b0e57d86750524</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/35</id>
- <inline>0x5f26ce521fd203982e2e7e7051ec7c4b2cf98c267d3825ce,0x8555cb3934fe7aed5497829a6b8fc78c7cea464c7adc185d</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/36</id>
- <inline>0x40b50a121c6e6477fb65a7c5ae074af5a98e2b87e61eddbf,0x1b2a5735df815b923977c81796e06cac5cc7b27a7392d3c0</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/37</id>
- <inline>0x7621af09628691ed09af0cc1462c67e840f42f610efde6b7,0x9fcaba076dd255b2f06c2c3958e0b0bc19c7250a8d647b0c</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/38</id>
- <inline>0x96f4e91396ca08a71aeb8fe3a7d0b630a839786ba3cc38ce,0xbe9a4c20a4fdc4ab0695be79baab8ddc2f965a6d9e843d66</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/39</id>
- <inline>0x1d93e3b0ad421f7a597d86dbb0bea6a5a5a945ef34f77e9e,0x3e9e3c3fea00d8e0f49f97df032b09b343fc912eeb0fb38e</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/40</id>
- <inline>0x7a78c5fce9be4dfa88601a9197f839dac303f94f853d0bc2,0xaeff15338c34eb73d3d8703b647c4b0e012c55fe2b363096</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/41</id>
- <inline>0x2077ec856767884e010bb23453cf37e1702f882534a50c0d,0xae2dc8b0ffeb0be2e7e835342b81a75fe7eda05d122abaf7</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/42</id>
- <inline>0x49cd233e20654df673673656131b2ba44912258317fff1a9,0x504dad2d443551e766612f53640ccddb35dfc41a1a0a93de</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/43</id>
- <inline>0x48991942efdc0f5f72fedbaabb8b1fa830bbef1bde096d72,0xb4f1f9582076ef37a31920d1164a3fdf6a2aa7b5c45cb76e</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/44</id>
- <inline>0x6f62622cb92303a2c07b19dd92b6aec0a2288a3447b53ef6,0x2ff1cb8a6ec21e06f0aaed08c679bec3babc1e8eadefaf7d</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/45</id>
- <inline>0x5e7a39e4070b6463aedb4b47c1630d9eca0d9b94e9a80494,0x309532b1917bf93d4da738c79fd53f67761233d037ba0a6c</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/46</id>
- <inline>0x941b662cf05a3932343c5e73cca9474ebddd283b49d5e2e2,0x3c6feb7a04eaa672c0cc83d00163467a190c7c92f59d16d2</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/47</id>
- <inline>0x7e05d9d39daefb115b319248483013a1f58d19d7a2fe18c3,0xa5aa4ccce13c81f9ba26017023bb0439a46c3f803915ff10</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/48</id>
- <inline>0xb50dc20992def2ce30062a2c4943e6b8e89020870eff1f2f,0x1340d821a73fd4a13192b1e745eca4a526d436ba2e5e3629</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/49</id>
- <inline>0x6aab28a136f692ae4c5844f65e87ddbc023e6e11225e4144,0x8e4012caa78cdc7c73c7fd9f42bae695d5b671a0901bd5f6</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/50</id>
- <inline>0x37bbc69a63adfb7c51c69aa045e8d5d160de75b06af3d54e,0xb9605001d75ee8f4e07fec14f6aa442bd2749432f9cace26</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/51</id>
- <inline>0x1120ad627fb7cc7c5621e4d7c5818b891d37aec4bd663d28,0x10e78e8c938bf71724b0a1601095c7f6fe59b39f7e602921</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/52</id>
- <inline>0x587a9ef23690e4a58841ba2ee0e2aebb779cec73236068a3,0x9320077a9d92483a0d1e927af684b74dbb9c15e5c6d8dae6</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/53</id>
- <inline>0x433aa1200fd848d89eeffafbc76a4bf42dc88284e7e935d9,0x903ec27b863aa41ff5662e0be7d37a69daa9b4e72c9cc8b4</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/54</id>
- <inline>0x9aab4fa1bd8c55746f2584eec54118f400815e5b2b0290a3,0x0d1b9110aed6e79c0c2951f02609ea62df69d6f2193f54c3</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/55</id>
- <inline>0x49446ed07bfb0f57158f43cd5b4a1a03b4ccb0458a00204d,0x114cd9e8db27df268d12952190e9ee115d57b4c4ebf4955c</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/56</id>
- <inline>0x397cb69dbf2043266b538272a7d4bb42a4655a5518061d53,0xaee8ec1087a7b3da79d9d5da5ba3d29bd8b87e7ca5ef8d7a</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/57</id>
- <inline>0x9a8ec6082c7ef91237eb050977676b0af7c54f847a499ca6,0x79a8475dc581e5113ff3c0888e0389cdfe07206d130f1763</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/58</id>
- <inline>0x7027ed66faa7ce1d4210f6610e0a923283b829da2d0c3c17,0x12e43f5cdc12c96f9366a57fff5550ce0feff7d3efe5e8d5</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/59</id>
- <inline>0x5a1d82fe88b392b28aafd1960a576092f05baf3d5c04164c,0x0118cad17735949799602bc4ccb8170e34cb9e7fb2f76959</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/60</id>
- <inline>0x27886b0670e1015a581000b782d08790384d8f9c6672ce85,0x133087b832f84a5034e39b87b3ed2316a423de0af532e4a0</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP192t1/61</id>
- <inline>0x08ebff23b6c006a582cffd9a9aefa704cf1db3802a94cc15,0xbb823733f0afe7e09b90e537f2e395c77471851185ef837f</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/62</id>
- <inline>0x3a81c7f62751a5474efdc6415087a9c73a8e0ec9aa37ae94,0x79f451441715a120f084f2040d0033c76e23fd91b5135b7b</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 719</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP192t1/63</id>
- <inline>0xa13f674583e7cf28a7db917343d52eee5021f94687d2cdc7,0x08fee687764ebdb13d1df57635aa36e1bcc5c15ab81c636a</inline>
- <curve>brainpool/brainpoolP192t1</curve>
- <desc>invalid order = 1531</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224r1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224r1.xml
deleted file mode 100644
index c708160..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224r1.xml
+++ /dev/null
@@ -1,434 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP224r1/0</id>
- <inline>0x89e0c0ffcfa926835f54fe54243bfb9f035c47e6929d8e6f7d8e29d1,0x00000000000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/1</id>
- <inline>0x8a9c26172b8730551ff84ed3f6bbe42bed5b5b86c90dfc6359623ad1,0x8697842f0d758ed51d4b7a3e66d12d39c1bae07ce863b60a8f515556</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/2</id>
- <inline>0x6fd95cde64353c98f8a94d09d3d853ad016a4fd1438f932fccfdb4ea,0x31180bbca5bfa12e643bae80ffdeba837a919c8f46b82555dbfa94f7</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/3</id>
- <inline>0x4ae07d5021d560fa803e3298acfbf8f8ecffe12d43172c35fc8ccbab,0xc721d1efae6da065683c6ebe6e2a9690a65b3306a330c0cc1520d6c0</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/4</id>
- <inline>0x506847b86cac64bbe713e3177cea7eb72061e66e43d65ce7d7c564f1,0x99fc48786b17ccbd4221965b09d5d08946a2ac440c773b81d3afab3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/5</id>
- <inline>0x2542afbb345a4fc1c73224ce958dac1d15cb7397e95b63558f8f8d42,0xa68004a508c5f8b17c2f8ca203f83dd39ff11f7422058b0a0e6ff234</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/6</id>
- <inline>0xa99d4fd7c5f7e20183df489d0e72c4b5328c3c4845ba4289df0b38ca,0x66899ec3b6b3bec2e5bd7294545c35c0fa92123b88b4dba9b3cd2970</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/7</id>
- <inline>0x27790f9deb9b5c8fe48873d908d56cfaec2e2845de31128c8f916587,0x1207fd097653667c1148fd972ac71da97f8d8cdc3ecf96f91a070dc3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/8</id>
- <inline>0xbf5406fc6bd1d41d80ee17df88acaecdaa721457d3b51dc2e98f06d1,0xc9ddd2458a7cdaa2e7263129fc24b35ebeafc08f14f757e6e0ddbc1f</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/9</id>
- <inline>0x85ecc9bc99cb5a56cd27cffdd3e0908187cef0dfdd23f3e661432c17,0x21d1956bd9038b2085695721df46ee366e3d4bb8248244ce6d8fc5cf</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/10</id>
- <inline>0x324131baf7e84cc2c4e18b5ae827de053fae3c15dc5c0cc222f9b042,0x4c9db2552a4616538250f45bc43888830c52dd60045444fc5a9f88c8</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/11</id>
- <inline>0x3185f5a8072b757b7897b8987a9572a49a913d652b2896368fb0feea,0x2e10991bed4fc7bcda0c2fa78a2cd9f320b46cc045824e42ddc263e2</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/12</id>
- <inline>0xcbfa9f44ea1762bd2a2a790b2b058d307fde17a5c0a7e47ea3d0a22e,0x7d6287bd98f7fca9b938506d46d6ca6e89c3364c6d6c5d004441635c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/13</id>
- <inline>0xa8e4d37407def999b03989e163bd4608c636f2ba6dd475004a1b9597,0x52c3bb8e47493f6ce71f98fbe0c761629c2a1b9b0667ee5e1002fa65</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/14</id>
- <inline>0x50917415cc4a86e472ed16bd87ac91f1c923fc915aaccf6f8cdbba34,0x2fc2aad33adde7fcd890df073c4333f0a66685aefe43db8faceeb821</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/15</id>
- <inline>0xbea67e2d997598df7da26e6e3215b87e9fce7e2f4fa32eda1c28c536,0x654707ce32237372664595b19a7976fe67be4510986191759234c73c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/16</id>
- <inline>0x368e8432bb93e872ee8537e8df1bf8734e0bd700e8fe2972c77c1847,0xb7c23da282869b6268049610dd162fbc0c3121a650916a002fa3b9e2</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/17</id>
- <inline>0x9a929ce55386f553a36ef0697cc45cc8f96d00a83e8be45d0e3c62bb,0x47baae1f184639410dd147ccb8b4d8fcaf9dda2c9d07f0b000a1230b</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/18</id>
- <inline>0x817d380f22612bb17b9cf2d03319382bc4cf1145f0ff3628dd316a25,0x56f0972ae8636459628dcdcc35f144e31f51f7e3141dffda074fd95a</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/19</id>
- <inline>0x3de1c6f26bd048df21973de1fe0b23f5921ef0910f7e4c8c72b127ad,0x85986e31dde5875ea6f81d6a63b194da5cd4f8b0f24d338b4156237</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/20</id>
- <inline>0xa99585c4e76396d84ee4dca35c269c37d9fca8ee75b989c79bb83bc7,0x8077a14bd274e35e0823422dc730a404f6c600c420943a3825dd4e2c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/21</id>
- <inline>0x99ad24de19a9717b11af95ff7d089f2a674bc13ac3e94e9329f0060d,0xb79d3d9685208af2a2aa7bbc000c7055afe9eb593725dfe64b0c49d7</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/22</id>
- <inline>0x17bc9b645f03a70dad4cdccfd5079d9c86ea6a6f69d231257079abff,0xbff606f6d5729aa9763c272ec711382ada55a0c30bb6bbea17348ddc</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/23</id>
- <inline>0xcd65717618a76781a610da825c52e4b2735918fe5626c26fbfe7f0d2,0x32113dd45769b7262bef002ce0ea2a04a3d78025ec3895dda1cfce15</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/24</id>
- <inline>0x74ed4dd1a3246c8ff340a9814b7047d59a3346997ab8dd8840e10ce7,0xc3dd009ad54a1097baffe915c998a25231cce561d24336c9332961e1</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/25</id>
- <inline>0x34bef468db8e8f6aadafe5f7e2dbe5a09cbdbd5ba1dcc2453d26da6a,0xa2a3c1e03b115213f09d1490c5b8c345862d3b26504308e501193bc3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/26</id>
- <inline>0x242b22a34649c84ebc139f01ceead4965a2db06fcd0190451b6e3fed,0x722cb64468c17bb4e4424a696462ecf5a9165f272360afedfeaaee29</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/27</id>
- <inline>0x84808769d886fb7e9020bac6ad79cb116ddbfb17e6b9c20f49d6c5ff,0x82d84cefbdc1c8ab2da8325b045d70d049f4ccb61c2207273dc8fc5c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/28</id>
- <inline>0x89ba3b24c00d9e603c5287da29b1bca6a7d1258c77a95153b8578ea0,0x10a9f62d659f0c2344e7b67f2c0970231a67810dc06fb5fcd19f469c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/29</id>
- <inline>0xc228fdd85a0e6a11b49bb36d1f9f69482eb8ff432ddda50b828df25e,0xc46161bcd259be94dd99426dd9eca83f87e217d50a8e56edc6934ccc</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/30</id>
- <inline>0xa27dd74b9f07ea53076983e55553fa5058d0e3ffffc548fa91c7f42e,0x66c1866d9b6cd115c40cd59fa98fa234f0b417a7e2f9b22dcb8d28ae</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/31</id>
- <inline>0x7e357084e413cb28951b47f77647606a954cf08428a1086f2e4e2201,0x3ab4ada4ad184784bd92d2fc718cb300bde77397418acfb805fdb759</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/32</id>
- <inline>0x505f922799cb0678730a095332de63b76828009567ebd99a65dabad1,0x5920c072b22fad42298e87846414209f5debe97344f0d9f2b620d6c9</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/33</id>
- <inline>0x1f400fa81edf1097988df224638e8871cef826e6ae999d096652ac2e,0x2281ab10b3b2785af8836aec5d475dfdee5d948f611503d79cd14ad0</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/34</id>
- <inline>0x62ade77edb4f8145b0b6c33d024ec29ca9df6431e69539fe14406e5d,0xa651a52bb6bab5ab8f68ecaeb9980bcf07cd2f22a52e66c958d8ba4b</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/35</id>
- <inline>0x7f016ff373b21734a5806afe716ec8b9c64c5c6cec3256a0c234def9,0x468fe4ead1304c448f928eb9d3ed371c5fa82bf0a9cc34b13678d34d</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/36</id>
- <inline>0xc9042a9f833a921f867564ab23f09fd718c1eca2c7b06c59370729e3,0xa30eae37135f7d2002b403efd421f3e406c93ea83d26d2f6775dcaf6</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/37</id>
- <inline>0x59cb80ebcdfdb9821a2c86ddfd91b1e2b8020e3e7946706686f91185,0x15a8e1811b5a0b86e1ca65cca037337e9aae77925998d834da01332d</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/38</id>
- <inline>0x6a4c54c4d6ddaac0088bed8890cccc445640c5f1383b75fc8f088d0f,0x9d0acb0002a98d574480b63e4d3c5f3fc0f765d343dc906f67e17f34</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/39</id>
- <inline>0xba264c9d97507cf49bd95f32789e063dd31a554323b81c9cf4e79809,0x1582bd8629242bef8924d4926dbd7c1f32b2e638eca123fbf4b0e4cb</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/40</id>
- <inline>0xb534388ee7a750b44b35dce6b18dfd6b6f028031afb219c79827014f,0x5dae94894223d1dd7fc536508df8ef8aebb93f2af6df3f2944dcc815</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/41</id>
- <inline>0x1810236ec8d1811f9d0436aab32e97f705a4aacb34bf67d337cc7967,0x9122789dea85cdf79c111edb3c1ca60683dca715ab3c6e6cf6e208c4</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/42</id>
- <inline>0x66c090d3ec6db3c98e0d2667556b4f78f5524a3462045b976e1518dc,0x5ef4fc0925acf17ff2da5c4836670d5057ec49f8e1d0d2cbef9f1d9a</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/43</id>
- <inline>0x679192db6f2dff11ecafa460f170d2ae02e7a6c9d1b2fb9a84f130ab,0xc1f354ded85005c5e62de46c36cedb3d4df621f7da4748f95575d198</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/44</id>
- <inline>0x2ccc65af95c059a6082f6a7ab53cae3b8c4d58ab49b56d267d85b92b,0x5d89a587d86c8da90590945c11eef16317ab65afa9ad00401d1a9486</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/45</id>
- <inline>0x68400966690e90a7e0642249dcc45b1769341ffb80bf1b344b6bd221,0xb883bc763730e5c879e29505565aa1a9d308fd0a78029cbfba74cb9b</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/46</id>
- <inline>0xb2ebe10ba2052c913d571eb17ddf1cf25a8973d6c382e91236574a45,0x7373d46ea4f9d6661f101d49f26de7124057f7847e0d75f734b168d8</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/47</id>
- <inline>0x8aaf8bb725ebc21c12a723ab9eb9f739a116ba56990213048b1e0df5,0x608c57f890ac7876a575b6f6aaf8864a9ac6b05aae2df8a8092e77d3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/48</id>
- <inline>0xc0e5af59e50c78d733f9b902c2a0d71c67fae587bfccba396d574353,0x8fc03d6a5a61ae44da93ed610c581a1b07c7baf44ab63a5c62afab40</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/49</id>
- <inline>0x3e95834626de3d087201e644f9224736cc9ad2f5f3b5afda8c6f74b3,0x64e444f4546c1731aeec5e804db4b56225fe2643565618a4799a61d7</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/50</id>
- <inline>0x8c22d2a75be021c59821b121e4dee2ac5739bc52c08b824b9839433d,0x88a6379933eef263f6b47bf47da9cdbc75a2d022e944ecd3bea13a19</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/51</id>
- <inline>0xba6542ff9780382c535826a2aae0288d30990429940035763a251c48,0x45a9d043983c9bee42adf8953bc7038ab618fbf24b60d79fed426828</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/52</id>
- <inline>0x0089b90b886ed09591c182478b66a3b1cb19ae01fe529897a2a2d5c8,0xc4650cc96a78639f5f33b7b05f48a72e5c49e7cccf916ed5638f22bc</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/53</id>
- <inline>0x4719d664547496f82e499fb8042e94c22c6adaff9dfa27617c859bd9,0x5b4e325bf938c8a04fc90ba28d5eaef9ada1f622bb312865fa80a757</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/54</id>
- <inline>0x306692fc28ee89078487a2814f8a1537c62e5f190bc834fb99f1164b,0x42e71683d887e3f661471a86e48071417efef089a9ad9813817aa8f2</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/55</id>
- <inline>0x5f4e48482cf7886a3f16fa4f67647e493eb1d555fd5b789e612e03e0,0x75b361bfac7068f33512f03ca85fe5e2534877f62a45151a46909d35</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/56</id>
- <inline>0x72301839e381fc66ccfb90a27f47537e72938be432562ab2c515a676,0x670929c9aca13eff17a066aa49ee70b7af927aa3ef51a56d2bc9dd7b</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/57</id>
- <inline>0x1a8f2944595b492716e10c1990073543495b728e66059cae5315b41f,0xbb6bfdadb9ab8dec927caf69a55c7a8accc39e66f19e996484e0572a</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/58</id>
- <inline>0xd663c14ede1ad61f2d6a7c5c5fb84c33bf0cc1d984de8d1cf732c3dd,0x7f0c4afe5c6d72a674068ae92d0d72a20511c34670796825faa7f945</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/59</id>
- <inline>0xda95324c5c75af52b2fcc69d5f4fbbca0babf55676fb7341cdb93c3,0x3a77375fb7a06b9b593c153ecb8a3a15d2d168dd69fb05fb85aa83d9</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/60</id>
- <inline>0x67a44aa8a28b90bf74bc3e15baa73c27578e36082746098d01633186,0xcee5d48ffe8fd615e3a449718f9e1cc93d956627f123f5127acaea76</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/61</id>
- <inline>0x924bffd1d17d9d3bcf8b4a22246569bb0ccb4f9d6d61c4a995561f12,0x44ce9de91d9b67370760ec3a56e9c1f8c82e5df1a004f61c64a0af8f</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/62</id>
- <inline>0x86f62830c0d7b1f7b4a96d3fb266983ff6849d21c710f52c530b2917,0xa3c5fed67a85149d9d872d54007498d413fa562ab6a08ba03065c43c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/63</id>
- <inline>0xca69f15a74fc75add7c43558be3d2d440dcfded7b4cb73a147c49992,0x169ad1aa855e3773f07c042bff36f40b77fc18832d13c47616dcfa37</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/64</id>
- <inline>0x367c588818369060cadaf220754aae829766510e3ac1c752a2a52cac,0xadcbe6479964e52467a0adafede740ecd51d685dccdd552dbb3b8643</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/65</id>
- <inline>0xb089efced1c9d22998671b68a48cec5ed014b611446dcb6f58e2a344,0x6a9b8c4bddaa2cad7d05fe20ab5f0ded370d13478da660b92067e30</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/66</id>
- <inline>0xa7b74543de5b00f1e38d6332640cbebdf80522f75010bfd2c0ecc7fb,0xa0612426b274b5e0d6d1f8c2ffacbac9c482c773ccd07bce895a145c</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/67</id>
- <inline>0x614fd6a648489195b7a3d0c6e52b45bab288a04255f073a22f0a602d,0x379813298af38c01ac267fac9a74a8ca753c9fabc1376edd69c2c65</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/68</id>
- <inline>0x40768036d359129a0ba04b086bd81fc8d6bf0a89052979bd6a3cc562,0xc7b0e26b7b5b88278286475a199cf200d9fa8493d98837fbb7ccac00</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP224r1/69</id>
- <inline>0x6e8f01ad3bb0efb4b64d063ce895e5b8cebb59ca2e21b51c5c03df99,0x0b9ea9eea8711e05b748ab40a000dcea18f284c4aab641ee2649ee9d</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/70</id>
- <inline>0xc86fec6cd248b4f9ce398a115c01efd542cc2466d1339ebb2155334c,0x69f4038dac3a65e33c7ea5f72f667de1d866b1a9dc6b255b163fc6af</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 719</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224r1/71</id>
- <inline>0xaac6e5506124b876663a417e276772c255f8f02e6b13cf01de7a799a,0x94344c04162c316132c4a57125ab9398b4089ebed5d9db2a3dbf20b4</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>invalid order = 1531</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224t1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224t1.xml
deleted file mode 100644
index c7ae75b..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP224t1.xml
+++ /dev/null
@@ -1,434 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP224t1/0</id>
- <inline>0x903db86d55a3f7e56db96f347e33674e69b7f407a6dcfa006f8943b6,0x00000000000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/1</id>
- <inline>0x3ce88de890da96ced23018bbf9deb4fa110e43a8b5a1a1244cd42a48,0xba76d8b75ab4ea01617e6dbf784187b2faea6797a19e7d067f45300d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/2</id>
- <inline>0xce104655afd783d353b80d1dbf528c1d9bc08de18d061727b2ec81f4,0x24b5382ab293fed4d1351113e21a681b20ade8831b32a0d653518e41</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/3</id>
- <inline>0x29f5404b2216c310652b2259de41ee3f320a1cfd603bd0469e3c8e4a,0x2c415deed551027037fe611b8fb25ab2d253006c4b180e66e77e916d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/4</id>
- <inline>0x9df8a099a9474432e0a5a2d0e77142f38991609d1031fe34003993de,0xd4725eb18303cd5b54e93709a2181f1006eb73241b0c99a1d7d2d097</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/5</id>
- <inline>0xd692f567904cd6306378725e29b69dc0e1ec5f029f836504a67eec3,0x8cb5587f494359c2d16f54d02b8e53fa24bd98e6829592a680dfe9b</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/6</id>
- <inline>0xb4fd1fa1639c0235bca03c3ccc6cffdcacbe12c02d8d35219b518c0e,0xd54bb4b6eaa02598793c521b7f6f64fce884618a1a530d5d4e6bb5e7</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/7</id>
- <inline>0x5a9644ed3b4d970fd75d8c900bb6da1d1bf61099ed45880fd684e508,0x1e674b9fc1ab58d55c5f5b23108c02c8815d173c3cf6bf8b51eee972</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/8</id>
- <inline>0x30253b46cf63239ea7bc4a1722ccdf72734b0159cb209b8f3e6a6fc4,0xc9556d07c16c98eed08c4b8602aef096388f5a5578ab108d19846dfa</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/9</id>
- <inline>0x164e74e5b4f54b16cdc227a376af23c2cc68aea22e6c2837f07adcca,0x820c6ea5995ce42f75f727a0626821e998907b43d2440a1114ab662b</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/10</id>
- <inline>0x4da62a5a136a80bdcfacf7b7d0b09e8604a0455a257fbafad62ac8bf,0x1f3208b7c42089a7bf6d7e0582a6626f07e7e8343666b6078c57762f</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/11</id>
- <inline>0x8eafcfb6e6ab494a362c362b0f7b1e4fb80b317be1effbec498de54,0x5a31b805e265aa2bcd83f5694c748b12a3a99d8712496dcc7574fd4f</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/12</id>
- <inline>0x1b2fdb0abfb80973a375a7b7d3777e6261d28c7063793704155ea599,0x2460a6f8b1fe1806208dc36e9198f55c4b73e9138087da9a52b40d9</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/13</id>
- <inline>0xb039c3982b07d55cee6ef13578509764d977b966b56c8adff0c4a88f,0xa4dc55138c0cd444e1e0018c67ae26be451885329fef3b9809e0e061</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/14</id>
- <inline>0xd31f2944cdcea279e57fffa3a6ef95a1a5cdf0756b8a84c81b5bea6c,0x41c608535293b4548505aa5e1266d59d906dc1498cd5eb59ca013c24</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/15</id>
- <inline>0xa5c7373dc1e90d54f1a1a8b2f2c18500bf7eeb850a2c8f49f7d7445,0x32c2fca7ea7e57d3123673ce66265cbd2c5df24a3780dcd679015093</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/16</id>
- <inline>0x4195f6bf23b70cd19fce75dcdecefdc5ea96d867880a83a3a26c53bb,0x12c026b38ff6cfc801ea7dbc2ce2f32c5daed87e35ade0a174281f19</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/17</id>
- <inline>0x5eb477369426b55e554b45ba8a121b26b919cae4659995a3d8c09b52,0x20991a254b6cf4daa25ce7191796d34847187b6b3a37e8de3f10db39</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/18</id>
- <inline>0x2803d5cc5979d238e067be5000138a4a35a8735c54c5df5f44e703c1,0x16122b1685ce3a92930666ad772c49f741781651a37bf7bd1bc85096</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/19</id>
- <inline>0xa96b5bcc91bda73d22b3715d9decc72a2e4b7aa3182fa3881b82f805,0x7b66b9eb4c1fcb01cf92bcd6c0c181e1e1622ed5735cf06abd25c32b</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/20</id>
- <inline>0x11386d243329901f84b44612631583b56847627e6f1413c962cbcc5f,0x66e244ff879d38a6da1309a5f458f0ddd41d5183c72789055174674c</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/21</id>
- <inline>0x82dd7213e43a39e6b86ea2361e2b511bfe16949d79b12e336b2a240c,0x4cd02b7ac711ea52c1c9fd16deb3705a2bbde473ea28a969a61d88f9</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/22</id>
- <inline>0x4ae657b535dcfc8e137e42ff6a823d53036063f866b8deeaa4a1883f,0xd3026b4bc72b256739ab6613f0d88edf2399861e6ea98ab27df9c0d3</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/23</id>
- <inline>0x5ca6c3c84df389e2c725cb1de35f53f624e4bc2586b7f4017f536a69,0x9f11b34c3850954fbdef6df7ce02c2fef5293d221f73721da5efc7ad</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/24</id>
- <inline>0x6ee14e06310a2f620fd869a245218978d24ee2986049370b8ca648c9,0x2349894833015df29ae127df8c03095113c965b5c44fa29b2ec2227d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/25</id>
- <inline>0x78e28d078946477cfc9a0f3ef0f37d90be161dfb9e128ccd67b00557,0xac419bd16593e40bb2ef0a14ac05688efe479c5d246098142b2866cf</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/26</id>
- <inline>0x9d23cc7f6d559bdfe74ec50eadb8315d7219788c8d28d0d21229167c,0x21ccc26f1cd844ab93070dee5407f24a53bbb62f859fe9606166fc84</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/27</id>
- <inline>0x2e4a02a3d7fcd8f7ccabe314c8ad627a42b2a4ecf16dfee581d4ce59,0xac2a0f9e987a70e545a4fc26b1a4dbb026fd9020314f2e9180fd370f</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/28</id>
- <inline>0x72db0b351ad167fbbb2b7536aec92362752bafbe85a87ea9a26e13f7,0xb0fb799918526b3ad5569bbe7bbfbacae0594dd3ec06dbe9f14b794c</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/29</id>
- <inline>0x746cb8ac686bd2221f40fd9709c54ba38739c35e27b457592165b0c0,0x3124868483f9cbe25575f65ab598380625c71bb81acbc16ab4c72085</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/30</id>
- <inline>0xcab41d49f921dc6b1846a41fe196ccbb61333c07f8d185810d44a0a2,0x64e1afd4256bf120e1c4a9b9905d5bac1fd44937a760e0e60bb4de95</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/31</id>
- <inline>0x98077cb4c113b3bc2e3c3a3fbb0cc3159dd3d5970354b89af3232909,0xc9dd9d82e59f07b3c3fbb3e804ca33dfe126edf45f1183ab09bf6413</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/32</id>
- <inline>0x1b9b208262a6652c42728b6b56077b44b9eba1e88c5f66fa7f60960a,0xc1c77a66919f2ecb9bdce66187cbcb8b8cf5a3a18bbc889ddaac32e4</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/33</id>
- <inline>0x9005ad037ec2d351a998fdb3b6f6f111123d97a7eacdb19fb10812d3,0x2d20e6ef8139ab5406b49088b1f59da721fc259b8d731de543d820db</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/34</id>
- <inline>0xa93315c73c705949eec16bf15fc133bd1c17e5a89e1de9aab66ae467,0x13849abdda8ddc3e47b01ce38818be4d438fe2cb09aee2def3d94b70</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/35</id>
- <inline>0xe51b306c6d9c742c304909025b450ac2533a8d70bdd68d1c94c7719,0x32bc0d2319b3192b306caa773ffcb623f73cbffa84c926a9ce4c1337</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/36</id>
- <inline>0xbc57775678b6a8f00fac758b2da4fea004885d6d8fdbfabc8575440a,0xc5127750958aacab52d7828659651a26b8d11ffd6feae6b1e6c668ee</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/37</id>
- <inline>0x121d57fc1efc371f213e3d571b64bd8fafe093adb49c93354a78acb9,0x98d61d971a0ee06a5d8137f6992110570af40522b8554c7c93ad9e7</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/38</id>
- <inline>0xbc4067725245f46d6b351174bd840c71f6efdc07959f9e30b999bb24,0x6d47c6117167d335a752342c8b444e5cf6e9beb0e30dc5c442d703b4</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/39</id>
- <inline>0x6924f34c8ea942477e7c57dcf7abe22c209a4fcb6ce1583a0e727d49,0x198540e98c22c2de0bd2007115d7701ce14f7b3e7d9392413bcbeb37</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/40</id>
- <inline>0x761f22bf61d56a14a71640f7a8d10fbdb3cefd76f75177a6adac0614,0x6370e8fb34ea148c31e3d84495963a27e23116992ef9da04f3c9cfc3</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/41</id>
- <inline>0x7ef5ace205f6de85ee6037a8e54b0d96528aec644dbd29e76167c59f,0x4921804ddff84e4bdad8d3d7267663280aeb2fd002890b3ea97b6f9b</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/42</id>
- <inline>0x36d9dd6f71bec680467cf7d7d10cd6e8af19ad3ed984c0bcdae7e0e3,0x116ed796671a045c815aba6f098442ac7390a58c55042500a88ca7dd</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/43</id>
- <inline>0x5bbc95e8c5e479790cad77105590fb0d2cae353a1b514163f7d90dcd,0x41439d1a4b58ac314bf90b6da7058bb39c8486e3c0fdfea002c8ce19</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/44</id>
- <inline>0x4584497900b9c7b13ca0f4b98bba3f41cf2ec8a3603ae09a95aeaf52,0xa24dc1842795475b50463910556bfc4f6ed4c37dd344c7c24238e87</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/45</id>
- <inline>0x8f17a76b6ed5b73a8a22183a538eba9ee89f78c5e14e8330b886ec05,0x7f1e9f24e0f592b834fd87387dd8ddf86a0ee75d8151142224ec08d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/46</id>
- <inline>0x8a48be79c195087c1dc1fb492c18e770fc9933d7f2a706e2c2e59ea2,0x913411f361680f3780727d7891a3a57c14bf18c3ff3441be3005de35</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/47</id>
- <inline>0x1e20a6828974b984d2214859c1220112f2dd298decda8f63b8933871,0x8ee907f36862ac6d2e8434881d229f2d2f469430c27e0b006e5b03fd</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/48</id>
- <inline>0xc5f6e051d39899b03ec7246c401427f3369abd0741707d44f16a553b,0x6f8b1a5edeac1eb52cda7ea1844d84c6c9c17ce855ab4bd8767312e8</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/49</id>
- <inline>0x4c887feba598a4c83737aa5b0ee8e31d46eeaad823e15e4a75569612,0x35615db28be271e04d61bcdf0962bf16f87dd60e62658b569ec296ed</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/50</id>
- <inline>0x224e219b5369017b397e88e5475d2193be9e59892e04fcb6820462f7,0x291add348326896d53d434d12de4a8855983b8960bddb6016af2ebc3</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/51</id>
- <inline>0xcf692fa6808c3f9a58bd822d5aebbd42805d110de71fee2d9ab2392f,0x227121c810c767feb2f9797e94ccf40295446b5b8db75c7d64e9d5c5</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/52</id>
- <inline>0x8b5399520a4e6561b28fcf78c73b7e22c6157825b37ee7efb0d96407,0x2f7fe5f0a2efbb0c301dd46f47073979498f8b3cfcdf97bf60976c07</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/53</id>
- <inline>0x81db1c14139330563b04b044528f9f63211bbd5503b89abce0bd7eb2,0xc4079468149ae5114d72aa8afbdf0529b5f5ce3ddea4917d9cf70be3</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/54</id>
- <inline>0x66f326c9fb27b29ee8d292146262791c41f1a7b5d3e55616be3084ad,0x6a2fb717ca1d79e716cae7a65bc9ff69e1c1c01a1416a815e0aafd83</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/55</id>
- <inline>0x26f7f045dfba40b7c57c46ae3c48ac8b45edafcdd7c6695340e73174,0x98bc4c6661b2ce4aa6dd5735956dd04a3ab704e0280b0a35760e942e</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/56</id>
- <inline>0xa24f5f510ad557024bb78f98a4be4e1dbdd35c3745f83da2d798160d,0x8103b60ecc1280179974703fc07be7e3ef8a1027acc4fd0767a4d043</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/57</id>
- <inline>0x33f0fb63704689cf0fa7c9598bd4e6eb252ffc0d468d3ae8c49802dd,0x41b877e8f9d42db264e68d51cb71d6e6184469fd6653419f3d5eb96a</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/58</id>
- <inline>0x738d3b8feb0e38208642bddbf6c79582db63573f4bf45491deef6bc9,0x8f15fbb692c61fedfa2d5118e39dd0bec694aff3480657d984949431</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/59</id>
- <inline>0x909836295b98009f532d0dc4759b9720bccdf4b402bd76e8e7771308,0x166141be404eaa41fcd4168e3f9e52633b262cdf3bf785a0729c3ddd</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/60</id>
- <inline>0xbc6aa5aa1517eb6d415ed4058c37303ac88457e441627842aa771bb0,0x9e31be36225fc588b5b1d3569a34cb96b2948ceb959bf187d7b31b82</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/61</id>
- <inline>0xf8810f9ba2ceee73185bdb7fdea5ccff2d32aee98aacf0b03b4c171,0x2e0d47c91c48b2cc18cb780777a5cd345c0cd7495a2be36e890071de</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/62</id>
- <inline>0xae59111234e43de9c4411ba969ffbd44b89591673604f9d7e4a4b42c,0x23466b1979aa5fd5ed79dee68b6fb2e24aea45bcfa7f4e32112f3571</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/63</id>
- <inline>0xa7a189b0cac22506728ad20b7af2e57e63857d9d02259ecaa950425b,0x620542e8455d0252ecfe25e810efba09004c147e96af0dfad08bc5a1</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/64</id>
- <inline>0x3fe68769ef787eed76d934207fb64f0ddf93fce600c2f846d68fa326,0x73a1e6429ad1a3387b36ad033f390619d7c542e32b1aa57f6831866f</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/65</id>
- <inline>0x3aa0bb5492fe8f666ebec513a670bde51356260ea847f45958d391a0,0x3902f73c1ac2db6650ffc7fa2c30b822e7fb0c42ef443cd89179c1aa</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/66</id>
- <inline>0x9e0aa59471a51643d4353dc11d6ee0dfb081840c35d2fd920c5edc32,0x26d59f1ae827fde1d7ec7ca9920c779ac0a4907591e3ff82a8d436b7</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/67</id>
- <inline>0x7595d2d9fbbc1483469882e859e12239a7a88db4fbc65108c60dbc95,0xa94b1a5129547139ac91e53ee006bca58e07553c46e42d8e55209456</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/68</id>
- <inline>0xcdac621d28856291e239968a66e7111c4aec852c9f1b70083f7d44c4,0xb506516b0918040a1551906474c6036a2fce8eacf751b0f7982e7773</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP224t1/69</id>
- <inline>0x96cd2668ee03c4cbb59d1de6011bdcc22935477e95f413817755bf48,0x040cc03af01e6f830694cec88cc0e0b9bcdb0033668265ac2a112d2f</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/70</id>
- <inline>0x8a875207d59ca2cfd415447bfdb52f15c710595862542768950e4fa4,0xaa0bfbec6318573c922cc00b73ec86761cdfc7fb959689e9df27eb14</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 719</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP224t1/71</id>
- <inline>0x6dd14e731e37d6d945ad336106e16f9fd9d2d83f2ddc1dfded98643d,0x500b783f23700d0c79d25c62b2f427faa88e05cbaf8454b53295d0df</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>invalid order = 1531</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256r1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256r1.xml
deleted file mode 100644
index 30343e6..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256r1.xml
+++ /dev/null
@@ -1,482 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP256r1/0</id>
- <inline>0x1dfa86445c71af947a9dce3727724fffdd535853657dc8deac3b6352620333d8,0x0000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/1</id>
- <inline>0x73f20e60ba2d2fea1a72a1784427cc014f48793843899d148b60ea7bc30be5ed,0x19db8691885427ccddde80c5eb2b7e046797bdff63a5da25e13641ed1c03756e</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/2</id>
- <inline>0x43745e76f3d702d4b56f72bb2e678112fdd0e72dfd5765f8207305cb1a0c7799,0x6129898d0d4cbf10c7bcb1cd47c32ba410e339ed51b5d59b840eb01e90cc37f9</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/3</id>
- <inline>0x12e06e059cea145f2633b205afe2913c2237c0c4198e853d18c6d52674401e6c,0x8961daa7becc02235c0cd120206487a9a28b49a49e99c94966ee86213da84884</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/4</id>
- <inline>0x238d36807884d384303bd359bd233d3a8ac0ee864c29a7409b4d5b5a7ded2a1d,0x138e4d38c19ef3ab0de6b2514ebfc647a96230985a23ce97556ed659413c33df</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/5</id>
- <inline>0x1d75b9d34a646de6db0007b325b3b273f8706c3856b4946c6226bcd661540ce3,0x34963d26ab32fe149a67e2fd26d6a064f072604ba21abf5f5ef58238ad24fecd</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/6</id>
- <inline>0x0b9f03197a680d49ad3e7b4d40d95340d5e1a46e57e2f961703137eea8e61653,0x681b44c0540f64f8fa77166a1c95002a7a7ae4f53a4317d57800cb3c8146310a</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/7</id>
- <inline>0x2d4b3dc4f3d3a9f4f4843637eb1ad271ffcf49bf6a2a837bb89b81920022899d,0x09ec63d7131dad83633aac03d648fc8b9c5016a403a3e4266a7b859337d00c31</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/8</id>
- <inline>0x54d4a252ad665dfd0eb00dda6ad4269773bd4c9d6446e5290afb52e1d268b739,0x6aa07690c1891396465ebba4f8abf49da87aa02402ff2a152d8f9ab466622a04</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/9</id>
- <inline>0x246102cac400868459317e20f72275d4ef9c3be50d6559ca5baf5d3eb9654d7d,0x719e0afb1ca59ce13b614347d54288f5d5be6c99a2cd0ee43e4e446703f3c846</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/10</id>
- <inline>0x1057632da4089c243f6805f8f902a499a135df6350a86a92684fdf7ab6c74088,0x5e7f55fe0a0a34a28372feae9be752589c7de5aef6e673d3604eb390b887ca84</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/11</id>
- <inline>0x16396165ab2606da2361fe4bbd6054f70c2332820d3d0724d013136650ba0f87,0x886cfe98f13db31729732a06a3276ef6b680525622fee32712e66d8929188301</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/12</id>
- <inline>0x20c0b4532cc51ad1d70ad0e080b146b6f20291eee5176cdaff91902a07c191a3,0x421a8de1678b7afdec262500bfa7b2af373ffab0f036fa79f9377dd6e433ae55</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/13</id>
- <inline>0x0abbdab45a30470fe34f79aa752b068daa8356a198fb171293109ee87fc5b9e4,0x6daf3a42a1c7f7e3fe75649caf1bbc7e36260a4bcdef5b900fca1b7795a35a87</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/14</id>
- <inline>0x421a05edf78999f525be90a94745de2026b3fa472279ec15fb28f179f4dcae19,0x4d1af98975612d07c09d4900feca34761b62a6e65d6fa6bf6a155cce8932773b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/15</id>
- <inline>0x13a17f21382cebfbe36b81033f6247bc09af567d9553e21195aac3cf86b55758,0x79b6bfab9688ed26d0ef25f3da372345a3d48c1e2957603913e9ef84b41f29b5</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/16</id>
- <inline>0x80070fcc7e01481ac8f408d3fffd8bbb3abb719868ead0629115698dafbb073d,0x04015e9e8842bf388a967129a4a8a203840e96297cc2bac91828e35ae6b6bafc</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/17</id>
- <inline>0x9f8dd6b106956635846c0bc4960e73e445afb42edcdbe2db15033a2bce4eac26,0x1d068e7e78aaf606528c9de68297df76e4ea4d2d70c218f4ca75a0c614f1a2fb</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/18</id>
- <inline>0x9037f7d00a9efb7e0aa5e72c605cc5519debe557831b8a334b5825a52ce46a11,0x93077171653859db823099a3ad6e99411bbd85c9d38202b53927c7c663410080</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/19</id>
- <inline>0x7360f59ca6ce30f2902a8b319a15c6b0dee06e352856df08d46f448f8d4e3e5b,0x401fb58b2ee90944ac3ed638421c3e6e551fdd26b30116941a53008d30ced90c</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/20</id>
- <inline>0xa4dc97e8516eb65df8bf750496f9468cc9404d4f7db95ef751d89e9f59ef982f,0x559b93fe10bb596c854a4f2fc9e48d9eea0913700d019c371f97a513d048ee2b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/21</id>
- <inline>0x28564436629973295a15960e222c422cc752f089dee32ea9b670ce48385c942f,0x6fa9e983567c04ff57e077219060342bbd99d72f5d946ae247a4526d40a18059</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/22</id>
- <inline>0x2f353189524e9fd0ed502753a1916ab8bddc75b52af5030515315d46a434da3b,0x788a79360667cb3a5eb9e92c940c6820dcfff071c2f37c47fa8f09eaf2526fe1</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/23</id>
- <inline>0x82670d6e968b40d758caf2763592dd82474b82d7299c5bddf124440436192b5a,0x6e4f901f0bd0291705523931b86a0fa3ece7091b1a83e73964c34ebaf943d18b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/24</id>
- <inline>0x6612b73523316a613f7849411817134290f31eb91f3ceff32d44425433ad1d9a,0x10289e4e8f6ac21dd0407e803a8766c596652979b2525c4bb4e21f20cb65e270</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/25</id>
- <inline>0x57158e246cfeef4b613ebc62b81a0c0f9e264f2c8a0feef0129d4de028610781,0x71471630a2e2f1193945499b1fd1a98d65601efe9545c3587c1f8cca3f35427c</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/26</id>
- <inline>0x5a6442a825d8cd8863c0ac7f5c65d49f7f5317ba6261e407eb21bc46a6640152,0x769f93972e933e19a375432b3a02050276a9db45c26f7e6342d02c2ca81c0e99</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/27</id>
- <inline>0x1fc287c26c926d309027389efcdc83244c5c00b29626be974e0032b01383418e,0x5468c9738ff24f6a76dcfd96448c10ef295486c2101220719335874715a11a86</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/28</id>
- <inline>0x7201a808475376dfd651b8bc07d587c248ffb51a293bc3aeea0660006d483546,0x6891172dfbd066982698ad2eed1487ae471add52b04b4e889e435b8def29c0a1</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/29</id>
- <inline>0x7161b0692df7a68c39f3789c334259668c315aa1cd8d247d7b83a46d6d382170,0x60834a457315921a80ed6c1483e13b5101c583659ce17e9cbf0d381230ec1374</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/30</id>
- <inline>0x0a3084e293cbc36389c7641dbd1b9fe978e0d4bf80b0c76e0c1c621c2f759ce1,0x77109db8c35585c9717cf8678663b32a11c9e0ec37ed665a777ec74ed69330ff</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/31</id>
- <inline>0x154c511793adad385d0af84aec9b262198bcdadd4497262a2a2c2847b0538ed1,0x4ad1d756c9306e31338b206a6e08823fcc55645618d5ab45f5c279715c17b8d6</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/32</id>
- <inline>0x49b478bc8d2260d3a9364fa281ff419eff122f870f54a73adcb1d60ed57c8291,0x44aa685cad59987ecaacbba811e4cb3bfd7da52cee1f61bf74d23dd45c443323</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/33</id>
- <inline>0x907d254851cdceba689917f23e95d0f97ec4cb1a70e00f61dc0a21f14dda70f1,0x0c51bbdc4ef9b0b10c385d1fa1583c2756960d640190e3b06891c4643ded97dc</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/34</id>
- <inline>0x0b3ca29e79bf55c9f4f902d8e6ef976cfd91a4c11d2cebe829507d9703280cf3,0x41bcaaf1f9e02d469f2ece950730d01f842c00270e489299c4d12af9b257b2f6</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/35</id>
- <inline>0x2568c783e1a4ebf97561b2c36c3779a2f383e4dee79843a3f04edd6deae985c6,0x747870359d26f8d0b1a26ae474a9db1c592ceb30eeb8b5266128e7729de356c5</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/36</id>
- <inline>0x9bda054a5480a7aab51dbb0ec13fa6e6b91c2f7db3062c9c044d45c864e5ce17,0x7603356a3a1584ed3d9fe0b671a6f2cdeae164e724ed4814c4e97c11a6456ccd</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/37</id>
- <inline>0x79fc9c58b7d60a40f31bc203fd1662e80ed00b09d4a0e7f40e181e1bd664adba,0x3ee0149f3fed7664461e409e99bdb3e7d516016b47d81544306066019e2a7889</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/38</id>
- <inline>0x1844574eaeefb13283ecf3994fe7f829fd6be0b34e5bd7270f4a5b4a4b33b23e,0x2c6037294260dec53f9e519a7a3c373fe2ebe1e35d8be3edb5422ec2295db6d2</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/39</id>
- <inline>0x34efb77eb6db1db5d3eac6cdcb2fcbe17ad9e73b0fc1cc1bdba32efd0744f5e7,0x5bbe58df3c2bb06a79f08f6099539c36c813e3a10c5f8078bee19f83c282773a</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/40</id>
- <inline>0x7ba08b1bf0489edee8915c04185cf409168368da280a1b8f6a4dc5018d99a3c8,0x5b7662ee125843d61fc941a874b7a3256bd6d05906023faa801178018ee388e4</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/41</id>
- <inline>0x223dbcd2e90a33855b6c43a3bd87f4a50a0559ebfd64f72264c051c76ea0dcde,0x9982529575734427c9453b9c29a7aec1ddbacbee1f1af5e02e6a32938959233d</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/42</id>
- <inline>0x8106165b89f03e24ddf5eef1f8b8036a392880996bb15f1dc3bb9d3abd165b5c,0xa401c75043208c2aebe531dd9661c6e3d8fc8beba59adc59f47261733b61339d</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/43</id>
- <inline>0x92bc20e7aee1d18d017916336ba8c5d0366a429d31033c2801c0f295b93acda1,0x0bc03be75c78342563a9667e000744fb8895724d013f08caddcadd8576326cba</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/44</id>
- <inline>0x188c91fe6a08837cad3c31eef72411cf16277dba8062d16cff1fd01fd8a43d98,0x08e5102f93db66e44867626315f98e488bef161c25d979388b9d6cdf5c64dc94</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/45</id>
- <inline>0x1c29059ca930ea78fe357cb7c4bcac5a7f93a0b31d69cc13ae93fdd2c3280565,0xa3ad198220a662f46853db896559b52a86b2a937e11fba8469b2a5c406d8c849</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/46</id>
- <inline>0x9aa15a45fd4258394beb3ff8c4e9709ebac688138a8af33ded89a244147954fc,0x6053cc91640cc3b0304a6119bf930fdbfe69f143a37537cb8340a31c5db522fc</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/47</id>
- <inline>0xa86083f363bb7aabb79b0757d52a77f3ef17975e7e8e1ac7e19ac3382750a769,0x074372f3343c2fa6011fbde39cdb23e2d253a7d9102e4d52e5769687abda1432</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/48</id>
- <inline>0x40ee75784c7c8fda8f969d9bd41d698d185d757edecc71ccad77e5f3d05ef077,0x85bec6cd7647fba1a2b10241d233b1640a0c414f1be199fbd73ece2a909a9f9e</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/49</id>
- <inline>0x05317d56926ab92ae38597afcf2ba6bf20c4fe981421c87de2f50d4d2356b8ff,0x8ad21c1c871e2b68948971039ea6095fe368572180ef360103c6fa5d9230c164</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/50</id>
- <inline>0x33d7fffa35bbfd951ba1a3a974b962f3f8acb0f4b2bfe72f5cc6cc2054b23e36,0x084503cb28c332e2ecd08304f8f09d5f6409dc67d7737991ddea997449c55728</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/51</id>
- <inline>0x147783d06720991b7924fe2013b70e88a45314412d7c535eefad661c15b0cf29,0x158af054acaa8356262c1c5d1108e4af240615395af218b92c9e9c08e981f5ee</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/52</id>
- <inline>0x005d2ff3680dfeef97a037e99ec79afd4cac7861fa441c2fe756d8f6494213bc,0x3ba863cd56155d7dd20d37f38e6d977a76eed84233b1240ae2c8fdf210529442</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/53</id>
- <inline>0xa1d8fddd493e393aa6400cf089eb35eedd1688499406f0c5c7af5720c22f6049,0x3cdf880aaf36b9560567420fd3afb5b0540b19c6d3bf6bc9b19834c6ddb53627</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/54</id>
- <inline>0x5e1648b24e5ea32a9a32b51bf3b1bb6b13db50b435c4893c3683f07fb467e9e7,0x0ef62afba115ce527c39ea43c8d6873f37610878937781549adb9b79efd635b1</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/55</id>
- <inline>0x2799d14a8518f7a1fab3de1a20ffecd2a8315193fbc0ee3f76c8f310d4fe3e6e,0x6efc29bca65bc469b35a26e57530a5d7a540a4e3f37ea404ef9be81043dbf21b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/56</id>
- <inline>0x6c8f4d21b4b6fcdbe67a8154991478ecaa856f33064c69fa1fa132a88fc7e7b8,0x8d499a8f5bd23ded8ce64ff9569eb0e29162381a9065657acbd1713740d3abc2</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/57</id>
- <inline>0x80b1bd0ff14579c4815d29046da3c92eea9c81c30b943f4ef7b3270e5252e59a,0xa2c26dd32ff8f11fdab034947f852596e52273cc37b62d0c1ee26dfe9729be03</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/58</id>
- <inline>0x33cbe6fa4e6f9a779517355655a4a868fbab3a3db5eb1aa06084472b1b29bcad,0x4628d6023f592950770c4a2646682102eee39b79c8dacc74dfd033c868a979e0</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/59</id>
- <inline>0x6d3eb141c8057de9e03e8b6b0bf6f6151f1cf493c45ab7d417f09e66cd1c6fcc,0x0d9304a6fff3410873d18e43f44bf4a68740542bb1f936fb6df723b0ada2bc5f</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/60</id>
- <inline>0x1440b3342c22e1cba4bbe1b07dfccc41e2be5932a7669cb5048c09aa423cc7fd,0x4ce1634fe91cd5f14b1dcf8e0021ea7d6ecd6dff27d0de98bd90a807894c9452</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/61</id>
- <inline>0xa6369f0480c4f70dd3f567ed53818e568047772d28652edc380b0ca23beef4ac,0x51e105daa2329f34d0164d7d01ce298b3b5b7402114ed3358c9f5d7a37392149</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/62</id>
- <inline>0x99b2d3fe0741635b6decc928a0adbe6eb4c207ff1341d17c44a4c0f08768bacd,0x1ff143051d6725449ca39662fe565da4f538652c99d4735ab43438a8262742dc</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/63</id>
- <inline>0x819ab1958574a16baaae369470d83be248afb52e0848c4063aaec4683640731e,0x9feeb10a5d7a68c06ebed042880a0d8bedda8ea8a1790a9e8b8464e394809aec</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/64</id>
- <inline>0x64e9fac6040073d7d90764813589141468448de7a6a07425fddafcfb1ae0ed0f,0x3dc15136b28b6dba4fba7daa80ca21f6ddbca2a32c48ee0fa23154c4cf8ea7c2</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/65</id>
- <inline>0x8c387cf9b3d48c218385ac40d2187ffa887f7fabfa17c571ec3dec016515c69d,0x25bff55168a07c64d5a22656d5b83591d2a72dec40f44a2db913d9ee084b7eb1</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/66</id>
- <inline>0x7f0606981cb6e9b1c7a0286f6f49731b24fb5297fbec4f2800b213cf8c3900a8,0x3f899b25363d83f1d08600aad1e55fa2f9f6f148b2d208e69ce15fbe098ce66b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/67</id>
- <inline>0x7816c1eda82c80dc2aa9f2441eac9338d1fa0f84dc674fe63439d356b831a398,0x938bc57a2ea543a013497c9f566f07be23f100c51480bd031aa5a2893f71f3f3</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/68</id>
- <inline>0x27f7837958d5fdb9203ed86543bd413e21aa534f9fb32c219e5fa493294e219a,0x60b3eb690624a881d372c9f8512be210957f07604e0d4475f7e9f3af256a5d0b</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/69</id>
- <inline>0x39648e0d1d60cfa163bedf62ca40281afe9d4345263577dc75c554cce3f8e316,0x32fb734a6391cacce655ccf6d01a89142fbaba5d53a3f07e071021ec74532fbb</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/70</id>
- <inline>0x54b3cfb752d65d19b8f30dd6df2293b10cc9860c943e39ea46e95ba6e79d708b,0x8582230d29935f8cfabe7fabd24857dc99f63f5c29f114ce9b29532acfe71345</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/71</id>
- <inline>0x3829a635ed46f474fe4e5b31a9d245653890d34a4a58db9be785bfb827dc76bd,0x753e7a74c96a32ca4b98a465d6e19b9db7555dd4124ff4d0b1f568b121c48edf</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/72</id>
- <inline>0xa6cbe11da51710351db9db8efe8d760c1331dc31c22089085b1f1585aa23bed2,0x1ac6df7a69675299e080dad965cb2615d1a569d5a5d5c3c30e5435a5545af5fb</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 367</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/73</id>
- <inline>0x1e85fe324564374ac4bb6b9452aa784376a78c1ebd7a544e59dabff34e434e6d,0x357d6f3b17b77f7dabc3a28d4e3fb6b215f1fee36c7e0d1510e437fd4a0be226</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 373</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/74</id>
- <inline>0x55d7cd53bd7775a0cb719e75741efc69d207b7ded1b1a6a74285ecbfd14dd555,0x0fdd325700cbecf7d4323bd7cf8d5894f1ca4d80a85523dbd4982f55638fce12</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 379</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/75</id>
- <inline>0x635835b09675e8352d0434a2d34aa77170248e28545a1e1d0d394ca9d8a36826,0x7aee9b0e6913e934e8107b14a56a54be9e87b27260befe130ecb69d0b32d2d46</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 383</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/76</id>
- <inline>0x6ea1e4e2555e64effcc34b0c4115e5323f3c6e4547c1065f8be34f7f8ca4517d,0x11a8d921a1828535164b3c8339080e8d30535a75968a02042204fe495c6085bd</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 389</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP256r1/77</id>
- <inline>0x573d17f1ae91154ea19e094a6b6759dde102c6eb677829ec8e7f5fc99aa1ca04,0x2f714a94b9fd5bd31bd9896b0990c09f9c64339ee1f33497760e7d52134458e2</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/78</id>
- <inline>0x885a1fc959c4f094a0524b350b576d4383599bd9063b3a8fa27e2f0833695225,0x2e39483178d9253a84b38d94d9ecdc0703be70fa1c1445a0d2038b738e687996</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 719</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256r1/79</id>
- <inline>0x0c58ff24e3c1c6e38f2d5e8bb4f30a6afce5d88003d48b5c930a7e3d4690652f,0x0bfd16361c8d4d12563000f88832155f172fde581a99d8e63f642ef68b63e2ba</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>invalid order = 1531</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256t1.xml b/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256t1.xml
deleted file mode 100644
index 8b0a544..0000000
--- a/src/cz/crcs/ectester/data/invalid/brainpool/brainpoolP256t1.xml
+++ /dev/null
@@ -1,482 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>brainpoolP256t1/0</id>
- <inline>0x5a6c607732f900c9742380bb80e36dcfb3e750cd04c4cae016686d53580b3c45,0x0000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/1</id>
- <inline>0xa7fd572ccba0a3ce2894ae449052c7f6562007ed44468a703c6c04a2e6347776,0x4c00c1e05297a37094f6041935fdaab2b4cd09270de790d90206cf26fc571a41</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/2</id>
- <inline>0x22949b3c6f76d3349156c820be50c55c3f8a34bb9cb6f1b110c67dd5cb8703a6,0x6b1cab822b53f3ec46b89dcb4c55b81d6f52b190bd3a24f56932785cc9f9d85a</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/3</id>
- <inline>0x607d942c11714f59173ef04e2c7013a3de3de7af95d085f6e5e43fce2e2ff143,0x3d876d94b3be34c51559b05538a5001637a0336d7a6960f093c49d6f068e7b16</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/4</id>
- <inline>0x4a9bd1a63938c916f9957175144c0072a6a3799de5ecd23d7c1d9f4b332c22ff,0x2d81971ec54e137cc9f9c37974a5e685a8beee79d095766fcd93bf5927c05b7e</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/5</id>
- <inline>0x78d84a05ed07f26ee1c113595bf4cffe1a4789a843b0b58f4f03d3507fe62aa4,0x8518923d390aa85eec5b50cc415477986d92cdf6d518fd8f83e85a0210b1d739</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/6</id>
- <inline>0x59cce39934f1d5cea3ca2d9f054c4a6b88d95d26a8bef892e46b540e04b6936a,0x3441ed840a3f048dec17a5391e172110bedae032daa78060aa69bd5a77479b40</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/7</id>
- <inline>0x38596269036056feabef4778abcfaf703454458615440eeb373f239704cd0111,0x17d5e5005a2eabf540a7a68a97c881057df5372307a58aa3185fe0dc880ab941</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/8</id>
- <inline>0x5cd8cb46c9056dd51f69885e33960c5bd094fe698ae9b5392bfb97fc3c768c2a,0x46c19f30936658d8bc02a1102ec7e1dd1f2c8bd54de91f70003d148a03a5fa6a</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/9</id>
- <inline>0x9a3f1aff40cc192b74ad029d895e83bdc081a5898756638e9557ea149ec6e2ad,0x6db576a79db611525b876577b72381636b61a7f146a31494e17800f574f9109f</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/10</id>
- <inline>0x9af949e79e678ad794e95c0c95f1a3e3c82d4bf426148d563888babc8d6bc938,0x2251230ee10275d5a925157f1ba3b38954da6e7e04bb6aaf7e43451df328f251</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/11</id>
- <inline>0x9b41b0ce21cd2f02a43d3266ffbb9b3036c4e162e7757d2a214e32d8635eaead,0x641528404069648ae7e93f8cd88717ad52ecf4f6022e5fa2a41a475267367d14</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/12</id>
- <inline>0x5e03031cfbf61b13e1cc05abe189499ad957abb7f47288dcbe9c6b624e63940d,0xa7609c5c0dc753dbda449c9f5cd83b6b98286d3dd93072eec87635e67b17f1dd</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/13</id>
- <inline>0xa8d85e8357da11efd22ba80da4bb125f0d8b6189845133b2bc3be81da2de87cb,0x00c73e6d8d720a55e1c74206a8662503fc8b487391c29d510744e54fdd98eeb4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/14</id>
- <inline>0x37ee5be057a90f53cb1d1832854d124ecc8a16aa1670afb4ba0d3d6c5a6dd803,0xa1cacc36a42287ef5ee1ec2ef439e203e4c7ce1d95dd71677c700a0675d93797</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/15</id>
- <inline>0x839fe2c5361e845379b7caa12168faeccfd7ba1a74786a9e5eb8b32471080c5b,0x8bf047285fc2786a9f3a14b73a6d255b6420f0cfd06b05db46a0862ab1155edd</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/16</id>
- <inline>0x3448a33dce591cf33e71dbb05c207e359284f382f2e25857813a51380c10b158,0x1f9312b84d1d6b59f09e1c294d0819b8a402ee9b729823033035e477b64ab506</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/17</id>
- <inline>0x6bc572cc356c359d353448471b641b782d82035fe207667023a61579417fd327,0x8e73e0fcb45f4407d50cf430cc983f755e4757631493588363b5899be9c67879</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/18</id>
- <inline>0x2bc7e522eb4016392ca64a27d30eedfbfa20008603a1ab242a917426421b0a86,0x552e59d299dcb70328956da62b88f421b30cb2af163c7af1e2b03310771d2262</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/19</id>
- <inline>0x89674107098344801e338c8fd7bddda5cb0ae4ee938f049ceb51cd47e784cbc0,0x8b0d5b6949bf1b078266359975173f433147158fd79f3ddca7f103bdf16e414a</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/20</id>
- <inline>0x8b73de710d59e1a1b456260c01b7698a5c10d990f579114b8026ad753ee6a6fc,0x16fc21b7238bcc8f7938d75b6c0c817ee91b0543e792b39709265a2563a5e267</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/21</id>
- <inline>0xa4987707c0f77d9c6f6c02ca82b1c2d786036f9968c3f156817413ac56b33f55,0x2a42d1b08596193a8fdd8cd163df65b95797c8dbd0efc7e15e29ac8ea74e47f7</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/22</id>
- <inline>0x30bcf4fdcf9cb73013ea09101db9b1fec7f423b83086a327448f1d3deef20884,0x5788b24d716379518c0f70d4e7d1f8c8f0ad7eac74d8ef16b2dd317798cb1212</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/23</id>
- <inline>0x1c4a352bac2efde91d52ad41ea4bc3525d78da0061b04eb08b81912be0a0acc2,0x0c7fbe998338b83e7567cee01a88b465c032b8ee6b58c631966921d67b0dd3ae</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/24</id>
- <inline>0xa19b9904b07089e30d9511f9fc9a33d5d999ae4047aec130b5fc0e4d1d6a4be4,0x5decb810e726c4522699c986a3d0add0b65f089d07a50158477ada3f125746e3</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/25</id>
- <inline>0x61cd1350205127d6a83c42b424e103bd1c4d804a81ff1f524886f8b719ded2d7,0x017d8f7969f9b850e82b35078c4303b4b6a94c79459cde47a766724a79e83c1d</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/26</id>
- <inline>0x461fbc9128ce57e13a8e9414a053c5477d0bcf1889c48f5c0218510d40f99962,0x057f14edee8af46b61a8054a304923c3fad612e3b4d2e0fbd82d8562c49a4042</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/27</id>
- <inline>0x5a4d44a36b9e91778da732db19c59deb3ad1f865eaa8362a0b9596ed4519f417,0x076e32264277f2d80d3fb2f2cd4d12657209b52da7d07e910072bce22749ec14</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/28</id>
- <inline>0x9ac88f9004e16688f8b69fad6d5c7cff0cafc71e43075d5b96146bba1802b2a6,0x1e3b9ca858bd2a136d824e662843a73280a1d208dfb8687d7af0812bab4128a4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/29</id>
- <inline>0x954e74c9b997284bf4e235e9bbaa0b6c812e6dec53e40e9abaf53191371dae76,0x93bd2ba21577dd1ace8bb4380feb4a037b000901f2d53beec9a5cae07f72deb9</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/30</id>
- <inline>0x55cb623064284cf443708fb2381f2e412a6c7a0bd01d4d961f515c9cb9ecd8b5,0x1985f531e2fc81467456f6ba2ab0e8ba5487e9e41eb9b238a1c2d93644f951c9</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/31</id>
- <inline>0x62e1ff33a8119f6043f3a2e866bfcc65d712d6f652ea40a84a79c15fb08eda9d,0x9c5b16a6980cc92ede28da10d94d32e8b97dd0204164a8156d842d3a5a2ef7b2</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/32</id>
- <inline>0x4fde6558edc810007bd199cc6cb86a6e20e868ce92abf91814da9be34f4e5f74,0x7d0a68dad1a21caea5a4c670f71f5f7774549b718c8b5f820075da8abd697db4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/33</id>
- <inline>0x8ff9f423daeae0289b2999f7f8f509937ffb536addb6da76e449651864b049d4,0x9a72bb42e61606ade4dbcd23cc6bb22c72831bf637521a22e11f78344a604104</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/34</id>
- <inline>0x03fbdc402d055a8bda9cb808f8ff9bb112b315da546784925b020925df99c6cc,0x9f73b9e859d544caa731ba70c65da08d3e791da4f2913ba5dcca0a811a6349bd</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/35</id>
- <inline>0x42124c83f6b5fc8c9d2365b57f8c26ac63ece44a63f046f7eeb3b76daaeea79f,0x1483566432fa48c40fb493d5f7ab64acf98f7a6c1ec4414e6fc56bb0853e7693</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/36</id>
- <inline>0x1fe067d9d508b3e1b870bf5ead126b819378109c9dc826e5bb191c452b0d4029,0x3c6aa149ca021702542da82c227a5994e5de822fb0f70cf0bed041a1b85a2318</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/37</id>
- <inline>0x0657fd424b17e5e7e65391bd734e2d123943011f72a551c56c1599a3ae51b752,0x259fe7af5aa7ba34a936ee859ae3b6d730a9b575c9e6603ea34fc083ce89d310</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/38</id>
- <inline>0x524e7eb105a7574233237bd7dce1801e117f96312bae9c89602c7909f99e8cc1,0x4aaa004afeb96096c89362e36fc70eeabaec49bf4c8c88504d9a39e30d23af03</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/39</id>
- <inline>0x9cd62c4af7b178e4c5bbe0c0dcf0fe2fab9f2f0c0e142d9329ef65ff9cd82629,0x6d0b8e74a0b21590d1d9bbd397560f4863e03f2d5fee26fa60ffec551c08ea09</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/40</id>
- <inline>0x683e452aee5e02083ff9d6f6282d5be6fba0fb67579a87612626838d48a5d3c1,0x8f779d4a9115174bf2d203d24ee9be9dadf344d02049d858c2a7a2544ccd8840</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/41</id>
- <inline>0x8becdae261b104d9ee78948780b555eb86cc7035b73a3a367b7f8a1be8cd01c0,0x036de4eee57440062907c8c1284ff925c497c0574c6cace8e4a38805161f11e8</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/42</id>
- <inline>0x9fd3051a3db65b22a45783bdf6eea352907806912143eadcdbf885e6684bccce,0x23bd921f11319c6cf9bc05552af9cf503385ef89ffaf264cbb5663cd540828a0</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/43</id>
- <inline>0x7879a47125532f11cdc3ab241e4fdf55f561f15cbcfdb8e9872ad31f4469a654,0x3a56c0deee99760515aecedc66f41a3bed54d028cd9b417d34166e0da79dbe94</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/44</id>
- <inline>0x861a4644f175a3a3ff7c744ad79c0b283df88a2fc57d04560c9da57263c6653e,0x620b3e2fc29529dd68f8365066e9daeba387f6c4e49ca6f40178dac212a45bef</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/45</id>
- <inline>0x76654d65b1f59414f808ce1ab039bb16fa3eaa5d54b907805087daa15033602b,0x3a9852f7397469f48bf80c604fd61632c1a80c433f4c88abab9d3db84cdf809b</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/46</id>
- <inline>0x3755a0e4359f9dfc732a7923242916bc1027d7589b459531854e36ce54a9f380,0x361c207aadf235f918f11fe0a52d4dbe2da9daa0a1de96257604ce6a1d9fe7e2</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/47</id>
- <inline>0x91712468bd01e16c5d608a10951d4d82e6ae49ef66485e8754c22cdfc7259808,0x00bac428282adb922c0c5ac23f8c0bb9767eed1dddeab194ea5de9ccb1401513</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/48</id>
- <inline>0x3f29e58cf3021c51750dc3350aeb1313ac88e7d52a89bf37bc2238431968765e,0x82b88a3c7644ef59fefd8f4e7595ac5a79e7ff8a0df517e62650269137c78292</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/49</id>
- <inline>0x5cdb6bfa6461215964acc206f6784d348d88ae8c1609b13931cc1ff016e39918,0x11431a024fe5e31a5c3ae2a6f3c51569e1a1a07066a621b6ff7a00e338a0f949</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/50</id>
- <inline>0x95edc8fa841c4363aa75b8b62f10523f991267137bb5df6d44cbcc346035d9db,0xa7704ab03c12c9ebcdf503a9ed47360baea71515c3ce1f226423443b7fa4ecbe</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/51</id>
- <inline>0x8e2f2f18728d6051e483bedb07955d63184991866ad5a35db7870381550c4b20,0x1ea625fa3dcb6bbb60e49764b917dce0bfb62358346406dbe0952977eaf01629</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/52</id>
- <inline>0x86b19fe41cafc7223ad4c1b882a2c09d5c2c188839fbe110cd0410b63c09289d,0x7fd7082d7fa6a1ac7e02f13400b6d87b491ad05c7569a12cabc412d956fdc2cd</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/53</id>
- <inline>0x213cc55897bccea9e7ef3fd255373572c31327054c3cb1991bc5feaeb6a4ac18,0x52f447384a90c375dea329eabe6bd9307a99fb00f9ab0024155b530c595def50</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/54</id>
- <inline>0x08e66cf003c13d492f5bba32bb933792335379812f7edcb69f61889d09fcc694,0x492bd824e57d53cfd01961703ad0344527df78f8e2f7f0a6f51eb06461f77121</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/55</id>
- <inline>0x6c9ab468738b14366db7e059f210cf62db3e0030bb618432c7600e4a0da17280,0x95ed775aa6852a6d1ac5476820f5b31675f5413dcd9c94818d5148428cb05c19</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/56</id>
- <inline>0x05df0571aabfb0d3cb734ab0f6623cb1a22f0f227b463dbd5cbfa0f8ebfe37b3,0x3a3250e75db55543c76d92eee205349953e7c53d0dc505baf70802805f5c78c2</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/57</id>
- <inline>0x6a6e6fb4944cf3914710662781b1b797c2c29f480c7089a937b8f425e69596b8,0x925f7f49f612d820f0d307085102bcc821b42a5bb794f3c2119210efc79d8390</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/58</id>
- <inline>0x3b0f68153ec7a3641e6693f34cd80ebd20181305b8951ea04911d8022f588b96,0x015c1e08b84503b6b81be5212ddf5385d79d2e09bcb3942eeed3eeb766428b73</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/59</id>
- <inline>0x849652e7c6b2b854ccd9061a3e3c831ef393e9843916e9c20342d945fe2d98f6,0x1b31f4c32947a7568d2c89996abc387f4fa4c0975c06ead210f55be43b986556</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/60</id>
- <inline>0xa1676e77c626b9cc6639fc16c37ea66052077492e9d6aae9944e1b0077344bf3,0x7a35fc808dffee5c839c0cf7c2533d456c22cf55e70ffdad605dd3eb856b70ef</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/61</id>
- <inline>0x8b8704dd4a2de21f18c9c24e666db68cbd970e53ba91ae3b023b4dcd4ba62417,0x17af54a9eacdc4e17b6d2b1e2b018d2423097025a44bcbd8efb83d30fabb5bf9</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/62</id>
- <inline>0x9945c8051b24065987583c5484a55883a9744e603f4dc89b9fe23c9c2db25add,0x9130529f0d3a0f229772e0776fbfab1a671359842e61018032dbabaa8b7ec0c2</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/63</id>
- <inline>0x3f7561605d9bcaaac55c6b9d272debd0e4e516a4e4da87fd9d9b7a368b43dc2f,0x67bd85138fd05075fe10452f4bb1853a74a2591e792ce30984d11867d55276c1</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/64</id>
- <inline>0x09784b99751dca1564983e97ea9dc117c88a0cc7d8b4a8fe571b8f767feadbd2,0xa34ee01a891dc707e96a00c75b2f7fb803429290ed3bff15ae8d4810aaeb4f67</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/65</id>
- <inline>0xa556146bf726c3ca53aa8a3ca68537fb886f09b25fd211879e66f2226e4121fb,0x6de75f8799337e816869239255ab88c096ba9a31966c2fd1af73f2fa03962b76</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/66</id>
- <inline>0x35cc0edeae8b75d699f32b85ef7c12b23a5f8f786ca6189199778bc2b55f2a46,0x2445009393346b1ee30a94c91c03e1f1868a500897d64fbd3ab957b6e48874cf</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/67</id>
- <inline>0x0694ea76457f3856cd64cbffd2e960fa63674555645e49a0eb11c0bb23058fc4,0x3d474292d44f14c6d64200aa49590b1a4cad714d3af2e14f4d6e38dedd1909a4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/68</id>
- <inline>0x415b636e31e4512853d5bf6df47de12c4b486c2886955c4e629f55d69060b5a3,0x443b41c20e309bd88d055f9a411936a0b8e6bcea417dcbe1d6b72b94e104a8cc</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/69</id>
- <inline>0x9e240b3d6b6496ae158cf56bbfe95ba63ea6529bc3f682dc3ae6793aeb0d694e,0x8af416d67c8ff3faa288a852c254643a5bcca430ff5efd0963ac708a3ba13a74</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/70</id>
- <inline>0x5fc1e3309dbf738ec9b2aeff5c9af2bf2690885aff6de496ae891f01a4167492,0x5d3d331b3fe9af5eca003c8f4c5609ec2bae04391f6d5a0245a1c80edf04b39b</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/71</id>
- <inline>0x193ba068664636b7ce58c914216dc522b2b1a6bfd3bc68719fc2b6fa3a167d97,0x4f87e3b1d2c8f1761bd09a2707f9cb751e3af7f9102a395d3831ed058caa0e1c</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/72</id>
- <inline>0x87cd2d4334ea36c78fdc48cf3cc3e1fc5245743cfc16e9b45b846b21582140e6,0x35ac290a1373e1bc1ce3d71793eda1b812f412865361d2d4d460b5675c9028f3</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 367</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/73</id>
- <inline>0x60506d4f1e58f7a3438b2f48e4af695f137b8cc49a4b6d4064c8cd6e4479deb6,0x91beabbacb4c0dc974933fd2093f8080e2ada7cdf70f179cc3d3c9123008283c</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 373</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/74</id>
- <inline>0x0546fc53be826e6ee5ee1c10ae2e8a652ea238b7d4c5045a17fd9fdc423bc9a1,0x4db945865e98861802a29e82cbab586ff44ebb8d9e9252e709eea7c55b9a9d0d</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 379</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/75</id>
- <inline>0x2a1930deb74c4978954ca46a8ac9bce5cbc5cd0971e79da1d28bbe13eb55c739,0x1ca0a80cb75c3c1fa9a072b1e7455bb4ba6aefae87808f273ff3424ccbb40dca</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 383</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/76</id>
- <inline>0x57263c50f7bac71c83c727780804b3882cd2ec5d9c95512ded9909b81f9a5968,0x7ea1afb11229579ed50d76d0135a7cdd684ab0a5f87b102fd123b2bc2c66d770</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 389</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>brainpoolP256t1/77</id>
- <inline>0x2bf8c11defcdac7379c1d81ab87d72d13d8b1a7a53e59a6c5eda6c5d7b615f4e,0x6bcef1b705223c36086a1a06cf6a55fecf4362c0444b4c73b8f8d402955e52fb</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/78</id>
- <inline>0x67e3ba2a6485080a29384ddd38f8f5a476338a7b39fe411d18c49cb5ce5a04a2,0x25e146ab0e5b3e5a6ad5dca7bcc72d9afdfaec3e2c993a9166144aa0d9fbecd4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 719</desc>
-</pubkey>
-<pubkey>
- <id>brainpoolP256t1/79</id>
- <inline>0x93efaee7235082be3ce10f16207f91472aa336b7309edfebcfcc77182206949e,0x1ecb5b2db697f34ca887e4fe4fa00fcd9d50dff8c6183038469b67b6060f1030</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>invalid order = 1531</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/keys.xml b/src/cz/crcs/ectester/data/invalid/keys.xml
deleted file mode 100644
index d630129..0000000
--- a/src/cz/crcs/ectester/data/invalid/keys.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE keys [
- <!ENTITY brainpoolP160r1 SYSTEM "invalid/brainpool/brainpoolP160r1.xml">
- <!ENTITY brainpoolP160t1 SYSTEM "invalid/brainpool/brainpoolP160t1.xml">
- <!ENTITY brainpoolP192r1 SYSTEM "invalid/brainpool/brainpoolP192r1.xml">
- <!ENTITY brainpoolP192t1 SYSTEM "invalid/brainpool/brainpoolP192t1.xml">
- <!ENTITY brainpoolP224r1 SYSTEM "invalid/brainpool/brainpoolP224r1.xml">
- <!ENTITY brainpoolP224t1 SYSTEM "invalid/brainpool/brainpoolP224t1.xml">
- <!ENTITY brainpoolP256r1 SYSTEM "invalid/brainpool/brainpoolP256r1.xml">
- <!ENTITY brainpoolP256t1 SYSTEM "invalid/brainpool/brainpoolP256t1.xml">
-
- <!ENTITY k163 SYSTEM "invalid/nist/k163.xml">
- <!ENTITY k233 SYSTEM "invalid/nist/k233.xml">
- <!ENTITY k283 SYSTEM "invalid/nist/k283.xml">
- <!ENTITY b163 SYSTEM "invalid/nist/b163.xml">
- <!ENTITY b233 SYSTEM "invalid/nist/b233.xml">
- <!ENTITY b283 SYSTEM "invalid/nist/b283.xml">
-
- <!ENTITY secp112r1 SYSTEM "invalid/secg/secp112r1.xml">
- <!ENTITY secp112r2 SYSTEM "invalid/secg/secp112r2.xml">
- <!ENTITY secp128r1 SYSTEM "invalid/secg/secp128r1.xml">
- <!ENTITY secp128r2 SYSTEM "invalid/secg/secp128r2.xml">
- <!ENTITY secp160r1 SYSTEM "invalid/secg/secp160r1.xml">
- <!ENTITY secp160r2 SYSTEM "invalid/secg/secp160r2.xml">
- <!ENTITY secp192r1 SYSTEM "invalid/secg/secp192r1.xml">
- <!ENTITY secp224r1 SYSTEM "invalid/secg/secp224r1.xml">
- <!ENTITY secp256r1 SYSTEM "invalid/secg/secp256r1.xml">
- ]>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <!--
- This is messy and what not, but Java XML api doesn't support
- the XInclude selector necessary to make this work nicely, so XInclude is out...
- -->
- &brainpoolP160r1;
- &brainpoolP160t1;
- &brainpoolP192r1;
- &brainpoolP192t1;
- &brainpoolP224r1;
- &brainpoolP224t1;
- &brainpoolP256r1;
- &brainpoolP256t1;
-
- &k163;
- &k233;
- &k283;
- &b163;
- &b233;
- &b283;
-
- &secp112r1;
- &secp112r2;
- &secp128r1;
- &secp128r2;
- &secp160r1;
- &secp160r2;
- &secp192r1;
- &secp224r1;
- &secp256r1;
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/nist/b163.xml b/src/cz/crcs/ectester/data/invalid/nist/b163.xml
deleted file mode 100644
index e3df992..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/b163.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b163/0</id>
- <inline>0x00000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>b163/1</id>
- <inline>0x045b3d6fcd766c378c2902a8907873bf6b006b8e5,0x1b1c588c4a90232f42cedd09a85b970ce80e378cf</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>b163/2</id>
- <inline>0x78b1ec2193620bbf47d97d2cf47c2af6b83598c61,0x3d54cb610d9fd1bd4eb5cc2b97bf4dfd88daf0fbc</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>b163/3</id>
- <inline>0x2dbb576b7b45b7cf93ad557338faae805808dda47,0x28e884699de4d91b8cddec085faf1243a7a7efb5c</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>b163/4</id>
- <inline>0x7bd5a4eb26bbcf54ae996aabc5d28193ae13a2e7e,0x2d748a6e019f4e4240c7258293f96d98d718a14df</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>b163/5</id>
- <inline>0x48674b3dfe157622559a83ac4dcf0987ce6dfd9fd,0x27cb3f98cefa8103ba622f8cacb5262843ffdd26c</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>b163/6</id>
- <inline>0x37612f327c129f6f7a61d656e5e2434225b9d3618,0x1c0843a951309d4e7ce80377f0222309c0f873cdf</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>b163/7</id>
- <inline>0x1b5a84f9e63c61a65d409253fb524a16fd1229d50,0x5e5b9586971af3c3c7dc586aada78d40b1b2574ae</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>b163/8</id>
- <inline>0x68662ba5e25b516c41d3705d9706d15bd430b4e7b,0x49041337947e0036a7b360f3f6bc6c63ff0606851</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>b163/9</id>
- <inline>0x37b31c66c2b9d59711342e5cde75ffc627475fa12,0x5b7bc816e48b42e9b92c327a589760bd301046009</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>b163/10</id>
- <inline>0x74da9e6c34992ef8a849b3f7ee1461524a7e739a9,0x56e9fe0be6371a7a869f577acc371a1ab245b1c35</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>b163/11</id>
- <inline>0x3db7d79370146adc4a8cde807ef6d69ab9e51dd3d,0x2245d22ca457f3ca4f277c0a1620d6489e49fd1a0</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>b163/12</id>
- <inline>0x468312520475cd81b6d5020ded20d3ab86b202f9e,0x6184ae5c52e46ea16708f3698410f8f0f97e89fcf</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>b163/13</id>
- <inline>0x41167081e7866cc1d4a519a5014f14c5d3f57be1f,0x2dab5765962b06bdca6de5660f718e1b36286ec8b</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>b163/14</id>
- <inline>0x585a273a49648802956b8750d28a4d3b929a4a0dd,0x062535933a6053690db15e68b67d1f478a7e8ca5a</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>b163/15</id>
- <inline>0x1434fdbef2072c6c5ff0da7e60e9b05f53bba65fb,0x329eafc1882651f4df79ce378fc123ee00db3370c</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>b163/16</id>
- <inline>0x09821fe834eafa79fee668eb5a6051c1eac9a24bb,0x104c1e025660c7793dbcba6df198e5ae96b39d38e</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>b163/17</id>
- <inline>0x2f0edfb1c99b770fceb9c0c184e37bbc776f625f8,0x04e3621e11a3bd72b963469dbd1154814f34cec49</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>b163/18</id>
- <inline>0x5d7785bbf2e59886ee4ca0caf5c390f94efff8619,0x1c3bd8b6075123ea36d13e992537da344649060df</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>b163/19</id>
- <inline>0x4bff3185d89cf9ac9d7afd3e5a684f638b8915c4e,0x6e899976a28dabf1a4c461d74daecd695cfc88261</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>b163/20</id>
- <inline>0x5e1b875eed86b553a826c44d874106ec3e854a314,0x0844512b3e490bf39e58edb4127ad42cd7c1f70fd</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>b163/21</id>
- <inline>0x23ce26bb50c35abab339cb30af1ba5cf589908d74,0x413e026b8b9e61caf999dff920968ce38275d66a1</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>b163/22</id>
- <inline>0x0c07a8d77f761144c45e014d83580a9fc2df43929,0x497a39580224e73d35b4360f5f0b4d27d5839034f</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>b163/23</id>
- <inline>0x61b0e74c976de68c5d4235322f98e0917e7493577,0x5743c688b8e802e1f9d66d64e0407a1017d66d6d5</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>b163/24</id>
- <inline>0x14e8b785d83107b2f7f7f5a4f9c8022b9f9598f41,0x4a9eebd6346b12d92452c26795f620652779f8965</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>b163/25</id>
- <inline>0x3d969709653f1291c4b3c6bf69706b2f7c7002e29,0x130cd0006e90c4f42d500d99fa61bfc486e1d2000</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>b163/26</id>
- <inline>0x482afa949e1421c971f391046b41a73f690ed4a87,0x2898364f116fd7300414bdecc8ebcc3984e22e7cd</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>b163/27</id>
- <inline>0x66e2c6ae2142e89b997c6f4293255103a85879478,0x02ef17266d907b9bfcedd59f44b9aa86045cc4eac</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>b163/28</id>
- <inline>0x2cdc8ba71fb0fe6d42e71d93b5d40bd862764f7ef,0x2220b2f21952c7defcd525a73d0e3719cf14f7f9a</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>b163/29</id>
- <inline>0x323c2b89a9419ff0000536c61221fef8b75241ca8,0x4c80535b8a8de7542660fe3ac5ccb818190d53d03</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>b163/30</id>
- <inline>0x7f603c09e17b9af221434d1c08664bf6c4ec18f76,0x47d6079c8f2d127d0a7d10154e1fb167700d26da4</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>b163/31</id>
- <inline>0x16a894ed2c908395e2249b22cf89c29b454e1bd52,0x473a65a3cdf7f7842b962ff64be2b30c461376832</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>b163/32</id>
- <inline>0x55e2584ec865a738338725468085ac4e46fff41b7,0x27f77c5a048e7d12831a48aef59bd1867529dc024</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>b163/33</id>
- <inline>0x5a80f09508d68f224fb60a79685524d370004d4c0,0x6dc3c9ffef83469b2bcda272698d0f58bf3ae9692</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>b163/34</id>
- <inline>0x511fcbfc4ea3b784c972c693217990a482651fdbd,0x08f5af041a0cd38c8e5233fd337132d0790a64094</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>b163/35</id>
- <inline>0x4370489b8303a1a185002ae9a55caac7fc4488f8e,0x06f730b7215ddd79a24ab0fac279bc3058b5e445e</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>b163/36</id>
- <inline>0x3c0ef7421388c8fcdbb4438d1b1ffd406477ab10d,0x268973a502505add6950d91efb775ed1d21df2f5f</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>b163/37</id>
- <inline>0x7143aeadd39824042a3d0656a11937d9c66c6f87f,0x72036a351d1294737c8733d37418eb517c3231015</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>b163/38</id>
- <inline>0x224919d34800d87e7ef1cc287b916f67fac637c02,0x081e855181cfbdeb78d4c1e9a8f77625759179d72</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>b163/39</id>
- <inline>0x4bb9f9ac43000b8d581f1ef53a65dd5cd01d9d9aa,0x27292fe1f26c3508040205f4f54e55f3a4a2ba682</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>b163/40</id>
- <inline>0x3c1a1b5fda74374f3344cabc084605540c05c09e9,0x12cbc455ec9e3c563fcee519a009d0f086fdc8e32</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>b163/41</id>
- <inline>0x4a86b6a466036560a23b88553ae4c75e0ccb322fc,0x707c142dd7c74001331a673cf6fdc5280edff228f</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>b163/42</id>
- <inline>0x012c1da1e25f230ac4f295aa2013e234b25009555,0x2bdde79422714912a9f202c5a9daa21ba7c694716</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>b163/43</id>
- <inline>0x0b96b5eb1a665be0e736909d2083a447afdaff1a6,0x75e1d2a6fd75471c1edb0f571e20d31632905ad0d</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>b163/44</id>
- <inline>0x1603ee9c642fb0b9cbbaa8656e74083808b374f06,0x035c10e5af2937eb8d8a7142a5cfd0f2a1a78772b</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>b163/45</id>
- <inline>0x1df3e8e973bfffcadb1b8283502ea51e80018282f,0x2937c96d1d2b7ea725344b36838cfe1c9a50b3329</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>b163/46</id>
- <inline>0x151047fe344d875ce435188f9962b564179acc2ed,0x67a8e997576d6ce49ab9750b69cf53de9a2b7118d</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>b163/47</id>
- <inline>0x796e06f3edb62f201f3e1072711aa8bb1add55cb1,0x7400274b5cac319f72c86efc0e6d9a7f02e2152b9</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>b163/48</id>
- <inline>0x48b5f12bae904a84754036aaa08125c66d44a8331,0x7b852f3632480dac366234ed3913762db52ea773e</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>b163/49</id>
- <inline>0x55f39b8d625db8a36d63ffb0604b6c22291a53de3,0x1c178d597b56c4486414fd6d1ed2aac1bf4253fc8</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>b163/50</id>
- <inline>0x6d08721b3d3db8c311b930c6b598a8ffff79e370b,0x4d6597cffdf635fcd82c491e64c5a4307bf426155</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>b163/51</id>
- <inline>0x756df2063a1eb177dbbc68c62afe4397a11f5ba97,0x467f36e6f170e0e0513f9ec187b5f42f953f7b0f6</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>b163/52</id>
- <inline>0x1960e8d84be8bcc85de5b9ca75cbab4081b644055,0x2f153b8c87011bcaf54e9618df7490c1456035f0f</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>b163/53</id>
- <inline>0x19721196faef971bb1d4ed96c6d61f967eb16689b,0x417aa49e946b36194e36605dde0bd82ae54c7d017</inline>
- <curve>nist/B-163</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/nist/b233.xml b/src/cz/crcs/ectester/data/invalid/nist/b233.xml
deleted file mode 100644
index f1ebb74..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/b233.xml
+++ /dev/null
@@ -1,427 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b233/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>b233/1</id>
- <inline>0x013a61f298b7e519c7b910134eede4195fd888c1f62939f23974f107a393,0x00f8b6ef4601b1d3e6b1879fe7e81a4fd14c7318f6d0491e636567aa8d68</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>b233/2</id>
- <inline>0x0146de15ac541eeb2db0c93ba9ad99f507ba180d83ace52cf4f97417802a,0x000fd6268bee78aec3a672d864ab7662e65ee846e0f0a14d311d6cc336d1</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>b233/3</id>
- <inline>0x017611bebf3eaa0103cacb7dd06d4a5154b0d428bb20b8ca255876dd7992,0x00703553aada662bfea2ff73b660d6ab4c16068b5009532dff97f116ddc0</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>b233/4</id>
- <inline>0x010260e6dfd076cebc1fab83c9dbc96c1bd2685f92d9f6e291e0f95adf5a,0x0166a50761a27b9a8254888127e3b4999cf3d8aa75bbcb254d6494043506</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>b233/5</id>
- <inline>0x0025c78cde1a14398e7fe4adf0cf94e99b56d534b25f8b17538ba5f80702,0x01749fd4b9633885b5d5bc11b0d438ac02b5d6a0ca85f7a44d61c56c4538</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>b233/6</id>
- <inline>0x006e5eda59c7ae482e532e5acf653145a7f39091e46a21a2738b3cb73209,0x01220025e82726431a53db8549ba32fa855071aa6e99f8058ac253ac572c</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>b233/7</id>
- <inline>0x005c4c2bddedf2cea25485beb2f6863ab6f2a073598fb35edee66272f902,0x00ae511ad5ba50dafedd9c930b62c651bdc71d6dbc0801d15f527660b73a</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>b233/8</id>
- <inline>0x01d941f2b318f675ae24ccd0d1483f3896533bce731ece06e5fc3b429a0c,0x006c13573ec2fe1dd96c91181a9d62ea2a195277b187c98e34f7f8d0e347</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>b233/9</id>
- <inline>0x0141b9261b0a3451e8bfd6f6635d664dc23bbd4b6f6b818a142f6dff909c,0x0132a06a292db906618c725baf9316f78bef273cd8858cc79716cbf27fc9</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>b233/10</id>
- <inline>0x011a3626951821f09c3c5bfc035e615dca196fc92eb582efc86ecf328fa3,0x00f666c998b9b4a43e59042fb59ec72a553348a94fdac84ad0ea04732d15</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>b233/11</id>
- <inline>0x017825f6fa1d64bdd1bec4937e8ea305bb1c29195cd8e06fa3f7af7bc98c,0x001098d0c2867f23ba94a06eec1f5332a9d8ffe4ca987a80da4c1a43e02b</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>b233/12</id>
- <inline>0x005de91b32d971a5a8ecfd95c92daf72c5b81f00b1f5bbb9c95a857f2796,0x01e58fab4058d731422250da1e26772c627c6f259772dfa12b534c3e605e</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>b233/13</id>
- <inline>0x00c8c98dec5a06b5a0ac2a9465d86dcdf5b22d1abb41fa4b8ce6c153ea2f,0x00e7ed172d04a95c6314011f92d1fb46ba3790c0c9fa4ae73f25126ab954</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>b233/14</id>
- <inline>0x00745aafbf0bc0e1a91b339ccb3436c35819b495bacc65a757d268f74de5,0x008674f6ad5cdf5d3eef078f7aa1df59538c30466ad5086f761ed3f97f60</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>b233/15</id>
- <inline>0x0090faea35c31b1913233c0fec7de027786823375898680fccae9cdf8097,0x004709283502d7d90bfe03354d43d4ec52b1c308aaf023db5d29dea1cb86</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>b233/16</id>
- <inline>0x01ffd653fc049c01e68c47016c8586b56241b7b2500b1939891cd2e329ef,0x001d0a374d61711553eb4e04082471a18d0e957622ce7e54666aeff6d230</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>b233/17</id>
- <inline>0x01b6f619592c7b815056f145bc3277751c36eac301a74c634937fe617228,0x000cf22a0871bc26a05454890e82c182149732d72ca217e48de4919cff32</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>b233/18</id>
- <inline>0x00e1d27dfc8f81183d082deabeeaccb34d49abe66a6d1eb34b5e948e0767,0x00a9034b2d3204fb9c287773348566bbf625b90297e0bb1c0ab50af1403f</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>b233/19</id>
- <inline>0x00dbddde662796c524b1f4aa2e3fb5d8067db008566d8152159213c82630,0x01b9c02e503c3c351d576f88390fc446995c1f2edde121836a3944f9cdde</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>b233/20</id>
- <inline>0x00484dae384338142048d671f3286cfbc3fa41d5822b2058e3576b350684,0x015acb48ca2463f5c0055be83d8fc9f97e00561b8f57e365b85324c80ddb</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>b233/21</id>
- <inline>0x00334677faca155a8998be6120e200f7ae099a18c89a84404a360b3b9da0,0x01d64fb72c5796a1e41a8bea71cf89cca82333305fb16da4fb444904320b</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>b233/22</id>
- <inline>0x008e4ad3ad13c14e9c95b93a8b014a73739a4d3acc8ade3330cfc4b51444,0x014c11fb315848a7c4d9aaa5ef907705d389a42d2219cdac1a769d968940</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>b233/23</id>
- <inline>0x01d0962af6e134d7fd5dabfabb81804e0fcd8f5dd3752b74a69e7208478c,0x00b18a2cd7d7540b4642ea7e4f1eb072c8c92113b38dd165e44185998874</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>b233/24</id>
- <inline>0x0148ec17a9ee2431be36f1c49a5b323517e6a5c1681a974176c6ce114f5e,0x0009810f5b0b5cbd9806ee31617abb0f2def4df180b5a477c2144c706a6b</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>b233/25</id>
- <inline>0x019c7e3306323fd7040d789e55872b508372f372b25efa12f81cc03e4087,0x0102afeb2eddd38b7911b081f0e098d81a422e884b4dc909c6daa0a41709</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>b233/26</id>
- <inline>0x00e4478302364bbcab0bf570139caf4f2698fccb76778a7f6bf8bcda05d2,0x00c012e6a2e75e3af727abeb710d6e1c950c6c0d1d2e82277f54ff2a3f04</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>b233/27</id>
- <inline>0x00e0e00aa5926e85ed48e945ad3dc08fbdd677a422ec24559d079c73c6a6,0x0112f2f830eaa3dca34eb8b11585032e6e9f0233345009d1e7505b978bec</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>b233/28</id>
- <inline>0x003c0f3774ee63de1846f71fa6e5b13c2e032a40af314150cd2a4fb25328,0x00c7c802d23d895aedb7aac6852e7a724432a11a6bca5bc6b40266f961c8</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>b233/29</id>
- <inline>0x00d7c6b7b9d0c06f504329ef1fb5d7b1f7453757779cdc1d2f79a5a833c9,0x00a4a97203210d3627e0c9e24061d9bcdcd819deba60e177b4f2cb48e81a</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>b233/30</id>
- <inline>0x005e15a61f0d25279caac0e100e03525c7d849ac2ec5fcf3935e566cdd04,0x01c495a2408787296f331a104c3c69b51fa05115b8d2e54f6e587ff427bd</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>b233/31</id>
- <inline>0x00bb21afe14f9cb7e1adb101f2438306aa885fc815055e91eec9d6e136fa,0x00d24cf32294ec6d3565da5eb79838c75892447b54bf7a49b79c9e85a25c</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>b233/32</id>
- <inline>0x003944e542d63a37a72fdb50b29eb4c8d494adfa03503fb51d1066c47168,0x0116a0ae7be3a949fb1a2e2336d1a4a624e44dfbbf74428239ff97ee9443</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>b233/33</id>
- <inline>0x00fb5c14d4e7452d44ce2d382f98cf029a0c8586f03cfd5bc3c1a390655b,0x00d0f39e7fe1c5d585b580688fbcf2d102fba3934638dff9dbc514428e57</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>b233/34</id>
- <inline>0x00eec38248d3363a60746704b37306d76ba6e8cfdf7a796ccd7cb65672e3,0x006acaa25692e9fdb8f0e2bbc851019837273bf4a8e12e6df0a38ac47ad1</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>b233/35</id>
- <inline>0x00c2562d62b3605a31f7afa3f5fd711c5958eac6101057b043fbf18c6cd6,0x006ddaaadabac82cee6a492b3cb2ecee479599d04342fe9509ae9cac18b3</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>b233/36</id>
- <inline>0x016f8ef95d8f22bf720501e73921fed1581430e1ab7b06ddaa5e044cb079,0x0089feb037be4b1fc618fd7f957f2350b787d5753e7348922e99a91ba4a8</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>b233/37</id>
- <inline>0x0078f41a800d4aa475ef45c589958bb0852114e97b1a2c7d820de703045d,0x00d779bb6d8f47bd49ef7212c64b48ec530ab247c6e59de4b29fb90e1c78</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>b233/38</id>
- <inline>0x00151157235224df03b15eda11d543f0bdfca29255cae93befae039d26f1,0x0097e5f3e126d011d74d5adde85cef50d732e1f19706414e7e04578e8bd7</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>b233/39</id>
- <inline>0x00f4a907b89e0cc3a6fa88396d3c9f35ab6d962a57b2de84734fe953bb6a,0x01f013dc6185a80690aebf2585533fb7471ed26e649bd6384dde6d26c1eb</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>b233/40</id>
- <inline>0x00cb402c2b66394b51001110ad3059fa75d9438dc9a604e12dacc1b47715,0x0116b718a01fbdab9b56d76beaa55f305de1a533b2809ed6cdb1409c8f31</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>b233/41</id>
- <inline>0x01daca87abe60bebf2a159cf3e35e77e0c9c74c75319dc2f45c2ea616f1d,0x0101229c0ccf9847ca6a58836ff24f0a9a901810257f3b53b8862d03d1f9</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>b233/42</id>
- <inline>0x0178341dd2dd67dd8f2a1ab426ba16309e449185421edcc444d85e73107f,0x00a539c68d39afd4b470fa7f2a3bfadd0e8a1bbc4625b76a8e0ce43583fd</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>b233/43</id>
- <inline>0x016220f7f3527411203509bf61afd5a8b171949091181ebe0b14fa08f149,0x008a6e1dd11c4da31674143f6fbb841b13b129c4449ee9f0d4f722c74456</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>b233/44</id>
- <inline>0x01ff577a6b82f2088e316c733284b14a848f88785e3ddbd879d5144aee27,0x00620d782522db8f52a0e218d4d9afc09b5c4e76b523fe7d506094fa8c7e</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>b233/45</id>
- <inline>0x007455b60b0d26344fb1f41677712d86feeddb6ad08bfcead240fea9430c,0x00895398f3616f864368c2b56a56f8c8b089d7fa79174864aafaad64037c</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>b233/46</id>
- <inline>0x00b281040f67d8067163a7800667b35fb85cec6f9ffae8fccfa286ccdd0e,0x0079d4eb67f6899e8f98bdbe42c2472f89e2686ce45e96043e180709f284</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>b233/47</id>
- <inline>0x010601dc66b747e868f51af10aebea3447c39936bac553b6ccbdee69b08b,0x01a498e6d86ae6307e727ee4e67ee1991c3bfd79f74d5fa46df69a3fe334</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>b233/48</id>
- <inline>0x01837c6bf9a6a02d6d241edf8cfa90ac5bbe90f581dee113567d68862907,0x001bf79288a7cfacd8bc29732786ab5d1af4f58bb29ad97d61fc15757506</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>b233/49</id>
- <inline>0x01b311700a99d6b31d9251efc31245620ec60f202af9323aa9cf8e38533d,0x005a8d1c7c839803e029369ce4b9246eae061d4d73d153a34b06a70bb61e</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>b233/50</id>
- <inline>0x01e94f42f0bce9ae4a672ebd1780ff590853d2d96d150fd44a97e7d7c5cd,0x00e1d1f7be7b761fe8b1beb36e224cda555d8b54393fc4309e52480c1458</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>b233/51</id>
- <inline>0x010307e2db628c6ff18c50a4dc25b9b11fdd47d6027b0ea67dd325c6f23d,0x017f8d26565fe4f9fd18f2f1c476b0caba04ca1ab80b8214ba27b073b3c8</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>b233/52</id>
- <inline>0x008d0248af4654952a3a2a466969facc49e69d4867426e665540ee62c907,0x0169a05a914ceacab932de16d795c1454fc74a28d9738a0823a74005c135</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>b233/53</id>
- <inline>0x00b56c6105b2dc5943132675aba5b40929074b443af7471cf194b4b5d881,0x0045650ab9b4dc065760eae9f4c3f448a41166c1a73e07980b46fd96d3c5</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>b233/54</id>
- <inline>0x00e3f3d96fef27970c3c5ba6ee57ebe31abe446680700cd892e70e1cca95,0x000af6328f558bec54600a0d1a201b3f94b8153c37414b23dbc50c652b3b</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>b233/55</id>
- <inline>0x016ae7f6e8c353f11b0f0249f7ada4a932f718b3a3decd2db7591d3c8f15,0x01f5d81df15c8e9bc2c0927823fa69834e95a7eb24235bdcfee523e36ec2</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>b233/56</id>
- <inline>0x011345c0b7ca4a9e3315bd6a117ea4cb0195937bfca72973423590cc651e,0x0073dbbd1c11a49a9a5bd699db6f2009ecb772a3653f9f456b3ed57f328a</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>b233/57</id>
- <inline>0x00cb7db7ebe450db630d9d11f3e78aaf1db1404ffc8fd62240869625d294,0x0196248488700595a86886592d902a1ff614d7375ca23957a36316cb9998</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>b233/58</id>
- <inline>0x00b1204b44f6dc452ae8dcbb6bf162b9da57fce5883a9d59d11a38e20598,0x0172cc9cacd371b24565e88d5d520fee07e4d154ddc595681cb770bc87fc</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>b233/59</id>
- <inline>0x016ac8da498b9874d97e0a3f4e31e025d80727b7f51a39c9bc6d589fcd0f,0x00029387493d1ae79f2a1a34684cd03e9dda2c3ac0341a3d62b294dbb9cc</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>b233/60</id>
- <inline>0x0093588d66c3501b0242a694a16fced131970c7d36f305542a320f988fac,0x01b4786ca34ae0a3c075638bc456e9452c56932f5466e3d6eae37965a290</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>b233/61</id>
- <inline>0x002a52c14a2170c4cfb51fc7ae3178a8aba06af950eb9876df4a36a87c21,0x0090b0eb0eadcb2aa525e18f82e61aadc6569f5a723e00bcf13e5a97a0b9</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>b233/62</id>
- <inline>0x01d7bf63e3f74777a5ab19abe5b79f9a3e12fb39aa0596b14ded008f0fbd,0x00bdfbee7583de11891bbd61704636c5a666e347c32f847113ed6b6e727b</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>b233/63</id>
- <inline>0x01df3668c18241829a8a164689bb0daefcf2cbf5b4ac0cc203956e2e0a4d,0x0146fc0b29ae85fe07e86195c08f551e93cea75e2a484058d2ea90f5a189</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>b233/64</id>
- <inline>0x00ebe59683062dd9dcca8ce68d049fd46a75d8bd33390f974e5c3e8e8758,0x019f7805689698d14059b80ba6007cc112d9a693153f35355a5d1e3855a6</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>b233/65</id>
- <inline>0x015437ed2698d53bf0e0512d4a3cf4adba1d3bf6b98e299839354430dc47,0x0125b9abc1e1180af80363551e5ce87e84c2d154768dba046db98d0d7132</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>b233/66</id>
- <inline>0x01ff3fe7fc0c131d929b0f209d32488fd839ae43aea783594b406c96dd47,0x013c6190ae1fc24c45a978e5bd95492266521aa33fd1a2b70ffbe2b86ece</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>b233/67</id>
- <inline>0x0124244e94af744cfd8c51fb9aa310cb0f6c2a9e2f9eecaa838de8e10a17,0x0072e4138f50626f9657e6733d188feb6cda6e8192fee3ef55ad5ed34653</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>b233/68</id>
- <inline>0x01771ed15ca630599b4d9b73e685cee69c1da19d792c60831b827510d648,0x0092e00d5c743b169fd6518caa3805d951d0015c9f88b754a5aeffbab242</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>b233/69</id>
- <inline>0x007c16da7bec7fe551a76ed180e2a6fce5e27582b5ea54b0b94bd5224831,0x01e0fe02498b1fb08141abc52d2f2d6b7fc132ab6dc610408f24dcf22867</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>b233/70</id>
- <inline>0x01f84ce2bd84fb36bdd5d22146408de2360a60619c236af69598e3b0abb8,0x01908b380205678d7b311888704cd36be535d8603b1d41584e58106dd606</inline>
- <curve>nist/B-233</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/nist/b283.xml b/src/cz/crcs/ectester/data/invalid/nist/b283.xml
deleted file mode 100644
index b925891..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/b283.xml
+++ /dev/null
@@ -1,499 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b283/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>b283/1</id>
- <inline>0x0779193c415a3c0d34c37b9e8b87f053465b922c8d819f43f6b1d91545130d298176ce3d,0x038d3c16e1633d4da8994827f4e8e3ecfd245bdad6c9ac93816a487bb54b734673c0fe13</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>b283/2</id>
- <inline>0x037d13f4d3ca4dec934b2b3138804b29a77da41c39f34bb29558d12203be7f0e86e37049,0x0594926a5a06080ff4bd331affa5b59cfda7552a38a7e9c3132cca8aad852e6ca303f0f2</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>b283/3</id>
- <inline>0x0152aa9ce607c66a2b44b28311762036b2d3ee9ea4ec79c573366ac662aaf19bc61054ec,0x06e74a7e7368dc3da894478c59b9265eee01b6b6e0784da6c1e7e62bb2fbf365e209297c</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>b283/4</id>
- <inline>0x0271fd22eb5e7ac3854bf59d0600e20a87eb3b5310ca402e4e41e4cdaff7ca26755bf192,0x01ff5c1b024d3a730c3fd7cf1a2977d43cd639902799ffb8b960341d1ac4cf70267d9a40</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>b283/5</id>
- <inline>0x02a092d1617d747bfaaeda7821996c3b8cd389a55e8d960ae03727ceadbce11ffd61a4fc,0x0463511218a36bd118f153d5bb41f1dd8b884707a2ceb0be80ae9ee69d026d1add4f09f8</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>b283/6</id>
- <inline>0x016f68482087c2bddda5168afc00dbfa30bcd2efca2caccad5d51b10c1180bbafab93add,0x0707f82fdedaff347a44ee7b115d268dce2c8b2b053776b8c53b2d40af853ef33db3cf5f</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>b283/7</id>
- <inline>0x01a3f116c19957e20c3a3ffe04da2564b0b1d19f9983acaed782413475418ede905e4cf0,0x030e1b11b18cb98d6ff9bb221e2c32097ef12bedacbffbf9becb8cc44a61155bd1d937ba</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>b283/8</id>
- <inline>0x06b0473c54063241a828554215fffda26ed98d6f7e84fe09b4d67a94b066ce0641d34a99,0x0430a3d4df4f29f55066e66b69dfcfd19a2a4b13ab3f2be0c6c7345263de8850b71ab52f</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>b283/9</id>
- <inline>0x0225dddeb810414b5adfc2cc761efd1d4bd2497460fe61016bd4ec1d1cb654e2f9470920,0x07134e4486e830040adb0d485c0b3b5632723641e5225503a1906dfae4b59ea0204477e9</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>b283/10</id>
- <inline>0x06fa135e4634fee87fcb088f519f05d35a6d712b96d0b82ccb946892022b3d933a70e7cf,0x04d1ca88059c59819aea772f8498a9b433369c2bab128e5e7959d23572b353df0b748723</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>b283/11</id>
- <inline>0x062ebc8ba30dca383ce283a8d6bfa0b30550bc5eef0933381248924000639a8c9d143e46,0x03c6420eacb629eeabd60bed83a4c3ad8517e1e61991d775742bc5dcbf718ae8199cfeee</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>b283/12</id>
- <inline>0x002f4543cc81bd449551d0bfc31c4b9f941707cff893c82fbc9bb3e63a7a0c04998d13c3,0x020b3e6f1546b67e8c40484bb89b207ed5acdba600a686a8e407b23339865b0a63dafcef</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>b283/13</id>
- <inline>0x0423a193fec53465dba0c71c55a6eb5b376ea7deadfd25f73c43440f683c25cd4588d2b4,0x0497c847e4e7f2b4690c9e677631e822d455f74a3107d5147ef813d929dad644d5d30911</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>b283/14</id>
- <inline>0x02e3f839479dbb78170690c7ef04f194f6947ad37842f3f1440fa95244f7fa64d951d22a,0x0422135f2bcc3dc18aa21032bd462368ff0f45815b94664d5a9d85396a1391c1f4486cc3</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>b283/15</id>
- <inline>0x025aab829e8acce7f0d6ceaa8d2a55d869342df6d8a429a54f141c5d43026052e3645430,0x075a8554a97a51f638aab7a9cf167d6c6c10af0ab2eb7504b917e02e65d0ded0f2da4782</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>b283/16</id>
- <inline>0x0486be9b697e87aa12c3fd5de9c8fd68c23ac81095b2e14cd055e45e56e0886a06c7108c,0x05664fb0a4ba93f62d2bb8e381422cfca68c5dfa72c22dfbc13e04a8c0fd548dc3a10cb2</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>b283/17</id>
- <inline>0x0068b93138c130c4d8148f93f06c77fc0074d2c7772eeb37dd9a3eb4ef5c38979d787c6c,0x03ac061e69880affea110270e521a3247322815557ea8959b692cc23c5dc8e7ed9f08312</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>b283/18</id>
- <inline>0x05c9e3366f3d5494eb4670fe76fbede508f7ebc2a6a3c8bad5087909feab4358ae73c1ae,0x00974848bf262a1ee1be59f7e5a81a979f0ef63333d29ed1d21ba94614ddf907f6bb78a5</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>b283/19</id>
- <inline>0x02aec67bda90b6e51947da6082abc44a0563e12c7deda93bd5d3d2e5f0cd71ca9af67c84,0x0710595c75d5e04d629169082538e1014b5e0a554b8b0c765402f8e4d5377876a8a8802a</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>b283/20</id>
- <inline>0x078f9b0a80fae8b66c521eae9d68f625e8d922844d5b5d953fd00e66090a858835679974,0x03a0a9600ac3c78bd170000757239563d526e05c60c35fee556cf04e7cb59b5b27d1a2f8</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>b283/21</id>
- <inline>0x00bf69153274ed1a81ce9626d78e755cc68f4aa1ed7c6d96b331d2fe79f7bf25c5717299,0x008e0ed0842b1df5dc8cdcb62ac0e5f60b9a58a64a60f183672b7f98d4756052ea10abe7</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>b283/22</id>
- <inline>0x007f38778f2e63af0463a2fd5e19fda1866e9c74d74b9e6957b4df5aeb3c6a74b187cf79,0x06a059ef1357ab447139d99237b878a85c7b0e62a9bb6c1b35327471fd530ab50c80a61a</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>b283/23</id>
- <inline>0x0203f947e69b4d797300e26f25f0414d6d4eb2092b129b1f1e647567af071ad0384aa148,0x0538142081632653d38abb90c112389aa7b1cb31426e9742c66f7b2cd36b8b286730c990</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>b283/24</id>
- <inline>0x03e9b8abb2f3e7da72e5d72d49111a200d253a891cbf890f1b83da78f709b04c56ad6234,0x04b601d4e9fe8d0d96ad339bbad542adb4fded566ae2d350da7a15d3ec1d994d75a60038</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>b283/25</id>
- <inline>0x07f7159eef2ed67a54e10dc165c87a258cc97d27d690366ddb622494be1df2d962f978c7,0x04437102e16c942d832c4169b9742d73f94e431bfae9b48661f8b87c52155273db646a40</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>b283/26</id>
- <inline>0x025247593b3fcab041ec1b817f94773b62c2ccbea9354321749671945f60e57e98788b47,0x033b34aee6adad081c225c1f052d0f0c0cdb3f0e187be87ce3fa0668c131aeb0c3fea875</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>b283/27</id>
- <inline>0x026e774058489e479d0be98f24f26d9e709ffc9dab9f843e02ea357294d5f03414196077,0x0069218178fc907fcd4cd22a9b2cf48f26d8b0e35e9dd577d81ce7232ec48e83d8740d38</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>b283/28</id>
- <inline>0x00617a10f29294a07d0ddac53676cf3ca62fbb6fdc3dffeaa8ea569b761ffad6be2d770d,0x05057cff525ca5c135a2c4ee5148e4e3dd1d4db1c3d887f1fbbed518f0b280a23858a56f</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>b283/29</id>
- <inline>0x032550e2755a589ef6564ca00f50a33549edadaf4ded6d3c243dd5cab76248e0bede9ac7,0x00467f5a007aba4fb5548719ccb82c245d95d510c0971d8ed5f31ee6e86af6aa9d63578c</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>b283/30</id>
- <inline>0x0406de77255926a17b15d8119555ac1ae8ddf2d84ab96eb51be8330b0d173ea362ac70d2,0x013ecd50b43a8b062c9e61d2c2c6f4058ffd892e58eb69b3ae5574f2d12d918ce6c5c15e</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>b283/31</id>
- <inline>0x03b1cde83e5cf5d9a88d42aaab8e2083447a1065d2747fc5b8bacc93f46001a06328e5fa,0x07bbaa152649a7342f2cf5b0d7e30079238b4f6b090183dadd4caea336c580966e127410</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>b283/32</id>
- <inline>0x07a6fb99f100cbea439b9c75223463557ca148fe25aaa1c93c1af3743a69bf1a8c550026,0x071ffe60341b0a6b8b39b55c1e9c7a127ad171a4840f7e7982abf200218db8187998ee0e</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>b283/33</id>
- <inline>0x0333240d76b343bf26568ced4a423848da65b59a1466dfa9f4ca49e1ca88bd93b68616fb,0x00bc723cc82c0a4dee174fd5790fa082c6364fb1b4e9a038ad358828d134875bdf7fb1c1</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>b283/34</id>
- <inline>0x06985984f915452fc08eaf0223388502fd5146c6e0aaa0a2ce075c1ee69ed709c3714707,0x070d3e1ebef193964ed905daf78a355bc3bbf4e730fd74c523cdf30a05220abaf3208d22</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>b283/35</id>
- <inline>0x021fae0cb04cfb777c5528b7aaa0b0d2f8c2490341fa1ba1757fedbd1a83eb7c98ef068a,0x00a95f7f13ae547973e81003594ab84d14b7cf0c91770df568ae1a24ecde723377bdfb51</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>b283/36</id>
- <inline>0x069c7c94d9e11fae6d94a3f419248ba0e1d62bfc0f24f4d526df9cd7d0707489d8cece43,0x06a0e890e9caceb72ba88162641035a2ba2a0be2c41081d2d85418263ae2ee75f49b984c</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>b283/37</id>
- <inline>0x0683f02b9cd5727c7119311b37afbd056cec28ce4011f4a6bdcec8222f1ca2404e1d19d4,0x01ce3fb1464cb24bdb950b847d87d0d67f2587964edc8352630d361e9b588e62be995cf1</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>b283/38</id>
- <inline>0x020e43e328f95a17ea4be65ed6568a4d4275d023954b67cd7fb6fcc1d8f817db98d49cf7,0x00dd28ed97a4d06a55e054b488151a1862dee0427be38c97f720df01652b14a383c1d03d</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>b283/39</id>
- <inline>0x07f06a42952df102d35f0ea3f6438be3e64c24a9c3ab6f9f8f64cda8d0dcb7edab4241d9,0x062ceaae5d01b1342e6e700108d88d9ea8f94a88122fa34e13ff38bc1fecaa555d1d861d</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>b283/40</id>
- <inline>0x061e9811646891d8249b80f50376095e68a7a234453fa396b2d9fabce36349bf5d02f2e0,0x01d00381750db14dd2210634e4a8a21fe168441322aa45e8a4f88db4c71e578f107dd49b</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>b283/41</id>
- <inline>0x0765cd95edc6254f3217dbb3368a286ac7fcfe32040348e2b23a0f2339d40a67a73a6ae8,0x06c8947571d2f572755b36e3e6379f241cf307a939b04a434a2074e9a6f67a1b57544d0b</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>b283/42</id>
- <inline>0x01a7db868ec7d5a564fe4fc5c34e83ff39abefec3f6ef0739dbb77a90c437dff0638dbac,0x05bae2e8a1d5d880fe44c65da05c3efb924bb9c26dc6182a94aa883d75cc1c7d5483545c</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>b283/43</id>
- <inline>0x00902323c53020ded0701b41849b05b19bce3d06f56aad207620169fef5ebb798e417801,0x04a424b06641ec05bc86db1befa0142d3ffaab09ffd7196b25e745028179e92cdd39add6</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>b283/44</id>
- <inline>0x033c0bafeec6c8c380c9134b1e9e1f3183aea3c4590cf3f90b11dc271965ba3eb83ed16d,0x02a934ec1562788d57d23e41eb7b6daf099c1717a8c566959f33805caf61d91c129ecd02</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>b283/45</id>
- <inline>0x00221ac15a50a04cc3fee82be8fe906684bf2da74644a2e5f4332a7abfa0c2381eaec77d,0x060b3eadd4ed1669aa9282c9209629e39cc98a4ebfbfed874903c3fa467cadb7dc04d9e5</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>b283/46</id>
- <inline>0x00fd9b7191c9b55161e08b95897b2914e62736a5e77a99a5522f594d6c257babd89512f4,0x0791a3660eb760a6cbd5c5c9fd7b6e17384b108ce3faec15425675c4c1853a9f5259bb58</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>b283/47</id>
- <inline>0x0341d823854fdf93c7acefdcd76fc2cc4fe81654c72d39efe9da6d42e9665d3ab383bb26,0x07cbd2dcaf11a0e9287a572e19129b2255c2a57902b0310330eab56ed6f03d2ed5fefe3b</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>b283/48</id>
- <inline>0x0463a6f5f6eb8acd9e1ba6b2d22511ed47a62e607ffca881de05c9980ac80b1e727a8b8c,0x0278af82017c37596bc1b1f1382c4d9ce345038f77b904e35584c9a650f5cf668ce357ff</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>b283/49</id>
- <inline>0x06ecd46254dbe5368afa88b0152a6f35bd57e3e068215b888f86c96431e80ab99e09dde6,0x05f2de25d8691859e076faea519796069738f9ec06413e8261f41494095ef4f33e9fbda0</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>b283/50</id>
- <inline>0x06b20b5dcad5d8de60b61be1459272b29be536f90f3ae964ef060459128951e5a74a5aef,0x00a9ae88145df307a1bac2edf6ae46c409480b5dd57cb92f73bc70cd709e6f73cebcb721</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>b283/51</id>
- <inline>0x073f7871894db376e42ebea88fe0b8aaa93dd831bc6c22030f4b7c82ad9a244c13422ef3,0x076bd7597ead6f781a79ce8f8819db6f6adda0a4750d330d0b77f5fa5f8c68a66824d550</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>b283/52</id>
- <inline>0x062e46e74c2e53af85dae1c5558fd8c8fb3f79d037fcdf6692c988f6f58df46440ee1313,0x01d228a4e12fb85460cea9a2ea8b2c4cd2d3194906157191d3021dda40d80999f55b14f6</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>b283/53</id>
- <inline>0x0793df16b39ee47a9bacb66560a918e58b8140730dbc9f33960cbc41af093ecbc9760d10,0x03198d52a72198fc96f977007b84b6c8565963332aa27489cee99b5b318cd4878c9216d7</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>b283/54</id>
- <inline>0x04369b393651060e372ecb20b63357dd941eee5136bab6895c7792219fd969efb67fa626,0x063f7c186872a590637229e45dd6d75f540879b0b7d4730807f5211a365023707966cb87</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>b283/55</id>
- <inline>0x06153cb0fea7bf7c023a2de70d5265ce2d2b6ec7037eba43fb98fbeb51481a4cf063e81b,0x07c7d016290f63c044aa63cc1c115fa952c79cafa07b5d9beb87fe0d4ac90f05aae1b763</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>b283/56</id>
- <inline>0x042d0270b15356ace95f11ee5b81e0573ba05b64a4448c41d83295552798af8bc7961a9b,0x013e4d3877100e7447fddcadf1468cc883bb4122b3ddbadd42472ab725914db55a736705</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>b283/57</id>
- <inline>0x0265280e6d39e382ca199d6a1ef7d5bb978a0c27f84ce9e7fca3901c8f2db29ad167443b,0x01481094878cd62a731252e59172ef200a60f4d1b054631e422f892cc61a6677c4e9808f</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>b283/58</id>
- <inline>0x020dfdc3f3f67aa0015d0565183c117868d9694a188d5a24038cc65e2d84fd7270603c8c,0x06eb4749c4102c98b511e52dd7a3931ebc6cb463ad03932a330878542912e95d88814112</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>b283/59</id>
- <inline>0x0659a4e55b4ac1d62d14c0c53300dddcef75a40bff76a4d741e05827ec4547ad58e4de98,0x07dd8933042a46fcfc2e5c45de83f0ed6bcd1c52e39ee4427d3d8719a121be1426a68e48</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>b283/60</id>
- <inline>0x045aa971cc5ed1b1a56bc195b5ccb4f886916e4ea6c1dfac99fe2139051acf3fd16d06de,0x05de6dac1a923a6b061e5b32f6b57a5c4c9fe73caf13cfe499c12194eee7f2dcdb9c9df3</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>b283/61</id>
- <inline>0x0130088a907114aaa34aa39059cb461506a872d0a0d25b1e6a8bd325dcdc287c8da2e9c5,0x01e343820d57b4838f1129a56b90bf4bcbf651ee0ffd16fce241577c8a6ea6e35ed282bb</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>b283/62</id>
- <inline>0x07ca612e322d6870162a673ebdd6f67974368db7e66e45132d22cbbf00987e88aa29761d,0x034846538ad144ea55e8e4c63833ac130ca99fdf50443c145d96ff2a33ffa76543b9a0fb</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>b283/63</id>
- <inline>0x040701cd44834cb567bcb41a9403ea03f6afa71f2683deccfb7c9e619b39ff8495d0dd4d,0x034795b48595f0ec339967624ec3706392cc88aaa59919ee9309993dbf501c457362f8ca</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>b283/64</id>
- <inline>0x0712fff63ba8e1d59c26b838d98f4328e981400eafac50c5a60ada6bc44802b0ff1a4858,0x060fe5667ab12ae49dc1596f62fedc825df052e085605ed49b60a7c7565b24ad296f1e60</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>b283/65</id>
- <inline>0x02e836679a914cf63f8ff95f326555c67d465dee1912c0e341e837c7fce107c8f7f192d9,0x073260ed1c19dedeaa4ead2a83d1a61fe159fcd73e6b4a26fa87967028db7b6cf9b4aac7</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>b283/66</id>
- <inline>0x0343e85fd37cc47fbdfa92808fb1efbaffb685d76c5a164214991a776fae225bc2af5662,0x007d3e9f8578ffcc4ecfb0e0122ac5c1e98223b32ab7b10f92628281dcdc1a5b6a7a1cff</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>b283/67</id>
- <inline>0x04b0c72fba220a9c62d01e0cb5c6416068b25161dff24cc94d7978ba6549254ab471bca6,0x04ba2b148f6d248b0d4698fcaf0f86367f44db9dae1398c4e5bc9b935c1ff1d4bcaf7b62</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>b283/68</id>
- <inline>0x05691ea4ace4e6a6c07b446b06299bddd2e54a80cabd2d88e4e970e718640d516edeecb1,0x02d43cfce6aff06c52568985a8e9e56c6467d92a2d1d1304de66e16bec1a94f99b31a616</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>b283/69</id>
- <inline>0x02a0ad1766fdec21d914dd4abe6a5086fa34fdecfb53b3e231950360f9a040436e86b7ee,0x06a2e2671dc3aaeddb261591ffb0d84928c987f2a809e28d98ab8dc89a8d22b12fac7a6d</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>b283/70</id>
- <inline>0x07aaaf8f52a6924f37c5424d27a7cc0969003bbad4af560e9e17a42b1008c86b6ad1621c,0x02a62a220df144c4da621b008838a6861675d98ec39484c69c9d95f2315944ed697fe4c7</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>b283/71</id>
- <inline>0x075fb07766947a3204f605e058fd88130561c4fd95ca136d38c7fe7964329e9756c7f632,0x03ea7651dd694e345c34d0c4aca1401e9e96bbd9760158dd76b691ba8cb619dc7840fb74</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>b283/72</id>
- <inline>0x07be5fb1c73f07056d19bbb8d201b4c92d6488e1054c35ae2ef9df5f9bdd5d7ce02299eb,0x031e7a9295c4f19324d0d455454ff69c33a6890b3dcfa18e0dc776572bed8aed4004cf33</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 367</desc>
-</pubkey>
-<pubkey>
- <id>b283/73</id>
- <inline>0x004d7f5b8c2eef6a3ca195e92276b79c9090609d9448d964be2ba9ebc1793dba3b2c7b09,0x016830ca772d9c96a6a01efb6624e9864275f0792e5b2d0b60ae2d0deeff2ba0d837d896</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 373</desc>
-</pubkey>
-<pubkey>
- <id>b283/74</id>
- <inline>0x07edcbe1f3d610cdd018597d78389122733b22f0a41dac394db45c0c46b835b1d71ab12e,0x05951ff19691e93ff27446a1dea9f2aa6347c290b7f50ba0777edde63c445001fad60ec7</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 379</desc>
-</pubkey>
-<pubkey>
- <id>b283/75</id>
- <inline>0x065c729d7f61139fbe759be3cee769ab95d08a136a9fd545f20a7d972a239112e15cf3f3,0x070e74af3ec0380c129bf4742710f47b966a78a033f9ce5b14e88a45002d818329c7fd83</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 383</desc>
-</pubkey>
-<pubkey>
- <id>b283/76</id>
- <inline>0x0513d61373d78ca6cdda79f6298e08702fcdb619ce1493f1ed76f4cf22118816c4257aae,0x07276a32ad4054de563e21ef86ec0520785a2dd5816480db9291b6c4ed728e601487a019</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 389</desc>
-</pubkey>
-<pubkey>
- <id>b283/77</id>
- <inline>0x07ea64416b7e5c4f206a8d48634dd3ca860bb446b461d9b5946a5c71346c45767658dfa1,0x01564ae32bc6baeaab67cfc87204aa1daa183dcf2f47fb6d74f733d87900e1343edd858c</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 397</desc>
-</pubkey>
-<pubkey>
- <id>b283/78</id>
- <inline>0x04a4e83e1f9c9000a6a1f2cae5eea2bc365919d7e5dd54c3408aa96c66c0574aa552844a,0x005470ff52f0046b54061ccb0271939499743cae5edfc9cb1c8ac01ac9dc1f8728e56021</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 401</desc>
-</pubkey>
-<pubkey>
- <id>b283/79</id>
- <inline>0x0401910133e4dee00a43c663d692345a84c2ebdd288db2e83ea712a17d6c3e4cf2fd1840,0x00cb4dce0552ac93f9d14e062bb00503e44325a0323d2449c54ea0f63786b9db139d3696</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 409</desc>
-</pubkey>
-<pubkey>
- <id>b283/80</id>
- <inline>0x04162b540ca358555104c31200c876ce4f0fc347316d5b037265e6593dd4e1f0631c56a5,0x0413245d7bbe2d358f71116159320c452fb596feb70e7ec9bdd9a691476f3a5c034c7bfd</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>b283/81</id>
- <inline>0x0218149b619e455e54056dd0a822ff01671d65091d630c06b5c492c86c4d6db7bd3babc9,0x0607515ded6d4b424e8e0ad3e35873f7f7673be71639681bb1a5c2abc962e6ce74ac6d66</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 421</desc>
-</pubkey>
-<pubkey>
- <id>b283/82</id>
- <inline>0x024a130051a5b598e0e231f798400df676c5a2f6ccd84573ae5c47441c5ed65bf9991d53,0x05c7024abeae8ad4d5899b7dd025c135127d45211780ac5512033fb62e26a1cbd445d93a</inline>
- <curve>nist/B-283</curve>
- <desc>invalid order = 431</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/nist/k163.xml b/src/cz/crcs/ectester/data/invalid/nist/k163.xml
deleted file mode 100644
index baa9ef5..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/k163.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k163/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>k163/1</id>
- <inline>0x07ae172096ef461faf74b167ce85c69172bf83be8e,0x039a323b9cf58f1d93b34c22a410e483ad88ad2fd8</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>k163/2</id>
- <inline>0x057fed3954476d4154a0724e4a0cf168d121c397aa,0x04da7d3a1f7897b395698b282dcff999d5abb15124</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>k163/3</id>
- <inline>0x028c42859c3070ecd2cfe3ccece08fb8eb50ca9079,0x050f823bc96b23c7982835305c6e792c4953b5cc50</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>k163/4</id>
- <inline>0x03d71ee6bdd35c854d0349940ae8a6e790a24a5e61,0x015d70a4b1e2fd11b0604996e4353ed5fd4f313b75</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>k163/5</id>
- <inline>0x04e1538f88276d915580b6dedffe34fcb10af63326,0x033317fdc52c146be042a5c0e826d9d9186843f13c</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>k163/6</id>
- <inline>0x07e3c2b73496db537b43f9566501a3c509887f53cc,0x00012fcb35ad9e8ec93ae78460a0546ae80c8f2645</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>k163/7</id>
- <inline>0x0419b8a01fb28523088100647c336ff2089bd6071d,0x0132db3289e526e6bbabb95d964361350ca42c2fbb</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>k163/8</id>
- <inline>0x0721f4ada90b02dc6e95216f85bbdb4d5a2bf08254,0x0117328a80b45c43f1ece7639fea23a31ac1b86983</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>k163/9</id>
- <inline>0x0204ab1429c0f090f8048e0ea807e2d116209665b1,0x07f7ace820fdff791d2133af214b3495535690fb56</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>k163/10</id>
- <inline>0x02ff03f381ef24a00e9df514b4e8b4c2baf270bc10,0x051aabfbd97f726d713fd784938bd94c441d565e23</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>k163/11</id>
- <inline>0x021c9f0e6d473c4a10262f2d16f9afb4905d404aeb,0x03f70861bb4e071409fdd7ea601607bdf01f8e009f</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>k163/12</id>
- <inline>0x0758cc28f062bc91b264e46ebc389b885ce0773121,0x07cbe9f3e52e52e76c6a617837cc693f3fd75881d9</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>k163/13</id>
- <inline>0x01658f9407cea1ce114e4f816187df57d2302a5da4,0x01152a87ee8baaa48fb11aca8451c9aee45ad7edf9</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>k163/14</id>
- <inline>0x01f162cf4d0a5eb71bd304ace21ee744bd3e262ebe,0x004860340d67e525e92e04bfba5e6114aa468b535b</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>k163/15</id>
- <inline>0x02f773c3d82717ee684c49587869b400b45c843642,0x03af4adc783d2a013dcff16fe41b2ad88170fe08f8</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>k163/16</id>
- <inline>0x04df600f39bb49c246ed7c6477d304b9d022dac62b,0x07536b27cae5cab302775ffe13b6eb2e0923aacbb0</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>k163/17</id>
- <inline>0x04e49dd1e0da3242e92316c8477441a8fa01c2bad4,0x0350ebae2177979faa6907e348a6802773610eb0bd</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>k163/18</id>
- <inline>0x033f28f48ffb6dc2e4d8d752ee4de6faf8f8626b36,0x01496d4abd17ef95c7750d4ec86a2d158c3b602ac9</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>k163/19</id>
- <inline>0x03a43712a11475ee1f4631a699ae34aa86d105a940,0x01267c79cb580b3198e29c9199c6b957932d213abf</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>k163/20</id>
- <inline>0x002ca647249e2a13572df59a22d1878a4671a9c9be,0x05632dbab230be29975ac059b6bb6f5ee00e1714fc</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>k163/21</id>
- <inline>0x05dbfa1b44d6984cb9c51e9ef59ff2158f8941e6b1,0x00a825db948cdc7d3d93f3ab51df2b3f372d747b3c</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>k163/22</id>
- <inline>0x04307cc2c9b20822fa1967b7596805621f2695d156,0x0145d76be145905f4d78fc6c14871fd0b868998158</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>k163/23</id>
- <inline>0x0462b532a7cc4b6e6191e784732713d0448ea28dc6,0x072e7978852e17c0330494b4bea23681ec4954ded9</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>k163/24</id>
- <inline>0x0764f3fe54ace84998d9e188721f56f40551bb0fdc,0x0227391ba4d03259c62b22254804d222a2a9a701ae</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>k163/25</id>
- <inline>0x07dd6bfb18e715d37753ab109ea87adc0697ce2b05,0x00e3aa74a10b1a38e746932c82b39106326f9f9247</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>k163/26</id>
- <inline>0x0000e796873bde33109ba48dc3c6bbde46679b8acd,0x01319683af2bd39fa71d68a0919a6c92df11b1e0c5</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>k163/27</id>
- <inline>0x01a1d6e8c6437b08366e04b750081703e32d422432,0x0189c8bdec90db00b915563e5374864bb16f38c220</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>k163/28</id>
- <inline>0x0240855798f8585441919cc0f099bfc1fbd0f94099,0x04e4c74631e6fe3b6a83a8677ac376acc614119b9e</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>k163/29</id>
- <inline>0x00963875e3dc6560148c6e7f644ff25297051046cf,0x06cf0a43da9a62ddbb8529028f8a7cc06f30cd4e8a</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>k163/30</id>
- <inline>0x013e441383291dd95921d5ef8b35299a0d2bc04872,0x00b2f6e5726f0c29a71233be44f6276d2b94ad5648</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>k163/31</id>
- <inline>0x0657d829869083e194b74ec178aa9f240599f8e52d,0x03cfc11433d0c4bbe1dfbd8d91869e20efa5e047df</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>k163/32</id>
- <inline>0x001c01ebc988af5c70dd0c75e0a2b348173d8ce7f5,0x05869a17e48d87d17ff700d6f628372a7c22260ecf</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>k163/33</id>
- <inline>0x02f2b0b3036e807c90a266d1ba2318204feb59b7be,0x042c7c6df82a53bea60ad60654bc9500217b5593ac</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>k163/34</id>
- <inline>0x0781c91afdc3c0751c425f331eb3a6afb7e376044f,0x071196a4a86dbbc75ccf372d20158b8cad91ce0716</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>k163/35</id>
- <inline>0x07caf54cc2bb338c18ae8eb96c4b695a4d453ab94d,0x041e38c4c35b264f5fc0d874167c8c8583c10255f7</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>k163/36</id>
- <inline>0x058ee7e528716b5cdf6205ffe06175b87ef6a9846b,0x0683dd173b7e650510c563ecd884dff7b99ea6f8c1</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>k163/37</id>
- <inline>0x05a2d624c51ab39b73c5399106c444e08bd39e366e,0x00f4ab5b06e367ab09538ab32fd175bd296882e3bf</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>k163/38</id>
- <inline>0x03f336d7c29952d370aecae7b90a8b1e951dfe8f3a,0x021a9c25c158c57e4ecea978f6b44881daf404ae48</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>k163/39</id>
- <inline>0x02d3305a2d3469216ebdc2c2ff779afc04a012abe3,0x047f464df98cec545a82b7d358ae875ab5e37347a3</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>k163/40</id>
- <inline>0x030c2c794f889e72ecee25d5ac5c1abf0939fa87f9,0x05f2d6c263224847c58706820dd3e7bf7c5d2e0787</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>k163/41</id>
- <inline>0x05be67c51e14feb41639bceaf9ce8cfdd6c3e58168,0x04676ec0ab03838c4e6495c76563b572d2a0cce2ef</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>k163/42</id>
- <inline>0x006ac6188a225b467bf3c52259b10b580cd8b50040,0x04aca2a58fefa61cb2095c17ec28136b3e6911347f</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>k163/43</id>
- <inline>0x0180872dc72ac55748324c3f5e284d13faf0924c67,0x0048895028a1a0a639400ae5f64ab4075f6cddc97c</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>k163/44</id>
- <inline>0x07c6ad13ec3f441bf9b044ec5c6dea2d97931ba055,0x048aebb47664dcb5cd151c1a0a75794fb3bd95576b</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>k163/45</id>
- <inline>0x07ddf92a5fdae42abb69ac16effb5b490bcd9d227f,0x054cba3811aad6a68bc5315cb4a7211060cbe1fe36</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>k163/46</id>
- <inline>0x03159acd03e5cb566183271b4cc69e233d10f60aa7,0x06c225da0617fc30fbcbfe7316317b8fa604a7ae70</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>k163/47</id>
- <inline>0x0150d07395554bb30f89c2ae1b077c2d08db17cf19,0x01216494f1a85627594e98352c2ae5ffd717e0d754</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>k163/48</id>
- <inline>0x05bd14dc19215e372e27db63bf7ad69077db7ecd2e,0x05c9470edff53bee9be27070c25da993a6b63fbfeb</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>k163/49</id>
- <inline>0x01369e74091a56b27baf27931ebf227e69a09eeb00,0x05e404b5c0084c117fa8db37c42e2f5d606c2ea92c</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>k163/50</id>
- <inline>0x0244683f23734bc731d0966bf901da5a75643b6757,0x01c128ce1f126926898a5f47be7fca98401ef8875e</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>k163/51</id>
- <inline>0x04696b2286a4c2adf90d504ada7f932b947ff5c1e6,0x04fdf518b9c69045f0d7e7fe732299c3587c9373f1</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>k163/52</id>
- <inline>0x050d73d1c8de565612a4db976427ae43c155c4e29d,0x01eccc79d0eaba13263ef9b133561ca59d7b1bbc75</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>k163/53</id>
- <inline>0x064a96d22b4b43a307d4a1282ddefa701f75ecff39,0x05528cff88e88b2973b507f0d50a9a8131f7f65a9e</inline>
- <curve>nist/K-163</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/nist/k233.xml b/src/cz/crcs/ectester/data/invalid/nist/k233.xml
deleted file mode 100644
index 250c9df..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/k233.xml
+++ /dev/null
@@ -1,427 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k233/0</id>
- <inline>0x00000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>k233/1</id>
- <inline>0x0665910471e7c8069040cd6c56f155108e98951c42a8715229ec1b07478,0x0c2ddbb9d27282bb89ab53ca60c5bdb1c870b0b3cc77a2860961b84ed63</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>k233/2</id>
- <inline>0x01b28d9d1c625d693013e63222ae2f28eea9de53667605e268b446c69a99,0x0d81ae0dc707dd6a7ed7c1ad13d149a8b671ccb1450a8e4eee29629c3a4</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>k233/3</id>
- <inline>0x0158298dbafe03ac28cbc7a2c4494f43f453593f6eb2162663e2cbf886a7,0x01ba54211282501a8c76039a081972e17c15d634f828aecca69bae916813</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>k233/4</id>
- <inline>0x08050533a5bb38c0575c0f569a698dd4aec10752e7b2a9899b439259877,0x01886464d57deb6726c0798f2e21dee8e57c6563ba4efe172a313161d91</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>k233/5</id>
- <inline>0x014da58bffd9541bcd8176d66fccc440864c56ec8da466e102b1f621ad94,0x01ef1bc065af5a8eb5b99b449b461ffdfd25d7b8a34436734c60de8446e</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>k233/6</id>
- <inline>0x0e0d800fbec84ecc512f35de8c6a5363aa35c21cbdbf51ee176cd625f7b,0x05a75cf71da3f079ed663e8334d04f49a19cc337ce3955efd0d11f8075c</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>k233/7</id>
- <inline>0x01a2b7512c32d10d1965bb7fe2a737fe59f7db2ea455617d0191e84b6445,0x016dcd68bc3a9abe5a00efbf930f84dbd676a4c595314088669976dca20a</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>k233/8</id>
- <inline>0x0d6814b441bc498c9cbcd375b6a4d54f1f732f2628f1509650ec647ad87,0x013cc74e4b939b446b63c7ff6b7e7571fa01a1432bc7958a28773ae64bff</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>k233/9</id>
- <inline>0x0193d8ff00ac50effd52134acd2f15c51e452727a948b310c367328dcc,0x01bed4420061e99f86f9e4f87092dde4f9a0f8ffb91164f175619ed01f8d</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>k233/10</id>
- <inline>0x0128dc1bb2c7f691269c91c2c3a97375352b4ae89aedc3e9b70c27e8cb37,0x015f05aa4e9437b4991b2532f59aa91784b4cc3edb7df747447b33cb5b31</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>k233/11</id>
- <inline>0x071e34b19c6201b3d71ec452af201eaf8639c37f0a0100cfe1bb78de703,0x0733c5ea24a38b2c2bfb7ff73d5df7f926421671fb60a1525574f8b400d</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>k233/12</id>
- <inline>0x013bea689c338fbfdf713b1ff8d71bf5580c700cbbbf911eccb765520cfc,0x0f6c0ad7dd750e8ee565dcb3a40a3c07c21e111c8a91c2ff2776fba6516</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>k233/13</id>
- <inline>0x09b3d92f94ae04fa0f83ca0da7f57ddc4cc528cd77381a7c3657268573c,0x0ec46a8e3eabd81376a808ccec0a098e3544abdd6114a4aafdbbfcb2397</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>k233/14</id>
- <inline>0x03fa2195cd936ea8e00ca032b61b855790b8d6354f26dfe9b577553f8fb,0x044e64e8ce820c5555cbeedeafedc0e1898939db86f1c60c0f9d89f9fbf</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>k233/15</id>
- <inline>0x01619638dfc7d66ad6d28b49b4e66d2293f6aa1d9aa57ddc4886de0317f3,0x04b92e3c95d4087215a644330c11c3364782b09a2414263f7ab8df90d76</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>k233/16</id>
- <inline>0x0bd6d464d93d162a372823080998b761ac66de8bf4ceb4f1a3091697945,0x0b12d5ef510c99127506af2067eac58c7e3dccac4349795ac3ea6008e58</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>k233/17</id>
- <inline>0x01c5424b19abd81a0bac3371c4e0a3364350a9126f359b178560f4fde00a,0x032a99c3aadf52c6ceedb9b786dc6e5fa3db8b769922f86baddbc7c4c79</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>k233/18</id>
- <inline>0x0a7c293e9677eb6b78d05b0cd42992fe21e74abfd00bb1402bdcfc9c6b4,0x01e4b93345b4c0cde539aa980998447567ababd8b62bf3c309882180d0fb</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>k233/19</id>
- <inline>0x0109f61ac8bb31f61e910c8f081a03213753f157b06de71d3da460e8bf02,0x01cb85fef71d116dadaf4cb08a6fa7bd9b044cbc9da4d46bdb6ee8c79fe</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>k233/20</id>
- <inline>0x01cb157a75ba450b59b6d214c7e0cad9bdbe640cea05c0a617acf50a53d7,0x064fd4ed91ed4089e71c1d299f935a8743505b73ed6725e24d277566c20</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>k233/21</id>
- <inline>0x013b849674baacd6a03daa62d2d1909f299df47735d6911bfa1a8ebdf31b,0x0497be0480d5e672890d73fd9ab83e891c5bdc5ce22e73079d708dd4d97</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>k233/22</id>
- <inline>0x08450d7779fe02fbe0311f842da5681032aaff9402b0d2c439c207c854c,0x01f57464bccdf31fb004f315e3960a3466a5852fcb15fcfbacef0f95fa90</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>k233/23</id>
- <inline>0x0dfa2f479313558610b47f089572dbce1c3737cc8d41f907c47b896068e,0x0b94423bf46ff2581652bfd16e621678987507053095596fb103368a9a6</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>k233/24</id>
- <inline>0x087adc0a66a15da581182a42c9018218502813a151c0c4a711b4e124d99,0x06cc9cd9198191cedc27a3d9ada6f56a799720fa9cce56b403165ba0170</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>k233/25</id>
- <inline>0x003759086db1168f4dbdb82a8ed8bfc81c471c838e6894c134179a30fd91,0x008919a53ddfff6cc766b46bb44d1a9e6aba434605162f77c812f45167cc</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>k233/26</id>
- <inline>0x00aeaee6bbf3e5db3666c68833f45fa70acfcae0cfc47dd52e8f9cc047f7,0x0051ce23fbd60e86ae8b024bd3fc7cea2903feb09cddb37b998e4337b287</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>k233/27</id>
- <inline>0x00ec34221ea56f7cba306d293218cdcb5b779c748f7efe6f04af292d64b6,0x006991b62bf8950308d3276a4371e2b3d447a06332a778d133982380c298</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>k233/28</id>
- <inline>0x01b3e98707e5fea3ea2e9af10fa2b80a69da00044bae4131c534de67ebfd,0x00bce8e3d468c29078c94b603a6f5904d0c8dc3e788e8aa036883e54c6ba</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>k233/29</id>
- <inline>0x013334a5a14c1c76db51a9c2631ab8ecb7459be4b7f9f83bb9dfafe4f5b5,0x00543f2a0b3c73eb03fb7fd42001a932cfa9483b8f6128fa82e3d7385a91</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>k233/30</id>
- <inline>0x00253ff4f67bdca75a25d07f725aaaeb721ecbd6a503eed131903fd2df7f,0x00f83ff87668775647e56a5a34ea56993994123bbe7ecf9e33f11ef95f1c</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>k233/31</id>
- <inline>0x01c6c3178990ef63b0d80dcedd8ee60a8fa3690cd1e2cfa1fb1da0b0e274,0x006b3856de656973844f666b87fe84381680f3f4e57e46969b92d4a5a800</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>k233/32</id>
- <inline>0x01280b5cf701d2d3e2e070a1b53aee76fda1e28395fe7559bb43b9f76fd6,0x01ca372d4eb9580f4b1e05815948cf6b2d182d696b892ad13c54fd13a845</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>k233/33</id>
- <inline>0x0061f096f7841265275bdd459b13f4232f995ba0545103eb228883cf8bb7,0x006d485bcc52137cacc384e46276969debc22fe0c29dd5a6f369214decb6</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>k233/34</id>
- <inline>0x00f80bfe6b38d3e179dacab6bf20afacee932b94039c58520f323d1a2189,0x011eca4d5dec4e22f4180f99afcee1c8eae6ac864484c152a0e454eb6bef</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>k233/35</id>
- <inline>0x015d62b25ac88bf56f1289055eea46cd2600ed16bf05f10b5e3002f5c31b,0x0003e163c1182c7ab31f1ada5f34e7e9ad014550db98fb01bd33f4f63c7d</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>k233/36</id>
- <inline>0x0010cf0e5722e529b777a8ac57bc11fb55836c542fe23dd9ff2e326c2831,0x01bd34ec7982de5a7290c7f17a7d5d99c035abf3a54ac1cfd15dd11fcb19</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>k233/37</id>
- <inline>0x0111b77e99b3fab22fba1d28f214a6feeb0d4f9539f34d3401ee7511aa4c,0x013bb7d343a1e3f7834d12e4e25d55dbccf44498e2222e12efe3fe4ec072</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>k233/38</id>
- <inline>0x01809d02b28528f2a605e1c59b79c262336fa8fe54b7a6ec901f0e7e0295,0x0160c58b96c23bd34cb1336ae409933f5b088e0ce3ac7fe7a0df2b406dad</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>k233/39</id>
- <inline>0x01a482b426161d2517af9a33eb392d2bc07d9b44051fb209f76de41c2bc1,0x01be48f5e6546195c453a646f631ea003044ee80d12062984e29c84c13ba</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>k233/40</id>
- <inline>0x0010481fb1a84ad81a39a0e5c7ddf76a06110ddf7a059dcc1faa272febc1,0x01f4a3edbf9dd7394bec4345f1a406b9e603a8ba051b8e8846dbc6efb4fb</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>k233/41</id>
- <inline>0x0040d7ca7b4dc19ef788b99fcd071a0c528c43fac1af077ff3dd90de763b,0x00b3dbb8d2f52c0ce8dc671d8f3e88f9aa81553c5022c464f69bfe41c01b</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>k233/42</id>
- <inline>0x01b515fec3d612339ef64182ab9170b31f0846c097674dce4e65fa25cd7a,0x01e61bbd05569e358b48d9e0092185c6c929f0dac0e319f11bd88f98b825</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>k233/43</id>
- <inline>0x00e5ab97b9baf539437e5121d0c7bf5c5a27981ed3754a097d3f70ea2c14,0x01ada3138dd3f0b6619886364d7aac358345a213fa0c5329cdd4f80bceeb</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>k233/44</id>
- <inline>0x00a72b6e55e1671dc3495682c3e61f59f42f213d138c743b28cb47acee16,0x01660cd9b3bde41058737fe268f190e56f650b7a26d69d54d6729ee5f7cf</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>k233/45</id>
- <inline>0x01f4fc414e30e6a62af37a9f2182ec257040cfae45dbabbd91e94854372e,0x0000439167fa5ef5268f7dec7e283b0bb0901df3a019e2d05522cda022af</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>k233/46</id>
- <inline>0x00fd92f8cc957799a6992df609b4b4686067296e55c7d40fecbf2ae73446,0x01a1b81ed1c2343fb871140a35250f208f7b5866d707b9eaea32f201bfbd</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>k233/47</id>
- <inline>0x00862c30c196db1ff2cb5c2a0658ce1dc71fc9a1c806c9403a0bdb7124a8,0x00e27b48f59e5c2b6d80ab13fbf731a573379f6f0eec2137f15db3d4cfa8</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>k233/48</id>
- <inline>0x015664849942fd80559f6106996263e873a84e443ad6326a94d87afac60e,0x01fc71fccaded3864613c51319cf82c590025ae8a8cd1bc599dc068d6cf2</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>k233/49</id>
- <inline>0x0197a0e7c5be80f7d93585ce09b3ad6ddd1af17b120944d8f901def9e57d,0x004a8d32875236444c95646768552bc22f50ae34d2d233d861c700aa8718</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>k233/50</id>
- <inline>0x0031a468a02abf854bcfd030a4e0bfd428651d53cb979acf79bb886c9d53,0x014b7dd1a68001c25947182184d76ad901f6f52da7e9834867c742532f42</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>k233/51</id>
- <inline>0x004ffb6c6c40e18a26c86ae9f454efbc6a11cd5b7e2045a0ba1c27fdd73a,0x01524360ad03e1191faeb9da9f45cce204221d06d4eb6b5de21a8c572b92</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>k233/52</id>
- <inline>0x017dd43136faec3526ef448ebd1bcb57e532cff31eaa2251cb03b40ab1f0,0x00b43e5518404f534e7d5607a22d0d69e364a0ae0edcae133806555376be</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>k233/53</id>
- <inline>0x0166fefca250ad4b636d8fa99303c8e9b7b1daca1d47d08173948c4806bb,0x016524e665a5edc829a767ca6fbbab76a252028f85122f08296956ccac76</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>k233/54</id>
- <inline>0x004aa9b7e02161e984051d587f09661f391d3a3db225b6283070412c4c66,0x01ca90eb55786a0555976dfbced6160f1dcca52d051c8f12f138ff268e4d</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>k233/55</id>
- <inline>0x00c351dfccee35e89ce463c7a40f521f46a0777345237a50c487d88e962c,0x0106d0b50d08c7c16107767d8ccac32238dbd2539317487d8f8fda44432a</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>k233/56</id>
- <inline>0x00f0d2b7c68e062b70aa8b51c745bdf4e941d1736ec4fca525003c1684dd,0x01723f640c4b75aa4b98f5ef3e08ac2bc64404b1c843d66408db71beebc6</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>k233/57</id>
- <inline>0x0075b00fbe53ba943498601e5b3c1283684dcdc923e011a44e738de58a86,0x00490c152282d6cad043ebcff0303ccdea1cb92bd2998746d3319a500908</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>k233/58</id>
- <inline>0x015340e79b9913116f2b13dcdf19dce4e862df49bb24526c355059180f8c,0x01426db6fd4183ab0d0cb10cdb89104907da90c0a56cf77db0f5d52f1211</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>k233/59</id>
- <inline>0x012869ab756cf31b721eec0b6bd3a1b5f66858150bae5bcaf156dabbc265,0x0149731cf7d13202a338fce6f903049c14ff13bef535418f3625f9b3ebf3</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>k233/60</id>
- <inline>0x01bcaedec07cd7804abdcaed85ae15406fc7717758f06a77c61b5d5ba73b,0x003c809ca8961fe74476a678238f097ebb685677888306fdb616642ba12f</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>k233/61</id>
- <inline>0x0079a405e6eac612c9e76fb540b41ed73fe31c940d642e101cf1277a5d60,0x01451e53092911841afd8c9e3b3b0515b44680840b874ba347a2debd7c1e</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>k233/62</id>
- <inline>0x00f5a3b8d0544b10b7a0cd95bf931acfa23d3003a0d85eeb3eef0715bb0b,0x00aed1ccfc130cbcb46ec7f923ff68d2712226588967a3fd7b469b3431de</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>k233/63</id>
- <inline>0x011de1b82bc3409a58758e2f5f4e34dab9a52ab98762577657f10cfe5533,0x01886640e5b820404753c11995ddff63ea6e9cb16f9cf6d65dacc243aeb9</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>k233/64</id>
- <inline>0x009360a0162c7e80b22f9bbd251e4dad4de143957703844f8b5cc6dd8691,0x01551f1dc308d1ba13a4c567c8d9ba378050540d3659d888dd1fb925aee2</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>k233/65</id>
- <inline>0x011b7ca56f15932a072c2974d893ef13454a60f4540db009367b475d5d0e,0x01ffc609a5d34c624949f09838f4371950dbc79dff0aef485c6d3c5f5f4a</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>k233/66</id>
- <inline>0x010c1c2585b0b77a3b9726996f090fa83d937aef46c4800b39632f29e3c8,0x01749ea8aee37239d24a71ac80b40352d16ef03192e6c8f9c7a1756a8727</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>k233/67</id>
- <inline>0x0014b01a5c4b4154760ba46f00e2bd40ad9c96fef6da596a8ed1fe8050fd,0x013b9db83176fee073099294b4c15e1dc2fb65fff22499ba187e96862128</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>k233/68</id>
- <inline>0x0057f9ec1cf4c06588b90ed7932b614d0446a539449ee2b2e8548b38c30a,0x00132995ab8dad93de7e37b459e00cf693fd500cf0f3a76351d80943a58a</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>k233/69</id>
- <inline>0x015c9d67e834aeea98c852dbde13cc0007d8004becdee67676cae6cc5630,0x01c1e9662b93c85c1255f70f0df15534a08898db505140c36c7dcd1ef242</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>k233/70</id>
- <inline>0x015521da657de63d02cc03dcf4a1416d16e75d627e2660358b9fb7658d1c,0x00697153844ab2917d908b756529ee8b8cf6ef7b1bab46ae7f422b57a899</inline>
- <curve>nist/K-233</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/nist/k283.xml b/src/cz/crcs/ectester/data/invalid/nist/k283.xml
deleted file mode 100644
index 38e3659..0000000
--- a/src/cz/crcs/ectester/data/invalid/nist/k283.xml
+++ /dev/null
@@ -1,499 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k283/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>k283/1</id>
- <inline>0x03520239d5711e6da0766bd315b6bab3e9b3dc861018cd18be176416633de044405f68a0,0x024dceb466657371942f5e8ee691285b54e1fd6c624592bff1ff0bf3f1d1704d4dcdb0ab</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>k283/2</id>
- <inline>0x01005789e764397c1cd351854505cfaaf02522a1eba9521581416db7e103c5cfccdc7a3c,0x072e96807a5a395fad9544c91d927dbff547cfc59ce1a79268eb98e1cba2a18760d02835</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>k283/3</id>
- <inline>0x05db42ce8d49b94354cf83be446f6a852f13419d567bde4872954feba26ab90730b0ba7e,0x067ad7bd0a19ac54d7a18d10c3758cd82a724be53258ab486f1d04a21e9c763fa8a8a0b9</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>k283/4</id>
- <inline>0x05023aa320422183f2f5b54ec0e43077321a76cb54c4ccbb2a80433c4f5b062023bc08ea,0x07c1b1d3b352bf0ae6bc63ea9fea78511c8ded6b432ba6aca48d5be9682e7e88ea1f678e</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>k283/5</id>
- <inline>0x02b83282f33031ecf864d7381ad97bed0c5731c0742d4d08dcf62f9442551f0cccd23cda,0x03e3aad26816adbd0da54334a0c5e0d533442c3f50e1ef1bb6775fed51fb431cea6539b6</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>k283/6</id>
- <inline>0x069cf151b88c37ad012667207ac96126870ef533f6ade97b7e599e5187e4fe862f4852cb,0x011421965bf8fadb99d7842065ef8b534f8c4b0b2e8926b778e2db8ce18e4377ca687840</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>k283/7</id>
- <inline>0x031539e2a896bdafe7667552705e3e5a3b239ddc5dfc947fdd6e156c2d647cc0cf260876,0x06511462b1f32edf3d97aba01f11edce3ac09100d6f1d88a96fdd3b9571b10642f3584e8</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>k283/8</id>
- <inline>0x02a9bca8a330b05ae93fe1d3a1765e217b0a0b1d5ac33964a56a82b0761feb0ea1e14e5d,0x00ac6dafc567e9deee00f46f85c99ae0e2833d85f4ae2f93da103e31bb919d9511d0bc13</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>k283/9</id>
- <inline>0x0204bf246ac49a43786011ed88294ef64e81d619c2a3adab1a1d5486374297bec4f5f417,0x005047e68a57270f5d06151e5945a21a1eb5ebf7003eaa8f7cc0a73e151cac393be42555</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>k283/10</id>
- <inline>0x066a58d2c5e5f359e07b8aba0f51bf265506ad6ea9056b4960054f97d09ed804b2fd832a,0x00c3a94674299e3f172c0dcdee6862564b066cbdd0d7ea8ec3a56b4a4b888645021c3dc8</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>k283/11</id>
- <inline>0x004e986c1d88aaccc3ccf9c2127c95ee94f62a3da616520d4d576d7760d6da5f73746079,0x048dcee8e0060ab212e41e7e0690716cf8f08a95da4f04ea5bff9d0a53ff1082490ea227</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>k283/12</id>
- <inline>0x01cae445b2514fed0c5de888af2bc78ca2b027afa89fdbf4369dcbb8ef72dde0a4a11e2b,0x068dadaac2b5f3f4537673f15ab60bedfad85ed572d52ea5ca442588c04f8d1381ca798c</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>k283/13</id>
- <inline>0x05f7d635e6746d7c9eea829d04d9745048695065cd511a58b8464d24a44fc5e71e1def95,0x076ca018a1e1c2a70adc6b71c0962bc0c9ea2d1547c5ca144707b69eee89568e27203b9d</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>k283/14</id>
- <inline>0x075da5e02dbcf8aa297d29a864337933da2ea4878a3204b48bbb61382534df18e42e277b,0x028be753fe94b786153bb2cf39d99d003ee21854cec804c94ea80d4921ad8242459b33c9</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>k283/15</id>
- <inline>0x0746ad67f584bfb0966b460415b2f759b3cc26b170701330c179112be3548d37f834e855,0x00286f49938aead51f1b16340fb7e4c456d277b631258d3b23d0bc61eab287bbfc37664b</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>k283/16</id>
- <inline>0x040f67d68533c2e8fb935fbdb961e97da93a6b41a563d328be0f7741d0fa8bfeaf20c400,0x070bab7b93f1da2a817371cd811900e1bce63c8c45036f01a817c4cfcaecead368a39261</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>k283/17</id>
- <inline>0x06784fd10e5f7bd7ffc70f6985286d763ea5210b7d9900d92f5f7a7924ad8323acd7b21a,0x0197adb44a915cff68f134cf7195ad98ccfee67347ae69966b7e223507da0fb4c3195e4c</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>k283/18</id>
- <inline>0x0205aa25a9844d29700a7265e241c1a812f750e4f2482f2f8b26aa093e5254bc46752e77,0x02fea8b057b083bbc332067f628dc16237f01257dbd4375faff91cb699eb4fe564370c01</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>k283/19</id>
- <inline>0x0036cc5407e19b9297b0b15658592c9318b2dccdc4bbea7ea130edc793185c6b1f839d9d,0x05728bbd3ac6b74ef047fd5e4bf96e54597bb73801351e8b6a35217ea5c050cf32fe2006</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>k283/20</id>
- <inline>0x0139a00b65d9f55e36e6b3f49130a1d3df797b225f00c5ff76d7ec0b29cebb8fc18657ef,0x01c685b02d9aab76656a57887a63b3748f11b9076450803dc777827e712dacc73e64d92a</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>k283/21</id>
- <inline>0x0267423b3e9e222ac6375df239dc8a4ed23cc0c2dcb2643f2f695f625de1300a2a161b38,0x03604a1d43ee84b4bf941ed237a19e307bf4d8f01a12b3d15775d41cba862b66c2c17a09</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>k283/22</id>
- <inline>0x022c5840d8b2785fd6ab192edba8b0ad54e278d11220d349d30590407347dedead51ed36,0x059fe27815e9e9614b80cd0ca3f7e326d28ec008f7aaf71007b98be67bc269ee611e8c62</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>k283/23</id>
- <inline>0x02fcf47ff9b36efe8f592e975593fcac0822c333c6e81215303cd5d79084cd23a1121c07,0x05dbbf6ad00a100ba6d78c47858eb30f4fff4c810ac24ecdb84fc05960c4f7e2a2378732</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>k283/24</id>
- <inline>0x06e4252ebed88afd0b37f96e6bb745c399d5ef50eb1eb146bf565e2ca5480e5462989f04,0x001e729c375dd3a162fa76e3cb371ab753c2a154608b2a23a0e99a241a093d7330861a10</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>k283/25</id>
- <inline>0x0215a1e2e6470a86248b313db5e95721518a91396c648ce9c9a29469f2aafe9e9a821a7f,0x061b56cf94747d65432e13c3fd1489f3616e8055e03f7981dfe6157c2f4e6f15b6909cad</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>k283/26</id>
- <inline>0x01ee87fff02d953ab6ef3960153057a9b7928264cf95e0500eb03d6850c90b3f222a8c3f,0x03bc2c2b2adaeff8e8c75eb747674544af02635e2e869cedfdf1e0bab2da6bd3f3592196</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>k283/27</id>
- <inline>0x07e0698ded14808847196b84625619a39c7f4851413551b7ce31ec78dc2681e6da09fc52,0x04290a333d8e7535b14a3134bba5f322cde3ced0188527a73ed3722b85df6f3bca79deb3</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>k283/28</id>
- <inline>0x02b3dd6ccb194b93ab25df65698b4b5fd9015b7f0b9839a06c07a78130d1d4b39d2296a9,0x0498a7d308d06d3b82e68564ec530c440f3af854188073717ab35273044556fc90556cc5</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>k283/29</id>
- <inline>0x03c951be5d86312d67f1bd0d39f6c34f156b438ccae509652d66c06c2d2fc9522829714a,0x0613cabce8c954e5d9bc4c23e3e1f5dfbe361f19e48c227cebcb0983fde98266a79b30ca</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>k283/30</id>
- <inline>0x01735d42a2e9ea59f48531e68f2bc0eb5cff12534860c8ef773fc9fa528bb896c24f17b4,0x05a73ee796d1f4d751f291ad7ee880952d380d64d7fe32d478734b9f2f1396e2b2d8d3e7</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>k283/31</id>
- <inline>0x045ef742138e33bd592d5a53b00f7d61814a68e2576c518c90bb64ef12195d6516860d4f,0x03da85db791285f032ea0fefd5cb6a9a0b371f00270d108549fa7363eb8824cf6d53afa3</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>k283/32</id>
- <inline>0x038d6b2080c7e19ec8011fc1c4f0957524ea71babd3993220776a4d9a8dc7b0cca05d638,0x034190739a5065de70bfeff1b3176c75d90858ad63e6f9078f32cc97d5c2a1c0bb0be775</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>k283/33</id>
- <inline>0x03f9a414344e88096515b6bce427f0cad2aa7d08f41cbd7d1072d939a033f2b9bdaa705f,0x0055c2a28cc02b64228b59a7115f244d0ed86ef72d35e5fdb4a7e8e514746f0164326dda</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>k283/34</id>
- <inline>0x03866a5cf304aca769e4ba87e00491679a22dd73ebe0e831f91fa2a766ede55791ea6114,0x06d407001a2108571bbf87f0c97ee6161860f1da477f72ced58651206766a0d40d297b9a</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>k283/35</id>
- <inline>0x015e790dce7c01d569a6a4e83c7d0b4e0b3611813edc92f329f8eb813b5a484e82ffa30a,0x0728a46e00818615945625af56cd2e3eb97ca2c7b6094565a03b18197426fe3f4a335b4b</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>k283/36</id>
- <inline>0x071bb5c037fcd2cafa8f4ab94aad61cb75ae960de5c2a3742c56c86d4cf73bba4788e161,0x03aa0c2bb3e5cd30b982c4d4890763f827d63fb4f7db81c049ff9696f449434520d2361f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>k283/37</id>
- <inline>0x03d7caa3d27bbce12fc9f8cb6ede8075360b16482fe6f2449e09923b6983ea6e2010b2d1,0x0126fa7e0e8ce1c8d248b99759c728031cb7ee6e757f5064a5472715bea5eaeb9c7a19a5</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>k283/38</id>
- <inline>0x0087dfc115b8b453ba77ec658599debf75b6f6f7436051733bf0582651f994085a9f94e1,0x054e2ad467a2f4b751fdc4dcc524ff6ea7fe6b26ba49e1760543b7f537d015c24318d77d</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>k283/39</id>
- <inline>0x00eba36a3ecc111c1438df4d9f39a9d64f18d0ed35401b691e0f7c29ce21bd65eb6d6e0d,0x01585df01551fdc0cfc206b0dc7490237c9e8d5548687a1a6c0b8556508bdff27b1f9927</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>k283/40</id>
- <inline>0x00eabd41943fb772b790ebb1f22c07da6aced704b75f38b48bd84469c1a73c82c547ec31,0x013ecdeb327ee1bcf235c8e6769540b84231721daf090b6707c7949d58af96f1cfb98b8a</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>k283/41</id>
- <inline>0x05031d17a2fdd89ca888ab817cfd7180585bfa3a68c0ce2dd149bcc79b26bbe46ad58d1c,0x03d0741ebb1cfd7134ebd26d4bd558252d91510fb3543dabaa2777b6a5283faf35a9d9ba</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>k283/42</id>
- <inline>0x033935f57cf8f2b81f6865f3f6b904d302842f23278a4a338096de30430fc6f1bbf83fb6,0x0132f461c93d373f41fe985dbc5aaee79cc93bb761164244f0689eaa88dd2c3d69061ec3</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>k283/43</id>
- <inline>0x00db03ca6af0780f4a2f3e11dccfbff969b2dbf8b80c7adc1abc97a0624e936eed835be8,0x038c43f05f76cb717fb5369af974da70dfa56b1748e891201ae78f0420b6f9442bf142ea</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>k283/44</id>
- <inline>0x047f0e5229522fc4b7d100fd89e34969edf03e51cade01da9027469f4676615bc9a10aae,0x01ba20b98a6cca3ab4ef69af34627266f8c3846990c4c81af95a3cbef307e18f32b4235f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>k283/45</id>
- <inline>0x034c036dd7609844a2af553432d1e6ae7e76acf264ea74cf9e3ddbe1c87e8982a837150e,0x04fa41cdcd8ca21ceb5c1def1a951798de9c9fcc6e3c9314519d8acf8a1c5dc7f48fd3a6</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>k283/46</id>
- <inline>0x03be5716392d8d0e7f06a61ce734300152d1e6c0dfe67273a71dbb53e7372de85a411144,0x00b5b4c319f77918dd4f8a6816e03432e8a4e48c2c9bc2f634453196f400cf948d8d8729</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>k283/47</id>
- <inline>0x0152dfcf46706d794166ae93b3243fcdea735fc0adff7c5d04a561ed72efb09bdaeb8a99,0x016bb4eafc64cefefd17799e5e95ec1a7c477d4bb6c40319c78a090ce865e6740feabe80</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>k283/48</id>
- <inline>0x001b61d9a7ec9d5735221b2024698b395c9b514961a9950e8905156a1bd340027e8f24a0,0x030b64d5fc76e480a2e6540ead5c5b6792db5f30113f1f7648cad89cf9906db225c27c11</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>k283/49</id>
- <inline>0x009a80217581cb5a3b9a9bebfff26df4eca8dd9cb6400328056b4cc98bd4f63da2abebb5,0x02f0139f643dabae905a11f6daf19cf343ff4ffb3fbf32e9170af0074616f34822f1cca0</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>k283/50</id>
- <inline>0x074707ed5fb2387c70bd4e6904361ed287c26da4c219e11c0e6f1aacccdf646a81ebd65e,0x013e1f4f50388e98213e585a258441876ab20597be1b09bde0164498cda65e780cec4e1f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>k283/51</id>
- <inline>0x064af07c046462a89c07e2d885807ad572a9a4fb105fa8b2568222036362a1e7b6d07cb1,0x039c1e0f266b2ad2038453afe9bbf50a79eac46a1a5b223a0182f502619c9c8b8e26f15e</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>k283/52</id>
- <inline>0x056c5dbcdde389b503d537affd651a35e51df20361438e503ddebe9cbbcc5b92bb24a898,0x058634c14ac8853a3936aebcc638a1a0c449e4f6344f45b8bdd0b34b628a61c7c24d6ed6</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>k283/53</id>
- <inline>0x05e033c49007c1200d78a43a5ac1b92a063f217d3cc5448180cd2d0abc3ed6f4d0a28c7c,0x072f2c8eb5711e3953524dbed610a7e2e474bd6cd83bb02b14dcb66ab8bfd545489f4747</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>k283/54</id>
- <inline>0x07756b00d6643155e6fa08055485db9dfd44bcfbffa346b563f5508681225e4076777cc2,0x04257635918005d8f622d0bef4ae4fa77c8ba31c1bd641017c96bb49d87da63148e958fc</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>k283/55</id>
- <inline>0x069614948a5bb9f3c7c08bab2cdb789e04ff0698365f7911a15c475718d984acd1185164,0x02469f3d1e149f38fea73b08ef745f9535f0efdee4ec6875780a13324342ee291e672bd9</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>k283/56</id>
- <inline>0x045c409e181b2702ba016ba742efc6bb26b13c167bfdf3fb8ffe388c6670aba7ea4aecde,0x047a00b60562c782e96e0d8ef77a222dd1bad984798c62508a1dbc4d584bf52aec76f5f4</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>k283/57</id>
- <inline>0x01776fee2ffe3be472596778cdcf4f7e85040ac22422800e55198736de7baeb9e442df8a,0x07228f25bb3bad587012e84081b22e618c997bf4d670033073188eb32e508b2aabbd5394</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>k283/58</id>
- <inline>0x01989ab5f540f531878302e5af67be36edb3047a2fecc14209a4891df98f5f1172ce94a1,0x02d31b77182c691ada9dc13d7f8a0d6d33449aae51d1399651f11ed29e8bf8876d9601de</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>k283/59</id>
- <inline>0x02e720a463ab0d7169633d509eee85f1d01af7db38f1321611df44c289f4b30f582644ee,0x067cc0488ebe9018efeb41fbebdc78aa16273e3a374b727ef37f4ba98e0d5b22c2bf93f1</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>k283/60</id>
- <inline>0x045abb40da72a6a2e1d339341cb0196714df4781ab2b6125fe57c515f57f0e87083b1563,0x025fb584e3114e09e59a3b790f0dce6d1a05fdf92184c61c08c9bc583340a222fa2ba65a</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>k283/61</id>
- <inline>0x018d1a29ee3b45e46ce2123716e8eac99a72d3f82265c62fb3475c1dba95c084e4d2cf70,0x04bbc68c393af4338ec9789ad0ee42698ebf77f917bcfd54d36f37e717e77665e2e58377</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>k283/62</id>
- <inline>0x07a20cc4cb733b1517db885aae0c6b727a0bb48287621e28a86cbcb662b95d878576cb08,0x06beb9ed1b77020083c106e83bd8c4a583922066a9ed2c3701097d37154062b8069e6535</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>k283/63</id>
- <inline>0x006e09c1e09d707ae19515d9740511055a31a4cb81ab76fb3700ace52b0f4eb9a582ecec,0x05eaa33f749f96a24642b9d1a4aa4c72bd586524bf9f38c0b7eebcd7cc7ae9ca472b8b25</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>k283/64</id>
- <inline>0x07776474e70c432a4ea47d2c467f4f1dabefbcd72f2f29a69f89e58de40f38ae4c7be1c6,0x04fc23f823175c19f193c1451989a50a1d4809ee5eb92a889f7e994073336e35c7314a09</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>k283/65</id>
- <inline>0x07f593e5ac6260073a5e437247a787d6f0c0b85a0ec56333677132142b287668aab1d379,0x015ee4c48f9bb3dd25051715366175915a303755a977c6e4efc1af3c81d59c784d75dc5a</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>k283/66</id>
- <inline>0x07f8798f7767ff59143d2d4ab30244ac831edef69be00c2b565a561d7f78ace112bb9230,0x02e451e724182b7d0d7868ba28db451f4f31eaccc4a88528f37652eb2a882bd519d9178f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>k283/67</id>
- <inline>0x00ef234ba82ae60338ad03aad81346e5a9b32fe948f419955104fb10d2a77c2e6c3d2bce,0x053de1b2f1c223efe0a55df95bf3466247208414febb5819e08251a59946688dc8a6675b</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>k283/68</id>
- <inline>0x021f71e6831b0bcbbc608eba8a9e910ef9866712389cb94a11b6b9e90e8368fc8c5c42a4,0x07651bec0bfaf5a5d6f8b17f3c6b50ab27df6490465bad17b561a11d16ec650bf63e3219</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>k283/69</id>
- <inline>0x073e9492a7dba813e205c5aa01ac963b66d429626af949657a9fb6b6f7ddde8e941fa9e9,0x03acef3843cb0fdc18414707cff0fe4cccf5925bd2e5390aa997f4745e510753ac7bbdcf</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>k283/70</id>
- <inline>0x06a20dff7cd6caccb1fd3d0ba39eb85ce93463379c8729d00230d39a09c656c4e3602a24,0x006bd2968f953b8558e192449c0ab9fbc8af0e79219ad68a1a01c2575af93fc33e3a2ed8</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>k283/71</id>
- <inline>0x0529d961d987f3646b94dc65cb569f7318cf16ee1e070d833dec3baca88f2c173fd2a5f3,0x0004d6cfe4a9bae00eadca759010fd58c6e9641e57831b12f79490620cd6b577b3aa68ef</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>k283/72</id>
- <inline>0x049680beed139a9bbe22b9f94f6616661a1af69b64e3bdb94b4647ec4c4b5aa21a1f8267,0x061e6f12374a4e23ccdfb871e80c3cc3323a8e3c61362639cd4bd0c0b1ce0f34afe1f52f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 367</desc>
-</pubkey>
-<pubkey>
- <id>k283/73</id>
- <inline>0x035a8d86570b0d875aac35da377cc81dc353d5b374876487d0aff8985e8a78d42e29e1ad,0x028825e8a703adef5db340cdb05c4a9efe1d905c30984b32eb9e516691c260c2aa741e1b</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 373</desc>
-</pubkey>
-<pubkey>
- <id>k283/74</id>
- <inline>0x0503d7f311405772516b2249a62227da0f153ff0a674342448cc072a7415c9d26a147177,0x00b4977d7814592a3ada046ec12c1b746caa943d01da276c2b1e971ba2d95d68814bd368</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 379</desc>
-</pubkey>
-<pubkey>
- <id>k283/75</id>
- <inline>0x028e92f2d80c749260fb98b06407e49658da4c610305b198b39d14481c62684b36d10681,0x013623a6fcc41ca22b9158bfd4b850612569ac0b85ce39fbb584c3499b4ab4308c157b9f</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 383</desc>
-</pubkey>
-<pubkey>
- <id>k283/76</id>
- <inline>0x05c443b6c6d1552c8fd4974be4d85c89129b5f546d7910df96e2421bdfefa37e15a725e4,0x071ed0290df854c4e90e06dad658ec95450e94d25e284555f783d21b151b8128c01a6644</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 389</desc>
-</pubkey>
-<pubkey>
- <id>k283/77</id>
- <inline>0x04cf6f337eda2408d0af8b6577839ad988a4f112ed89052a00172bccd8585313a871efe0,0x00d38f0db3a4adf6c7bd80bfde00f786503045f96904e86838d333e60912f757b4371933</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 397</desc>
-</pubkey>
-<pubkey>
- <id>k283/78</id>
- <inline>0x061c9f66679bfa8dc01503e2c6b8e0cdbda6046a9ab761aa0de82e114f6181419f71cc63,0x0555862ec4ace16a89e0f0a368034475d71c170524e7fc45736240df596eeb4d200258a1</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 401</desc>
-</pubkey>
-<pubkey>
- <id>k283/79</id>
- <inline>0x026e9cae9cf92172ce5a8b144a45b608b71e94b4c2e36ef4153eac64f2186cfcdb31473b,0x0071179370a5607981e5c77ef487f363d785f2175b0665357f9d53063222236f30dff7cc</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 409</desc>
-</pubkey>
-<pubkey>
- <id>k283/80</id>
- <inline>0x0225b65c4e10b8c08732d190d36c4b81f3256c4638d08e43b5d40487f9993934a3ad77cd,0x07db18e8af40291d4f8d370c5356e7ea5a64d445177338a0fb025f0c0b23dac1af163fc6</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 419</desc>
-</pubkey>
-<pubkey>
- <id>k283/81</id>
- <inline>0x07d9621f70c83c44f37753a6fecd9117be6114c04a6cabf4eae3ab2660d17db7869687b8,0x00e0f5221d994f3cedcb6c1fabdeaff6e02a34ab5a9ba93380bf570e013e3e51227ddf3c</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 421</desc>
-</pubkey>
-<pubkey>
- <id>k283/82</id>
- <inline>0x043a92779e79981073bbcf449ff68180fdd4cb491a6731de2a2dd285f232617863336847,0x0500f0252d5def9185311e8f7655a38645fb5aa241b78b3871b9feafff5c68f8bf2f83e7</inline>
- <curve>nist/K-283</curve>
- <desc>invalid order = 431</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml
deleted file mode 100644
index c93b236..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml
+++ /dev/null
@@ -1,266 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp112r1/0</id>
- <inline>0xa58bdc3b9dab98a634ca647d4645,0x0000000000000000000000000000</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/1</id>
- <inline>0x6ed433535907e85bb451f70e72f3,0xd6a53604d5e548e5eadcc69c3f95</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/2</id>
- <inline>0x962227ac8f103034b43bcaa9624a,0x5022ffb6832197b94b8a350f8bbe</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/3</id>
- <inline>0x3f088992a4aa4b02b06c7aa103d6,0xa17ac381c86ae12877c84bb0216c</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/4</id>
- <inline>0x8bd960f42ce43f71feb49184b18b,0x1e07400273aaf39cfcf0d14d7744</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/5</id>
- <inline>0x7a2deed6ffd34b68b829e0475d9c,0x1c31b632d82d2af875de0f21a8a0</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/6</id>
- <inline>0xc286184a5791e3bf40761626e82b,0x64216877ebefe36d911eb669f8bf</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/7</id>
- <inline>0x9ecf08b8fca23c09906d9ac059e6,0xb121844e9493f2973ef51166f2ea</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/8</id>
- <inline>0x5588b4f0dae189bad77076fb4a31,0xd5e9f58535dd14932796ffc821ca</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/9</id>
- <inline>0x7e82cb7c3f9d85b602784a044e22,0xacec7d552506f1792eaa13ba1c5a</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/10</id>
- <inline>0x9809c916b656a7963436ba0485f0,0x38051487d624a3a2f9c9ec0f29a1</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/11</id>
- <inline>0x8b3adbcdcdb18c2cbf0cf9c6b781,0x0e60359cd04af6683496efada8dc</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/12</id>
- <inline>0x4c2a571159aeda8e0ac1856e1575,0x75aa93055a8a7c1565a99a21f08f</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/13</id>
- <inline>0x2a4380165a48a4123b4ac1f103ef,0xc89a173046b66cf225388a8e8392</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/14</id>
- <inline>0x645fbfa393769f8f2d74c9b5b8ef,0x94cb1aa6fbb3dc7a42bdfd8b880d</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/15</id>
- <inline>0x03f5b2a97e4f7d4f73b5771e9d72,0x7be7bdfe3e6d7de20145e0fab394</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/16</id>
- <inline>0xb9687b364eaae021552f80d76007,0xa2c0ce0b77998ddd4de703f52c38</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/17</id>
- <inline>0x5abfe683cb112939a1d90a2939d2,0xd0300cfbed0b2b2ff8e64404b706</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/18</id>
- <inline>0xd75cd76f9dc25f21343050a4241f,0x2fe43a75f7f15ab649dcc467b96e</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/19</id>
- <inline>0xd484c2b709a39a3c084c0c16f094,0x9ce84b26f02d7ef4ea1fa54def15</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/20</id>
- <inline>0x1723919870a0d80077d9a1e450cb,0x0428173a0d15ea25f5a6cfdfc97b</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/21</id>
- <inline>0xbf968536d9c3e8adae410ba0f089,0x90a80446682791fd03ac1dd129e0</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/22</id>
- <inline>0xbeb4f3fd07860c0ef03cd4593e6e,0x7f14be45c4bccc048385eba69b6c</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/23</id>
- <inline>0xd6dacd814f6a887ce2bd9a9387e0,0x9079900ed0147013e8d9d8809693</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/24</id>
- <inline>0x2fa08602ed3becb016ec8271f0d4,0x7bd6ecf28359e30a4655bff5e7cf</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/25</id>
- <inline>0x34c5f199ba83347d9a8b10f59bf3,0x0964245d35298161bd23ff7d6446</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/26</id>
- <inline>0x9a7c29d760628c0bc41bec78fdad,0xc631eb205164b661b3f434fcba40</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/27</id>
- <inline>0xd4432d98d07f3610c1172168deab,0x20ebb0544ef9cf298288654dbb25</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/28</id>
- <inline>0x1ba65039ad27c2e76afca8418f80,0x41503954fe592332325756793c58</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/29</id>
- <inline>0x566dc7a41511b7c2d47d7ec8f7e6,0x0e7ab43ef12082342a02a78555cd</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/30</id>
- <inline>0x6aa85ac394188b73937d62e07c65,0xc0758b109d4ab43ff330822eb911</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/31</id>
- <inline>0x0f821a24ffb775fafc53bbd61542,0x198812c3fb415ada5310065b2741</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/32</id>
- <inline>0x71c4cb1682af26551485f1bb34ba,0x16df985375bb3d4c251c9808f1d0</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/33</id>
- <inline>0x7ce65cf47d6e35cf12b6e8286375,0x4838606ae8854f1baba4c20504ad</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/34</id>
- <inline>0x1d4fc5e81aa29bf009972d275dec,0xaf78918c68e4594d8efd5b444e97</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/35</id>
- <inline>0x2fc7401d1fec104efb18e58cb7a1,0xbc3bc6fa15726f13eaca74a60397</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/36</id>
- <inline>0x3e151dbb79fd9e81b4f5def9093a,0xbe52c24f65c410f831cbe1422bfc</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/37</id>
- <inline>0x01d7750f2e60a9a24916bd0c4334,0x11c38ae3984a3a1188f2b84ff483</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/38</id>
- <inline>0x27c729c996bcefa25821d1072c7e,0x8a61c413d559851412f6224c3137</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/39</id>
- <inline>0x4fa3d8f924136b3b638a0f1dea3b,0xd77c5efa832ddf2418eba9087349</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/40</id>
- <inline>0xbef734759a6acbf7ece5e7e033e2,0x689cd4c5e7623684d4542317c8da</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp112r1/41</id>
- <inline>0x8eac00cf476993c428eaf07c80f1,0x27977f0c5acb323667408f21d143</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/42</id>
- <inline>0x8c5a6233e53b2c6b6fcf33af2726,0x5a04f74d8b5e220e8c23d1f21bb6</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/43</id>
- <inline>0x5a4479a257ed4b9a519f29184712,0x58c11aa81217d4ce67d8f05da930</inline>
- <curve>secg/secp112r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml
deleted file mode 100644
index 49f869a..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml
+++ /dev/null
@@ -1,266 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp112r2/0</id>
- <inline>0xa991c6f86f5bdabfe4d430b3a5dc,0x0000000000000000000000000000</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/1</id>
- <inline>0x58512412f98c28fd098fbe062dbb,0x4f5c43bd225bb40737272887e943</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/2</id>
- <inline>0x504509f066234ef04d9bac06a342,0xc655008dcb955d973989e0e057b1</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/3</id>
- <inline>0x04d927ecb2f7087ea26fa0e59ccc,0xb1dec25114c1755c063c03dbe1cc</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/4</id>
- <inline>0xac0013cba242d37349d73dba87e7,0x7a6830a84f18335adc544814cac3</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/5</id>
- <inline>0xb470988d36e23b04fcb008c5ff7e,0x2e7f9d9778820da3081a89ee976e</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/6</id>
- <inline>0x03b7c03b728345d173f6c865c7c2,0x3243914c4944301261ae61b17801</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/7</id>
- <inline>0x0d857dd6ac32e4249d082c706a95,0x482c8af26f0ede2b945f24787152</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/8</id>
- <inline>0xd7a4e32d96dbfe6505c000af0894,0x9d433c8f712db7926c6a24347749</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/9</id>
- <inline>0x438de089a6ab2678ded91e8b4a43,0x872eccefff5ee60a0c56d827abe3</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/10</id>
- <inline>0x84e48e438a927d34099ea72d723a,0x6cb18571c23f071975f38dbb7570</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/11</id>
- <inline>0x3f2735b8b50f4b477e87b37098ee,0x72d14473abba5b4b64c01d214a1e</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/12</id>
- <inline>0xd826a8bd919e0b3c06cf59cb14d5,0x3001914d35a819b21b6fdcb08303</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/13</id>
- <inline>0xa7b201756d4f9b21aa6eea2d2269,0x9ba6a1c3c652fe403a4e0b627342</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/14</id>
- <inline>0xc24429bde26360cb825de55d3724,0x2d39d3354c80af6119037b3cd854</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/15</id>
- <inline>0xabb16e4874332fa20fef885dcd6c,0x6b09ec3a2eca101c33cd40e05203</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/16</id>
- <inline>0x6f7562c311d5494fa5c3c862396e,0x955dcb80a6168d07d2aeeee53c29</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/17</id>
- <inline>0xd3520e6b7fe46b9eae25f691d2cb,0x26f11be4b177b940dcf8367bdb48</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/18</id>
- <inline>0x10f389e1e1df289c7715ef492d58,0x81f3eba42f18cd0ff7d79a9f8e01</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/19</id>
- <inline>0xb9fd96f926826433666c64f70f6f,0x4deb2aeda4201a18a6772f7598fa</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/20</id>
- <inline>0x228474d915930adb0f6069d9ef89,0x4651f0056e01694c797ddab51bdd</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/21</id>
- <inline>0xb0a65f7b5da7d88d9da8948beccd,0x5727fd0ae26f93adfd27b85cba7b</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/22</id>
- <inline>0x48a289b5e049eefa41c166a649c5,0x3472efa7627d25aefa2e01bbdc5e</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/23</id>
- <inline>0x5a3dced85e768f18904cdebafdee,0xd21360fc187371f6afc1f76e57c8</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/24</id>
- <inline>0xc760ccc276bce27932d9993d33e9,0x5e3c96a38446bc73340c50a8f72d</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/25</id>
- <inline>0x1c7fc32ad4159b86213c207b64fa,0x6e653fb358a0bd891c50880ef1f2</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/26</id>
- <inline>0xd055795ca56a353761ce0baded6c,0x11164de005abc0f5d0ea2d691221</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/27</id>
- <inline>0x8368f5afa9b24ebf635be717d130,0x1c23379997bbcca3af3eec34988e</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/28</id>
- <inline>0x7afb27e941d691c26fad4335b39c,0xb732805fab9e835799aa1cd40ea1</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/29</id>
- <inline>0xcfb21c8fbd406c878bbbc318e578,0x17e0a411a7f9c4a2461de5815a3d</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/30</id>
- <inline>0x33541ee100275f6d708276dfd090,0x8bdec63ac571d54bd5dc74259a34</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/31</id>
- <inline>0x177b978486adccfb74d3c30ea7c7,0x5e1e3e9c8519e3b379b7892064fd</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/32</id>
- <inline>0x2cec1fcef95765c9b712abe806b0,0xce8f29057fec53f4eb6096165d41</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/33</id>
- <inline>0xa41677a0fd4572ba98ade3f313db,0x6ba2bbff08f66055f84983f157ae</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/34</id>
- <inline>0x66e90059368a8a31b80b1e07cd5c,0x841bdac14ef77bb009148a578ba3</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/35</id>
- <inline>0x567e5d7408324116f1f2c8e9bef0,0x555f4187a6e52d367aecc02d72ed</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/36</id>
- <inline>0x845341926ecc3f1f1766dfb8f26d,0x536f41026296a6e610a1aa4c61ad</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/37</id>
- <inline>0xc61da2105539dca7f324d1816792,0x4069c8c569af389ba6c124ca7cc9</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/38</id>
- <inline>0x79352d8c9aaca8602bdc2bcdd784,0x0b3f20709e4f2953af0b9e86a94f</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/39</id>
- <inline>0x60375f2eec5ff92fbc2efa252d15,0x34c5fb6ebffefde7e9771b1b3a46</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/40</id>
- <inline>0x09910c45778f1efa1c9f3154d44a,0xc5393764eb6184d869ad9677fb1d</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp112r2/41</id>
- <inline>0x6fffe4ca3cbda6828ddd63e9ab11,0xcf5e055aa2a94c0d7214d998c3a0</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/42</id>
- <inline>0x3813064a869de8884025d85736c0,0xd71ae54681ffc105144c8f7ba5bb</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/43</id>
- <inline>0x6906e5609f3d9e47c7cd961dc08e,0x7fccd8384db6b6fcc842a4f397fd</inline>
- <curve>secg/secp112r2</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml
deleted file mode 100644
index e010003..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml
+++ /dev/null
@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp128r1/0</id>
- <inline>0x0ad532d7437555507e85fee6591b8565,0x00000000000000000000000000000000</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/1</id>
- <inline>0xfc69a54797d63679481b0ab5bffb7181,0x9c450b3dbdb7f2ea539151b372650ec6</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/2</id>
- <inline>0xa93c05bc80199e2eb2cdeb0e6948e7ab,0xdff1c75dbbf1d108a6e0c8b50a08bbcf</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/3</id>
- <inline>0xcd1deefa8374505908cb6959fb919cc7,0x029013f0415d73458e13fbc11655001b</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/4</id>
- <inline>0xde266c98638fa36777f35b2223c91cfc,0x1b947aac7a466fc3d297b10ff8484dae</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/5</id>
- <inline>0x1838605e0e53f9d172aebd466a66cb35,0xf63b02c9a2d65087260622edd87d29fd</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/6</id>
- <inline>0x387eebc129560d2ec0c8656b9b13dc93,0x74f60f68b187eda0e952b45d0c41dbf3</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/7</id>
- <inline>0x529ef50f0a8c004a14c1ad7cd43e0ef9,0xbb45b561401279bad1e1b0c7c13232ce</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/8</id>
- <inline>0xecfefc620d86d1694ae8cb41dcce1b5f,0x51b86c07c1aad767cc68cb80704beaab</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/9</id>
- <inline>0x6d702020fb517aab858c67ebda4de749,0x38213b0d6fc92dca7462cfc94d9a851f</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/10</id>
- <inline>0x69ceb27e1b9f34be748cd8e626494cee,0xdf180f3e613900e95fd452a77e3d7797</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/11</id>
- <inline>0x60682616ca53de62835b1f90bf7f64cc,0x87477a4bcc3681480c53d044fa602fcd</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/12</id>
- <inline>0xb4c635797b877e4536b54e46c2b405bd,0x10cc3afa3983a4384bbe1e64a5ccd98f</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/13</id>
- <inline>0xb2a089f1e0afa8d031cee4bc0f39aabe,0xb6045935f79962e9a6e17c3cbdfbcbc8</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/14</id>
- <inline>0x098b36c442de5c741c70fa80a31d72fa,0x251e9a04ffe799cf4776575be582f108</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/15</id>
- <inline>0xdf21eaed127767d439b9a7b05bfe244e,0x6bd22a598f2f29b2b9970548636471c9</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/16</id>
- <inline>0x5ea79b209b249f320670588bf16a941f,0x143bb38d2e91dacad82c3950ef1345db</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/17</id>
- <inline>0xcabd1f91622e6d8dd021508dcab59e08,0x8902e03ae5300d85b735cd41f057fb0a</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/18</id>
- <inline>0x9ce43ec4dcaf95993d8ab00efcc7199a,0x07fb6d895c27bc326a33cb8111e865a9</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/19</id>
- <inline>0x258d5033cdbd811104238c9d69e45596,0xfe5275fa796dcc1e4a58787eb1e71411</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/20</id>
- <inline>0x2571bd8d8c77af6e8e8ab9a14c75f415,0x4d55b748f9710b36e404c090e3d363b1</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/21</id>
- <inline>0x3ff817bc6c5ae03b4ab933710e52bb77,0xed377a0158e5c7c47d60451342fe65a1</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/22</id>
- <inline>0x98e44a63c76627eb95cd2c090e84b053,0x441d03cac9612dc24c13cff25dd8de1f</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/23</id>
- <inline>0x06803013e75597fb7f83f1f8681af11d,0x32490d391f8a2b1de83212dd218b3a5a</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/24</id>
- <inline>0x22cf1fd78c34f9c918fe5839f3fc7a09,0x38e3d353cc231516b3367e54041cd651</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/25</id>
- <inline>0x2d7b57c9ec5cfa8f65036953b43dd61d,0x1fbfcac122a8a0afd71884d7eb50178a</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/26</id>
- <inline>0x6e6ff0f1be9d7119865558daa8c334a8,0x2826b8d4f2cfbef3bc1b6d63f5d8185c</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/27</id>
- <inline>0x75b01105aeee0856a9e86ca8fcee0e71,0x46102bdd1b75728c04ebd8cb971dab73</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/28</id>
- <inline>0xe6f6b7ae27f95c72ce0f4b65bc53eef3,0x51253fdef86051d533f007b0fc153c50</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/29</id>
- <inline>0xddeaa1407ef4e29810a7a3c39f54fd51,0xaf6826697f90f9b7a2eee96120c81934</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/30</id>
- <inline>0xed560eceeda09a4111cb1dee3e96b73c,0xc905937f629e8d2170ecb81c66934ace</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/31</id>
- <inline>0x795429dd5e9c5f070148d7d5ca2bad17,0x960eba8c90a5ab5f487dc54d00ddec74</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/32</id>
- <inline>0x167256d3907764ab25bc306ecee5c1f2,0xabe3b00f2996163c79fc90ca00feb245</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/33</id>
- <inline>0x742017e42aeb2e0b408764c99711cc55,0x2bb70bf48bf430cf3aa9dee0dae2019d</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/34</id>
- <inline>0x635c9ae3debc366c4c3b9654a4493dc0,0x9e1334cf07dbe388bfbb4718fa135f1e</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/35</id>
- <inline>0x48d7039a2072716782802bc30abf963f,0xc2407e7315f17b3955401c7ccef85efc</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/36</id>
- <inline>0xe81726cc9a327fc537dc8694d03520cf,0x48dec70e3b0c795d51580a25199bdd63</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/37</id>
- <inline>0xff6e22e5b03f8662c42996cdbe2388a9,0xf2bb92e29ac8c2fd4e51647b4597828f</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/38</id>
- <inline>0x612a6287e34de249552fa9cd7cc1b85f,0xd9720cd654fcbda890d1f0ca9ebc0b06</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/39</id>
- <inline>0xb890ca6a7b5a7c242430afb747a5b5cd,0x17aff39e97598baf943aa778ae0d15fb</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/40</id>
- <inline>0x1a2e48a326d3dd743e1f4bf842ba2859,0xf89f9e97e2a3d18cdf90d95e0cdf78b1</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/41</id>
- <inline>0xa67fb1dca60c137520ae0aa038c4134f,0x7252d9682ba8feec4974e77688b56647</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/42</id>
- <inline>0xef4ada4e005c28f62a64455aaf8c952d,0xa182a3ea0e95b64eead91f16c357edc2</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/43</id>
- <inline>0xe6eecfd4d406c1a84ca90053db92df22,0xc9cc6646f7bfa02d750636dee97384f8</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/44</id>
- <inline>0x5f118fa94be6f20bec4f89abd1427e40,0xddf8e84a3ac293a8448efe7af61e649b</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/45</id>
- <inline>0xea08890b70e94ac5d53514b583580faf,0x6cc66b4eedab2a8f01a0b41195271853</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/46</id>
- <inline>0x0ae9c73132e5ef2fd82d06b0f50bfe64,0x9b78c29bdf53038463fa4bf2edb4297a</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 601</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/47</id>
- <inline>0xd3522b2fb7fd15b8fbaf10a9abc60ca9,0x21236ba59e5a40eb9881a0218a2c2359</inline>
- <curve>secg/secp128r1</curve>
- <desc>invalid order = 1103</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml
deleted file mode 100644
index 1bf0e19..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml
+++ /dev/null
@@ -1,290 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp128r2/0</id>
- <inline>0x84a2a35ab236365d29cddba15a256aa8,0x00000000000000000000000000000000</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/1</id>
- <inline>0xcce609e5a2dcc34f6586c83028fa2a20,0x9c5c11c51b9eea1bb0340fe751a7b60e</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/2</id>
- <inline>0xe2a3bb780144f4219ea4746212178d0d,0x89cb1d8c8006a776d74c2f7404fd5a9a</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/3</id>
- <inline>0xc76164fb89ace094c7becf35873c7e6d,0x37536278167f04d672ad06673c1dfd39</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/4</id>
- <inline>0xf1894d5a8c9fc11a526261ee270fc6ce,0x599c4e663008029502d6eb3d2f14653e</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/5</id>
- <inline>0x6eb6f563941f2203f08972066ac9f428,0x69bd692f2daf9275f11bd30b436927f2</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/6</id>
- <inline>0x031122c136cdb52adb5d38ca620a6d1a,0x49a0430f0c465c8cca890f1cb3d57c40</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/7</id>
- <inline>0x16306eaf58c7954be01d58293297b56a,0x967c3ff630b17546c625cb2c81f92b8d</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/8</id>
- <inline>0xa4c6f4e9efcec102ac1a180f2f2e2e60,0xfc96138f948fd7be176405e4462a07da</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/9</id>
- <inline>0xb8bff33456a3092ee6b899d85474c003,0xa96674f5b12d3e3987bf9793f09aa0c4</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/10</id>
- <inline>0xfa1bd687f42768fdc054b2c3264fa32b,0xab811c51737068251108dd3d93b74f14</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/11</id>
- <inline>0x8940c1218db052d691b91cf74cf70dcd,0xb8fd7d307d91629894d813370ff4b18a</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/12</id>
- <inline>0x393953bf31897eb8af71a7e2da2f54ff,0xe00f394b3ec3224c79e2f58cfae1adb9</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/13</id>
- <inline>0xc6d0c8da6f4bc61f11189fcd9594f77a,0x1f4cfa3a686b6c0f973f0ed9930463f2</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/14</id>
- <inline>0x73bea969fcfb1ffb24613086be8358c5,0x21da27283e46686d0b98b7566ef53ac5</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/15</id>
- <inline>0xa638b22af15bbef2e7b2260d96b84546,0x341ad7e104e47f7a330c5e3f79642af6</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/16</id>
- <inline>0xc2b4b8cdadcd9a6cfe3e1948bbd9cb1f,0xd8cc8b3f8ac17143f24226e3dcbc787d</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/17</id>
- <inline>0x0f8d91c30849157dd24629c59c6912e2,0x9ffa7b719eea1b279dd5681fe454eb05</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/18</id>
- <inline>0x94c904d41ea62e7440f98962d1c80371,0xb8144b38503ef44f184af716f2a01a33</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/19</id>
- <inline>0x1557e024a448104f339207831178db16,0x652f887463050272d6ddf672ea2df247</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/20</id>
- <inline>0x1c1baddf917380fe6d14e7d1b0a674a5,0x379a0f91ccc369382db8ff82191816db</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/21</id>
- <inline>0xeed103435a0965a8f3c8fbd8cda3e822,0x7ba6c76124e141c1dafcd144cd1bc57e</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/22</id>
- <inline>0x9e1ee15f2eb3538a3f7e8afbdb9e27a6,0x54e2a5ad96b37b394557a9570e992ddf</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/23</id>
- <inline>0x8d1ccc104012cf8e37a824ca4914032a,0x94bd8e7087db9ada99e6bf15d04ed78a</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/24</id>
- <inline>0x2bf3480db70e7af290e311c498b11be4,0xc29c188ea2f6894d94b8cf1429e48b32</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/25</id>
- <inline>0x3ede10fec5fe5bd643eb1b7a6d9445c5,0xac8bd2e6e32640d6657b141da3cb092b</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/26</id>
- <inline>0xb23e5345e832b6dc87f6ea858902ca5b,0xe757cade5d9c055f85f489f251af5613</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/27</id>
- <inline>0xa5c73efcea40fd746851c482f691119c,0x1acb457e178db88089ab51a4f69fb33c</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/28</id>
- <inline>0x6f47817e69dbd24f332db01e60feff56,0x1a2fc53fc28e27043f45c41a81fde9a7</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/29</id>
- <inline>0x662a6e0658f7a0e801ccc80d12e0d292,0xa14713be092caf8ac531c16380669279</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/30</id>
- <inline>0x153268ca20a65041270e6da154329b61,0xd68832ccaf75e9f871479f14e2dafd1a</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/31</id>
- <inline>0xede87533092f1fb73d97187da65a393b,0x77698bfdcf8e4650a8aa3fafbb6da468</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/32</id>
- <inline>0x39c1a157c41b9d551f0f58d442dbba64,0x8ffc18748b501946fe5d80c43461f1d6</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/33</id>
- <inline>0x7bfa6d93115008add78597c1b830335a,0x7f2aa9e8a7af23aef2acb8cb100d9c34</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/34</id>
- <inline>0x43cdcb5660d6148fddf7855a7db3dbb1,0x6c01fbc7b931d5c54903b71498ba6f7f</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/35</id>
- <inline>0x53a7b377e672a95f65a0f34e935b02e4,0x512a28fe69af7a5755dcfce74165c48f</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/36</id>
- <inline>0x86e757edeea30b3e7e09cff0f82f6481,0x9afc1a981aa977fa2675a147cb5703d4</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/37</id>
- <inline>0x896bca3b08cf8ffdca62c87da3991ab7,0xbc6c6a1b52e2d1c5361a5936f5588cce</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/38</id>
- <inline>0x5da356b24c0972896e7c2518afb3c320,0xa8fc3d971ec9b3c374868d27792bdaf5</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/39</id>
- <inline>0x43fbd097eff5eb2b77d3f5957af064b1,0xb71b37a403e65d26b8ecbd27269bb269</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/40</id>
- <inline>0xf7a67fbe9fa495695401e9c246fedc00,0xce57681c8c471c3e1babb70ab9a9952a</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/41</id>
- <inline>0xd735a727ba41e6d3753cce00c1ea007b,0x63bdbd5a4ade1dc01eb77fd56b23d339</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/42</id>
- <inline>0x4f82fe24186364444bc27ff0d0239eab,0x49adc61a23f19bdd332604493244a203</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/43</id>
- <inline>0xea851216f1114aad7407d63e47e57bf1,0xab95a188631623d7f4ca852f8e7046e2</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/44</id>
- <inline>0x4777487133821bcf67bf5d43d12264cd,0xb4560ca7c3bedb6d21921de955462fb1</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp128r2/45</id>
- <inline>0x33c5f2e6190f7a3c23dbc5a1020e0f32,0x40afb310a8c5537ecc07c59d971c5fe6</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/46</id>
- <inline>0xd5392aed70323f8a02ec104dbd3dd3f2,0x0733de2e9d20bb117a632a9b5ff3c1a3</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/47</id>
- <inline>0x005a0ea68afd5793063d4537045e5cba,0x6ec5978352c81a646fc1b29491a62a59</inline>
- <curve>secg/secp128r2</curve>
- <desc>invalid order = 1103</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml
deleted file mode 100644
index c0ac9f5..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp160r1/0</id>
- <inline>0xc0cfe6c13bc5460e2fbd931342998c35e62658bb,0x0000000000000000000000000000000000000000</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/1</id>
- <inline>0x833dd617288ae10a4f9e99c8a07ddbf6ccfe79d2,0x49d0549029f8289b5edae90adb683b342e3b20b6</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/2</id>
- <inline>0xbf318058e56dfc9b72a7b3c7eae2ff9cf8bbee57,0x72d2de5db2b4ac76f350cdafa0e0307e61564183</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/3</id>
- <inline>0xe78ddf367e2ebe7fe072feccd36211dac465d7bd,0xcce0eabb34a6a93a3d21ba92f262bff114623eab</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/4</id>
- <inline>0xc38e88357677e2476dac909c8f1acbd3e2a268c7,0x5d6d01948a3127bc0debf1b2c78bf36a1ce43934</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/5</id>
- <inline>0x092e841552d45365c8105205fe5597874f482d79,0x14c61971092c78ffc9d5e121a495f9d42d52af51</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/6</id>
- <inline>0x962395a9a49b238ef65b235a2272328ce5aadea3,0x22ae736863876e7ff387574c65b25fb293f7b10a</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/7</id>
- <inline>0x21bf7455ca142c7c6a59c24cffe65b6aa6dc42cb,0x0972dc2bba67209a47ce309c86862688e31bdf5f</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/8</id>
- <inline>0x2d69e72509b72192f75091bd3dcd412713c881a6,0x08d04b92d51d65f1103031fd951ad5f70d8986e0</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/9</id>
- <inline>0x69dae7f00c8d25007b27e23a2b6cfb8ab5859844,0x3f3662bea415535a1d9059585ef120a95a74c923</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/10</id>
- <inline>0x58747d3661858147d7a68edbe3f001342378d9a0,0x35dc2407d6cbc92813b39ef7f8a8d2743de4d342</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/11</id>
- <inline>0xb291eeb5b4c9a8240bfb672a6838c4bf38e8e6e3,0x1be81f0289e9faa5027776a52bb054d3ac5f3e31</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/12</id>
- <inline>0x930e2757afa9a264665b753c762fa0b4b6084990,0x893c1bf1084f1f384a114a6b483ddea912923672</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/13</id>
- <inline>0xb2641259edffb9cb54caea462cbc5cdacd1ac685,0x915dd4fd7733af2062866a520d39bdb6cf55ff7e</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/14</id>
- <inline>0xfd6a6a6deb0134ec725d1f52e604b952865c1e85,0x92c3b313ade6221202acb02f652450860351eb7d</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/15</id>
- <inline>0x1b1c4b971c4de50f2d20b711de8fa02bb9a9ea3f,0x9a094c3960c7476b9315ef0cd8d1c9533c1910a3</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/16</id>
- <inline>0x83a9558df2fcdd657b15382be29d0c203936dc65,0x84bfe85c0b7f27560f4294c493090da840f8ea87</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/17</id>
- <inline>0xd0960a7a153fc358e86f6044681a05ba8bc9f431,0x0430225547258f8fec4a8b453cfc393e97e70b40</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/18</id>
- <inline>0x34543b4e13057e80fd365836b8a5b5a6cf17cb52,0xbffa403c6903ad0d7f0d6aa4e340f3460a69a29a</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/19</id>
- <inline>0x716712d3f319d28e98c184ebefa0cc9ca6af4434,0xbeaaece3c91ae17936479896abddc4392a52422c</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/20</id>
- <inline>0x5b1102fd80d4a9e2eebe68d4ef09405cbc7730f1,0x11d8283e4bcd5e2ce76f48de8a6bbdb4426b78a1</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/21</id>
- <inline>0xdf8c4cba0cf63d1a27d41bb3d74da1b4951659a9,0xb476ac5af20a2cd9f67fabfe3b857bbc71f4e479</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/22</id>
- <inline>0x0ae6ae7fcc5ed7a0fdf86f6bf1e57aa311fd6e3a,0x47fab4fc9498882999fbfc3c5530ddda857878d4</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/23</id>
- <inline>0x672ed995101d5b52c4c2f1f48a66976ab0553f54,0xe2798c84e1b7f4cb0388220a46edfd1e9e5843bf</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/24</id>
- <inline>0xa26ccaffb446d5db27a6248fae84eacf8fd984c0,0xc1041d8f4c4ae589d4c9adcbdde8156da94e50af</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/25</id>
- <inline>0x43531be7233b38b2b6791abe7f86916d791de2e6,0x33c3ea4e30aa1d2add594d50ef70a1c87c47bebd</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/26</id>
- <inline>0x3b3e9a7bb0bc796156f03cd5e247b6adf8d54d99,0xb9fdadd7153400b8c6fa546d1af810acf8809e36</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/27</id>
- <inline>0xcd138cde1452f22a0425faea5b7c75b75531af20,0xe1c29456aeb566bb6556fc3ca178381b08ef43e8</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/28</id>
- <inline>0xbaf914398f52636eb4cd1ef8234938166d92e708,0x777946c7a5c354c31bf149c8bd314da4c0facb5b</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/29</id>
- <inline>0x84706f3bda98906ad4b760b4c70b3a48fedd8946,0xf775d63085665e87a634d59852a49e038bbb460d</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/30</id>
- <inline>0x8c891d78027199b1c628ba92dae118c48dc2a02e,0x0c24f0183bbf72703763b8fbc8e02a93e3ec6643</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/31</id>
- <inline>0x82b5463506dacbba36988f7efe002ccf29b37f4a,0x6962500ba3044127859b8e3f30c228d3172c18a8</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/32</id>
- <inline>0x114587eeb96763a95baa219e8e5bdbc8999d830d,0x3b2eb3878376a0128d6cca8fcb94a502196f43a8</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/33</id>
- <inline>0x96469f016db393336aa90fbebb92f82fb139188d,0xbaa5d167e50164790ebaf064e06fcfd05ccbeece</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/34</id>
- <inline>0xd3ccead57a943a1d4836e95a73a2b8e0511ae386,0x4c43987fcf5b62eb83c77c1dd4dd9e9b9df92906</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/35</id>
- <inline>0xe9642822321a8e26454bf7026870fef35c31b8f0,0xebb9131b1440ef344807bfdbced2678fb35f16e9</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/36</id>
- <inline>0xd2a55bbaf224697b9c2945a046e5433cb300216e,0x75a695363f61ecfda45d3626d17ddd2eebc9685b</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/37</id>
- <inline>0x96c29a0df5b40c161811e4d7daa72e1ea918e2b0,0x0155b8b6ec7a647840d02bd45fea9dc765e5b5fe</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/38</id>
- <inline>0xc794d9c58be7a4f0e949056b94fa1d9aa6b1c24b,0x2bd416df233d630a196a27f922f5a3b2edd48635</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/39</id>
- <inline>0x02d8edbf75cb446acf73461f4342c598d9f21d7c,0xeda4148d6daae6cebaf4adf03a65eef569a76baa</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/40</id>
- <inline>0xd4f98c260a1e596b73d3e04efe991660e8f26888,0x74cadbe00913e2d3a99c1c2773d15c1eff7a6199</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/41</id>
- <inline>0x750f72e3b1b370c2af6e05b246f913d20d5bef05,0xebabaf69708e332beb9bce2594157f4350a5444a</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/42</id>
- <inline>0xdeb89226667fe62755b8173c390b286fade4f20d,0x27f2ada1d097f055396d853faca156d46e35afae</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/43</id>
- <inline>0x5696b02a140422770dd88618f18d5a24e34c9049,0xff2fe6d8789db776d2379d76d39db4b52d75fc86</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/44</id>
- <inline>0x09332eb605bcbfc193da360069c2e4ecb8309008,0xf3a2c4839f590128ef53ef58fb59edfbd823571a</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/45</id>
- <inline>0x87813efaed90e9939f539e490a532de2db7f48d4,0xea955e5137034cfbf438e0a01a3e3c49cc8ccc58</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/46</id>
- <inline>0xad6509135946353e86366cd0b990740704dfc359,0x90bbc73737e1e9a0adac9fbb8fa53f9435d512aa</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/47</id>
- <inline>0x8c33dee7e1a978c9f9cd5666c0a20179c31b7f9e,0xef023633c2e8771ee4118a4f8b35898af97b321e</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/48</id>
- <inline>0x6b6c4dd46c55bb8ca886dc038a51208275139fcc,0x10c87e4e5df63ef4383e134ff6317ec9dbf32e4b</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/49</id>
- <inline>0xf95d63df4dd60af0bebf35df91da09f23bf6227a,0xe3b2340ee59177bfd3afb19e03e38b28397055a8</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/50</id>
- <inline>0x947ede3f9f0a8bc262e5c07e30d65665e5b844b6,0x0395d63bb0ff9de9cb0feabc0fe1dd6dca4b8571</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/51</id>
- <inline>0xfab92db5188c3dc224ee77b6b315528f22d85c98,0x70bc29bbb1849c432832b63d047cd4fb11edd538</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/52</id>
- <inline>0x2c1bcb2bd9ef53b71cfe4a08c47147686a217995,0x4b37ab9cf59027508e6cc669f3baaf20ab62afc1</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/53</id>
- <inline>0xc70ba850f1fc3d7d83f4458194465c5b58f3a9be,0xdff35fab8eccf87802bcee31bcb032185ff57cc5</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp160r1/54</id>
- <inline>0x8932e643678c5a324d7a2cf47528676d08f135d5,0x3a6a976e51623bf13d8d339312e2e65c9b29ea04</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/55</id>
- <inline>0xaee7bf31f3d12332e5e529eb0a7732ac913d0211,0xaa88ae4645cac4e7970a764e486774b2398e9fd0</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 613</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/56</id>
- <inline>0xc0a7736e7eec336eb3b7f853a832d4eec1d6f33f,0x2d7c536a1ee9cca9bb504755225c678f64ed5275</inline>
- <curve>secg/secp160r1</curve>
- <desc>invalid order = 1123</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml
deleted file mode 100644
index 5a0afdc..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp160r2/0</id>
- <inline>0xc6e84ac83f87603a1d57367f565e1af3b0cdcbc4,0x0000000000000000000000000000000000000000</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/1</id>
- <inline>0x679008c7f73ba2fd092cd625ce949fac0c40a42a,0xf9e2032a5394c20d0103a5354520e24ac57d0ff1</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/2</id>
- <inline>0x6b29c97caef3f1789927d0249374cdf947f3c57f,0x5dfb20322462e9ad1f269fefb3c4d506e33d7287</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/3</id>
- <inline>0x3b97459cc78d9cd1365d02db00c09644c599741e,0x37e010a66a7cce9e110f2d0db05f87b8e5310424</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/4</id>
- <inline>0x6c7ee5335cf5d6ae3af880dffb9c65adad1b4b30,0x44c1506727b99bbcbda5641b5c331042d0f4c516</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/5</id>
- <inline>0x1e7216915613480077c0381287be4904291915a3,0x0a958ec774c031e88ac21bb297700c2444e385ab</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/6</id>
- <inline>0xca164d8f442a24d9645ba67dded0604e5e999270,0x2ed3c67f8fa41eb7088073eeeeed9aa868514695</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/7</id>
- <inline>0x78066f1d19e638cc130d07f1f7ff0ceaa650e0a9,0x51f38ba21fb40f0aa486daf7bcf34d3c7199a22f</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/8</id>
- <inline>0x3dbd60624d59786f152c708f3118e7612a530adf,0xbbd603781f827c45e811e469ad633334cc3fe53d</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/9</id>
- <inline>0xe04b0d49bd17dd1fcda82f78f150ad787c2256f8,0x0472c3237c80ff56199f3e5b88c939546a41899a</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/10</id>
- <inline>0xacc669ca04ee2c9d5793f0bcbae73a18a26eaaee,0xc28a1ceca057bd9f79440df44533c49dcad903a5</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/11</id>
- <inline>0x6984f513fadfd4881af98a1c6e086afa7d1d1bf6,0x8ba7d97b6a5059a3f28a012ba154789cb7bc4a85</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/12</id>
- <inline>0x78721a9aabeee3792b21e600d375c4313cc51fb2,0x5e3850909d825cd4e3c7f3e17fc649bc0b490d14</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/13</id>
- <inline>0x5f5fceb3e8d6222035f5c49d1c6ff6d80dd8b761,0xd66132032abaf91e3b44baec9590219532995126</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/14</id>
- <inline>0x4ffdc28afab1ce2c46bc6ff004e1ebf44074b483,0x95d7d43ab573bf24c95f90372209e23b2b4ca6c0</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/15</id>
- <inline>0xd6b5faa063b7d4c1aae975c89b13320547f6b092,0x594ab3c14b89764318949b5c492cbc89cc56cb6d</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/16</id>
- <inline>0x8f9a658baaa49a2fed9db4307ad9b63bd547ed58,0x480aab0e865c0b2718cf805a633fffb8e164eb0c</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/17</id>
- <inline>0xd67c52b4908a05b4df86c0c2329f6adc26d9f9a5,0x3158efb6b968ce82adfa2a586e1241eeee75859d</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/18</id>
- <inline>0xf12ca0c97ff421855769c23bbee55ee43b38e010,0xb807e19c29717bde141535b5380c527319d7a52b</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/19</id>
- <inline>0x91f2b1c06d0a7dc7e634b1de92aed4a929613efd,0x9d3dce0e3a0ed94f0e16a2275544fa01bcdf3110</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/20</id>
- <inline>0xc878caa9b643039ff758af0505a58810ba70f67c,0x57f6fd4133c82276cd6807802a5da7374f432259</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/21</id>
- <inline>0xdb7f0d2d8aecb1f0878aa4b189325d9585b6d41e,0x0c774a4effc83552d7429142c26f1edd56d4e3cd</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/22</id>
- <inline>0x4d13bb52748b197436f0393eb63cb3d157d43166,0xaabbc377a28040c9198d8747f3b80deb274a79fc</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/23</id>
- <inline>0x3994dcd38714aec53fdeaed659eab5dd9a5e596f,0x506557507dbf46c903c006c024e0aa5e73ef27c2</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/24</id>
- <inline>0x1bced2defc53496b0d5df32f2eeea5223e26743d,0x00891db7d17f24bab45f7f9cde87cb7ca496a941</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/25</id>
- <inline>0x975141d578e13cef5d31b788f78d3d9c34cac180,0x478811020027f6edacd60797de81bb15f1888240</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/26</id>
- <inline>0xeacd1e489107f9fb7dfa5fd3fa2fce4eba195b55,0xdbd30f20716ac291098292f2d521173498251e43</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/27</id>
- <inline>0x4fb5f938f76f9c60f15a5ba60b6c10955609bb7e,0xe2f1db92c5b6759d8c4c13728d8d0d1d65344220</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/28</id>
- <inline>0xc276679d7d6341bf59fcc6052545d48e7a50bd1b,0x843c8a4b7e380970effa3881de9a8696c71afce0</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/29</id>
- <inline>0x04d9cd970c3c6d9d95569f6992f55b133eed6d2e,0x22f743b5121876787d91519d3571014a974b5bbc</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/30</id>
- <inline>0x5a67fc1e78b4558f874f54474619453ebda72167,0xc2ac1ace98d48ccea6547d7f63437e25eb6e16a4</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/31</id>
- <inline>0xa02721aba43d077b00c0b840b4d220015ac95f95,0x3bcbc95611d2a3abffaecd07aca0fdb2e6bd6572</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/32</id>
- <inline>0x54640ed44ed47408dc940f0b7927135f08156032,0xdf1f03195bfd64f86217e23314b9c32fa36d80c3</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/33</id>
- <inline>0x09f34f052e51242db1e02eacdef0368407e7ed6a,0x2357e99d4b1c4317c5897d8f4b49b8d4ac538c80</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/34</id>
- <inline>0xdc236536c107b6398a36557d355f2081d3ed0b50,0xf08b93fa3927ccdfff47e532653b95d06abbd98e</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/35</id>
- <inline>0xcce7dc4979d1a62a0b727845080f6110f6c04291,0x481e6f382e28c00a0c6875319a8c68d339ef7da1</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/36</id>
- <inline>0xdfe249a860271e6a8cdb3394c84c3ccdbaeca21e,0xa869c2f188c76931d217058ba213f58c9e624905</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/37</id>
- <inline>0x03c54495ae78d30eeba044e74b4a16a1b2e346dd,0x4bef711b01e38128af6acbaf06944aafc5942a61</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/38</id>
- <inline>0x87dd1c39f3578808e242d707d9c634afc9c43afd,0x15f60903697d8a89f28b12cf28d6d26fc3f472ac</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/39</id>
- <inline>0x165e67a242a10052e28162ea0ab6f76fbf6b5f7e,0xd7df96d6142a1f1a754951566f0acef3d0956010</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/40</id>
- <inline>0xfb1513c478cdf76ff224e13e0a0608141dd91a39,0x4552d3caf3393787cf3617db537902d2977977da</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/41</id>
- <inline>0xdfa389c12fb0b92f7244783245d56aa0f38ecd11,0xf0ebf6f2e6792f104e8c5ca57dfc42a7b0d5a005</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/42</id>
- <inline>0xb29ec316293d35197db3147c7768b98546b2d3fa,0x5a0f0bb21208a50540ffeb324569c4a7b2e46c65</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/43</id>
- <inline>0xc448782e0414fa50128c0e12e74d58dd3c35e06b,0x766f356eae72ff39b34d28dfa8c348608f04229c</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/44</id>
- <inline>0xc3485829fcb74a61c7890e019f9c2620f71ad274,0x56a4b91b562e0f7c0622587d84169ff6a7aea862</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/45</id>
- <inline>0x688e9a0a22fb4a20000b80d9844bc8ab27498ee8,0x1febed83f57e0a64d6ae27f05009718862600bb1</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/46</id>
- <inline>0x34cb67f2c15cb355f1d216ddcd44e5196ec691b8,0xac138a13b452ddcfe220643c271ec6f94472f808</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/47</id>
- <inline>0x40fa484b10c4bda29892a89ba126c00d02f42b76,0xc6908b23c981b7db33446711cabc98da928947e3</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/48</id>
- <inline>0x8cb4ce8ea3b13ce42127f816bbde2d2f56188d78,0xe6eb08d609f290956595a4262a743bd1b8e3b613</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/49</id>
- <inline>0x8a5a9e37eeb6de27c9d99bdb25f1626f79475c04,0x33bf1bf9c27a5a59b119f0d6088727134303a0cb</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/50</id>
- <inline>0x5bb249ef8eee1ddf794c01edf599f17e5e2cbf07,0xc058a4694891181014fa3afb5f906f397f27c70f</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/51</id>
- <inline>0xf8dbe5cb801e0ac5433c6792afecf8b244e1e6a9,0x12ca3ddaaaaaa0c2faa4b3555aa686b4f33b218e</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/52</id>
- <inline>0x42b04beb4967d5612a957939f6e259d43611c9a1,0xe7e7324b1046059d13ef5a53922dadd00b438013</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/53</id>
- <inline>0x3c9bdc58ea12673309a433162522723c45082e39,0xf9aade7f0b78731d7c4ee45a0e59235f9a2dd4f3</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp160r2/54</id>
- <inline>0x15567f6e8e2d4a71ed809adbd53c620b3d674ca4,0xb418ff9fdc1eb410dd53064090099e76473d3f61</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/55</id>
- <inline>0x490905f64c868304641864ca9ad90fa48475f765,0xb52e302f7fe9c63a9bf6124daff99e7e3c7f9fda</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 613</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/56</id>
- <inline>0x1de73470d9a5ed4c6bb7a4c162956d20c1c2a38a,0x8037b163763d4dfd2d218f7d85d17c06bfa07ecc</inline>
- <curve>secg/secp160r2</curve>
- <desc>invalid order = 1123</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml
deleted file mode 100644
index 6ecf018..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml
+++ /dev/null
@@ -1,392 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp192r1/0</id>
- <inline>0x5dbd30be3f1e5b0fff852abbb3db1a0c6a41e5af386acc2e,0x000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/1</id>
- <inline>0x27472c162e0e76ed439a7dac0f42c907e958471fcfa040c5,0x88056e9bf3b909d69fef8239ed91e8aa57b5ad3be79f9d9d</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/2</id>
- <inline>0x297d7c712a5571fc822fc0f0130af1a2b8410be85bb9635b,0x36042c7f37872777957db18355a8f843551372df96dce597</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/3</id>
- <inline>0xe099561b090c1b5a60c8181d16f1d9ff28aafab9f2bf0a05,0x935873370296e948bf9d2c281a86d9094bbb2102b2d09fe5</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/4</id>
- <inline>0x31516fb8d150ef6223d5bc30e4b0a7b27dc040df947756d1,0xebb5133a70336aabbbb1751b0cae679d8bd6a221fe43734e</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/5</id>
- <inline>0x7ff851e2e594729c4d826ecd4e5c0a5647151cda6a3498ae,0x0fccd1ad5544abe3dbe1ddc50d497e13a5ae5c33e898ae38</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/6</id>
- <inline>0x5250a12af280ba03b74a516f1b546d8ce3d15e6bc588afd6,0xe7cc4af235199d7de57d6b5dfb2f87579d7f57d06155f786</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/7</id>
- <inline>0x9382d9979537978153b818adb0b1474c98343650ff18b836,0xe4c801b2e1061f2379ba72120417b127a5eb21b71a75c871</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/8</id>
- <inline>0x5cb4126d25fe31705acb7a317bedadaeac670167f52dbc5d,0x6a88653e29f2e445aeedef2cddd3767dfae142537fc2292c</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/9</id>
- <inline>0xffdf9041646f645ab1b84797130a4e3e0a5780ecae2a6b9c,0xde20499f00512b8e8f0d6e508d96a7fb1a8a21b1b4f14469</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/10</id>
- <inline>0xfedd6143d5ef3546db6a88892fd35c89ee1b9df8f55a2dc6,0xdb6e11404a9b81e1b4aee8897c57b17de1e1f18c3a22ecf7</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/11</id>
- <inline>0xc665a0fbcf3da70e0d2e218b61dffa1a3c047ffc994a8fcb,0xd7945666c95d32ca3e76bb5759dac8c5114786a03e9a4b14</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/12</id>
- <inline>0x53e006798bbc4019336bc22391dc3d56dedd4876f99dd93f,0xcec5bc9528c4ef6ad6b48b09a1db687758992883c4c4e1ca</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/13</id>
- <inline>0x4dd07a7938b8099d9db84d8a5ec2211892eed59f0576d7e3,0x250b9d862aa0c2a174566cb5ed7443f101565959d7568f86</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/14</id>
- <inline>0x890c2dc529a8a7bc314f06945ac95a875877bb3a8dae8fb4,0x36098beaf2700988e796d94ec7c63814a725fa9ba95dd811</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/15</id>
- <inline>0xdb25c8e2d10b55ebf5417f97511c871c900a5e76f9a8c1cd,0x25876aec0aa8be10ab960f43d51cff56c2c9b2f4fae6607f</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/16</id>
- <inline>0xd110ee7f0a25877f8e34d122e975e3f91d6cb380edb8bca3,0x4a84aa3e5c5f03cc5813457bebbacc4292df1d99f661316d</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/17</id>
- <inline>0x886522837b4397bdefacca064d2c05e7e45f5254006fc044,0x9a2f290741b55107784cadfba91975f72e5b4db4f3995bd7</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/18</id>
- <inline>0x34ac4302f1892c0280634f8c01d42ff79d61996c533346ac,0xd97b431305dbbafb7d3ccdec0e40820d2778b27f327930c4</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/19</id>
- <inline>0x2015152da4a67804da55c607b396b218ba7bee715c79e667,0xf84a3dc8d2da8f2831fb1866389c63f73beb0f475af1a165</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/20</id>
- <inline>0xf5262b2a11c6ecec7736ebf3ca4fdd30d5f4a2bce409490e,0x2823c1c5e51db72bec6d02ef9c6e1d4f87a46175bc9b6e49</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/21</id>
- <inline>0x870c9a3146fa0ce54f033214490c0bb5b3d856e719320a3e,0x0c444ac22b325d17d52537399257f169d5f157edfb5c9c46</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/22</id>
- <inline>0xd93a312970b47c1df6ac33d41c2b42e8f70e6d882368ca88,0x806c68ff482f1a163ad2ab24b193312997c0b24b8ac51193</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/23</id>
- <inline>0xc011215a1386fa44657de71dad92a73674054a94047e27a4,0x608f0afac971b1ef183c364a218d0cbe18c0da98fb1d59af</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/24</id>
- <inline>0x81c41c99457f44f65913ab53dd2518e082a52d3826d2dda9,0x0b54f5a2d43f127ea0ce8824fc0da310f28d2be55b872424</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/25</id>
- <inline>0xcf9f5610b43bbb66359afe52cf7d727c9f6f88bf99bb7078,0x9bbb1fd21341ae87003a4236d3e7146a46444cc9a023d244</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/26</id>
- <inline>0x41ceda1b6efa5ea06f59079c46a39f5ea19f05893290038b,0x2002f8e70269e4b5a5b671a150f9b08aafbbafa4a28a44ae</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/27</id>
- <inline>0xea7c99856512d64a6c1e43e1d066114e180655283ccf0e69,0xc3ae813876df54418a47825959e2904280a3871645606875</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/28</id>
- <inline>0xc3dd8843fdf80a6c424528c85255f2c59eec6fd2d313acea,0x794a3b45c08b0957ccf69fc39c5ca8b6f135e5c82e560a43</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/29</id>
- <inline>0x47be9dd14d55a2069b04730ea7628d2739740b3999ee6846,0x2f18146c7a78083ca1d1ca9978d75af77632fbcbfd03ce57</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/30</id>
- <inline>0x1a34305277ba9e4f8dff43c35e7557b9c7bb97d8e67a9da7,0xa2f9cbea69ca159fba5b6e01a387505bcdb95a5b3972bb08</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/31</id>
- <inline>0xb39e730b44bd525045e16b1b9b4f1766b1d2e2340b78b692,0xabf0948fa33620eab7ddcff9fe676ab35d0aea9bac1773e4</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/32</id>
- <inline>0xf95884d12150870f578a78923a6b60a04cbffbe8e58d5c53,0x73601c4164d571b35a32c863e10fcb3b2b5c504ee713d692</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/33</id>
- <inline>0x9bbbaa1c698f0fa1f7c0c8912fe6a7f87f0ac43ead7d84a4,0x48bcc716863c6c15f75d574a2b79330bec5335e997677cc3</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/34</id>
- <inline>0xa8e0b081806f2acf2bbd2b4ca84c5cf0ca4452d891ca033a,0x74343a3277d2d1482c9bc3671d2e1e7b3bdbe4405aeb5c0e</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/35</id>
- <inline>0xf37d1e123fbb7ff80d094f270482b8464236cbda2a26945d,0x734cf3a2fbe1834bb9c836267114c60d36fc737c312e583a</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/36</id>
- <inline>0x842316373947e06322066c352fa94051a1a208abd259681c,0x7adc033959285b7ef208c0715a103e5a90040ef1037cef6d</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/37</id>
- <inline>0x199516beeef420d7bdec10ebbd3dd8ded2c7738f1335f3c4,0xfa48c94d024de59668bafe22b3e80051bc31db57644fd0ce</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/38</id>
- <inline>0xed389a937e70f77dfaf9e214f9063bb7a688e1a9f03a421e,0x86da3e26f45ca5f091df93db1c09f1dcba44540af9188ce6</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/39</id>
- <inline>0xbb9354bb0b84eb538d9de70e493b742a1a4e415f1a2b7a3f,0x7337ea63b42d2e16eb9dfb8c3db27ad6d86e7861796b168f</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/40</id>
- <inline>0xeb934b44f535fdc56d0a201df834420c64e0698414f2190c,0x779b428a8b4952c27d4717fd8dbc25c6bfae43519fc88d53</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/41</id>
- <inline>0x12b1b6eb0b4254fc0a0ec711cd9b3b58c8728b6964406045,0x73eb25c46634628c43c9c86452fdfbbb0498f91239f5d3d5</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/42</id>
- <inline>0xb62d5a04187c5fde5cdffacd2238991a273302857e253ef9,0x863d0f972905a1f4c4de9279a850a56700c47337b91b40c2</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/43</id>
- <inline>0x41bdf1cb89aa224868f07e1264e202f2bd873f68410f555c,0xbdf21af9b4b4a36260bf2cba95749da2320f09922f685faf</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/44</id>
- <inline>0x670de2dc03eeafff1d046903116f87594f38fe04c5e87744,0x3fda0e3692a4d38fb99502aa87fcf628c8f8ffe40b3199de</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/45</id>
- <inline>0x280d88bf3c2805bb80fe55970f8f08c7d1e85f1ef8f42094,0xe3bb919ebf416060acc6764b049f4830d426d4893eafa4d4</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/46</id>
- <inline>0x3d305fd148fc191067ee2a849ff67942d74094d83a4d09c4,0xdd3c6a1f10b97dcb2d6b9a67f1fa9bec3b8ab121891506b1</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/47</id>
- <inline>0x23938453082332fd57c2374c54872ac14d4c3d037f4c59cc,0x9abae254d8b3ead0e535a50cc1d7cd7398b988cd77b652e0</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/48</id>
- <inline>0x379070d950662d6b6ec8e8468c949892c1952110bdb9d1b0,0x2492d00cf85c4ff0dcc3da6cd1bc49ed58b72c82f776e813</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/49</id>
- <inline>0xbe1dbe1b810f97ca4ed6815ece79a609fa68367f8e7edf36,0xd59d9d928d657d60441dc6f036d39411a465174b1673429f</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/50</id>
- <inline>0xb7bf7dd1af3102701ff30312566b7a09b2eb6f883d2bad39,0x9e2efd8be2b0d1c8dbe7e382bfbf60c70be2e1523820e212</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/51</id>
- <inline>0xf477da92061d0495d772c5f23710493cc64f26cc1837b218,0x0ff7dc6300eaaf184d5bb6f41c72f851364f9bac01d60bf9</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/52</id>
- <inline>0x233b2af2180efe04c42e3f46a6176757af55b4e476d0978a,0x8b2e9eca22c8f541df9720b5610860cdc8a205ad693451f3</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/53</id>
- <inline>0xc2a6d90c780bc2c7cd562ce57d22a34033348e159b8b624c,0x414cfdea7bb6f7058c4b86e1f2b4c7e5478ec63cd029af62</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/54</id>
- <inline>0x07f328cb98d777490d0694a4b00fe401c016a92bee0d301d,0x1f9d23be48389e174fbd388e749a53a5d5877ca32818603b</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/55</id>
- <inline>0x6a6f673e6af49d51fa372cba24627780c198d8cd14521643,0x38fbefec62f1242d7014683d52a5617312395c7a69edd326</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/56</id>
- <inline>0xf112bab98c8aa7bdd0a1cf8dff7f00edd53c5ea6d8976c25,0xd946ab9ec4e4f24cd4515879ad71d0aed0d815728a7c99eb</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/57</id>
- <inline>0xfd76f651c4c0ae480e285625561ba95102b145760932f9fe,0x9852d35b02b85fdd3a8cf92ddda59e0d212c9cdd55685335</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/58</id>
- <inline>0xb083d0c23a40035951d312e6fdcd1992368c571440be652f,0x50d622f84764022cf5dcfb29405cc0091c4567d5e8136b38</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/59</id>
- <inline>0x66c6ca260d1bd9c8534d7496925b6a26796696f66ca6909b,0xc588bb2a61b170b39961429f5f6e191e9d1557688b5e69f7</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/60</id>
- <inline>0x497d6a371020e946b1f913f41dd4c0f27773901368935551,0x9a45c2cb0b10e18bfd4963a177210a87bdc666cce1467a87</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/61</id>
- <inline>0xb7ff343789349a9063e0f35a5c66fbf49fa6206d3e5d1b4d,0xd4afd7933b58f89f74b81157144b710d082c559ab65203b5</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp192r1/62</id>
- <inline>0x64f88f2014026439717b443fd0e9656bae76bc12e04846a6,0xed20d8d4ee021c98be74fdfd4e545fb8b8e529f269f6059e</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/63</id>
- <inline>0xeed3216e47d486fc7d1717e5732e1ef5409b84a0777df50a,0x20b7bcc21f15418b75ef425fcb0c7caf87c9ccad70e06142</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/64</id>
- <inline>0xc26950fdd51d386cf3c9d8e3e78c33e10e1046bfd5c41d8a,0x8bea331f38d09138dd75f414466db8c13948f8c6ddcc5def</inline>
- <curve>secg/secp192r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml
deleted file mode 100644
index 9ce561d..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml
+++ /dev/null
@@ -1,434 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp224r1/0</id>
- <inline>0x15813b67113a4bdbd68031077a43009cce8ac33fbb0f94d1307cbd91,0x00000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/1</id>
- <inline>0x2a3af848496b126b2a871879ceee564e5e024f2b5c81d0dd23e89d58,0x2f4b5053098b9796268201c36c8a09dacdd49164bd62ca46b3c36c99</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/2</id>
- <inline>0x4ac5b04b59265bc031c6663c3a2bd5d9d978ea4348f38594ba102b42,0x01bad806f66ba85b636a5fe8ae202af25763792b7a65efb29bc724b3</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/3</id>
- <inline>0x19b886c460ed8315b0644a21ae91b664ddf5c4927f764e15484fb2da,0x361cdb6b4d4b0fdfa64b2b4432d896465a23448412723796ebd1140a</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/4</id>
- <inline>0x85e9575932e2e05e978e96afc0bce70ae5781c7cc95fabde5b2d9a62,0xd2857f34a39fce5d82a0b0c1bad8b5d147d66b0af2741eaf57a710cf</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/5</id>
- <inline>0x51d9d741776dd5c2d1780e05c6bb8869d9350d92d961c3697d506660,0xfac5fbf9a5590eec2c334354d5ad89434d3ceff005ecd59e2a5da5fb</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/6</id>
- <inline>0xe918209d920390e12465ea1998ff1d60328e1922eccf82afc2817df7,0xe3794681311ae507525d933c68d8e5d6209485692194588eb1891b12</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/7</id>
- <inline>0x0824e1f1f1eac192e59b334ba5b3186192d45dc609026906665a9301,0x50cc932ab26b523635a38066c547fe008d694cf898eb342165d21f98</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/8</id>
- <inline>0x406a44b18f68c1477569eb78bf730cef74109de101f8a114e6819990,0x058f1c0bfefa5a5a5d1399249b4ee4ca857a3567cfd974d661905fd6</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/9</id>
- <inline>0x17fdd5df6bfb6e4df703dc1439ab925d230d9dda730f177341a50235,0x3194a2104c2e43d8008f33afccca4d5dc5df4bc6b64e5ecc1abfcb37</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/10</id>
- <inline>0x19c3d7805264db1eaaa88c9d54ee9f3a4b92e488a3afe7e3788e6880,0xcbd6cce041eb13b57d20a9b7e0c31217e33e42d900a233aeef57eff1</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/11</id>
- <inline>0x4b998a619de7fb54bad7c417f354b9e4647e8e52c8114e79cd359e4a,0xe91c39decc581fdbc894fd2f2da3312ce07ef09bcef3b48a059050cb</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/12</id>
- <inline>0x6f7abdab0c5057b2d6440c87313fea1bf7ad506214babf6e1dbe8cc2,0x7f8d62650ee5f8bbb46e8ece3b606e5c8f051c13238785b8e0f4c81c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/13</id>
- <inline>0xffe20dceeae9ca22017c94d7b7d568a9878aa7ad15b67c8f1430e1ca,0xa26069c07dc38f0d45bb3b91418714c511dcbcb6396b02db7367873a</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/14</id>
- <inline>0x446685ff9600c91ab6f6bcc103e94db91f95d605605e67080475f1c3,0x327884db4b7761cb31e19fc930b6e00acf09ae604cf25d715d0e1531</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/15</id>
- <inline>0xfe615fc7a983085bc66e9a9f67c8a82521c9cb03c55caf0732837811,0x8a62e2ee5265bd2eefb0455e2d590daa854851bf58589d1272f9849b</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/16</id>
- <inline>0x857c09d9f9a77cae49355223c9c4f35eae309740fd1e85ff00f9353c,0x2c7d667955ae39c3449b3e44fe1f83904b70bfa95452045c92593364</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/17</id>
- <inline>0xfd8c74cc4cd6d8791f374e7af7ff80640d46dbc250e0217a83b5e14e,0x9b63e94eb4aad3504b18dd50630554adef3b52fe3863df3147ccac54</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/18</id>
- <inline>0xd0388a4c1671523b855504cc5bf999704ab7e4a20ac320c29475154b,0xb9b780043adf4ca0577dfcf64a70be394c3cdd9c2ebea74eb9b2f279</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/19</id>
- <inline>0xefd6b0ca13e3fe0fdbebd56e050f9b0dd6ab17c848cd93dd1d95987e,0xb71e2e10d85eca224d67c6f1d6ce00c89ef216d42a2d460116393ace</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/20</id>
- <inline>0x3e21d690d87e1061b54974efc8b25ec8dc89458fcfbbfc4bc52c3cec,0x62fd132333adf2e1e4c4731c8aac750613f2bf01b507b24306b7293b</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/21</id>
- <inline>0x45367d8d7c681d35ceab3f15380a33fd10174e6ff1e88cebf2133635,0x0112cbec1609557cd62280f32c027f1414bd8b1c89b24d74d809351f</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/22</id>
- <inline>0x5a67628d0343d765dea6ded21f622f6c57f264b4ee93a5dcba311b0e,0x260153810fa3522358087eb54f1aaae3057aa1955332725bbe1b68e7</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/23</id>
- <inline>0xcc0cdfeccd65fed9b0e9db9c431bfcdfced1c9468033c91594581f29,0xfaf09441eb53b4dccb7dfc3831ed5950d541d2f02ef925822abf8081</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/24</id>
- <inline>0x0d738337ead10988ce050d4c0ad7a9ac329bea7a1bd9baa698cdbeba,0xf4b661264be680c8b732f61d016a4ff6ac1c8240a01f70cfadfba0c2</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/25</id>
- <inline>0x4d75a425c4e6ca8ee9f3de58ff5499a87433951bbe19f3c56b0e6894,0xb76c77495a43a5c5e3cd286070a2284158c255dbbf090dab493e40de</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/26</id>
- <inline>0x8d95deb4df1320866baddc9e3f39b4ae1c6546b8353d68a5383f1edf,0x843c1443ff14271d6233d5d92d72d26b10f7c43abb0a2d48a3a15135</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/27</id>
- <inline>0xcbc5e580fc7fa7b1525375f455e7e13c6297f544c64a6e57f2a68025,0xcee2079b78fae4e7bdd80ec668a03629733643b5d0b78d76d09b5256</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/28</id>
- <inline>0x73cf2fab6a046dc2f9ccef400a8dcf4f410101ccbbc2f275c71b05cf,0x1657846ed9425d52525c8567e5bc50d48b4358b2d8adea1a4fd4207e</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/29</id>
- <inline>0xc73a93624d3b93c8687806a7715a0425dddd69d420eb0beaca6493bc,0x070b627906ae4bb34d3c803bcc23a838129b77f38cf0469d1ebee278</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/30</id>
- <inline>0x7aa658c60ded35ee0e13f34a43087e2dad681c995adab60965979807,0x89e2ce81f4c49fdb7d0b971680d7a029b14bc63d11c67938009ff415</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/31</id>
- <inline>0x2e5a6d18b0fd87be3fa21a2c6ad96f11816953c0f745821690fc0d79,0xa158645c6a34c7a0373201933fa6d4d71239a8fcc38e3cb30f267e6f</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/32</id>
- <inline>0xc90c47c2670cc93e27efcfbafc50fedba823525e3e5cf0fd357f3c4a,0x073040196665f86296f2a911be78b5054ddcd99d24194b17c95958fe</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/33</id>
- <inline>0xed636106ab1a7a5b69f40ff3d52560be494bb50abf0bf34bb4cf2aad,0x93642b55e6d4aa740f2e6bb09fcf40e0772a6c1788061b97c31a87d0</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/34</id>
- <inline>0x038cb9b0889e3f593bde90601152c68206e55c34edc509475117b25e,0x38b9b003caf68c778057c3c2eb87e829b3f6d8ed5b4bf554b45b9d7c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/35</id>
- <inline>0xd199f22a7f9ef58d051c77a49419500dc9e51d7c1fbf34aa842aa2ca,0x14b9cb34136de83560e55089f33917350a850202b0d4b6787af7532a</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/36</id>
- <inline>0x6fd81907dee473b6da05b6fc0afb54167915821c580ceccea68845ca,0xdf915779b29a39d5e791d4dcee2209fde0360121a40ecf77896359ee</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/37</id>
- <inline>0x66bef60fc586138a53180a2c3b9457731e423168ea7b66e66fae7a0c,0x88f4db7a1fef7dac22d92546d245dc502673c5750ec2a3d488b42ff0</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/38</id>
- <inline>0x883c19375c67b3496ec5b805a73f705a93e6ebdf92e079f3cdb0cdf9,0x9e3b6d3b121be861d5a87d6e751566ec9bc96f5b4dc51aa0509b2d56</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/39</id>
- <inline>0xfaa5ab8ad0846ffee094e651d8a29cbb65ed7bc3212842990a1d840f,0xb990d9773c07839c69064d98ac39a26ccba0abe294b28b2368189ed4</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/40</id>
- <inline>0x2f597a836e0417af3a00d2c232a7002357c4e0ed8c78accbc586d7c3,0xc5087d5a5a01942f5f39abdf4f40189e32a785f8e84d1cc93eac0d37</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/41</id>
- <inline>0x7cddf880261a8570d8c14546edc91806e6b298c77527cd7af6cf2112,0x008fd5caff7e4b046ad7b660829eafaf115d1395e998ac62f75c1bf9</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/42</id>
- <inline>0x88cffed6ac0b23a8f7346d4aab48262cedcaef089de6f721ca561031,0xfe5d853d471b48469746557adb564de1e9ee40f0e49594bba48cadaa</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/43</id>
- <inline>0x6072970782b7bc85a88c5346e5b22b6b54767818b297a77a486e6344,0xdd76e50fe49b3eecbdebcfb536a3885d67fff473ebe7a39c4d4e82f7</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/44</id>
- <inline>0xcf23d2546833d9ace2e69f52840b7128e80b977b302963b689e5fb0b,0xe9129b98f3e9dd1b0d3e494a9800bdfad18ee11d0c89c92041f4c468</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/45</id>
- <inline>0x9e7e82bf03229124d22d112f61b4a5a93577565e70d711b0267b5268,0xc7d2ac6f6c527205373e21b4a84dddaf4aeb08ad4786e87ee5dd9ee3</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/46</id>
- <inline>0xbec8817d7f285d4affce5f2927fc4a7606e180cfd15972e4c64a0cf6,0xac7722980f9c6e6c299c80cbfb084cca2891f72026ebeb79e448ea32</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/47</id>
- <inline>0x66be83e793c99145d6a6fc4b9fb02e29835fd2349c0538a441d48d28,0x600e73e8d191acc73fb272df6ca7edb3748e9ae43af215b5288e9c0c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/48</id>
- <inline>0x039820deb6a5e58b71d72d28a7da99d578a833f70e9a4bdd930d7954,0x2a1ad5207d1aa4123ae6d2999c7569c39487ffc26288384d2503f551</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/49</id>
- <inline>0xda6a33dfb2f3dc6f53b8a4edd167d3c39f78f1515e514ce5a096111c,0x79aca7e933a283a82b0dc41e6353c7d4f950051f3b5089042b47e147</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/50</id>
- <inline>0x80d3d17878392e42c2809add36c451c3700a8befb741391c37ecf130,0xf5cb5b1fa16a6e79cd0663824265046527e173a822610d588dedd6b7</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/51</id>
- <inline>0xf5639566480e6c3c9cde04cd792345d9d50f6a248f86078a8e4bf433,0xd8d4ac9128664c6fd39794485fd52e408e07665a18b17e4d36402a58</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/52</id>
- <inline>0xf6aed3821c7c9a1fb8befd775161570c6e0ac4c6e615a6b866b33451,0x56b9eca63eec26a0e7418778d83c77e00dada116fe96307319e7e070</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/53</id>
- <inline>0xffee0c9580fb64265ad41779850c6c64d1d413851afb65365d687640,0xa79de8aab6209d3f67aab47e87550bf4c712fd7ba43521e7490f01d2</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/54</id>
- <inline>0x2e862f490d3da0a207b2fe447f9b096e8b49a75f7e90f113c50d6cdd,0x9f25ea072d1c0471a74b889bb559ca315275c9e6c5c19a1fa12b5c93</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/55</id>
- <inline>0x61cf3af253fef2be402f9998f4c3d8461d27a5226662f64e868ffd8a,0xaa4ff0b6f7928e0709394399de0d97fe53a8683b777a4a075e899d9c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/56</id>
- <inline>0x3d03ff1fde14c96e3de5dae877c78f4f270531de4f07061ab7130397,0xea3daaa5d04217ad1525b5908f699ab996171cd25461641bc4d3eaec</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/57</id>
- <inline>0xac56b0ab6b95c45d6bf2e66ea00394025cb9837b5da72173e5d3cefe,0xe58675da73ee36a2874e2cb96ae3573e9b6cf60990ff0cec064ccdde</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/58</id>
- <inline>0x9244eb293582c5f42bc6827fd17cc8449567c5c78ee93abc460c507c,0x42e9adae812ef137b711d3259b851d47e2e35d92486453b79070344a</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/59</id>
- <inline>0x31d50a36dc59875283235379095aad4fd20a33dfa208ba7376e31b78,0x137232aa64ea9e67145a06b06b7a909d95dbedd294299d0432565e45</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/60</id>
- <inline>0x551a3b2581584f4a3bbc119a940e7c9f3a84e29625ded75b88f39282,0x09b970d228646f1f436eadca0318239e8636aac259c115c963e7f17c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/61</id>
- <inline>0xc6950fecb2f41eb7e85410809ca3902d14f95197e3c8288ddad92725,0x0e6267afd50d294fec6c7b5281fb4aee90bb186582ab3f372ac443a5</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/62</id>
- <inline>0x357e1954c99764097a023c4c239143516158690c36b5a80eab439c32,0xf362d1d6f1c58a1604df3573c39793de37a65d5b32a299578aa93e9c</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/63</id>
- <inline>0x584f77bfa721f02e7481e017daeb2f8277019d0630a91bf538ae0257,0xc21271ab35a4f90f06353927c2498d7c68169e53303c69ec71880867</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/64</id>
- <inline>0xfda1c1a2c40be6377194f14c076b90f855cdc4354fb159d033a3a353,0x996a40b7f0e3cb2a333e1b4285f2151a86d09de8318a6ab9de1e539e</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/65</id>
- <inline>0xdd6f2d93badb5e511a9cc5489c79d8c411e84d85e186961eeb3a6117,0x858cf03188fc1e172384926bfdebfae983a223cf13fc07c9858da88f</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/66</id>
- <inline>0xaf2a4b4d6edef6d32d42716c29ae5eaaaa71cdd1775e7362ef39c95a,0xe34788bcea616c717a778b6486fdb03e60100cb344d635e03b7efd11</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/67</id>
- <inline>0x2fbf987447feed974bc71eea5cfa2657ff24e16eeec32488e9099dee,0x461b4e646a977e6b59a74a0b6b79fe4454b9571f342ed964307c3b71</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/68</id>
- <inline>0x8805caa0199000343345f6cf371f5ebee24628a127a9a2c79350c206,0x26de29dd6b806fe39b7d170cd032bd68467f148024a66e0c18382b4e</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp224r1/69</id>
- <inline>0x21224a2e74c519b044cb0885bb4d39c93d459cb810a486e2bd257380,0xfcf0f5c414e98767bdd0a95887aa065634102f61afcbe13b7f1918c9</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/70</id>
- <inline>0xc81155743c1ce0d22f9bbc7acf64666e1e82973866c63e7e10a295c3,0x83ddf0ad6ed67e8863f3830e0ef6e76857b2d21d6de3ce9bc60153a0</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/71</id>
- <inline>0x74c39d25aaff45aea0a1e2a1f76ce58fc56bfff0b92f21ecea29b582,0x9a1f6fee02efe3a3013501fb4b77f9f6e6ca633463809207319a0787</inline>
- <curve>secg/secp224r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml
deleted file mode 100644
index 6a30210..0000000
--- a/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml
+++ /dev/null
@@ -1,482 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp256r1/0</id>
- <inline>0x8f12f2d85ee6c6fb911b0b6c636785e347256edd7add0da5091fe43844f3ad0e,0x0000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 2</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/1</id>
- <inline>0x866a59a3c8c60de3947700bff2c91be97749114e31fc389727c55ae7aba9f6f5,0x9e9893a290a8ab4507f241f384ba3332758054adf7d8f3156ad02afed128deee</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 3</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/2</id>
- <inline>0x95d086503fe293bd19644c4f4f3093eb650397cc9bf0e6ab87b78066261b4a6c,0x18b7895e75baab6768f35c9f8b183ba10899b0ebae4543ea791c05e3d1a2b764</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 5</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/3</id>
- <inline>0x5b6caf990697e508e999ab40f9a419c2cbb7b9c062980d9c96b62eb8b15a345e,0x86f61c2b428faaf6079be077750a0d60058a14fdbf102c6c07f8d1ef751c802c</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 7</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/4</id>
- <inline>0x6d3b7edd5efe158464c744e9e2eca3acfc338889af611286bce18121b81305a6,0x6a60fe4a3f6c91b6df4853ca6e1fee6faab291bcc849ac16fd857421c270de6f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 11</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/5</id>
- <inline>0x6026525f4d5adfacb4a933f3361ed53b2729031dcd323c615e231363c0ce02e3,0xae2fb47cb4ddf7d70d7babae9a8a893b3db5931653caebfe10523e43c60804b8</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 13</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/6</id>
- <inline>0x110f1fc75318d904b41566c0d00925b061e87f1bbbc3a99ad0875eb7f94da1e7,0xf25db03828aedb999899230568736f6d1214ac07b2fec22657cf8a6e1cc89f5a</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 17</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/7</id>
- <inline>0xeb18bfb2a81015b1ab9779b1a6f8fb1713bc7824490565adf37b04c6537dd0ff,0x8f27019de59b18b36436985167970c9e7cdb4d09eb82f1d028d358cf92e15895</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 19</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/8</id>
- <inline>0xbc89e296951934d93afb76c29cf37cebe77047c00cc744fc5289edebc7ad2700,0x550f83d7f5f641fdcb22424b4f01fcfc0ae6ddbe0cfbb34b35645ae1a91ad6aa</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 23</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/9</id>
- <inline>0x93bf2bbda8a54cf4e4eac690768ebe76897c44b28cbc49e1d6326f30c20cec4c,0xe833ebe5d3a641df5a32ad8c0589e0be4abaf08a57e3689c149215454726ad0c</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 29</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/10</id>
- <inline>0x5ee8b9c465becc7a550444586ed3bcebc7a31fe34915ab7f40d06fbbf97f786c,0xe265ef42c0c708a04ea2dc6dee427b00884593a3a5c22e55255e64f766532a45</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 31</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/11</id>
- <inline>0x9a2d6ee27751cd8fa8e72ca9107e086b65531c77961d14907f759be1b9abfd61,0x38e6c71047b3a08208820bfeb96cf22a61a06a5178242dd54b280c74999303ab</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 37</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/12</id>
- <inline>0x004de812700bc95a04975f89bc0f6981e71a003ee72d09aa82a9a5bd8570b02b,0x5b591897cc2c01346d2a3c09214bcb4d10e46dd0fe19eb9dfbc6cb81dd9eb2b7</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 41</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/13</id>
- <inline>0x432b09a9973a6ae6c746ceba9903bdb36bf0de94a292482e906fb787b27010be,0x155d792b3cd870c892ace2af9d3fd48d55a94c3485e32ee3362232b331d00267</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 43</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/14</id>
- <inline>0x3c013011cdf737c3a35c84574f779f3f5ed522530a8d7f80b8004fe737f46811,0x44349a25a8a45cc2ad5ccc11c170ee9d72d328e00db71f40148dcd72ee456800</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 47</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/15</id>
- <inline>0x70a15a2462e072ddfdc4a9fe471de74c44c38b0858e47d0684b26568b82860b6,0x3fdb3a5157022baf2c19d84dd2657da03c92c273a2e96e6a63f1410b9607033b</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 53</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/16</id>
- <inline>0x81263aa019de4e0c36967774f3c82b39effb389853e2cba0a5cf02ea19c19193,0x95ee7f527830f23c9cb01ef3653309d43a240549eea30be83649c0a0a361b22c</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 59</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/17</id>
- <inline>0x2128b029fd81aa818a71128b8da12982158083b2f2e4bb99b5879625eff5e2cc,0x60ec11c2851d82d4d4e0c33118163441c6c48aaa14997d30d4a9f371cfec8791</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 61</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/18</id>
- <inline>0x7971c03966540f5a5a6ef23e6992289e81c377297421df9bb0133738b5b320a9,0xde681b5f79f17eff2b18b3527051fe35981bd908352ecd1e8688d0f0208c4885</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 67</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/19</id>
- <inline>0x87d12340acb757fae6eecc8709b9fb0455d1bdae7389fa220e50b49078ffa54a,0x75890f8b4e4a318954187c48359f4270d8b389f5cba266b2a72fa4c814433d9d</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 71</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/20</id>
- <inline>0xcfcf8c4b6a528e8308342000c90ca07c5cc612b838fe96f603826045f348bef7,0xb45ca4421607da8a41e7a62025ded78e44eba472864e744dc2f61fb70b84401f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 73</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/21</id>
- <inline>0xfdbd68774d6aa1bffb22205c53b689b2250f8231573b2fc8e48ca558d10bf53a,0x76a5b860409b1bceadd05ed58c84660ce3b2b59e600465bc10ce3f8a4e34335f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 79</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/22</id>
- <inline>0x702ef740f465c7e8e2731431ff25787bb70bca7c95b42504978b505f6720eb86,0x0873d9ba564e5d3bcdf070718616854b3bfce6aaff50fcdca68f94e5778dc194</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 83</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/23</id>
- <inline>0xad4cc335465f6beec9195cec81625e57ac730e3707b6e5c599825b517a5b367a,0xd9add85ba9b5f97e23a2e68e26da6e58db4548a4c8e55399c7c90252ceda8ff1</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 89</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/24</id>
- <inline>0x4fc913027b35036a89ba43b96ae84c0c83a776125d275453a370710efd7567ae,0xc83d135da14feb034877a49bf525596c68910c8e8004a8c88ac21c61f673826f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 97</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/25</id>
- <inline>0x3c13f6b5087d313c5c984a92b5e21d13526e4f6355d397e219330cb781d7f938,0xd177742872e9258fa113e041e0aee8ffe172e5f20d5f80b449068b7306c7f94d</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 101</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/26</id>
- <inline>0xa75db744af4ccef799eea08aac6ce8030632aa406aed3158e83c41a7610f6a91,0xf1b62633c2a6ea22af04127c74dca605d0fcbc09cc71629a8bcf90a5f97200e6</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 103</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/27</id>
- <inline>0x48620b7d6df33243d67ed0f2bf43637952144a4ead19480a79bc33227aa33945,0x5900633cc813bd4f2740f063db8426de7e0b743c9a887160e431424bb49682e4</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 107</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/28</id>
- <inline>0xdcc68d7325c310b51ed4dfa191e506cfef02d6e1eb9ad356b53f984e4cd4f6d0,0xdcf6835e50f09ef9b689816196fee67d57f60f04695aebfa5575cfe8615277e0</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 109</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/29</id>
- <inline>0xe5499ef69b017cd641f66b36e129d0200ce8fe030386a687d68d60a14de7f157,0x63de50c503daaba7d8abdce4f8a9bb556969616cf59df6109813e09d813db342</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 113</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/30</id>
- <inline>0x3488b130bdb5e52056cc659910005c5f181dedde6612562a2d94e9348673edbc,0xbf20dea353b21929d4f494e072fece389f5790f92a75aae6529c6deb13b5e952</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 127</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/31</id>
- <inline>0x7405904455b1ca2a38469ffc44fc776d89cfe720c03967921d601faca7be4509,0x6f125bf9c0e01ba8bbdc031a05d5af5b7a8e9c61b183d218a61230d3cd0227ea</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 131</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/32</id>
- <inline>0x2f6e45887af9cd331f9e0306c9143378271da4cb0068ac6170ec427949d37d57,0x55370714307d93fbfab6b1abb0538671eecf324f7c73ec2062fbfc811ba6cc9f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 137</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/33</id>
- <inline>0x41398d9e75ba81285c350b0adbeae4efaf4c4d60868145dcf09ce69d1c61d60a,0xc65b4d9d24ba96813ff847b7c4e896e37912ebe69608a27da8e4c0c88f0fd6e8</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 139</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/34</id>
- <inline>0xc0232d6f3263707bb6c410069f64549123656e2ed3de9d7ad7926b3ad1017600,0xbb40e762ccd65008b82d56075dbaf4a2ee70ce1db6cad812989e25da63af0911</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 149</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/35</id>
- <inline>0xb7bcc0e1c1708816ad45e856a7d156a0289b92fe70fa65386dbe954a237ef861,0x764b0155a349a683ba41120538902226f41214449fb15f18e928807a7cc4d592</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 151</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/36</id>
- <inline>0x4bc476afe87b081f9fde3b7830e08a4f162d682c3f8b9ce488a6f44b77df28ba,0xd9037097df480d54ffdd4ced1cffe3efebb205c8d805a775e5c5310a0cb1952f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 157</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/37</id>
- <inline>0xa583ce09b9dcfbcb33fc564f83c577ef1fa94e125cd437343d3a82be97a3ec25,0x28631e0c27dce808cc08aa94bf4c317ebb0f4b4227a5b4ff86fddd76c93b12b8</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 163</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/38</id>
- <inline>0x3a591ada3f9c7803e6da77cb1b9adfd349d80dfac04829b7ccbd0767b50006e8,0x0b5eb79cd757583bb44385e902b9dcf14a321f6cbbccaf83c631abe34f2e996d</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 167</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/39</id>
- <inline>0x7a277a5debbf3da308d7cf83cb46ecaaa79c1b02bfd40ae3b911e879d576e9aa,0x054946996938f9af0f326e109f44ab5317605cb1a1d59464f3a695c05a4904c9</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 173</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/40</id>
- <inline>0xc7b3cd34083b9edb2e79b74129d38dba1e287c294fb5eefc5b88d0cdd53ee70c,0x0d29c58435ab03277891c7c53f283e7f096a14da33303cfbd4f6934131c6cece</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 179</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/41</id>
- <inline>0xcad59c7e9c91517accaa91ae59ade119dd121d9b4c4346eab714510643df06ca,0x75e737143937016f278fc91ae3fe419b9379571c3dd311c1552250a4913ab3f0</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 181</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/42</id>
- <inline>0x351f43dce3f06599d59d5afede421c3490a11e173a432072de8a81080ee7e248,0x983efbca5e57eaf38a6443b7983ba5c402e2d141d0c0d79df27ba01073b0e906</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 191</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/43</id>
- <inline>0x6309bcc67907b2598cbfd4c646da15779d994dc252767570b7baa8ba6d8654e6,0x7c81c40bfa678e1931296b1f663a8f5ea78275876e74c8bab01b9402929068da</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 193</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/44</id>
- <inline>0xf292f80fc10311c888836cfe3ab45ecb09dda4b6fedcc281aafab56a5da78995,0x57f87ca4673e184a47c174a575c96b11486a0b93bc87be99b3c2e37d77e436ae</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 197</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/45</id>
- <inline>0xa62ce6b8c6bfeacab500982d3a6c87e973eefba80886b92a7e94fcc600ff3fb7,0x4e0e63a86999b374981d3cfa08fc0b639e0d9e3a928fc6e57375ce43b3bbf4c9</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 199</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/46</id>
- <inline>0x5914880f8d170571c1135c083574714dd96a2b1e6e99beb7941dd148d2e599ff,0xaf784693a45e40eadacb00ef603c0b9f9781a732ded580abd1f6d4e5eeee34a8</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 211</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/47</id>
- <inline>0xe1fd32eb7c50f5bdac4a25df392c487156f107ef6de78fa5b944ee7fb3f43e81,0x475d5a69377321302573576b88eb977118b79a8c38237e9679de8ad20b475d66</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 223</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/48</id>
- <inline>0x1103402b2f0a6110548f5e71021c98ff3057eba508daf9610fd81721952d957d,0x90b3e12a67ea60c09c614a3f83221d22d658d18dfdd741af9f96e0a5a819eb7d</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 227</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/49</id>
- <inline>0xec5f138bc7ada81fbc4872f9e85da964fc8a05733af7fe27fae80a5f5a05c457,0x8888bf60c20833735580c9ca06a76075efc0f9b61be4817fb39503f8f7260069</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 229</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/50</id>
- <inline>0xe60a2d08993de62dcdac2f18ba67122c7c3aba754e2e8709e6cb1a285e077997,0x72182d27dc3b2be7ad9b8596c5949ac3c1b5669e8122ca52fa59bf2b32b78310</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 233</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/51</id>
- <inline>0x5d079ae0c776a896b213fca832d8dd8d972506165289a4aa04980dbf669be204,0xe2d6f441c219f45a5d2d996dcda96fac74952178052acf47ae72e4442f4a4a91</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 239</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/52</id>
- <inline>0xd6eb5b70a2c63869481403117cdf85cc81574b4280f86f83d9a3e6c49e62b260,0x417656accdc70b7372118f249776584a641feed1a36ed20cb8c97c9142dbc242</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 241</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/53</id>
- <inline>0x2346416762b085d6ffc07a5bbb755f507a1f87ab4b0ed4572f6cba4f415a178c,0xb58ced69252349021d06dbea777e63de85c948bd30d587b36c6b5e008cee9045</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 251</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/54</id>
- <inline>0x9d59a99ddedb6d100b5eefe0b1552393898e0fb4d8aa7871d05aab7762a24ba1,0xd61cbcc969505f8b9acc838fa908fc33a45bfea3c40b4a8df2c785222d41772b</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 257</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/55</id>
- <inline>0x0e3b247021a52f27f88bd01ea44a018eeafaca6cc6bc05e7951ab3429f79511f,0x028b782453e402d75b1caa5b30f97345649afd010d3e7c4acf96ec9bb3d8833e</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 263</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/56</id>
- <inline>0xb09abbc7fdd85f1cb3288b55e1a4f2c498c5a562ef01702706fda54f8c75e024,0x1754db8616228f1b04bce0867d9b0f5660bb4594122ffe5d391d016644176150</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 269</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/57</id>
- <inline>0xe720cf00824e69b6d81df9f4f4d81f2b1a774181eaa5bf65bb33705c0550ea52,0x77bb8bcfdbe38f0a486ee821be6910087bb4f483a01717d8289418d9749a72b6</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 271</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/58</id>
- <inline>0x9bdbd9f0fd24cf705cf945e8e35fb5bce9f67c5d6e478980b1fe04d966dfb580,0x775ed3d85398765182c299b266533e96fa781a70b9b110c0706cce677f8c5973</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 277</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/59</id>
- <inline>0xf8ab3fcb6a70cbb9cac133f074b6dc4b489b6ed1eebea9f37345b57ffe272cdb,0xdba5d39c71966986c68bf1d0eaac97477756765666bd20ab386fe07ad108be50</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 281</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/60</id>
- <inline>0x8aafbc2259752f42fd06d88ba4ee77284a18022559424a72cc93f250dae60bd2,0xf861e3e45b68bca5f26088fd98bba9bb914f3a72e768c4c0bd562e968c532a40</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 283</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/61</id>
- <inline>0x8d714ce2e5e6b39a201377f70e4552776854701a2ee834f855cfa4dddba5a0e1,0xde2532ba273e910b62cc51b9bba8a194544b5ddda89214f21f7015eb8912f7a8</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 293</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/62</id>
- <inline>0xbabf3f0f14db3b651076b395c5f2a499c06e31059924722a7ecb83d9aaf6be55,0x1eed385eccdd355ad437be25ca223ee7572e2e11559521bfa2db65eeda89d1ac</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 307</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/63</id>
- <inline>0x1b3f213670b9e6bc0b40001516ea9941b5310883d33a0e13b5ccaeaacc593bf9,0xab5c0bf0a0eb8531452b163bfd6cd171d75021f3642f3185c1ec80582dfe3a74</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 311</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/64</id>
- <inline>0x2ff8dff93cb2edbeb20db37d4539c76072bd949734b7ff768d06a56662a2a78f,0xf727bfbb18610ab05923fea34e146a7350eb1d28819f62cb3c6e1be0d08178b3</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 313</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/65</id>
- <inline>0x5b14939e07aefc98655c1a27bdc1e78b694aa99cbdbe63ec68bffa0284d76278,0xa430eca9df72967d258ddc7ad1f4aaf779193c1d9af62e71b54e497d22090593</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 317</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/66</id>
- <inline>0x1683cea98f5f65beb4ac810fbcd6524ade785bf6a03093ebe27477e8bda3bfb5,0xe236090952561208a3f4ec76806c09ea2f6661783cc191fbeeca0b589960a98f</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 331</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/67</id>
- <inline>0x4ba604f77ff7c968efb390fbd5bb9b7be49292633af22a5c9c9b822d4f952329,0x488f7ac53558955a998a32cf9344f5c016427043fb0614db869cae0918357e4d</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 337</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/68</id>
- <inline>0xc6b7b1217ec2c931f8560eff678daa0f52e6fc1aa5197f9fee90594b5d68e8e2,0x8a9d94f6b004fdf3acd8dfb0ebcbdf00a30fadbfdbd18069ffc01b94177d9855</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 347</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/69</id>
- <inline>0x0a732788d93a5c81202b3f7bcb74b09fd69345e0345ffc833317c5895ec074de,0xfb9dc56e4cbd7176b4b7023e565d244638fb9e3b8184356850f4da6be9b755d0</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 349</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/70</id>
- <inline>0x5dda49123f446452d3aadac4fcfda4e3449bb80b2ad4d230fd9e3d8da2c34362,0xb161d3e87b523b8a9cf1eaac24681ad2f966de45dd6583bc4800d1b5021be17e</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/71</id>
- <inline>0x521dd973febda789dd851a225e2568f52f0fae50caccbb3f8298d8e936fdab8b,0xae659e2e25b3fbc18bf62731c4140965c68b959b1ecd7fe0472db79d0f5fab49</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 359</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/72</id>
- <inline>0xc165bf74cb7d1245f4ec958223301d880bc1a127f13ed8231ea442a9c487e970,0x101673339a56af77a6aa80a8e4c364a9bcb8e5197afea4e2fcd1b1bd2770d7f5</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 367</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/73</id>
- <inline>0x128968b6fcaf13159426a3638350245041c350ba9680c07f9c8f32d9c0175994,0xad4ed97bb42257bae49977ae029f50a46ae6c8765da76fd62f8838c3bd6e9d52</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 373</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/74</id>
- <inline>0x890f87ef79d7b31ce623023ad8660c259f76746fbe2ad3c4160e7644487213da,0x8a5ab8b61d6c98f81be18178a9f5816c245841d1287e7435c2c2dfa51ea19ceb</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 379</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/75</id>
- <inline>0x7fcca390a2e21feb868bc97e8e231e3c2f386c38fa4b6e550f0f067c0b093d8c,0x1beb2934c78d5cc7559ee208785adbc340d0cd5bd2a6a7a0c4e4222eca961bc7</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 383</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/76</id>
- <inline>0xaae8e67f2cf220f47da34f4fc0fe3a93ad9194994f748e6936b81db166e90993,0x94dde8bdaf5bd25e8ec3d33fd878641af658f4d4e141dfe94b690071680ed6c3</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 389</desc>
-</pubkey>
-<!-- Additional points of larger order. -->
-<pubkey>
- <id>secp256r1/77</id>
- <inline>0xb1b630092fa728b962bda086704dd16628d8ba65a5836f0e5ab6b268b1874346,0x6741a8de59e27d93c2afe35d02a62a0d6ca1d410f02fa272c916457c3d64024e</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 353</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/78</id>
- <inline>0x8ccf453921033e2a0e2d612103f9d6037bede19bce172bc7e4cfab350dba5c1b,0x4f381c96db7205602819de572b088b81cd8aad51dec5367b2572d07ec174b13b</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 631</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/79</id>
- <inline>0xed9c0943430dbb23b735c527f5376eb1f159ce7ed42d725f89b03d2b4004dd93,0xc8e98a510b4d1988d8291c4f59b99894285b0a18801ec46e1d732c37fbbe6027</inline>
- <curve>secg/secp256r1</curve>
- <desc>invalid order = 1231</desc>
-</pubkey> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/misc/keys.xml b/src/cz/crcs/ectester/data/misc/keys.xml
deleted file mode 100644
index e17b45b..0000000
--- a/src/cz/crcs/ectester/data/misc/keys.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <privkey>
- <id>openssl-bug/skey</id>
- <inline>0x4543A4D2C9DDD5516FD16D5498034C76D4EAB340276B6BAD8FF57756F4ECA8E6</inline>
- <curve>secg/secp256r1</curve>
- </privkey>
- <pubkey>
- <id>openssl-bug/pkey</id>
- <inline>0x296D416994A4801B9A48E8C67C98E0C05DE1C0E85D4DC676F32FEACDC4998F0E,0xA91F9BE06C1D50EEB0295A35CA0F130F17EA647147626318E28AEC97F0653749</inline>
- <curve>secg/secp256r1</curve>
- </pubkey>
-
- <pubkey>
- <id>compression/128/non-residue</id>
- <inline>0xb6707fa8afeddf79b9579e8dda4eaf51,0x000000000000000000000000000000</inline>
- <curve>secg/secp128r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/160/non-residue</id>
- <inline>0xb1cb90992ff28689c6f160dcfb51b9525492e3d9,0x0000000000000000000000000000000000000000</inline>
- <curve>secg/secp160r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/192/non-residue</id>
- <inline>0x8910baef94195e069c142b129e97507bfc2e19b53b707441,0x000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp192r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/224/non-residue</id>
- <inline>0xafd44b41555e8bea506518b35405d4f5be78355d6342e7f5287bd748,0x00000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp224r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/256/non-residue</id>
- <inline>0xeb7a88c476ede6ecae7909aa19631d9918762e851c38a3ea00fe50b7b2e2e656,0x0000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp256r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/384/non-residue</id>
- <inline>0x45d50b222c11c0f20946133382a988caf2d4f64e669340ba60a5ab3151a6bf3883e7e77a6d358fd07db411bc8ad0f375,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp384r1</curve>
- </pubkey>
- <pubkey>
- <id>compression/521/non-residue</id>
- <inline>0x1d7b127de8415bbf498c26f7a17c9e39dcd866b68359bc8e139f401f8ee8489419fb6166850c98cce7e1fdc620902961656d72f9b42703f06ccb9fe6e218e7e3fe3,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp521r1</curve>
- </pubkey>
-</keys>
diff --git a/src/cz/crcs/ectester/data/misc/results.xml b/src/cz/crcs/ectester/data/misc/results.xml
deleted file mode 100644
index 07601b1..0000000
--- a/src/cz/crcs/ectester/data/misc/results.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <kaResult>
- <id>openssl-bug</id>
- <ka>DH</ka>
- <inline>0xdb6f7cd6a06846bf9da9b4928caa5e4b7c8f58d9</inline>
- <!-- == SHA1(0x1D0F27241C177385B0D5025029FABD5D5D8475DA4E267DCD177B49C63605C25A) -->
- <curve>secg/secp256r1</curve>
- <onekey>misc/openssl-bug/pkey</onekey>
- <otherkey>misc/openssl-bug/skey</otherkey>
- <desc>https://eprint.iacr.org/2011/633</desc>
- </kaResult>
-</results> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/curves.xml b/src/cz/crcs/ectester/data/mnt/curves.xml
deleted file mode 100644
index 0087a5a..0000000
--- a/src/cz/crcs/ectester/data/mnt/curves.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>mnt1</id>
- <bits>170</bits>
- <field>prime</field>
- <file>mnt1.csv</file>
- <desc>Example 1</desc>
- </curve>
- <curve>
- <id>mnt2/1</id>
- <bits>159</bits>
- <field>prime</field>
- <file>mnt2_1.csv</file>
- <desc>Example 2/1</desc>
- </curve>
- <curve>
- <id>mnt2/2</id>
- <bits>159</bits>
- <field>prime</field>
- <file>mnt2_2.csv</file>
- <desc>Example 2/2</desc>
- </curve>
- <curve>
- <id>mnt3/1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>mnt3_1.csv</file>
- <desc>Example 3/1</desc>
- </curve>
- <curve>
- <id>mnt3/2</id>
- <bits>160</bits>
- <field>prime</field>
- <file>mnt3_2.csv</file>
- <desc>Example 3/2</desc>
- </curve>
- <curve>
- <id>mnt3/3</id>
- <bits>160</bits>
- <field>prime</field>
- <file>mnt3_3.csv</file>
- <desc>Example 3/3</desc>
- </curve>
- <curve>
- <id>mnt4</id>
- <bits>240</bits>
- <field>prime</field>
- <file>mnt4.csv</file>
- <desc>Example 4</desc>
- </curve>
- <curve>
- <id>mnt5/1</id>
- <bits>240</bits>
- <field>prime</field>
- <file>mnt5_1.csv</file>
- <desc>Example 5/1</desc>
- </curve>
- <curve>
- <id>mnt5/2</id>
- <bits>240</bits>
- <field>prime</field>
- <file>mnt5_2.csv</file>
- <desc>Example 5/2</desc>
- </curve>
- <curve>
- <id>mnt5/3</id>
- <bits>240</bits>
- <field>prime</field>
- <file>mnt5_3.csv</file>
- <desc>Example 5/3</desc>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt1.csv b/src/cz/crcs/ectester/data/mnt/mnt1.csv
deleted file mode 100644
index 7ff5784..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x26dccacc5041939206cf2b7dec50950e3c9fa4827af,0x22ffbb20cc052993fa27dc507800b624c650e4ff3d2,0x1c7be6fa8da953b5624efc72406af7fa77499803d08,0x25a3ae778f7ef6586abae5acde21e54b6c64edf33d0,0x05b4ace33aa53c670ce35535d6c273698a182da557d,0x0000a60fd646ad409b3312c3b23ba64e082ad7b354d,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt2_1.csv b/src/cz/crcs/ectester/data/mnt/mnt2_1.csv
deleted file mode 100644
index a53376f..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt2_1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x5affffffffffff4b46081000000059bb1bf600b7,0x3dd24a7e5c0bdfaccc215e22760469c73ee9d879,0x478c31a992b294e19f6e4416f958646dddede5e3,0x2725af3d7dea98cb9242ac6ddb9bd89bdcf38898,0x480b4184ed2c50c0230b4c73ca939c1b6b7f1103,0x5affffffffffff4b46081000000059bb1bf600b5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt2_2.csv b/src/cz/crcs/ectester/data/mnt/mnt2_2.csv
deleted file mode 100644
index 20dd8f4..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt2_2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x5affffffffffff4b46081000000059bb1bf600b7,0x07b29491c1a02cd87844f5098d0381f6c45d6523,0x41cc630bd66ac817d43358b108ad3d214037993c,0x0d76b3e1f1ed76a282fa99575d29ff2e587049e9,0x36e1557ed145ad409f924420e12f74a900fab054,0x5affffffffffff4b46081000000059bb1bf600b5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt3_1.csv b/src/cz/crcs/ectester/data/mnt/mnt3_1.csv
deleted file mode 100644
index d00719d..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt3_1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8afffffffffffeeb0fa77000000089f0dd49fac7,0x6d01fd0a017c62075ae999977379867e07f2a6d4,0x7701535c00fd965341d38bba4cfbdcf9a4651825,0x1781998103c3ca14ea76b9d3a700a53e1c784789,0x53352dde04447c25c9bb332a3c7634d3b8801f34,0x8afffffffffffeeb0fa77000000089f0dd49fac5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt3_2.csv b/src/cz/crcs/ectester/data/mnt/mnt3_2.csv
deleted file mode 100644
index 86d8191..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt3_2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8afffffffffffeeb0fa77000000089f0dd49fac7,0x5fbe0085bd2b23afcd5b9c7704aeed2bfdbe89e4,0x3fd4005928c76d1fde3d12fa031f48c7fe7f0698,0x494e297179d42c761701ab03b2e5bca98a24dfe7,0x3274201d6596252a780390a222e3763bbecfe5f1,0x8afffffffffffeeb0fa77000000089f0dd49fac5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt3_3.csv b/src/cz/crcs/ectester/data/mnt/mnt3_3.csv
deleted file mode 100644
index 348b30d..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt3_3.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8afffffffffffeeb0fa77000000089f0dd49fac7,0x2ddf23acb05a91bda6ba9c20d7a584aa25075ce0,0x1f8125c46a31e79fd6cc25298b23ab130cd22b5a,0x3f710d05b65b5e16ae1b946d3fc582b16a927432,0x4a30945c64fd7f85e148ba816005468447616b1f,0x8afffffffffffeeb0fa77000000089f0dd49fac5,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt4.csv b/src/cz/crcs/ectester/data/mnt/mnt4.csv
deleted file mode 100644
index ea5eaa1..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt4.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa2ffffffffffffffffffffffffc298b00000000000000000000005c866cf,0x4be28760aa064734852cb4ff51ef2928a7a3cd75087c35cb1433714f7407,0x329704eb1c042f7858c878aa369f70c5c517de4e05a823dcb8224b8a4d5a,0x82556d57811807a0d7675674b3d57222cfbf9a2a2a2cd146572d7b67627e,0x73afacea28dc870baa1d5b0bd4300ddd975e2eefc7c2db508fc2e92a8345,0xa2ffffffffffffffffffffffffc298b00000000000000000000005c866cd,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt5_1.csv b/src/cz/crcs/ectester/data/mnt/mnt5_1.csv
deleted file mode 100644
index 2fd1622..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt5_1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271007,0xd149265d4687dcab1f2046e0947e51ac5e8e7f25916d35539d4df2e9017a,0x489e7783a1f584712bd4f6d48cf2d1ca2c975678936e639083991c5fc369,0x1d871a744f1e02ed15d7d84abd95e80476e6307085f12dba27092ff06d60,0x5c0c8bae9661303107b0077949dee16a7f6dde4982657b9196de23d9f9d0,0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt5_2.csv b/src/cz/crcs/ectester/data/mnt/mnt5_2.csv
deleted file mode 100644
index 18ec3a5..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt5_2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271007,0x26caaced434c5a4c2c9c1b09e0ddc167548a95516e7c81b20702485c9809,0x6031c89e2cdd91881dbd675beac3f3df8db1b8e0f45301215a01baf56ab3,0x16e55a2ef696238a7aaf19e51b6a81e1582f28b4bcb6575ab4e0331e569b,0x38de9844643fc9db3c568ec528983da16a177d56145a1d4bf88a2340d839,0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/mnt/mnt5_3.csv b/src/cz/crcs/ectester/data/mnt/mnt5_3.csv
deleted file mode 100644
index 73fce1d..0000000
--- a/src/cz/crcs/ectester/data/mnt/mnt5_3.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271007,0x44cfc0f3bc92ec82f818b443b564cf25dee3ebae7902e370f9e80283d3bd,0x2ddfd5f7d30c9daca565cd8278eddf6e9497f27450ac97a0a69aac57e27e,0xb071579c8cc322dc7fdce378e5b539b4b7580823aba3cfdd6637cbfa0bbb,0x15d1b75795732b1e2db1efa55cdbb19357e0aa0422cc03b442809339cf02,0xd2fffffffffffffffffffffffe9058d000000000000000000000a0271005,0x01 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/b163.csv b/src/cz/crcs/ectester/data/nist/b163.csv
deleted file mode 100644
index 85b777b..0000000
--- a/src/cz/crcs/ectester/data/nist/b163.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0007,0x0006,0x0003,0x000000000000000000000000000000000000000001,0x020a601907b8c953ca1481eb10512f78744a3205fd,0x03f0eba16286a2d57ea0991168d4994637e8343e36,0x00d51fbc6c71a0094fa2cdd545b11c5c0c797324f1,0x040000000000000000000292fe77e70c12a4234c33,0x2
diff --git a/src/cz/crcs/ectester/data/nist/b233.csv b/src/cz/crcs/ectester/data/nist/b233.csv
deleted file mode 100644
index a9c2711..0000000
--- a/src/cz/crcs/ectester/data/nist/b233.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9,0x004a,0x0000,0x0000,0x000000000000000000000000000000000000000000000000000000000001,0x0066647ede6c332c7f8c0923bb58213b333b20e9ce4281fe115f7d8f90ad,0x00fac9dfcbac8313bb2139f1bb755fef65bc391f8b36f8f8eb7371fd558b,0x01006a08a41903350678e58528bebf8a0beff867a7ca36716f7e01f81052,0x1000000000000000000000000000013e974e72f8a6922031d2603cfe0d7,0x2
diff --git a/src/cz/crcs/ectester/data/nist/b283.csv b/src/cz/crcs/ectester/data/nist/b283.csv
deleted file mode 100644
index 06cc151..0000000
--- a/src/cz/crcs/ectester/data/nist/b283.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011b,0x000c,0x0007,0x0005,0x00000000000000000000000000000000000000000000000000000000000000000000001,0x27b680ac8b8596da5a4af8a19a0303fca97fd7645309fa2a581485af6263e313b79a2f5,0x5f939258db7dd90e1934f8c70b0dfec2eed25b8557eac9c80e2e198f8cdbecd86b12053,0x3676854fe24141cb98fe6d4b20d02b4516ff702350eddb0826779c813f0df45be8112f4,0x3ffffffffffffffffffffffffffffffffffef90399660fc938a90165b042a7cefadb307,0x2
diff --git a/src/cz/crcs/ectester/data/nist/b409.csv b/src/cz/crcs/ectester/data/nist/b409.csv
deleted file mode 100644
index 66523a7..0000000
--- a/src/cz/crcs/ectester/data/nist/b409.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0199,0x0057,0x0000,0x0000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x021a5c2c8ee9feb5c4b9a753b7b476b7fd6422ef1f3dd674761fa99d6ac27c8a9a197b272822f6cd57a55aa4f50ae317b13545f,0x15d4860d088ddb3496b0c6064756260441cde4af1771d4db01ffe5b34e59703dc255a868a1180515603aeab60794e54bb7996a7,0x061b1cfab6be5f32bbfa78324ed106a7636b9c5a7bd198d0158aa4f5488d08f38514f1fdf4b4f40d2181b3681c364ba0273c706,0x10000000000000000000000000000000000000000000000000001e2aad6a612f33307be5fa47c3c9e052f838164cd37d9a21173,0x2
diff --git a/src/cz/crcs/ectester/data/nist/b571.csv b/src/cz/crcs/ectester/data/nist/b571.csv
deleted file mode 100644
index 7d824c4..0000000
--- a/src/cz/crcs/ectester/data/nist/b571.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x023b,0x000a,0x0005,0x0002,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x2f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a,0x303001d34b856296c16c0d40d3cd7750a93d1d2955fa80aa5f40fc8db7b2abdbde53950f4c0d293cdd711a35b67fb1499ae60038614f1394abfa3b4c850d927e1e7769c8eec2d19,0x37bf27342da639b6dccfffeb73d69d78c6c27a6009cbbca1980f8533921e8a684423e43bab08a576291af8f461bb2a8b3531d2f0485c19b16e2f1516e23dd3c1a4827af1b8ac15b,0x3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47,0x2
diff --git a/src/cz/crcs/ectester/data/nist/curves.xml b/src/cz/crcs/ectester/data/nist/curves.xml
deleted file mode 100644
index 2abf72f..0000000
--- a/src/cz/crcs/ectester/data/nist/curves.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>P-192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>p192.csv</file>
- </curve>
- <curve>
- <id>P-224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>p224.csv</file>
- </curve>
- <curve>
- <id>P-256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>p256.csv</file>
- </curve>
- <curve>
- <id>P-384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>p384.csv</file>
- </curve>
- <curve>
- <id>P-521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>p521.csv</file>
- </curve>
-
- <curve>
- <id>K-163</id>
- <bits>163</bits>
- <field>binary</field>
- <file>k163.csv</file>
- </curve>
- <curve>
- <id>B-163</id>
- <bits>163</bits>
- <field>binary</field>
- <file>b163.csv</file>
- </curve>
- <curve>
- <id>K-233</id>
- <bits>233</bits>
- <field>binary</field>
- <file>k233.csv</file>
- </curve>
- <curve>
- <id>B-233</id>
- <bits>233</bits>
- <field>binary</field>
- <file>b233.csv</file>
- </curve>
- <curve>
- <id>K-283</id>
- <bits>283</bits>
- <field>binary</field>
- <file>k283.csv</file>
- </curve>
- <curve>
- <id>B-283</id>
- <bits>283</bits>
- <field>binary</field>
- <file>b283.csv</file>
- </curve>
- <curve>
- <id>K-409</id>
- <bits>409</bits>
- <field>binary</field>
- <file>k409.csv</file>
- </curve>
- <curve>
- <id>B-409</id>
- <bits>409</bits>
- <field>binary</field>
- <file>b409.csv</file>
- </curve>
- <curve>
- <id>K-571</id>
- <bits>571</bits>
- <field>binary</field>
- <file>k571.csv</file>
- </curve>
- <curve>
- <id>B-571</id>
- <bits>571</bits>
- <field>binary</field>
- <file>b571.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/k163.csv b/src/cz/crcs/ectester/data/nist/k163.csv
deleted file mode 100644
index e35fbda..0000000
--- a/src/cz/crcs/ectester/data/nist/k163.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0007,0x0006,0x0003,0x000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000001,0x02fe13c0537bbc11acaa07d793de4e6d5e5c94eee8,0x0289070fb05d38ff58321f2e800536d538ccdaa3d9,0x04000000000000000000020108a2e0cc0d99f8a5ef,0x2
diff --git a/src/cz/crcs/ectester/data/nist/k233.csv b/src/cz/crcs/ectester/data/nist/k233.csv
deleted file mode 100644
index a429d81..0000000
--- a/src/cz/crcs/ectester/data/nist/k233.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9,0x004a,0x0000,0x0000,0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001,0x017232ba853a7e731af129f22ff4149563a419c26bf50a4c9d6eefad6126,0x01db537dece819b7f70f555a67c427a8cd9bf18aeb9b56e0c11056fae6a3,0x8000000000000000000000000000069d5bb915bcd46efb1ad5f173abdf,0x4
diff --git a/src/cz/crcs/ectester/data/nist/k283.csv b/src/cz/crcs/ectester/data/nist/k283.csv
deleted file mode 100644
index 32dcc3e..0000000
--- a/src/cz/crcs/ectester/data/nist/k283.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011b,0x000c,0x0007,0x0005,0x00000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000001,0x503213f78ca44883f1a3b8162f188e553cd265f23c1567a16876913b0c2ac2458492836,0x1ccda380f1c9e318d90f95d07e5426fe87e45c0e8184698e45962364e34116177dd2259,0x1ffffffffffffffffffffffffffffffffffe9ae2ed07577265dff7f94451e061e163c61,0x4
diff --git a/src/cz/crcs/ectester/data/nist/k409.csv b/src/cz/crcs/ectester/data/nist/k409.csv
deleted file mode 100644
index 119754a..0000000
--- a/src/cz/crcs/ectester/data/nist/k409.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0199,0x0057,0x0000,0x0000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x060f05f658f49c1ad3ab1890f7184210efd0987e307c84c27accfb8f9f67cc2c460189eb5aaaa62ee222eb1b35540cfe9023746,0x1e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b,0x7ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf,0x4
diff --git a/src/cz/crcs/ectester/data/nist/k571.csv b/src/cz/crcs/ectester/data/nist/k571.csv
deleted file mode 100644
index 7fb1431..0000000
--- a/src/cz/crcs/ectester/data/nist/k571.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x023b,0x000a,0x0005,0x0002,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x26eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972,0x349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3,0x20000000000000000000000000000000000000000000000000000000000000000000000131850e1f19a63e4b391a8db917f4138b630d84be5d639381e91deb45cfe778f637c1001,0x4
diff --git a/src/cz/crcs/ectester/data/nist/p192.csv b/src/cz/crcs/ectester/data/nist/p192.csv
deleted file mode 100644
index 07f9154..0000000
--- a/src/cz/crcs/ectester/data/nist/p192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffffffffffffff,0xfffffffffffffffffffffffffffffffefffffffffffffffc,0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1,0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012,0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811,0xffffffffffffffffffffffff99def836146bc9b1b4d22831,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/p224.csv b/src/cz/crcs/ectester/data/nist/p224.csv
deleted file mode 100644
index 4b206d4..0000000
--- a/src/cz/crcs/ectester/data/nist/p224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffffffffffffffffffffffffffff000000000000000000000001,0xfffffffffffffffffffffffffffffffefffffffffffffffffffffffe,0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4,0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21,0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34,0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/p256.csv b/src/cz/crcs/ectester/data/nist/p256.csv
deleted file mode 100644
index c5a2440..0000000
--- a/src/cz/crcs/ectester/data/nist/p256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff,0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc,0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b,0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296,0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5,0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/p384.csv b/src/cz/crcs/ectester/data/nist/p384.csv
deleted file mode 100644
index eeba9fa..0000000
--- a/src/cz/crcs/ectester/data/nist/p384.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc,0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef,0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7,0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f,0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/nist/p521.csv b/src/cz/crcs/ectester/data/nist/p521.csv
deleted file mode 100644
index 609672f..0000000
--- a/src/cz/crcs/ectester/data/nist/p521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc,0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00,0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66,0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650,0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/other/curve25519.csv b/src/cz/crcs/ectester/data/other/curve25519.csv
deleted file mode 100644
index 2e62d80..0000000
--- a/src/cz/crcs/ectester/data/other/curve25519.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED,0x2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA984914A144,0x7B425ED097B425ED097B425ED097B425ED097B425ED097B4260B5E9C7710C864,0x2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD245A,0x20AE19A1B8A086B4E01EDD2C7748D14C923D4D7E6D7C61B229E9C5A27ECED3D9,0x1000000000000000000000000000000014DEF9DEA2F79CD65812631A5CF5D3ED,0x02 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/other/curves.xml b/src/cz/crcs/ectester/data/other/curves.xml
deleted file mode 100644
index f200d9c..0000000
--- a/src/cz/crcs/ectester/data/other/curves.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>M-221</id>
- <bits>221</bits>
- <field>prime</field>
- <file>m221.csv</file>
- <desc>Montgomery M-221 curve from eprint 2013/647, transformed into short Weierstrass form</desc>
- </curve>
- <curve>
- <id>M-383</id>
- <bits>383</bits>
- <field>prime</field>
- <file>m383.csv</file>
- <desc>Montgomery M-383 curve from eprint 2013/647, transformed into short Weierstrass form</desc>
- </curve>
- <curve>
- <id>M-511</id>
- <bits>511</bits>
- <field>prime</field>
- <file>m511.csv</file>
- <desc>Montgomery M-511 curve from eprint 2013/647, transformed into short Weierstrass form</desc>
- </curve>
-
- <curve>
- <id>Curve25519</id>
- <bits>256</bits>
- <field>prime</field>
- <file>curve25519.csv</file>
- <desc>Curve25519 transformed into short Weierstrass form</desc>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/other/m221.csv b/src/cz/crcs/ectester/data/other/m221.csv
deleted file mode 100644
index 0a74263..0000000
--- a/src/cz/crcs/ectester/data/other/m221.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD,0x155555555555555555555555555555555555555555555554451FF4F3,0x1684BDA12F684BDA12F684BDA12F684BDA12F684BDA19B7249700DF7,0x1555555555555555555555555555555555555555555555555555EDC0,0x0F7ACDD2A4939571D1CEF14ECA37C228E61DBFF10707DC6C08C5056D,0x040000000000000000000000000015A08ED730E8A2F77F005042605B,0x4
diff --git a/src/cz/crcs/ectester/data/other/m383.csv b/src/cz/crcs/ectester/data/other/m383.csv
deleted file mode 100644
index 9a8890d..0000000
--- a/src/cz/crcs/ectester/data/other/m383.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF45,0x2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA95FABD1AE6C,0x04BDA12F684BDA12F684BDA12F684BDA12F684BDA12F684BDA12F684BDA12F684BDA12F684BDA12F7159AE18A4923F45,0x5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555FD5E4,0x1EC7ED04AAF834AF310E304B2DA0F328E7C165F0E8988ABD3992861290F617AA1F1B2E7D0B6E332E969991B62555E77E,0x10000000000000000000000000000000000000000000000006C79673AC36BA6E7A32576F7B1B249E46BBC225BE9071D7,0x02
diff --git a/src/cz/crcs/ectester/data/other/m511.csv b/src/cz/crcs/ectester/data/other/m511.csv
deleted file mode 100644
index 815714c..0000000
--- a/src/cz/crcs/ectester/data/other/m511.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF45,0x2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA94D474F50C,0x425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED097B425ED0BEFAE0163491C0,0x2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD5D1E,0x2FBDC0AD8530803D28FDBAD354BB488D32399AC1CF8F6E01EE3F96389B90C809422B9429E8A43DBF49308AC4455940ABE9F1DBCA542093A895E30A64AF056FA5,0x100000000000000000000000000000000000000000000000000000000000000017B5FEFF30C7F5677AB2AEEBD13779A2AC125042A6AA10BFA54C15BAB76BAF1B,0x02
diff --git a/src/cz/crcs/ectester/data/schema.xsd b/src/cz/crcs/ectester/data/schema.xsd
deleted file mode 100644
index 99c9b76..0000000
--- a/src/cz/crcs/ectester/data/schema.xsd
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified">
-
- <!-- /<category>/curves.xml -->
-
- <xs:simpleType name="fieldType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="prime"/>
- <xs:enumeration value="binary"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:element name="data" abstract="true"/>
- <xs:element name="file" substitutionGroup="data" type="xs:string"/>
- <xs:element name="inline" substitutionGroup="data" type="xs:string"/>
-
- <xs:complexType name="curveType">
- <xs:all>
- <xs:element name="id" type="xs:string"/>
- <xs:element name="bits" type="xs:positiveInteger"/>
- <xs:element name="field" type="fieldType"/>
- <xs:element ref="data" />
- <xs:element name="desc" type="xs:string" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
-
- <xs:element name="curves">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="curve" type="curveType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <!-- /<category>/keys.xml -->
-
- <xs:complexType name="keyType">
- <xs:all>
- <xs:element name="id" type="xs:string"/>
- <xs:element ref="data" />
- <xs:element name="curve" type="xs:string"/>
- <xs:element name="desc" type="xs:string" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
-
- <xs:element name="keys">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="keypair" type="keyType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="privkey" type="keyType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="pubkey" type="keyType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <!-- /<category>/results.xml -->
-
- <xs:simpleType name="kaType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="DH"/>
- <xs:enumeration value="DHC"/>
- <xs:enumeration value="DH_PLAIN"/>
- <xs:enumeration value="DHC_PLAIN"/>
- <xs:enumeration value="PACE_GM"/>
- <xs:enumeration value="DH_PLAIN_XY"/>
- <xs:enumeration value="ANY"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:complexType name="kaResultType">
- <xs:all>
- <xs:element name="id" type="xs:string"/>
- <xs:element name="ka" type="kaType"/>
- <xs:element ref="data" />
- <xs:element name="curve" type="xs:string"/>
- <xs:element name="onekey" type="xs:string"/>
- <xs:element name="otherkey" type="xs:string"/>
- <xs:element name="desc" type="xs:string" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
-
- <xs:simpleType name="sigType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="SHA1"/>
- <xs:enumeration value="SHA224"/>
- <xs:enumeration value="SHA256"/>
- <xs:enumeration value="SHA384"/>
- <xs:enumeration value="SHA512"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:complexType name="sigResultType">
- <xs:all>
- <xs:element name="id" type="xs:string"/>
- <xs:element name="sig" type="sigType"/>
- <xs:element ref="data"/>
- <xs:element name="raw" type="xs:string" minOccurs="0"/>
- <xs:element name="curve" type="xs:string"/>
- <xs:element name="signkey" type="xs:string"/>
- <xs:element name="verifykey" type="xs:string"/>
- <xs:element name="desc" type="xs:string" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
-
- <xs:element name="results">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="kaResult" type="kaResultType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="sigResult" type="sigResultType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <!-- /categories.xml -->
-
- <xs:complexType name="categoryType">
- <xs:all>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="directory" type="xs:string"/>
- <xs:element name="desc" minOccurs="0" type="xs:string"/>
- </xs:all>
- </xs:complexType>
-
- <xs:element name="categories">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="category" type="categoryType" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
-</xs:schema> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/curves.xml b/src/cz/crcs/ectester/data/secg/curves.xml
deleted file mode 100644
index c04fe38..0000000
--- a/src/cz/crcs/ectester/data/secg/curves.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>secp112r1</id>
- <bits>112</bits>
- <field>prime</field>
- <file>secp112r1.csv</file>
- </curve>
- <curve>
- <id>secp112r2</id>
- <bits>112</bits>
- <field>prime</field>
- <file>secp112r2.csv</file>
- </curve>
- <curve>
- <id>secp128r1</id>
- <bits>128</bits>
- <field>prime</field>
- <file>secp128r1.csv</file>
- </curve>
- <curve>
- <id>secp128r2</id>
- <bits>128</bits>
- <field>prime</field>
- <file>secp128r2.csv</file>
- </curve>
- <curve>
- <id>secp160k1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>secp160k1.csv</file>
- </curve>
- <curve>
- <id>secp160r1</id>
- <bits>160</bits>
- <field>prime</field>
- <file>secp160r1.csv</file>
- </curve>
- <curve>
- <id>secp160r2</id>
- <bits>160</bits>
- <field>prime</field>
- <file>secp160r2.csv</file>
- </curve>
- <curve>
- <id>secp192k1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>secp192k1.csv</file>
- </curve>
- <curve>
- <id>secp192r1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>secp192r1.csv</file>
- </curve>
- <curve>
- <id>secp224r1</id>
- <bits>224</bits>
- <field>prime</field>
- <file>secp224r1.csv</file>
- </curve>
- <curve>
- <id>secp256k1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>secp256k1.csv</file>
- </curve>
- <curve>
- <id>secp256r1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>secp256r1.csv</file>
- </curve>
- <curve>
- <id>secp384r1</id>
- <bits>384</bits>
- <field>prime</field>
- <file>secp384r1.csv</file>
- </curve>
- <curve>
- <id>secp521r1</id>
- <bits>521</bits>
- <field>prime</field>
- <file>secp521r1.csv</file>
- </curve>
-
- <curve>
- <id>sect163k1</id>
- <bits>163</bits>
- <field>binary</field>
- <file>sect163k1.csv</file>
- </curve>
- <curve>
- <id>sect163r1</id>
- <bits>163</bits>
- <field>binary</field>
- <file>sect163r1.csv</file>
- </curve>
- <curve>
- <id>sect163r2</id>
- <bits>163</bits>
- <field>binary</field>
- <file>sect163r2.csv</file>
- </curve>
- <curve>
- <id>sect233k1</id>
- <bits>233</bits>
- <field>binary</field>
- <file>sect233k1.csv</file>
- </curve>
- <curve>
- <id>sect233r1</id>
- <bits>233</bits>
- <field>binary</field>
- <file>sect233r1.csv</file>
- </curve>
- <curve>
- <id>sect239k1</id>
- <bits>233</bits>
- <field>binary</field>
- <file>sect239k1.csv</file>
- </curve>
- <curve>
- <id>sect283k1</id>
- <bits>283</bits>
- <field>binary</field>
- <file>sect283k1.csv</file>
- </curve>
- <curve>
- <id>sect283r1</id>
- <bits>283</bits>
- <field>binary</field>
- <file>sect283r1.csv</file>
- </curve>
- <curve>
- <id>sect409k1</id>
- <bits>409</bits>
- <field>binary</field>
- <file>sect409k1.csv</file>
- </curve>
- <curve>
- <id>sect409r1</id>
- <bits>409</bits>
- <field>binary</field>
- <file>sect409r1.csv</file>
- </curve>
- <curve>
- <id>sect571k1</id>
- <bits>571</bits>
- <field>binary</field>
- <file>sect571k1.csv</file>
- </curve>
- <curve>
- <id>sect571r1</id>
- <bits>571</bits>
- <field>binary</field>
- <file>sect571r1.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp112r1.csv b/src/cz/crcs/ectester/data/secg/secp112r1.csv
deleted file mode 100644
index 00d64d6..0000000
--- a/src/cz/crcs/ectester/data/secg/secp112r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdb7c2abf62e35e668076bead208b,0xdb7c2abf62e35e668076bead2088,0x659ef8ba043916eede8911702b22,0x09487239995a5ee76b55f9c2f098,0xa89ce5af8724c0a23e0e0ff77500,0xdb7c2abf62e35e7628dfac6561c5,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp112r2.csv b/src/cz/crcs/ectester/data/secg/secp112r2.csv
deleted file mode 100644
index 0513e72..0000000
--- a/src/cz/crcs/ectester/data/secg/secp112r2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xdb7c2abf62e35e668076bead208b,0x6127c24c05f38a0aaaf65c0ef02c,0x51def1815db5ed74fcc34c85d709,0x4ba30ab5e892b4e1649dd0928643,0xadcd46f5882e3747def36e956e97,0x36df0aafd8b8d7597ca10520d04b,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp128r1.csv b/src/cz/crcs/ectester/data/secg/secp128r1.csv
deleted file mode 100644
index eea5fed..0000000
--- a/src/cz/crcs/ectester/data/secg/secp128r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffdffffffffffffffffffffffff,0xfffffffdfffffffffffffffffffffffc,0xe87579c11079f43dd824993c2cee5ed3,0x161ff7528b899b2d0c28607ca52c5b86,0xcf5ac8395bafeb13c02da292dded7a83,0xfffffffe0000000075a30d1b9038a115,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp128r2.csv b/src/cz/crcs/ectester/data/secg/secp128r2.csv
deleted file mode 100644
index 6f2d098..0000000
--- a/src/cz/crcs/ectester/data/secg/secp128r2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffdffffffffffffffffffffffff,0xd6031998d1b3bbfebf59cc9bbff9aee1,0x5eeefca380d02919dc2c6558bb6d8a5d,0x7b6aa5d85e572983e6fb32a7cdebc140,0x27b6916a894d3aee7106fe805fc34b44,0x3fffffff7fffffffbe0024720613b5a3,0x4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp160k1.csv b/src/cz/crcs/ectester/data/secg/secp160k1.csv
deleted file mode 100644
index 7d14c99..0000000
--- a/src/cz/crcs/ectester/data/secg/secp160k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffac73,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000007,0x3b4c382ce37aa192a4019e763036f4f5dd4d7ebb,0x938cf935318fdced6bc28286531733c3f03c4fee,0x0100000000000000000001b8fa16dfab9aca16b6b3,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp160r1.csv b/src/cz/crcs/ectester/data/secg/secp160r1.csv
deleted file mode 100644
index ed37d81..0000000
--- a/src/cz/crcs/ectester/data/secg/secp160r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffffffffffffffffffffffffffff7fffffff,0xffffffffffffffffffffffffffffffff7ffffffc,0x1c97befc54bd7a8b65acf89f81d4d4adc565fa45,0x4a96b5688ef573284664698968c38bb913cbfc82,0x23a628553168947d59dcc912042351377ac5fb32,0x0100000000000000000001f4c8f927aed3ca752257,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp160r2.csv b/src/cz/crcs/ectester/data/secg/secp160r2.csv
deleted file mode 100644
index 2121fc1..0000000
--- a/src/cz/crcs/ectester/data/secg/secp160r2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffac73,0xfffffffffffffffffffffffffffffffeffffac70,0xb4e134d3fb59eb8bab57274904664d5af50388ba,0x52dcb034293a117e1f4ff11b30f7199d3144ce6d,0xfeaffef2e331f296e071fa0df9982cfea7d43f2e,0x0100000000000000000000351ee786a818f3a1a16b,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp192k1.csv b/src/cz/crcs/ectester/data/secg/secp192k1.csv
deleted file mode 100644
index 550093b..0000000
--- a/src/cz/crcs/ectester/data/secg/secp192k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffffffffffeffffee37,0x000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000003,0xdb4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d,0x9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d,0xfffffffffffffffffffffffe26f2fc170f69466a74defd8d,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp192r1.csv b/src/cz/crcs/ectester/data/secg/secp192r1.csv
deleted file mode 100644
index 07f9154..0000000
--- a/src/cz/crcs/ectester/data/secg/secp192r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffffffffffffff,0xfffffffffffffffffffffffffffffffefffffffffffffffc,0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1,0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012,0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811,0xffffffffffffffffffffffff99def836146bc9b1b4d22831,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp224r1.csv b/src/cz/crcs/ectester/data/secg/secp224r1.csv
deleted file mode 100644
index 4b206d4..0000000
--- a/src/cz/crcs/ectester/data/secg/secp224r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffffffffffffffffffffffffffff000000000000000000000001,0xfffffffffffffffffffffffffffffffefffffffffffffffffffffffe,0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4,0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21,0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34,0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp256k1.csv b/src/cz/crcs/ectester/data/secg/secp256k1.csv
deleted file mode 100644
index 7835afc..0000000
--- a/src/cz/crcs/ectester/data/secg/secp256k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f,0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000000000000000000000000007,0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8,0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp256r1.csv b/src/cz/crcs/ectester/data/secg/secp256r1.csv
deleted file mode 100644
index c5a2440..0000000
--- a/src/cz/crcs/ectester/data/secg/secp256r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff,0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc,0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b,0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296,0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5,0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp384r1.csv b/src/cz/crcs/ectester/data/secg/secp384r1.csv
deleted file mode 100644
index eeba9fa..0000000
--- a/src/cz/crcs/ectester/data/secg/secp384r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff,0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc,0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef,0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7,0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f,0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/secp521r1.csv b/src/cz/crcs/ectester/data/secg/secp521r1.csv
deleted file mode 100644
index 609672f..0000000
--- a/src/cz/crcs/ectester/data/secg/secp521r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc,0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00,0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66,0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650,0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/sect163k1.csv b/src/cz/crcs/ectester/data/secg/sect163k1.csv
deleted file mode 100644
index e35fbda..0000000
--- a/src/cz/crcs/ectester/data/secg/sect163k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0007,0x0006,0x0003,0x000000000000000000000000000000000000000001,0x000000000000000000000000000000000000000001,0x02fe13c0537bbc11acaa07d793de4e6d5e5c94eee8,0x0289070fb05d38ff58321f2e800536d538ccdaa3d9,0x04000000000000000000020108a2e0cc0d99f8a5ef,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect163r1.csv b/src/cz/crcs/ectester/data/secg/sect163r1.csv
deleted file mode 100644
index fa7a328..0000000
--- a/src/cz/crcs/ectester/data/secg/sect163r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0007,0x0006,0x0003,0x07b6882caaefa84f9554ff8428bd88e246d2782ae2,0x0713612dcddcb40aab946bda29ca91f73af958afd9,0x0369979697ab43897789566789567f787a7876a654,0x00435edb42efafb2989d51fefce3c80988f41ff883,0x03ffffffffffffffffffff48aab689c29ca710279b,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect163r2.csv b/src/cz/crcs/ectester/data/secg/sect163r2.csv
deleted file mode 100644
index 85b777b..0000000
--- a/src/cz/crcs/ectester/data/secg/sect163r2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0007,0x0006,0x0003,0x000000000000000000000000000000000000000001,0x020a601907b8c953ca1481eb10512f78744a3205fd,0x03f0eba16286a2d57ea0991168d4994637e8343e36,0x00d51fbc6c71a0094fa2cdd545b11c5c0c797324f1,0x040000000000000000000292fe77e70c12a4234c33,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect233k1.csv b/src/cz/crcs/ectester/data/secg/sect233k1.csv
deleted file mode 100644
index a429d81..0000000
--- a/src/cz/crcs/ectester/data/secg/sect233k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9,0x004a,0x0000,0x0000,0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001,0x017232ba853a7e731af129f22ff4149563a419c26bf50a4c9d6eefad6126,0x01db537dece819b7f70f555a67c427a8cd9bf18aeb9b56e0c11056fae6a3,0x8000000000000000000000000000069d5bb915bcd46efb1ad5f173abdf,0x4
diff --git a/src/cz/crcs/ectester/data/secg/sect233r1.csv b/src/cz/crcs/ectester/data/secg/sect233r1.csv
deleted file mode 100644
index faba42b..0000000
--- a/src/cz/crcs/ectester/data/secg/sect233r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9,0x004a,0x0000,0x0000,0x000000000000000000000000000000000000000000000000000000000001,0x0066647ede6c332c7f8c0923bb58213b333b20e9ce4281fe115f7d8f90ad,0x00fac9dfcbac8313bb2139f1bb755fef65bc391f8b36f8f8eb7371fd558b,0x01006a08a41903350678e58528bebf8a0beff867a7ca36716f7e01f81052,0x01000000000000000000000000000013e974e72f8a6922031d2603cfe0d7,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect239k1.csv b/src/cz/crcs/ectester/data/secg/sect239k1.csv
deleted file mode 100644
index 8b2e58a..0000000
--- a/src/cz/crcs/ectester/data/secg/sect239k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00ef,0x009e,0x0000,0x0000,0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001,0x29a0b6a887a983e9730988a68727a8b2d126c44cc2cc7b2a6555193035dc,0x76310804f12e549bdb011c103089e73510acb275fc312a5dc6b76553f0ca,0x2000000000000000000000000000005a79fec67cb6e91f1c1da800e478a5,0x4
diff --git a/src/cz/crcs/ectester/data/secg/sect283k1.csv b/src/cz/crcs/ectester/data/secg/sect283k1.csv
deleted file mode 100644
index 9a3a8f6..0000000
--- a/src/cz/crcs/ectester/data/secg/sect283k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011b,0x000c,0x0007,0x0005,0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000001,0x0503213f78ca44883f1a3b8162f188e553cd265f23c1567a16876913b0c2ac2458492836,0x01ccda380f1c9e318d90f95d07e5426fe87e45c0e8184698e45962364e34116177dd2259,0x01ffffffffffffffffffffffffffffffffffe9ae2ed07577265dff7f94451e061e163c61,0x4
diff --git a/src/cz/crcs/ectester/data/secg/sect283r1.csv b/src/cz/crcs/ectester/data/secg/sect283r1.csv
deleted file mode 100644
index 68c17f6..0000000
--- a/src/cz/crcs/ectester/data/secg/sect283r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011b,0x000c,0x0007,0x0005,0x000000000000000000000000000000000000000000000000000000000000000000000001,0x027b680ac8b8596da5a4af8a19a0303fca97fd7645309fa2a581485af6263e313b79a2f5,0x05f939258db7dd90e1934f8c70b0dfec2eed25b8557eac9c80e2e198f8cdbecd86b12053,0x03676854fe24141cb98fe6d4b20d02b4516ff702350eddb0826779c813f0df45be8112f4,0x03ffffffffffffffffffffffffffffffffffef90399660fc938a90165b042a7cefadb307,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect409k1.csv b/src/cz/crcs/ectester/data/secg/sect409k1.csv
deleted file mode 100644
index e39e076..0000000
--- a/src/cz/crcs/ectester/data/secg/sect409k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0199,0x0057,0x0000,0x0000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x0060f05f658f49c1ad3ab1890f7184210efd0987e307c84c27accfb8f9f67cc2c460189eb5aaaa62ee222eb1b35540cfe9023746,0x01e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b,0x7ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf,0x4
diff --git a/src/cz/crcs/ectester/data/secg/sect409r1.csv b/src/cz/crcs/ectester/data/secg/sect409r1.csv
deleted file mode 100644
index 727fb25..0000000
--- a/src/cz/crcs/ectester/data/secg/sect409r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0199,0x0057,0x0000,0x0000,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x0021a5c2c8ee9feb5c4b9a753b7b476b7fd6422ef1f3dd674761fa99d6ac27c8a9a197b272822f6cd57a55aa4f50ae317b13545f,0x015d4860d088ddb3496b0c6064756260441cde4af1771d4db01ffe5b34e59703dc255a868a1180515603aeab60794e54bb7996a7,0x0061b1cfab6be5f32bbfa78324ed106a7636b9c5a7bd198d0158aa4f5488d08f38514f1fdf4b4f40d2181b3681c364ba0273c706,0x010000000000000000000000000000000000000000000000000001e2aad6a612f33307be5fa47c3c9e052f838164cd37d9a21173,0x2
diff --git a/src/cz/crcs/ectester/data/secg/sect571k1.csv b/src/cz/crcs/ectester/data/secg/sect571k1.csv
deleted file mode 100644
index 0c94778..0000000
--- a/src/cz/crcs/ectester/data/secg/sect571k1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x023b,0x000a,0x0005,0x0002,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x026eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972,0x0349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3,0x020000000000000000000000000000000000000000000000000000000000000000000000131850e1f19a63e4b391a8db917f4138b630d84be5d639381e91deb45cfe778f637c1001,0x4
diff --git a/src/cz/crcs/ectester/data/secg/sect571r1.csv b/src/cz/crcs/ectester/data/secg/sect571r1.csv
deleted file mode 100644
index 739cbb0..0000000
--- a/src/cz/crcs/ectester/data/secg/sect571r1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x023b,0x000a,0x0005,0x0002,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0x02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a,0x0303001d34b856296c16c0d40d3cd7750a93d1d2955fa80aa5f40fc8db7b2abdbde53950f4c0d293cdd711a35b67fb1499ae60038614f1394abfa3b4c850d927e1e7769c8eec2d19,0x037bf27342da639b6dccfffeb73d69d78c6c27a6009cbbca1980f8533921e8a684423e43bab08a576291af8f461bb2a8b3531d2f0485c19b16e2f1516e23dd3c1a4827af1b8ac15b,0x03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47,0x2
diff --git a/src/cz/crcs/ectester/data/supersingular/curves.xml b/src/cz/crcs/ectester/data/supersingular/curves.xml
deleted file mode 100644
index 186a8a7..0000000
--- a/src/cz/crcs/ectester/data/supersingular/curves.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>ss128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>ss128.csv</file>
- <desc>Supersingular curve</desc>
- </curve>
- <curve>
- <id>ss192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>ss192.csv</file>
- <desc>Supersingular curve</desc>
- </curve>
- <curve>
- <id>ss224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>ss224.csv</file>
- <desc>Supersingular curve</desc>
- </curve>
- <curve>
- <id>ss256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>ss256.csv</file>
- <desc>Supersingular curve</desc>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/supersingular/ss128.csv b/src/cz/crcs/ectester/data/supersingular/ss128.csv
deleted file mode 100644
index 9dd4f13..0000000
--- a/src/cz/crcs/ectester/data/supersingular/ss128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9ad6ed2af5bd6f3a9ac1d052ea17b2a9,0x8a3fe60aedb247e20a2d0c4a07de4d37,0x10970720080b27589094c408e2396572,0x563804cbd66f054434143af1e3ec6eaf,0x42af7ba7a078ef8fa3c0f253d1ccc16a,0x4d6b76957adeb79d4d60e829750bd955,0x02 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/supersingular/ss192.csv b/src/cz/crcs/ectester/data/supersingular/ss192.csv
deleted file mode 100644
index 0c8ae8b..0000000
--- a/src/cz/crcs/ectester/data/supersingular/ss192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8c4dbc0e122afdeb466c2b7c3321e72531ac1cd8435f5159,0x64ff701953d8a795e3d9fa41a85eb2bd355479744198ae6c,0x274e4bf4be5256556292313a8ac33467fc57a36401c6a2ed,0x6c39b62a8665aca35dc1669dd483a1e881c65557bbed7f8c,0x1f90241e9bdb361251343bf4cb1ff19545e1e0fff2c8f235,0x4626de0709157ef5a33615be1990f39298d60e6c21afa8ad,0x02 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/supersingular/ss224.csv b/src/cz/crcs/ectester/data/supersingular/ss224.csv
deleted file mode 100644
index 01eaa35..0000000
--- a/src/cz/crcs/ectester/data/supersingular/ss224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa52f9550f18b8475c5cddd1232428b0c6138aa8704759eab7916f839,0x35186ffe96c8460148b9070efdde881f68647ff48a93854966ebf457,0x701725525ac33e747d14d603346402ecf8d42a9279e21962122b03e2,0x726e4342d936e7c3f004d36b5a703ca35d000014e70bceb1e956f7cc,0x9b3785caa9b028340c564ec4e7450229b7a0b16bc7185c78d852e2a6,0x1084c221b1c126d893c7c94e9ea0411ad685aaa71a0bc31125b57f39,0x0a \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/supersingular/ss256.csv b/src/cz/crcs/ectester/data/supersingular/ss256.csv
deleted file mode 100644
index 47a8174..0000000
--- a/src/cz/crcs/ectester/data/supersingular/ss256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf9cde8953b26ab31fe1b135266d2f9187e3d9df982880f05cc80f1998b9b0c8d,0xdf0a21f2f4d03d6ca2e151406e17cc1f0300287a348bc4452d7320db6138269e,0x1ac3c6a246566dc55b39c211f8bb2cf97b3d757f4dfc4ac09f0dd0be2a62e5ef,0x3c52f9e66b5c180923ac7bfb7f88f0162ee1dca122aa8dda1e8de3e044cb55a6,0x89c2f4437118d2edb0021706feef5a4419150afd7d1c3b7401eee93c2e547264,0x7ce6f44a9d935598ff0d89a933697c8c3f1ecefcc1440782e64078ccc5cd8647,0x02 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-raw.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-raw.csv
deleted file mode 100644
index 36c396a..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x312dfd98783f9fb77b9704945a73beb6dccbe3b65d0f967dcab574eb \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-sha1.csv
deleted file mode 100644
index f9abc47..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x4adca2e2cfe8dbd4f0b9ce27e4422c57ee0a6b98 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyA.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyA.csv
deleted file mode 100644
index a2f0525..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyA.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb104a67a6f6e85e14ec1825e1539e8ecdbbf584922367dd88c6bdcf2,0x46d782e7fdb5f60cd8404301ac5949c58edb26bc68ba07695b750a94,0x7c4b7a2c8a4bad1fbb7d79cc0955db7c6a4660ca64cc4778159b495e \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyB.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyB.csv
deleted file mode 100644
index b397506..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP224r1-keyB.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2a97089a9296147b71b21a4b574e1278245b536f14d8c2b9d07a874e,0x9b900d7c77a709a797276b8ca1ba61bb95b546fc29f862e44d59d25b,0x63976d4aae6cd0f6dd18defef55d96569d0507c03e74d6486ffa28fb \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-raw.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-raw.csv
deleted file mode 100644
index 1d7ab37..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x89afc39d41d3b327814b80940b042590f96556ec91e6ae7939bce31f3a18bf2b \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-sha1.csv
deleted file mode 100644
index 45a851b..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x4f1ccffbb2a14da1f17de291dabcdd109eb13bb7 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyA.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyA.csv
deleted file mode 100644
index 597d3fe..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyA.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x44106e913f92bc02a1705d9953a8414db95e1aaa49e81d9e85f929a8e3100be5,0x8ab4846f11caccb73ce49cbdd120f5a900a69fd32c272223f789ef10eb089bdc,0x81db1ee100150ff2ea338d708271be38300cb54241d79950f77b063039804f1d \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyB.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyB.csv
deleted file mode 100644
index 110f6b5..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP256r1-keyB.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8d2d688c6cf93e1160ad04cc4429117dc2c41825e1e9fca0addd34e6f1b39f7b,0x990c57520812be512641e47034832106bc7d3e8dd0e4c7f1136d7006547cec6a,0x55e40bc41e37e3e2ad25c3c6654511ffa8474a91a0032087593852d3e7d76bd3 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-raw.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-raw.csv
deleted file mode 100644
index 392d962..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0bd9d3a7ea0b3d519d09d8e48d0785fb744a6b355e6304bc51c229fbbce239bbadf6403715c35d4fb2a5444f575d4f42 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-sha1.csv
deleted file mode 100644
index b293a59..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7562598c913df9bcad30d6985358f7779045b3a4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyA.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyA.csv
deleted file mode 100644
index 6746753..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyA.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x68b665dd91c195800650cdd363c625f4e742e8134667b767b1b476793588f885ab698c852d4a6e77a252d6380fcaf068,0x55bc91a39c9ec01dee36017b7d673a931236d2f1f5c83942d049e3fa20607493e0d038ff2fd30c2ab67d15c85f7faa59,0x1e20f5e048a5886f1f157c74e91bde2b98c8b52d58e5003d57053fc4b0bd65d6f15eb5d1ee1610df870795143627d042 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyB.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyB.csv
deleted file mode 100644
index 83289fd..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP384r1-keyB.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x4d44326f269a597a5b58bba565da5556ed7fd9a8a9eb76c25f46db69d19dc8ce6ad18e404b15738b2086df37e71d1eb4,0x62d692136de56cbe93bf5fa3188ef58bc8a3a0ec6c1e151a21038a42e9185329b5b275903d192f8d4e1f32fe9cc78c48,0x032640bc6003c59260f7250c3db58ce647f98e1260acce4acda3dd869f74e01f8ba5e0324309db6a9831497abac96670 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-raw.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-raw.csv
deleted file mode 100644
index fe6c294..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa7927098655f1f9976fa50a9d566865dc530331846381c87256baf3226244b76d36403c024d7bbf0aa0803eaff405d3d24f11a9b5c0bef679fe1454b21c4cd1f \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-sha1.csv
deleted file mode 100644
index ff8d321..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8e4814d30f0b5c7ffa35e15809f529d6fd94d759 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyA.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyA.csv
deleted file mode 100644
index 3648a36..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyA.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0a420517e406aac0acdce90fcd71487718d3b953efd7fbec5f7f27e28c6149999397e91e029e06457db2d3e640668b392c2a7e737a7f0bf04436d11640fd09fd,0x72e6882e8db28aad36237cd25d580db23783961c8dc52dfa2ec138ad472a0fcef3887cf62b623b2a87de5c588301ea3e5fc269b373b60724f5e82a6ad147fde7,0x16302ff0dbbb5a8d733dab7141c1b45acbc8715939677f6a56850a38bd87bd59b09e80279609ff333eb9d4c061231fb26f92eeb04982a5f1d1764cad57665422 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyB.csv b/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyB.csv
deleted file mode 100644
index 9684984..0000000
--- a/src/cz/crcs/ectester/data/test/brainpool/brainpoolP512r1-keyB.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9d45f66de5d67e2e6db6e93a59ce0bb48106097ff78a081de781cdb31fce8ccbaaea8dd4320c4119f1e9cd437a2eab3731fa9668ab268d871deda55a5473199f,0x2fdc313095bcdd5fb3a91636f07a959c8e86b5636a1e930e8396049cb481961d365cc11453a06c719835475b12cb52fc3c383bce35e27ef194512b71876285fa,0x230e18e1bcc88a362fa54e4ea3902009292f7f8033624fd471b5d8ace49d12cfabbc19963dab8e2f1eba00bffb29e4d72d13f2224562f405cb80503666b25429 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/keys.xml b/src/cz/crcs/ectester/data/test/keys.xml
deleted file mode 100644
index 380aef1..0000000
--- a/src/cz/crcs/ectester/data/test/keys.xml
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <keypair>
- <id>secp160r1-U</id>
- <file>secg/secp160r1-keyU.csv</file>
- <curve>secg/secp160r1</curve>
- </keypair>
- <keypair>
- <id>secp160r1-V</id>
- <file>secg/secp160r1-keyV.csv</file>
- <curve>secg/secp160r1</curve>
- </keypair>
- <keypair>
- <id>sect163k1-U</id>
- <file>secg/sect163k1-keyU.csv</file>
- <curve>secg/sect163k1</curve>
- </keypair>
- <keypair>
- <id>sect163k1-V</id>
- <file>secg/sect163k1-keyV.csv</file>
- <curve>secg/sect163k1</curve>
- </keypair>
-
- <keypair>
- <id>brainpoolP224r1-A</id>
- <file>brainpool/brainpoolP224r1-keyA.csv</file>
- <curve>brainpool/brainpoolP224r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP224r1-B</id>
- <file>brainpool/brainpoolP224r1-keyB.csv</file>
- <curve>brainpool/brainpoolP224r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP256r1-A</id>
- <file>brainpool/brainpoolP256r1-keyA.csv</file>
- <curve>brainpool/brainpoolP256r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP256r1-B</id>
- <file>brainpool/brainpoolP256r1-keyB.csv</file>
- <curve>brainpool/brainpoolP256r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP384r1-A</id>
- <file>brainpool/brainpoolP384r1-keyA.csv</file>
- <curve>brainpool/brainpoolP384r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP384r1-B</id>
- <file>brainpool/brainpoolP384r1-keyB.csv</file>
- <curve>brainpool/brainpoolP384r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP512r1-A</id>
- <file>brainpool/brainpoolP512r1-keyA.csv</file>
- <curve>brainpool/brainpoolP512r1</curve>
- </keypair>
- <keypair>
- <id>brainpoolP512r1-B</id>
- <file>brainpool/brainpoolP512r1-keyB.csv</file>
- <curve>brainpool/brainpoolP512r1</curve>
- </keypair>
-
- <keypair>
- <id>p192-A</id>
- <file>nist/p192-keyIUT.csv</file>
- <curve>nist/P-192</curve>
- </keypair>
- <pubkey>
- <id>p192-B</id>
- <file>nist/p192-keyCAVS.csv</file>
- <curve>nist/P-192</curve>
- </pubkey>
- <keypair>
- <id>p224-A</id>
- <file>nist/p224-keyIUT.csv</file>
- <curve>nist/P-224</curve>
- </keypair>
- <pubkey>
- <id>p224-B</id>
- <file>nist/p224-keyCAVS.csv</file>
- <curve>nist/P-224</curve>
- </pubkey>
- <keypair>
- <id>p256-A</id>
- <file>nist/p256-keyIUT.csv</file>
- <curve>nist/P-256</curve>
- </keypair>
- <pubkey>
- <id>p256-B</id>
- <file>nist/p256-keyCAVS.csv</file>
- <curve>nist/P-256</curve>
- </pubkey>
- <keypair>
- <id>p384-A</id>
- <file>nist/p384-keyIUT.csv</file>
- <curve>nist/P-384</curve>
- </keypair>
- <pubkey>
- <id>p384-B</id>
- <file>nist/p384-keyCAVS.csv</file>
- <curve>nist/P-384</curve>
- </pubkey>
- <keypair>
- <id>p521-A</id>
- <file>nist/p521-keyIUT.csv</file>
- <curve>nist/P-521</curve>
- </keypair>
- <pubkey>
- <id>p521-B</id>
- <file>nist/p521-keyCAVS.csv</file>
- <curve>nist/P-521</curve>
- </pubkey>
- <keypair>
- <id>b163-A</id>
- <file>nist/b163-keyIUT.csv</file>
- <curve>nist/B-163</curve>
- </keypair>
- <pubkey>
- <id>b163-B</id>
- <file>nist/b163-keyCAVS.csv</file>
- <curve>nist/B-163</curve>
- </pubkey>
- <keypair>
- <id>b233-A</id>
- <file>nist/b233-keyIUT.csv</file>
- <curve>nist/B-233</curve>
- </keypair>
- <pubkey>
- <id>b233-B</id>
- <file>nist/b233-keyCAVS.csv</file>
- <curve>nist/B-233</curve>
- </pubkey>
- <keypair>
- <id>b283-A</id>
- <file>nist/b283-keyIUT.csv</file>
- <curve>nist/B-283</curve>
- </keypair>
- <pubkey>
- <id>b283-B</id>
- <file>nist/b283-keyCAVS.csv</file>
- <curve>nist/B-283</curve>
- </pubkey>
- <keypair>
- <id>b409-A</id>
- <file>nist/b409-keyIUT.csv</file>
- <curve>nist/B-409</curve>
- </keypair>
- <pubkey>
- <id>b409-B</id>
- <file>nist/b409-keyCAVS.csv</file>
- <curve>nist/B-409</curve>
- </pubkey>
- <keypair>
- <id>b571-A</id>
- <file>nist/b571-keyIUT.csv</file>
- <curve>nist/B-571</curve>
- </keypair>
- <pubkey>
- <id>b571-B</id>
- <file>nist/b571-keyCAVS.csv</file>
- <curve>nist/B-571</curve>
- </pubkey>
- <keypair>
- <id>k163-A</id>
- <file>nist/k163-keyIUT.csv</file>
- <curve>nist/K-163</curve>
- </keypair>
- <pubkey>
- <id>k163-B</id>
- <file>nist/k163-keyCAVS.csv</file>
- <curve>nist/K-163</curve>
- </pubkey>
- <keypair>
- <id>k233-A</id>
- <file>nist/k233-keyIUT.csv</file>
- <curve>nist/K-233</curve>
- </keypair>
- <pubkey>
- <id>k233-B</id>
- <file>nist/k233-keyCAVS.csv</file>
- <curve>nist/K-233</curve>
- </pubkey>
- <keypair>
- <id>k283-A</id>
- <file>nist/k283-keyIUT.csv</file>
- <curve>nist/K-283</curve>
- </keypair>
- <pubkey>
- <id>k283-B</id>
- <file>nist/k283-keyCAVS.csv</file>
- <curve>nist/K-283</curve>
- </pubkey>
- <keypair>
- <id>k409-A</id>
- <file>nist/k409-keyIUT.csv</file>
- <curve>nist/K-409</curve>
- </keypair>
- <pubkey>
- <id>k409-B</id>
- <file>nist/k409-keyCAVS.csv</file>
- <curve>nist/K-409</curve>
- </pubkey>
- <keypair>
- <id>k571-A</id>
- <file>nist/k571-keyIUT.csv</file>
- <curve>nist/K-571</curve>
- </keypair>
- <pubkey>
- <id>k571-B</id>
- <file>nist/k571-keyCAVS.csv</file>
- <curve>nist/K-571</curve>
- </pubkey>
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b163-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/b163-dhc-raw.csv
deleted file mode 100644
index 25233c1..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b163-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0100fb42d177ffe6c31378e2e04e0da7376ffe8765 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b163-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/b163-dhc-sha1.csv
deleted file mode 100644
index 0ad84c1..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b163-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x10f4ddcf79c23fd7dc11563bf18b2be75a139e4f \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b163-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/b163-keyCAVS.csv
deleted file mode 100644
index 4d85a19..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b163-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x03a647ba32dac71ec6780b0638a70cd24fc3bd4c8e,0x02e69e961541844a4aa33769a7bce710f6640a560c \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b163-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/b163-keyIUT.csv
deleted file mode 100644
index e56e6c4..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b163-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x035466701d0b0030d098b6ed2343d355c24c907271,0x00d8bc02f341d261860dfb65f0cb7f0b488d8296cc,0x03edae173de8fa0cf0412d6a7bdc81fdbd0617adf8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b233-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/b233-dhc-raw.csv
deleted file mode 100644
index 5e703be..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b233-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9f3d8c4f1bec0f920e763ea1bb7415899f01734609e7547dc425ec946 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b233-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/b233-dhc-sha1.csv
deleted file mode 100644
index 8c6886f..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b233-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x958fd3d4a2f61130acf6472a6de421f11d9a4d13 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b233-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/b233-keyCAVS.csv
deleted file mode 100644
index 591bfe1..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b233-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x004756baddefc3dc337ab27b5452eb10affd9e31f5b55c330e90f0f686a2,0x012a79f65232308a21c98c01555ccafc7dce15c8fed3025a760cbd6c2327 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b233-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/b233-keyIUT.csv
deleted file mode 100644
index eb7b5e6..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b233-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0061e8a9b517fd05a026ec376616229fd8639a1fa76defe5398022f9d9c8,0x00706b5cb08738a94552fee584b1372fead4af79040909fcf6f50084bbfa,0x003c3ee474ac0d0bc1df567e3c35f5f766c5332b2d6730ff0e4d8e75aedb \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b283-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/b283-dhc-raw.csv
deleted file mode 100644
index 6bc719a..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b283-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x065194e26090e74047ee75f13f9769d20e1b52189650011e283daa090732cc53755dc366 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b283-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/b283-dhc-sha1.csv
deleted file mode 100644
index 6980f80..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b283-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x75c8297b1dd59937f86c3063e8ec0b2b9ad118bf \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b283-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/b283-keyCAVS.csv
deleted file mode 100644
index 52b33fc..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b283-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x02504e1a17819d39f010a4a69a0568299402b58f944a384c7d1a62c9c93ea4d1ff300e13,0x0265132f7b4c64b74b9179ed0f2e211f4328d625405022f554170da932b80fdf7c1aab12 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b283-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/b283-keyIUT.csv
deleted file mode 100644
index 8d2d534..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b283-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0561e495563018169804d4c8e2435b4afd85da376d914b69d39246f8e06113aa32e642d2,0x0781a7f59de7f42f5f9d6c3481f33fc5deb357c6ecf4c758e370d2435de3d8ee737703f4,0x02f43455842246a2cc8ec068e9d6c6e4160f6ba4e3b5d831d93c1daa8fd3d5a9660c7bb1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b409-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/b409-dhc-raw.csv
deleted file mode 100644
index f84d029..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b409-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01d48a586be9285fa38dd3e70b0330b0ffebd327ceefef88fdc1521ef2fd61cbc9124e03b0c926e70fa56acb3edb54c3c48fab2b \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b409-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/b409-dhc-sha1.csv
deleted file mode 100644
index f6db38b..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b409-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb6562e95755880a16bc35fcc030af5febc1113d4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b409-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/b409-keyCAVS.csv
deleted file mode 100644
index cecb5f3..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b409-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0146989a50297be373dd665c45455a2ae4c221da5cd424007bd97f9e8e846f96740f3fa58c3c94129671cdd4d7ea650a2aade9d7,0x01b42bffda843946a14ad6080f95b8fc6b7e173528d08ed36fe640aaf85aa00fb5edd5905a38b3c7961b7722b77b8dcb44bb25f5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b409-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/b409-keyIUT.csv
deleted file mode 100644
index 066d220..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b409-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x004ebc4d4acf9b404dabc3af3e8cbea8b88b32999d3ecb7f367b12eb3a6280b840038e22681637a7d16436e014f69616abf72e45,0x009e24109541c8024217e9ab2c963fa9e373640095a6c25a26eefac58e4342c0c85448b2709592a12402fe2b68a793c558ce8cd6,0x00ace92103ffe262ac17ad42a46d4366f4cb4c580eff3ab1dde6bddfdbb7374811d52b1fa99320b4af5d4e9208c14eb8efa8916c \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b571-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/b571-dhc-raw.csv
deleted file mode 100644
index ffef41d..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b571-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x06775e1b99a236e02b020bc73666e5751c1210dcb6e9b02a69f4075376e49f7a1476d2209e861abb73f5e3ad189d268e035b1de93d47b3a64de5783c9a09bc223e1cc612f26dcdf1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b571-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/b571-dhc-sha1.csv
deleted file mode 100644
index d75a7ff..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b571-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x624e4d4dc60f1064e378d34ef2e1fbb0ade792e6 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b571-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/b571-keyCAVS.csv
deleted file mode 100644
index 20b1816..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b571-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x03b63f5fa112ae6b5f113c765144fe4cbd6020e26d400c11609a3a634b9a325f416b0e3d3215734c68a1c2c8fad1d0bb9eb3939a41af22421f68781e7eb0664b9df5cea448deaa3b,0x008e6cc77bcddc816e84cfc1f626824fa24d3d5fd33d8093cbfe1fc4d881b63b494123bc759670edcb1887bb3b9d5a8b516bc503828163709d4dacb594d277a15a92c064e5770d1b \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/b571-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/b571-keyIUT.csv
deleted file mode 100644
index 8e3973d..0000000
--- a/src/cz/crcs/ectester/data/test/nist/b571-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x06af71fcec1a2904116fe14878663764c1ec74870e5d2d53919f0b635912db80dd5460d9e699458ff8494c5bfc74fba8d3b12f65f015e8def10de33f1800191f4cb502d21938b951,0x019584177b189c6641ffb678b6d7833d8d4bb25dee5018dda4e4c0d219048c01cd0da9eaffe346d53cf1a07b33b3dbdd4bc3acabe4832f9981eff2660991aac852147985eea3a51e,0x0344f22be87999b95b2287f67430ea8fe646c62fe38b7ce61f1f956597c27bddd9902e20d4436abf3bebd8243ec29a00481a8a2c19f550e99641b5f14aafbb5bda953a7559f8653a \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k163-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/k163-dhc-raw.csv
deleted file mode 100644
index 5001502..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k163-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x04325bff38f1b0c83c27f554a6c972a80f14bc23bc \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k163-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/k163-dhc-sha1.csv
deleted file mode 100644
index e03aa60..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k163-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x5e1384ed2d3d5efc77e89581bbb467934ecb7b03 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k163-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/k163-keyCAVS.csv
deleted file mode 100644
index 6f03652..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k163-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0574236f1428c432130946783a5b3aabb6c27ea5d6,0x07908c251b8da021cbac281f123f7af4fac5b3dbb8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k163-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/k163-keyIUT.csv
deleted file mode 100644
index b34189e..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k163-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x071f8b2877d6027d9c1ade4244f2dea12692ef23d5,0x05c15ee776221c72b84b347ce383f38067b89c3e9a,0x006653b6077398fadc7bf5e60158170148c3dc4527 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k233-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/k233-dhc-raw.csv
deleted file mode 100644
index 03193ae..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k233-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a822b141ca1f5ad32899e68c54d1fec3df8100df485ebf1c5868a9ac89 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k233-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/k233-dhc-sha1.csv
deleted file mode 100644
index c6c68ac..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k233-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x70b67e77fb15c14caab64c04738e97ea3288c415 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k233-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/k233-keyCAVS.csv
deleted file mode 100644
index 7c60338..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k233-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01f40e34b3ed4a1b2d40c056fb75f2ad543c897cfd82f542cf746a0f202f,0x00c130a1abe92bc4c977c800777996ccc50b90df991a2e81dd515c188599 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k233-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/k233-keyIUT.csv
deleted file mode 100644
index d8cc078..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k233-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x01a53e5c138b3d83905d563aa1db01274633c986b52f78225a92e33e7952,0x00ecabd3e2e26729a965604e560ed4498a22b31c39642e1cf99b1dde3ec7,0x00135a5b8c3ce047fbc5df26277d3bf83ac33ddadb5cf4a050ca82be48f0 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k283-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/k283-dhc-raw.csv
deleted file mode 100644
index 0e14373..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k283-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0745552817b5d729310b7dbebae687648714a9ae695dad20ca1ab6111c3d054670f21132 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k283-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/k283-dhc-sha1.csv
deleted file mode 100644
index 6852d2f..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k283-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb2a69891df7b9736507ce0126ab37213db2ce68f \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k283-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/k283-keyCAVS.csv
deleted file mode 100644
index f91e05a..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k283-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x03f075c24c35a9dc9952be6fd32b761dce63f4720a22408e3a14bbd097e012b5694c22a0,0x0675825b40202e95be7dab5a826147e04b8c51a09b0034577c1f31f8c16a70c8e1c85b89 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k283-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/k283-keyIUT.csv
deleted file mode 100644
index 2b19347..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k283-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0611edc045dbe43ecc4ef6b324cd51f70fe3d7ddf877ec68b798909c3c4561756aa30e5f,0x00833b25511704af09b62d9f7cbac59814e75bbb9c735f55538491dbfa60c1e0115efe42,0x015fde49b802542a52c70b23a0b1784e5f8780b56853f9a5f8c3a5266e8727dce97d4a17 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k409-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/k409-dhc-raw.csv
deleted file mode 100644
index f02c0dd..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k409-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0176bc5c4036ce5125493a58dd265f04d190f028366f7799f70aedf29ac67b5b37c37238593377a47944f5b639f43856dbd560ec \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k409-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/k409-dhc-sha1.csv
deleted file mode 100644
index f4f5cdc..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k409-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xc25335980d8bf0be8b039a1b525f6d002eec48e9 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k409-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/k409-keyCAVS.csv
deleted file mode 100644
index cc40c76..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k409-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0177f736f6116320cafbb5b4dec202d40508182fe011189b81e1f3998f5408607a46bb150ac47bcaaafde47b8a7b72f478bc22d2,0x01df4ef4b37e0124e55b67f3586de24a88a6c5d98854007d4b0c4b4ccd68d51fafa7638bbe555d60b74def217c6a63c5b4068fb7 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k409-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/k409-keyIUT.csv
deleted file mode 100644
index e8d0c97..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k409-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0068a3f8b12e02d10e2f52095526bc4048b8f6ac3a84531772870789938f1aeff813e05e509ea9587d2b7e4aa14344bac3ec46f0,0x00d1ceb40c7d5f3297e2955f0f3eb1422b3e6bbbfbf7eb518b9c17ae8d40feb84aaf36f5e5bd96075b2b4dbe538ac011962ac705,0x00084b711e3c60822e70fa6828b5abfb0e448888b35b0c8bb09f806616dc1ecf22dd86237d937c1bfde62b75ae655953fc6b2f7e \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k571-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/k571-dhc-raw.csv
deleted file mode 100644
index eca4a7b..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k571-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x003198a6b5d6cce847e24348a6a6ceff7a89ed3794d7acedc4e858c80ad04a74dbc02c7038e05ab26b2a299ec92ee0d2c7e66a81872a5157fbc5d4d37ad598d6ddee995ed28a2d74 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k571-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/k571-dhc-sha1.csv
deleted file mode 100644
index 938ba18..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k571-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x2d3100b4978fcce89c26c4cea4b72216ea942d2d \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k571-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/k571-keyCAVS.csv
deleted file mode 100644
index 71d1e64..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k571-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x03106a5c1d923a0990ea8c6008c36c366b53e5622b98464044741fbc7840284db8bbf602866c30ccbf5f9b7e59cc1d9bfcc5b970fa624da9b15f6cb336f5dda7e6b9924d5dce4543,0x005c5c7bbd5a789ac4c6283deb0d0d37c4852baa57d6bc2b0ac6337feb09704c44d1b385b70cc394fa235d83e6e7111787e57d0902c0cb132a190a6e62f398511c0c2c4cd50d4570 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/k571-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/k571-keyIUT.csv
deleted file mode 100644
index 6222122..0000000
--- a/src/cz/crcs/ectester/data/test/nist/k571-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x03fbfbbcfba609157f68a23126d805f7c75efb19befb595e3a975e08ff46bd34c8b87b9645c0e86ea0ad915465d5c856c69bb9b722b0d17bf97ad95c4602dea17c6b512054cb22d8,0x071c16df71e1b71b4bd3d9938827d3959093b9db1ff86bed73944a42dcb67cc33102e28c1d0e9804a6450656f4bf33ad72ecf7bb83bd282cde4bc15d4e48064aa8ad2f02979f5f3f,0x0173cd1631e18ece01b73b3572ffaa7495c4bc81f4078ae50d69cb1e338acf13469117112921166ddf2d29f3a9f8e10c67e88c9a99203a834565be76ac59126436739a6afa029cc5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p192-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/p192-dhc-raw.csv
deleted file mode 100644
index 4f139f7..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p192-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x803d8ab2e5b6e6fca715737c3a82f7ce3c783124f6d51cd0 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p192-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/p192-dhc-sha1.csv
deleted file mode 100644
index f3e01bf..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p192-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xcb0ffaa3d3f9d5876765cf082ee0b893c8179d19 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p192-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/p192-keyCAVS.csv
deleted file mode 100644
index d8a3fab..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p192-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0,0xdfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p192-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/p192-keyIUT.csv
deleted file mode 100644
index fb58f03..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p192-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xb15053401f57285637ec324c1cd2139e3a67de3739234b37,0xf269c158637482aad644cd692dd1d3ef2c8a7c49e389f7f6,0xf17d3fea367b74d340851ca4270dcb24c271f445bed9d527 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p224-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/p224-dhc-raw.csv
deleted file mode 100644
index 5a3bb67..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p224-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7d96f9a3bd3c05cf5cc37feb8b9d5209d5c2597464dec3e9983743e8 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p224-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/p224-dhc-sha1.csv
deleted file mode 100644
index 8e0e8ec..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p224-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd022bcf6eaef7789ef8d2aeaa9ab9d508944ce03 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p224-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/p224-keyCAVS.csv
deleted file mode 100644
index 183d654..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p224-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xaf33cd0629bc7e996320a3f40368f74de8704fa37b8fab69abaae280,0x882092ccbba7930f419a8a4f9bb16978bbc3838729992559a6f2e2d7 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p224-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/p224-keyIUT.csv
deleted file mode 100644
index 24b992b..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p224-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x8de2e26adf72c582d6568ef638c4fd59b18da171bdf501f1d929e048,0x4a68a1c2b0fb22930d120555c1ece50ea98dea8407f71be36efac0de,0x8346a60fc6f293ca5a0d2af68ba71d1dd389e5e40837942df3e43cbd \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p256-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/p256-dhc-raw.csv
deleted file mode 100644
index cd8291f..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p256-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x46fc62106420ff012e54a434fbdd2d25ccc5852060561e68040dd7778997bd7b \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p256-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/p256-dhc-sha1.csv
deleted file mode 100644
index 021f92b..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p256-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x381ae083bf9ff3bb49730a96d4e55aabae1c42da \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p256-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/p256-keyCAVS.csv
deleted file mode 100644
index e7b0176..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p256-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x700c48f77f56584c5cc632ca65640db91b6bacce3a4df6b42ce7cc838833d287,0xdb71e509e3fd9b060ddb20ba5c51dcc5948d46fbf640dfe0441782cab85fa4ac \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p256-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/p256-keyIUT.csv
deleted file mode 100644
index 0df2f99..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p256-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xead218590119e8876b29146ff89ca61770c4edbbf97d38ce385ed281d8a6b230,0x28af61281fd35e2fa7002523acc85a429cb06ee6648325389f59edfce1405141,0x7d7dc5f71eb29ddaf80d6214632eeae03d9058af1fb6d22ed80badb62bc1a534 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p384-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/p384-dhc-raw.csv
deleted file mode 100644
index 725e299..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p384-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x5f9d29dc5e31a163060356213669c8ce132e22f57c9a04f40ba7fcead493b457e5621e766c40a2e3d4d6a04b25e533f1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p384-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/p384-dhc-sha1.csv
deleted file mode 100644
index 765e6de..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p384-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf84b679c77f7e42457aa306667ac2e6c2ac1d8d6 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p384-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/p384-keyCAVS.csv
deleted file mode 100644
index 64c6328..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p384-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xa7c76b970c3b5fe8b05d2838ae04ab47697b9eaf52e764592efda27fe7513272734466b400091adbf2d68c58e0c50066,0xac68f19f2e1cb879aed43a9969b91a0839c4c38a49749b661efedf243451915ed0905a32b060992b468c64766fc8437a \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p384-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/p384-keyIUT.csv
deleted file mode 100644
index 65cf43d..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p384-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9803807f2f6d2fd966cdd0290bd410c0190352fbec7ff6247de1302df86f25d34fe4a97bef60cff548355c015dbb3e5f,0xba26ca69ec2f5b5d9dad20cc9da711383a9dbe34ea3fa5a2af75b46502629ad54dd8b7d73a8abb06a3a3be47d650cc99,0x3cc3122a68f0d95027ad38c067916ba0eb8c38894d22e1b15618b6818a661774ad463b205da88cf699ab4d43c9cf98a1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p521-dhc-raw.csv b/src/cz/crcs/ectester/data/test/nist/p521-dhc-raw.csv
deleted file mode 100644
index 6467649..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p521-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x005fc70477c3e63bc3954bd0df3ea0d1f41ee21746ed95fc5e1fdf90930d5e136672d72cc770742d1711c3c3a4c334a0ad9759436a4d3c5bf6e74b9578fac148c831 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p521-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/nist/p521-dhc-sha1.csv
deleted file mode 100644
index 2f4f557..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p521-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x1020fb37e0dada201655ad3cc7410aed9cc034f3 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p521-keyCAVS.csv b/src/cz/crcs/ectester/data/test/nist/p521-keyCAVS.csv
deleted file mode 100644
index c00148e..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p521-keyCAVS.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00685a48e86c79f0f0875f7bc18d25eb5fc8c0b07e5da4f4370f3a9490340854334b1e1b87fa395464c60626124a4e70d0f785601d37c09870ebf176666877a2046d,0x01ba52c56fc8776d9e8f5db4f0cc27636d0b741bbe05400697942e80b739884a83bde99e0f6716939e632bc8986fa18dccd443a348b6c3e522497955a4f3c302f676 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/nist/p521-keyIUT.csv b/src/cz/crcs/ectester/data/test/nist/p521-keyIUT.csv
deleted file mode 100644
index b36b3b6..0000000
--- a/src/cz/crcs/ectester/data/test/nist/p521-keyIUT.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00602f9d0cf9e526b29e22381c203c48a886c2b0673033366314f1ffbcba240ba42f4ef38a76174635f91e6b4ed34275eb01c8467d05ca80315bf1a7bbd945f550a5,0x01b7c85f26f5d4b2d7355cf6b02117659943762b6d1db5ab4f1dbc44ce7b2946eb6c7de342962893fd387d1b73d7a8672d1f236961170b7eb3579953ee5cdc88cd2d,0x017eecc07ab4b329068fba65e56a1f8890aa935e57134ae0ffcce802735151f4eac6564f6ee9974c5e6887a1fefee5743ae2241bfeb95d5ce31ddcb6f9edb4d6fc47 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/results.xml b/src/cz/crcs/ectester/data/test/results.xml
deleted file mode 100644
index fa43e4b..0000000
--- a/src/cz/crcs/ectester/data/test/results.xml
+++ /dev/null
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <kaResult>
- <id>secp160r1-dh</id>
- <ka>DH</ka>
- <file>secg/secp160r1-dh-sha1.csv</file>
- <curve>secg/secp160r1</curve>
- <onekey>test/secp160r1-U</onekey>
- <otherkey>test/secp160r1-V</otherkey>
- </kaResult>
- <kaResult>
- <id>sect163k1-dh</id>
- <ka>DH</ka>
- <file>secg/sect163k1-dh-sha1.csv</file>
- <curve>secg/sect163k1</curve>
- <onekey>test/sect163k1-U</onekey>
- <otherkey>test/sect163k1-V</otherkey>
- </kaResult>
-
- <kaResult>
- <id>brainpoolP224r1-dh</id>
- <ka>DH</ka>
- <file>brainpool/brainpoolP224r1-dh-sha1.csv</file>
- <curve>brainpool/brainpoolP224r1</curve>
- <onekey>test/brainpoolP224r1-A</onekey>
- <otherkey>test/brainpoolP224r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP256r1-dh</id>
- <ka>DH</ka>
- <file>brainpool/brainpoolP256r1-dh-sha1.csv</file>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>test/brainpoolP256r1-A</onekey>
- <otherkey>test/brainpoolP256r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP384r1-dh</id>
- <ka>DH</ka>
- <file>brainpool/brainpoolP384r1-dh-sha1.csv</file>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>test/brainpoolP384r1-A</onekey>
- <otherkey>test/brainpoolP384r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP512r1-dh</id>
- <ka>DH</ka>
- <file>brainpool/brainpoolP512r1-dh-sha1.csv</file>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>test/brainpoolP512r1-A</onekey>
- <otherkey>test/brainpoolP512r1-B</otherkey>
- </kaResult>
-
- <kaResult>
- <id>b163-dhc</id>
- <ka>DHC</ka>
- <file>nist/b163-dhc-sha1.csv</file>
- <curve>nist/B-163</curve>
- <onekey>test/b163-A</onekey>
- <otherkey>test/b163-B</otherkey>
- </kaResult>
- <kaResult>
- <id>b233-dhc</id>
- <ka>DHC</ka>
- <file>nist/b233-dhc-sha1.csv</file>
- <curve>nist/B-233</curve>
- <onekey>test/b233-A</onekey>
- <otherkey>test/b233-B</otherkey>
- </kaResult>
- <kaResult>
- <id>b283-dhc</id>
- <ka>DHC</ka>
- <file>nist/b283-dhc-sha1.csv</file>
- <curve>nist/B-283</curve>
- <onekey>test/b283-A</onekey>
- <otherkey>test/b283-B</otherkey>
- </kaResult>
- <kaResult>
- <id>b409-dhc</id>
- <ka>DHC</ka>
- <file>nist/b409-dhc-sha1.csv</file>
- <curve>nist/B-409</curve>
- <onekey>test/b409-A</onekey>
- <otherkey>test/b409-B</otherkey>
- </kaResult>
- <kaResult>
- <id>b571-dhc</id>
- <ka>DHC</ka>
- <file>nist/b571-dhc-sha1.csv</file>
- <curve>nist/B-571</curve>
- <onekey>test/b571-A</onekey>
- <otherkey>test/b571-B</otherkey>
- </kaResult>
- <kaResult>
- <id>k163-dhc</id>
- <ka>DHC</ka>
- <file>nist/k163-dhc-sha1.csv</file>
- <curve>nist/B-163</curve>
- <onekey>test/k163-A</onekey>
- <otherkey>test/k163-B</otherkey>
- </kaResult>
- <kaResult>
- <id>k233-dhc</id>
- <ka>DHC</ka>
- <file>nist/k233-dhc-sha1.csv</file>
- <curve>nist/B-233</curve>
- <onekey>test/k233-A</onekey>
- <otherkey>test/k233-B</otherkey>
- </kaResult>
- <kaResult>
- <id>k283-dhc</id>
- <ka>DHC</ka>
- <file>nist/k283-dhc-sha1.csv</file>
- <curve>nist/B-283</curve>
- <onekey>test/k283-A</onekey>
- <otherkey>test/k283-B</otherkey>
- </kaResult>
- <kaResult>
- <id>k409-dhc</id>
- <ka>DHC</ka>
- <file>nist/k409-dhc-sha1.csv</file>
- <curve>nist/B-409</curve>
- <onekey>test/k409-A</onekey>
- <otherkey>test/k409-B</otherkey>
- </kaResult>
- <kaResult>
- <id>k571-dhc</id>
- <ka>DHC</ka>
- <file>nist/k571-dhc-sha1.csv</file>
- <curve>nist/B-571</curve>
- <onekey>test/k571-A</onekey>
- <otherkey>test/k571-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p192-dhc</id>
- <ka>ANY</ka>
- <file>nist/p192-dhc-sha1.csv</file>
- <curve>nist/P-192</curve>
- <onekey>test/p192-A</onekey>
- <otherkey>test/p192-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p224-dhc</id>
- <ka>ANY</ka>
- <file>nist/p224-dhc-sha1.csv</file>
- <curve>nist/P-224</curve>
- <onekey>test/p224-A</onekey>
- <otherkey>test/p224-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p256-dhc</id>
- <ka>ANY</ka>
- <file>nist/p256-dhc-sha1.csv</file>
- <curve>nist/P-256</curve>
- <onekey>test/p256-A</onekey>
- <otherkey>test/p256-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p384-dhc</id>
- <ka>ANY</ka>
- <file>nist/p384-dhc-sha1.csv</file>
- <curve>nist/P-384</curve>
- <onekey>test/p384-A</onekey>
- <otherkey>test/p384-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p521-dhc</id>
- <ka>ANY</ka>
- <file>nist/p521-dhc-sha1.csv</file>
- <curve>nist/P-521</curve>
- <onekey>test/p521-A</onekey>
- <otherkey>test/p521-B</otherkey>
- </kaResult>
- <kaResult>
- <id>secp160r1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>secg/secp160r1-dh-raw.csv</file>
- <curve>secg/secp160r1</curve>
- <onekey>test/secp160r1-U</onekey>
- <otherkey>test/secp160r1-V</otherkey>
- </kaResult>
- <kaResult>
- <id>sect163k1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>secg/sect163k1-dh-raw.csv</file>
- <curve>secg/sect163k1</curve>
- <onekey>test/sect163k1-U</onekey>
- <otherkey>test/sect163k1-V</otherkey>
- </kaResult>
-
- <kaResult>
- <id>brainpoolP224r1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>brainpool/brainpoolP224r1-dh-raw.csv</file>
- <curve>brainpool/brainpoolP224r1</curve>
- <onekey>test/brainpoolP224r1-A</onekey>
- <otherkey>test/brainpoolP224r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP256r1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>brainpool/brainpoolP256r1-dh-raw.csv</file>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>test/brainpoolP256r1-A</onekey>
- <otherkey>test/brainpoolP256r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP384r1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>brainpool/brainpoolP384r1-dh-raw.csv</file>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>test/brainpoolP384r1-A</onekey>
- <otherkey>test/brainpoolP384r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>brainpoolP512r1-dh-plain</id>
- <ka>DH_PLAIN</ka>
- <file>brainpool/brainpoolP512r1-dh-raw.csv</file>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>test/brainpoolP512r1-A</onekey>
- <otherkey>test/brainpoolP512r1-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p192-dhc-plain</id>
- <ka>DH_PLAIN</ka>
- <file>nist/p192-dhc-raw.csv</file>
- <curve>nist/P-192</curve>
- <onekey>test/p192-A</onekey>
- <otherkey>test/p192-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p224-dhc-plain</id>
- <ka>DH_PLAIN</ka>
- <file>nist/p224-dhc-raw.csv</file>
- <curve>nist/P-224</curve>
- <onekey>test/p224-A</onekey>
- <otherkey>test/p224-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p256-dhc-plain</id>
- <ka>DH_PLAIN</ka>
- <file>nist/p256-dhc-raw.csv</file>
- <curve>nist/P-256</curve>
- <onekey>test/p256-A</onekey>
- <otherkey>test/p256-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p384-dhc-plain</id>
- <ka>DH_PLAIN</ka>
- <file>nist/p384-dhc-raw.csv</file>
- <curve>nist/P-384</curve>
- <onekey>test/p384-A</onekey>
- <otherkey>test/p384-B</otherkey>
- </kaResult>
- <kaResult>
- <id>p521-dhc-plain</id>
- <ka>DH_PLAIN</ka>
- <file>nist/p521-dhc-raw.csv</file>
- <curve>nist/P-521</curve>
- <onekey>test/p521-A</onekey>
- <otherkey>test/p521-B</otherkey>
- </kaResult>
-</results> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-kdf.csv b/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-kdf.csv
deleted file mode 100644
index eb56e26..0000000
--- a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-kdf.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x744ab703f5bc082e59185f6d049d2d367db245c2
diff --git a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-raw.csv b/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-raw.csv
deleted file mode 100644
index c246c32..0000000
--- a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xca7c0f8c3ffa87a96e1b74ac8e6af594347bb40a
diff --git a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-sha1.csv
deleted file mode 100644
index d83d932..0000000
--- a/src/cz/crcs/ectester/data/test/secg/secp160r1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xd248313e865a1ae677782b54b24d8abaf11a53c2
diff --git a/src/cz/crcs/ectester/data/test/secg/secp160r1-keyU.csv b/src/cz/crcs/ectester/data/test/secg/secp160r1-keyU.csv
deleted file mode 100644
index dcbe885..0000000
--- a/src/cz/crcs/ectester/data/test/secg/secp160r1-keyU.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x51b4496fecc406ed0e75a24a3c03206251419dc0,0xc28dcb4b73a514b468d793894f381ccc1756aa6c,0xaa374ffc3ce144e6b073307972cb6d57b2a4e982 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/secp160r1-keyV.csv b/src/cz/crcs/ectester/data/test/secg/secp160r1-keyV.csv
deleted file mode 100644
index 59aacda..0000000
--- a/src/cz/crcs/ectester/data/test/secg/secp160r1-keyV.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x49b41e0e9c0369c2328739d90f63d56707c6e5bc,0x26e008b567015ed96d232a03111c3edc0e9c8f83,0x45fb58a92a17ad4b15101c66e74f277e2b460866
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-kdf.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-kdf.csv
deleted file mode 100644
index 06a416f..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-kdf.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x6655a9c8f9e593149db24c91ce621641035c9282 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-raw.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-raw.csv
deleted file mode 100644
index 94eacd8..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0357c3dcd1df3e27bd8885170ee4975b5081da7fa7 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-sha1.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-sha1.csv
deleted file mode 100644
index 651b80c..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dh-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x13132f8088d60f9fe0d955ae04c9d20da829a38b \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-kdf.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-kdf.csv
deleted file mode 100644
index c234f31..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-kdf.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x59798528083f50b07528353cda99d0e460a7229d \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-raw.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-raw.csv
deleted file mode 100644
index 46a0a0f..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-raw.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x04cb89474b33a518e1c3cd11beb6e2b0cf48bee64d \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-sha1.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-sha1.csv
deleted file mode 100644
index 4839c25..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-dhc-sha1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x08e7dbcb78fe4020578c5eaa0aaca2cffb7b38ed \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-keyU.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-keyU.csv
deleted file mode 100644
index b516f3b..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-keyU.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x037d529fa37e42195f10111127ffb2bb38644806bc,0x0447026eee8b34157f3eb51be5185d2be0249ed776,0x03a41434aa99c2ef40c8495b2ed9739cb2155a1e0d \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/test/secg/sect163k1-keyV.csv b/src/cz/crcs/ectester/data/test/secg/sect163k1-keyV.csv
deleted file mode 100644
index 00ab019..0000000
--- a/src/cz/crcs/ectester/data/test/secg/sect163k1-keyV.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x072783faab9549002b4f13140b88132d1c75b3886c,0x05a976794ea79a4de26e2e19418f097942c08641c7,0x57e8a78e842bf4acd5c315aa0569db1703541d96 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/twist/cofactor/cofactor128p4.xml b/src/cz/crcs/ectester/data/twist/cofactor/cofactor128p4.xml
deleted file mode 100644
index b558f8e..0000000
--- a/src/cz/crcs/ectester/data/twist/cofactor/cofactor128p4.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>cofactor128p4/0</id>
- <inline>0x72294f8a7c88d510343c19b8251d7dd6,0x00000000000000000000000000000000</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 2</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/1</id>
- <inline>0x5d20662769138fe1506f2a2b44fd34c1,0x15d63a5aba305ccdee9f65e3f2c1d4e8</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 4</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/2</id>
- <inline>0x0b843b9da795292bfc598bae47fd0955,0x2944056236d430e404f6fd058a7a6624</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 17</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/3</id>
- <inline>0x663a7a5a7370a48f98ef5ba0cc2d19a1,0x13d59851b95e3916e1149b1f8345325d</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 37</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/4</id>
- <inline>0x415d46d2beb2357a567efeedd3e052a0,0x8b202b706af555d470fb42fb5919a64</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 24422261</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/5</id>
- <inline>0x6707ea110f83e67a9f6a43c184587bc6,0x1c44db735c6b30165e40660ecc5d8c3c</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist order = 87024861802858114445834597</desc>
-</pubkey>
-<pubkey>
- <id>cofactor128p4/gen</id>
- <inline>0x5a1c6fd7a138377f22dabe0840a02ede,0x39395b4be5f4c131a0a5f778be1166e5</inline>
- <curve>cofactor/cofactor128p4</curve>
- <desc>twist generator</desc>
-</pubkey>
-
diff --git a/src/cz/crcs/ectester/data/twist/cofactor/cofactor160p4.xml b/src/cz/crcs/ectester/data/twist/cofactor/cofactor160p4.xml
deleted file mode 100644
index bb712af..0000000
--- a/src/cz/crcs/ectester/data/twist/cofactor/cofactor160p4.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>cofactor160p4/0</id>
- <inline>0x0c43497bdc7c1fddd18368da4894a98a612f09ec,0x0000000000000000000000000000000000000000</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 2</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/1</id>
- <inline>0x526ba726c52a6c998994733747dc27db793ce64b,0x3f432767051371f91355e6a14488883bc51c881e</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 4</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/2</id>
- <inline>0x380cd2b93ff179b2411c721879d7fbed95ef1d68,0x7b36aafe70fa88d2522931555d91e072a89eaff0</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 8</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/3</id>
- <inline>0x640d26a5aa07b529bf39bb4d4ad79346f677e2e9,0x22c90f648dfd349f8ac76c4aa0e4fd7278bc4516</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 16</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/4</id>
- <inline>0x8dab044b1a87809667b940b43d913b00fa194c8,0x20652c81133c9e51a16d0ecbcd6f81111afc03c3</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 3</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/5</id>
- <inline>0x66e27b0bfaf5269dbca67fa71ea3a117f29f4ef9,0x2b9499a775ae8f7fba1884b3d852429757312c93</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 13</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/6</id>
- <inline>0x4758716ac3b6cfb971ea0a673c4eebbad085fbd8,0x6ab9c8044435062299d14bdb6d6a41faf0bb0067</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 169</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/7</id>
- <inline>0x76690f13f9fdec12b156a40f5a7c0f25b420e7e0,0x8cab0d69936dcb3b64007f2fd2881f18f627ade5</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 107</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/8</id>
- <inline>0x178c6e5bb98247299631a52d32a55e61711a21fb,0x6e9171b2aab5bbbe488d9c3c367cf0536bf19e1a</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 15259</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/9</id>
- <inline>0x08e82adfcb0ff539bf58e4f232f4721f3a014904,0x7ba4d134fa420dbf7fdff4986361d625e87ca27d</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 322336986893916431</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/10</id>
- <inline>0x1d6ee4ac5b0da602078684f14bab3510915f7fef,0x229903e44fe1dd7e4ef1d3dd4edc0ed05c712bef</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist order = 197469859348064237101</desc>
-</pubkey>
-<pubkey>
- <id>cofactor160p4/gen</id>
- <inline>0x5603c1fd03c11eb2ab5f7abb998658a791a71202,0x3151be9d7f447756c8e85f5ac82c1ee410727157</inline>
- <curve>cofactor/cofactor160p4</curve>
- <desc>twist generator</desc>
-</pubkey>
-
diff --git a/src/cz/crcs/ectester/data/twist/keys.xml b/src/cz/crcs/ectester/data/twist/keys.xml
deleted file mode 100644
index 3292004..0000000
--- a/src/cz/crcs/ectester/data/twist/keys.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE keys [
- <!ENTITY k163 SYSTEM "twist/nist/k163.xml">
- <!ENTITY k233 SYSTEM "twist/nist/k233.xml">
- <!ENTITY k283 SYSTEM "twist/nist/k283.xml">
- <!ENTITY b163 SYSTEM "twist/nist/b163.xml">
- <!ENTITY b233 SYSTEM "twist/nist/b233.xml">
- <!ENTITY b283 SYSTEM "twist/nist/b283.xml">
-
- <!ENTITY secp112r1 SYSTEM "twist/secg/secp112r1.xml">
- <!ENTITY secp112r2 SYSTEM "twist/secg/secp112r2.xml">
- <!ENTITY secp128r1 SYSTEM "twist/secg/secp128r1.xml">
- <!ENTITY secp128r2 SYSTEM "twist/secg/secp128r2.xml">
- <!ENTITY secp160k1 SYSTEM "twist/secg/secp160k1.xml">
- <!ENTITY secp160r1 SYSTEM "twist/secg/secp160r1.xml">
- <!ENTITY secp160r2 SYSTEM "twist/secg/secp160r2.xml">
- <!ENTITY secp192k1 SYSTEM "twist/secg/secp192k1.xml">
- <!ENTITY secp192r1 SYSTEM "twist/secg/secp192r1.xml">
- <!ENTITY secp224r1 SYSTEM "twist/secg/secp224r1.xml">
- <!ENTITY secp256k1 SYSTEM "twist/secg/secp256k1.xml">
- <!ENTITY secp256r1 SYSTEM "twist/secg/secp256r1.xml">
- <!ENTITY secp384r1 SYSTEM "twist/secg/secp384r1.xml">
- <!ENTITY secp521r1 SYSTEM "twist/secg/secp521r1.xml">
-
- <!ENTITY cofactor128p4 SYSTEM "twist/cofactor/cofactor128p4.xml">
- <!ENTITY cofactor160p4 SYSTEM "twist/cofactor/cofactor160p4.xml">
- ]>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- &k163;
- &k233;
- &k283;
- &b163;
- &b233;
- &b283;
-
- &secp112r1;
- &secp112r2;
- &secp128r1;
- &secp128r2;
- &secp160k1;
- &secp160r1;
- &secp160r2;
- &secp192k1;
- &secp192r1;
- &secp224r1;
- &secp256k1;
- &secp256r1;
- &secp384r1;
- &secp521r1;
-
- &cofactor128p4;
- &cofactor160p4;
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/twist/nist/b163.xml b/src/cz/crcs/ectester/data/twist/nist/b163.xml
deleted file mode 100644
index 03690ac..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/b163.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b163/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x02c25b85badf8927593d21c366da89c03969f34da5</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>b163/1</id>
- <inline>0x03a98eb9fc1007f0a2b0e8de7da23cc6a7f7dd76b1,0x019971752926a2aca5407bffbf2a73f3f884b97127</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0x1f</desc>
-</pubkey>
-<pubkey>
- <id>b163/2</id>
- <inline>0x023ae22e69bac70ca24078fdf63753eaf6cb89e857,0x03674a33443dc657c24685eb761ab7efbb63a8adbc</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0x38b</desc>
-</pubkey>
-<pubkey>
- <id>b163/3</id>
- <inline>0x04feb095cf083a783cac4107305889efa9f401cc27,0x0403abb00aa4712e4b9120391d59745e9fbad39db3</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0x1208485</desc>
-</pubkey>
-<pubkey>
- <id>b163/4</id>
- <inline>0x00a72a640e05acc0e6c6956ab5be24240b92623add,0x031dfc8af709b3db0a05126f17a7b4d703de503475</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0xb78fc77</desc>
-</pubkey>
-<pubkey>
- <id>b163/5</id>
- <inline>0x031b5fc734d73023a06e4fe1b7921811221c6d1b2a,0x05432357b4a42a7b8f51b04dfab95a5ecf03547500</inline>
- <curve>nist/B-163</curve>
- <desc>twist order = 0x5c4bf9b1205a07afbe718429</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/b233.xml b/src/cz/crcs/ectester/data/twist/nist/b233.xml
deleted file mode 100644
index 7a0b579..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/b233.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b233/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x0187f85627b97874e747ee31e06d71caaeea52f21253e5f946d061da9138</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>b233/1</id>
- <inline>0x01143eef5ed49cf4b4c552259589988a019e98418c012194a255e9186870,0x01f8070b0ef657563e5d584ce23fc58ef70265d4178d78717c6acebb8c78</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>b233/2</id>
- <inline>0x01c8185b4f7d07a7eca7deb9f2adcd3c9402461f8679cbc9618ad1d82be3,0x002d17d4fa7eafbf4f6238b94ddc95f6a56384a4028f50e7de1838c21c8c</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x11b</desc>
-</pubkey>
-<pubkey>
- <id>b233/3</id>
- <inline>0x01af53fdcb81b561803cb01ba4d384fa3ef7633b1c0dfb35f0e437ffc201,0x012a092d0b600cc59c2234ae65261513eee7a085428b2b42e96253b1143e</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x21d</desc>
-</pubkey>
-<pubkey>
- <id>b233/4</id>
- <inline>0x01f4b2e29d7a3796e3aa4a6b3ff40805d322292acefd80149ff954d75e04,0x00df2f3258674f799c4dcc8cef118abb4c00abf0c1f10144b47af7a6f41b</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x22dba0b9</desc>
-</pubkey>
-<pubkey>
- <id>b233/5</id>
- <inline>0x01b6b9ce48a1428cb554a76a3f659d8b443ebee6b5619c88100bf3f83bb1,0x00dcafc85dfc3758e99736abe5ed2c4f03cbed5a3b478c9e233b976f7258</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x2a7504c0fda95a2311</desc>
-</pubkey>
-<pubkey>
- <id>b233/6</id>
- <inline>0x015cc90c0fdc2fc5fefddf1e9890627f87250b74fbaacd77feb761085d59,0x00059ccb49d156720dd3bcd75438225df9f9e84e7ffc0fc0dda02a647613</inline>
- <curve>nist/B-233</curve>
- <desc>twist order = 0x1e53fa33649df4ef97d6b29ded5a7</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/b283.xml b/src/cz/crcs/ectester/data/twist/nist/b283.xml
deleted file mode 100644
index 7f57585..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/b283.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>b283/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x072bcc9c5792b1ebe81983089fb6f835a2fd220a304424ca17c082ae17442aede9b9b3f6</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>b283/1</id>
- <inline>0x0297e6d1f2b857a79f5dc85c2f1259d5d801c61a4d0a4312a04f65f09a887a7b93cf7ae1,0x051963c38ac61f05fef93707abcfbda7bc0f39eacddb2bdd3077f19c0e65c8be66ecb30e</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>b283/2</id>
- <inline>0x022b522e9e120300e74563dee496f8feb64209b858abd5da50f31c92ae4a1eee751c92d6,0x012647d0d771016622e899c2a54afad773907e42e15d45e1db3e4fb0ae6a6df2934dba63</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x13</desc>
-</pubkey>
-<pubkey>
- <id>b283/3</id>
- <inline>0x02597a5336d18d9effde2820bed7352dccc8824abc81cde80914ea3cd072da55e9f91368,0x04a6d2c92a1ee699cda25dafa88191ef34218e9ea5c996d37e9ce507c318e7649b3b02d9</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x1623ab619</desc>
-</pubkey>
-<pubkey>
- <id>b283/4</id>
- <inline>0x01b011689cef74d9b2be4e8fb548eeabe31a678f560fc7b893c330b3939da9451a0cff78,0x022fd9ba4762f742a18e299f035a837b0525d7030e6b061eaa9242237d0767e7c28b608d</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x2a4aa67aaaf5413fb</desc>
-</pubkey>
-<pubkey>
- <id>b283/5</id>
- <inline>0x06ac85dce72aa795b5b90d43849dec9d4ee0ffc4d41f87fe8d48de2ac3cf84dfc5c20263,0x008e5147dba15ff3cb287457b3f41d32ca6c074df014f85033368d982c1670907d6afa05</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x25a8cdb1f2e470f3ac1ba7</desc>
-</pubkey>
-<pubkey>
- <id>b283/6</id>
- <inline>0x0132803a996ebd53ffa3553fc994b583cdb9514e4476c79336acf72f82ac36add519e655,0x004d30604436960af06b2eab63027ca8f59ca105f505afcd3413e1e72f5fb9c0f29d3a20</inline>
- <curve>nist/B-283</curve>
- <desc>twist order = 0x606749a9c147da03ad3f37</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/k163.xml b/src/cz/crcs/ectester/data/twist/nist/k163.xml
deleted file mode 100644
index 31040c0..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/k163.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k163/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000001</inline>
- <curve>nist/K-163</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>k163/1</id>
- <inline>0x04410857858628f16bd3ef77fce6732525d6d75f6c,0x00c51e38c5eb613ff4c8b594d754a218f30e8b1c39</inline>
- <curve>nist/K-163</curve>
- <desc>twist order = 0x28d</desc>
-</pubkey>
-<pubkey>
- <id>k163/2</id>
- <inline>0x004c291913c2e75103b38481fbda3830850ee4c026,0x0403ff8ccadf20f12e10e40b8eed4872d4c128aaa2</inline>
- <curve>nist/K-163</curve>
- <desc>twist order = 0x1979</desc>
-</pubkey>
-<pubkey>
- <id>k163/3</id>
- <inline>0x03868f9f75e8d0056c6e1aabed4a3df1437a56b386,0x07473bb4e85044c95af468d5374da860c4e563159c</inline>
- <curve>nist/K-163</curve>
- <desc>twist order = 0x7926bec180108d</desc>
-</pubkey>
-<pubkey>
- <id>k163/4</id>
- <inline>0x0162deb07d5848fc45fd580549a6f17fecea1b7497,0x0297440c5cfd9e8fe781004db92f9f106b9d33235f</inline>
- <curve>nist/K-163</curve>
- <desc>twist order = 0x10a6989de57d15c65ba229</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/k233.xml b/src/cz/crcs/ectester/data/twist/nist/k233.xml
deleted file mode 100644
index 6354ff9..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/k233.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k233/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>k233/1</id>
- <inline>0x01f5c35c89f8294442218a24a7e62ce3dac66c3ee5e9d2b70aaf51f520b2,0x001328eb45743dd96c4deaaa299b5394abfec9852e73a1e051a745fa95d8</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0x1686d</desc>
-</pubkey>
-<pubkey>
- <id>k233/2</id>
- <inline>0x00959e63a797bf3b2ea48d328ea3a9985da6bc95f296d1fc5e8cf17c257c,0x0070034f2e503a97be8766dd6db086870eea2e3fcb02260e9fcc0df8704c</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0x6d8a417</desc>
-</pubkey>
-<pubkey>
- <id>k233/3</id>
- <inline>0x00103cf39b9ffa6da7ef9f19f601daf698148663f6e0ae3b4ae2dca53782,0x013c1241644b61fb8c811287c2277c863eb0c31287e30d57d99169b1f509</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0x7c02977</desc>
-</pubkey>
-<pubkey>
- <id>k233/4</id>
- <inline>0x003d84c97077988af52d6d825080c0c79276fc168e092260d67b5d4ca3a3,0x01d3fa5b63a25a8f08828117edb78a1ab31724ecfc74d4fc2c4b7ea00703</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0x46403a035013f70d</desc>
-</pubkey>
-<pubkey>
- <id>k233/5</id>
- <inline>0x01a053f3903f7b9e7e5c8784b01e43fd427b7264781b1e6c7a8755065a38,0x01ed5e24cd66d3d42b4a869aee65bff9506a8cdbc9f3c3c86543ba14db12</inline>
- <curve>nist/K-233</curve>
- <desc>twist order = 0xc7cb3894752e561e6abf871db</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/k283.xml b/src/cz/crcs/ectester/data/twist/nist/k283.xml
deleted file mode 100644
index 48a2dd9..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/k283.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>k283/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>nist/K-283</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>k283/1</id>
- <inline>0x02707778aaa47f7a075be036522a6c2998ce118bf7e6314f342ba399dbc3572750791e4d,0x0568810a78107353690d1429cb7f4f408650cbf112d096907f563971baafad1b36436ec2</inline>
- <curve>nist/K-283</curve>
- <desc>twist order = 0x400000000000000000000000000000000002ca3a25f1511b3440100d775c3f3c3d3873f</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/p192.xml b/src/cz/crcs/ectester/data/twist/nist/p192.xml
deleted file mode 100644
index d1fdf49..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/p192.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>p192/0</id>
- <inline>0x489ba2a146ac0e7bb9f008fb780005e48d3588893c7ebca9,0x7caac0b203223010fb59940946a12e35d227fcb3ee6c9afc</inline>
- <curve>nist/P-192</curve>
- <desc>twist order = 0x17</desc>
-</pubkey>
-<pubkey>
- <id>p192/1</id>
- <inline>0xfaebaecd2737a6c22b5023d236ad48ab9acacb2cac075379,0x43810e9a10dabc2f835af837ac83fc4f0225773f3a84103f</inline>
- <curve>nist/P-192</curve>
- <desc>twist order = 0x231acce82af76d32ca5d526f</desc>
-</pubkey>
-<pubkey>
- <id>p192/2</id>
- <inline>0x7af6e161dcb8cd7852d5102ab42974af5179706d4616cce0,0xa3177747f0de49227575d2afc449187ab546e9ab827fcac9</inline>
- <curve>nist/P-192</curve>
- <desc>twist order = 0x512b1bfde874086edba50007</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/p224.xml b/src/cz/crcs/ectester/data/twist/nist/p224.xml
deleted file mode 100644
index 3ae34ff..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/p224.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>p224/0</id>
- <inline>0x90427f4a141f94c26f98d40060292350fcace2356961ef27dda08d7b,0x58877d4992c377c33459aa0caeb0526881326f201beb519fc11aadc8</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>p224/1</id>
- <inline>0x7f87c1db4213f1032c251a514e324f4360390476e0f7cd025547df58,0x2498f43e46af6fa0ad6480cfd61fb40caa78e349db0766a8760ff021</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0xb</desc>
-</pubkey>
-<pubkey>
- <id>p224/2</id>
- <inline>0x2a2d61174fd561e9da2f279b96f7a69ae50a78d87f09674f465c9184,0xc9c7232ca8a50587181d8c96204c1eec6e976bcbd58e3c7181dbb2a7</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0x2f</desc>
-</pubkey>
-<pubkey>
- <id>p224/3</id>
- <inline>0x15da8f68bfe51bc75f0cd892f7400c3d5ce5a9c6da126171527767cc,0x0cee3612475887d31963b62c69580191d1158df3f0c0305765175c9c</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0x2e0273</desc>
-</pubkey>
-<pubkey>
- <id>p224/4</id>
- <inline>0xbd813fcdea2281a452733516e4e2625fac96573c41f3b37c56d0d1d7,0x351de92e6b06928fec37ee0ffd03606fecc5022edc1a72453c433ef4</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0x268160f</desc>
-</pubkey>
-<pubkey>
- <id>p224/5</id>
- <inline>0x2a379d972d016116067b5bf2c23937b6182b4dc6bf8aa0625eb58b9f,0xb9ec1e372728d3334a762e5d64faca1e0cd47f46c3e5402ff14cb140</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0xf3bac7aa52cf</desc>
-</pubkey>
-<pubkey>
- <id>p224/6</id>
- <inline>0xc5e229bfc9f4e0992ecf51a3c354e6aac1a4673056bee9a673beae5a,0x73a2e7d530b13c281d460ea2d2c3bddb49a8eb3446b9308ec64d5a70</inline>
- <curve>nist/P-224</curve>
- <desc>twist order = 0x22340ff0f7eba57b33ac73e28a14d1</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/p256.xml b/src/cz/crcs/ectester/data/twist/nist/p256.xml
deleted file mode 100644
index 2e1c55e..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/p256.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>p256/0</id>
- <inline>0x92787586fc8a5d065a2a754e229a66ea3c845c8d5f7120792ee3aacee88ca01c,0xee95a42047d9eae3bb007aa7aed3a87ee6986df813f6c76d8f19866a1b1f9c20</inline>
- <curve>nist/P-256</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>p256/1</id>
- <inline>0x40d27c77cf9fb36e49a850b1ae7357c9ab3f1d917d52ba3edb648bd33354d3da,0xd30662382d8440919f4decbc58c6d9ca8745d39cdd71c26063fd2fa8bcbb69f7</inline>
- <curve>nist/P-256</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>p256/2</id>
- <inline>0x33961ae81d08958d1dbc42bdadb05e7cb7bdda383b1c49e18c3a2f5908c833a2,0xc4a96d4f905a1d7e32d4c82d6e79f1ef7047d09bf1d1518be2c65d13815306fe</inline>
- <curve>nist/P-256</curve>
- <desc>twist order = 0xd</desc>
-</pubkey>
-<pubkey>
- <id>p256/3</id>
- <inline>0x21fa3bf4b7d23dea73a1751d3b02dd8724a2a5a0ae9b28fdd98b8ef18bb610f5,0x7d933ab51ac8bc7e5d3c5a44d9875c64a080eba393c6492e4e5ce2367f133dd1</inline>
- <curve>nist/P-256</curve>
- <desc>twist order = 0xb3</desc>
-</pubkey>
-<pubkey>
- <id>p256/4</id>
- <inline>0x3819da45c7b025be543fd40ec49b2613891c12f2ae2daf014396c70270eff92c,0xbec84d62254dbc67864ced51966d4f419ad5b1ec9ee1d72cce291a8a034518da</inline>
- <curve>nist/P-256</curve>
- <desc>twist order = 0x1e0a75640070a738557cc30f68bd56eaea65c94f98411d17ac4e16ece1a47</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/p384.xml b/src/cz/crcs/ectester/data/twist/nist/p384.xml
deleted file mode 100644
index 8e0d2b6..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/p384.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>p384/0</id>
- <inline>0x77e3431a4d6b9d63985798eb41188f9af7eb6c0f38745d360bf82b5c2c162cb8393adf2dbc4d5531c49322d9c7b4c9cd,0x2b38ea158d3c980e9b3618cfe42599dd9d78e630ac83c66673949121ca6c8997fbf5e08c060076f3fa60d6dec8ac8624</inline>
- <curve>nist/P-384</curve>
- <desc>twist order = 0x1000000000000000000000000000000000000000000000000389cb27e0bc8d21ea7e5f24bb74f58851313e697333ad68d</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/nist/p521.xml b/src/cz/crcs/ectester/data/twist/nist/p521.xml
deleted file mode 100644
index 1564c80..0000000
--- a/src/cz/crcs/ectester/data/twist/nist/p521.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>p521/0</id>
- <inline>0x01a0c6f0e5b2c6948218fb8d1e913d750ace27674e59ec0a45f8f5883518c65c401af5a2275b7c2c74e717f5b64c48056f1440de1d48ef0825086f12db4f862e4467,0x00c93c77edf1cac8bab534a28c49446113a22833e05658b69f73658d7867b43c94f58d52e17b726e3f6d0b5847d91980509250210c4e1c73eeec72e185529c1450b0</inline>
- <curve>nist/P-521</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>p521/1</id>
- <inline>0x00e84fb16849133c2e4c24e7efc4df752ed9f01204aa692342bc619a8a9ccdd1b058996f3896790d0ee1b7c480cb117cc0b9272c116c6f544b99dca9d441976c69c0,0x00e6d2c8adb57c81db0bead3d225ee900c81e049d0e36bf20bf421f5620449b1638f2b1998f3e1ffbee369a74bc4833d01f45b46388755ba16abf67c5f7f53ac9110</inline>
- <curve>nist/P-521</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>p521/2</id>
- <inline>0x0161cb810a7d7f9092d518ed483208f202cf5a984e98ff50f94b13e04bf94be942c91a007cff215d55bf124912b8620312bc94e813d7956e3821b45da439f0b0e8e7,0x005194f315423bcacf38ea558ff344daedf9a51a81b0a9ef27f1d687c8d1b6952b60b6486fc2c3d394749fb00e4921a5cfced55c1fe821e8b80279f6cec89ba1ac1f</inline>
- <curve>nist/P-521</curve>
- <desc>twist order = 0x4277ffb</desc>
-</pubkey>
-<pubkey>
- <id>p521/3</id>
- <inline>0x01c133c394ad86829a9252e4d5e266c3d2830eb9b899e2cb16b815a5c7050c3bc53c415296339d33427087bdef04c0ae2d8f7d63d4a41176bd76d3c07cbd1ecfd1ee,0x01fee0c7535c40e01f2c12ee2a6ae1e54cafc147c3b491602da1f278b46c6ae3c04705b3bb3c72af70aaf3d4c684411ede8694d7a21b3734ce43ecc2b4a1ee2efee7</inline>
- <curve>nist/P-521</curve>
- <desc>twist order = 0x25e6d2cd</desc>
-</pubkey>
-<pubkey>
- <id>p521/4</id>
- <inline>0x01232e18498e6cafe2572ec0b511376cf0d4844ec3b94472fb53346d7d9611726065cc922b3d2132117c99bce0ff8bc7f51bb30c6909a53b7c8a88e81807c31a1999,0x0112ada376c25bdc96440e0e2bf936377b287e885a08e6e1b5aa54f9b269cce4ed6ca6e6e44bd6d8e092e4864b278951648e897682096488e2a36036e989b1af7b24</inline>
- <curve>nist/P-521</curve>
- <desc>twist order = 0x17c8b8fa594c0fc63a5c0043ab498c1762d92f18fdfe2fea8f074695615d886d81bf930a0ac77d01bf9dd8c1a1ae121dab4e860c5dc18e265de3</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp112r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp112r1.xml
deleted file mode 100644
index bea215a..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp112r1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp112r1/0</id>
- <inline>0x873a74a2da300cab1c8761d8f67b,0x46e03cbcc61d00aa9fe5a8077494</inline>
- <curve>secg/secp112r1</curve>
- <desc>twist order = 0x8a5</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/1</id>
- <inline>0x218f000fe41ffd98b55fc9b756c7,0x62a1bd48c034935e4367f392fbaa</inline>
- <curve>secg/secp112r1</curve>
- <desc>twist order = 0x1835</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/2</id>
- <inline>0xadf84193c633787f17ff7c789296,0x19b5613c0ee78be5954a104fad0b</inline>
- <curve>secg/secp112r1</curve>
- <desc>twist order = 0x11167</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/3</id>
- <inline>0x4b3b746903493367fd076f6e73bb,0x030545f11165bac7cbf381c48879</inline>
- <curve>secg/secp112r1</curve>
- <desc>twist order = 0x44015</desc>
-</pubkey>
-<pubkey>
- <id>secp112r1/4</id>
- <inline>0x51132c4c92342942c8027b71890e,0x43beab4961a59cf10d1b30531f5a</inline>
- <curve>secg/secp112r1</curve>
- <desc>twist order = 0x3b273570eb27b9</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp112r2.xml b/src/cz/crcs/ectester/data/twist/secg/secp112r2.xml
deleted file mode 100644
index f1d0fee..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp112r2.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp112r2/0</id>
- <inline>0x48edb7418c08127bdd779ac7e5f7,0x0000000000000000000000000000</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/1</id>
- <inline>0x4a1cb7539a8401269dbff6acf404,0xc21acfb8b7b32712febd4e61633f</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0x17</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/2</id>
- <inline>0xc8faf44b8d4853737ccf82806b75,0xcce630f92e9c95bf26e0f4a070fe</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0xd3</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/3</id>
- <inline>0x14590ab5b3753e82b3d0b57ce706,0x233b3204fdedbaf31c5dceb86285</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0x35e63</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/4</id>
- <inline>0x8ae76a4a40729732096d3c5207e5,0x629a89669d42e3871f1820cb97a5</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0x73c27</desc>
-</pubkey>
-<pubkey>
- <id>secp112r2/5</id>
- <inline>0xa86117a59016f257c4397d388a65,0x67ead9fb333257074be723a5f46b</inline>
- <curve>secg/secp112r2</curve>
- <desc>twist order = 0x1e6727ac61bb6633</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp128r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp128r1.xml
deleted file mode 100644
index e9bf07b..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp128r1.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp128r1/0</id>
- <inline>0x7ad6f2458364dc3bc253564a0f55f047,0x24ca1c658f7572c87528e6b9db2b6a76</inline>
- <curve>secg/secp128r1</curve>
- <desc>twist order = 0x29</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/1</id>
- <inline>0xd831601d766cc45f62eb7cf7937ee642,0xf9e0a4e6fec14da13d27d248a190d230</inline>
- <curve>secg/secp128r1</curve>
- <desc>twist order = 0xc0034f</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/2</id>
- <inline>0x8867a9a49ff8c47c6d10d32783cd69b0,0xc2d9ae698d287ecdadce470328485477</inline>
- <curve>secg/secp128r1</curve>
- <desc>twist order = 0x56a1f8d</desc>
-</pubkey>
-<pubkey>
- <id>secp128r1/3</id>
- <inline>0xeb842468d2d732452a3044e8558fbf60,0x35022342302a1fc4f2bbd4ddca43892d</inline>
- <curve>secg/secp128r1</curve>
- <desc>twist order = 0x18996f4e0882951e9d1</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp128r2.xml b/src/cz/crcs/ectester/data/twist/secg/secp128r2.xml
deleted file mode 100644
index fdd9028..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp128r2.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp128r2/0</id>
- <inline>0x64a89794638df343c17a48c6e926de14,0x00000000000000000000000000000000</inline>
- <curve>secg/secp128r2</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/1</id>
- <inline>0xd2d9721cd218b8d0a9dc8101e053a834,0x8111cc843d9d6090ec34cfe2ea360eb6</inline>
- <curve>secg/secp128r2</curve>
- <desc>twist order = 0x3cb</desc>
-</pubkey>
-<pubkey>
- <id>secp128r2/2</id>
- <inline>0x88ba57155e8f2050626d2a02a34b4efd,0x8f97d0b54e869e605b7fb7ae97819d1d</inline>
- <curve>secg/secp128r2</curve>
- <desc>twist order = 0x10df9252a726c184278bf55634b577</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp160k1.xml b/src/cz/crcs/ectester/data/twist/secg/secp160k1.xml
deleted file mode 100644
index 8d1cc53..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp160k1.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp160k1/0</id>
- <inline>0x0000000000000000000000000000000000000000,0xc1fd26fdc8681a7ba7f699610a62c328cde65ba0</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>secp160k1/1</id>
- <inline>0x261f4b383910221b95b8064ffd1667c136652295,0x84bb1bf6e9d6beebcb0b3525e99df9124bb14e40</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>secp160k1/2</id>
- <inline>0x5ad5c6cd4067ee20b4984eb2132c9742d15d15e2,0x2de572e579ea7b539f0234a6a2f875966dc4b249</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0xd</desc>
-</pubkey>
-<pubkey>
- <id>secp160k1/3</id>
- <inline>0x12a1d4d6314698fa80a153de7849173ba3840012,0x34dec5c8c38ec56f7cdf8f1e44f54606a49e5213</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0x5fc5</desc>
-</pubkey>
-<pubkey>
- <id>secp160k1/4</id>
- <inline>0x836557a9441a4591e3b35c4b86c4b4a964887b4c,0xd5491a1f264c3f115223731855ce2ed837c15bf0</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0x25807</desc>
-</pubkey>
-<pubkey>
- <id>secp160k1/5</id>
- <inline>0x1c959049e8e689783335f711f7a928d4200890c2,0xd0846962412aa16de740be64dadca13bb0c50758</inline>
- <curve>secg/secp160k1</curve>
- <desc>twist order = 0x271c756a728aed5671cf8cb4b33771</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp160r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp160r1.xml
deleted file mode 100644
index dece980..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp160r1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp160r1/0</id>
- <inline>0xdfe49462b5a10a4cf944801e93a444d4951c54f4,0x9ef1de44c53a4814eb31f616175922327cd2e112</inline>
- <curve>secg/secp160r1</curve>
- <desc>twist order = 0x20b</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/1</id>
- <inline>0x5cf0cd60ea345232884895f01b4e1760927f5d94,0x0bb00af378e1f0f69589a2da5b8fd6b2669b5402</inline>
- <curve>secg/secp160r1</curve>
- <desc>twist order = 0x2c29d39e9</desc>
-</pubkey>
-<pubkey>
- <id>secp160r1/2</id>
- <inline>0xeb8957704438337bbddb0d6ce1e28b635d5db134,0x631bad39571cfea33639a76c774e46fecaadc9b1</inline>
- <curve>secg/secp160r1</curve>
- <desc>twist order = 0x2d65dd7cc36e3baf234efd9dea9ae3</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp160r2.xml b/src/cz/crcs/ectester/data/twist/secg/secp160r2.xml
deleted file mode 100644
index bdb8a03..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp160r2.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp160r2/0</id>
- <inline>0x33581bd94e113c8b34fec9c60b9031675b9c8b68,0x987cd809e044f8ab7f3757bbd06ecc01550f3868</inline>
- <curve>secg/secp160r2</curve>
- <desc>twist order = 0xa3</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/1</id>
- <inline>0x8318469fc335f235b8d8fc4fbcd61282b9521fb7,0xcf52bc6053b4cea8117431dcb68db2110dd87e63</inline>
- <curve>secg/secp160r2</curve>
- <desc>twist order = 0x1c9</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/2</id>
- <inline>0x615ace506803fd5f06a323ce45319a3ca5aadcf0,0xbb4f76d2db8189c07a10487fb32b206a38ba2e89</inline>
- <curve>secg/secp160r2</curve>
- <desc>twist order = 0x355</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/3</id>
- <inline>0x3178dfd1f5c334184521d055a043a2349f35f67e,0x98c2395fd272532476f2c6d5ddb2c9a579b84699</inline>
- <curve>secg/secp160r2</curve>
- <desc>twist order = 0x78d</desc>
-</pubkey>
-<pubkey>
- <id>secp160r2/4</id>
- <inline>0x0e17d26c2ebf81b5e1c695438abe9eb3edd96f6b,0x2502f5d59f731f0cca5b8449fde15b713f82f36c</inline>
- <curve>secg/secp160r2</curve>
- <desc>twist order = 0x8f3af9a6f25d7b73940da6f6ebd3137</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp192k1.xml b/src/cz/crcs/ectester/data/twist/secg/secp192k1.xml
deleted file mode 100644
index 457a414..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp192k1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp192k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000,0x50f36a853090dc8aaeab4e45e31a9476899ac91c98622974</inline>
- <curve>secg/secp192k1</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/1</id>
- <inline>0xc1ee9eeacca70968c68149d7ea884f4d2081c7f135a3c0db,0xcd1fcc8fa5650d5b63c2e4e3529845200fe959e2bf7aa743</inline>
- <curve>secg/secp192k1</curve>
- <desc>twist order = 0x175</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/2</id>
- <inline>0xa5e8d7e243f29335b7f9067cc2a99334e5504dab66de2b61,0xe488e628f21a0d13439c912ad6dd6a4c017deb6d1bd9ac91</inline>
- <curve>secg/secp192k1</curve>
- <desc>twist order = 0xdc3f</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/3</id>
- <inline>0xc3ad3754b5199729816ba49f459caa03c63e8580f66c03a9,0xce4bc350ed04ecb8634147d9a9cd1cf6d06268fdc6a11fdd</inline>
- <curve>secg/secp192k1</curve>
- <desc>twist order = 0x24e7164b</desc>
-</pubkey>
-<pubkey>
- <id>secp192k1/4</id>
- <inline>0x14fc875f81ce7d409013996fa7d8d75dab7b750f41e7aeee,0xb16e153045429ab589746734c0fb13ad11a81ef95e41cdad</inline>
- <curve>secg/secp192k1</curve>
- <desc>twist order = 0x1d83dac42196d3629c6baf0247e0157a469</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp192r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp192r1.xml
deleted file mode 100644
index 16ba7db..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp192r1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp192r1/0</id>
- <inline>0x23142b001b0b474409a0d4c8815e7ade529ae9eff7c5b95b,0xa1629eaae43dab352219bf25ff6e12f4936864615eb89078</inline>
- <curve>secg/secp192r1</curve>
- <desc>twist order = 0x17</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/1</id>
- <inline>0xc0a1f79357e0d708a855fe30e2fc032486e3b26d8fe1a5c0,0x51d01bb8aadd9b41863ece85c2b600a0107f812d4460e9d9</inline>
- <curve>secg/secp192r1</curve>
- <desc>twist order = 0x231acce82af76d32ca5d526f</desc>
-</pubkey>
-<pubkey>
- <id>secp192r1/2</id>
- <inline>0x45cc2ab6dba52cbfd5860d0e61a3decfee82e0b1c64bd094,0xbf8b1707363dc155b16233478b0555b1815a295338522b80</inline>
- <curve>secg/secp192r1</curve>
- <desc>twist order = 0x512b1bfde874086edba50007</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp224r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp224r1.xml
deleted file mode 100644
index ee6782e..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp224r1.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp224r1/0</id>
- <inline>0x5d60f43a069cfe3a7c365b782bd8ef722e29efed9f8e782d98da9523,0xc790eaae79a6ea2fbe7bcd6c430c54362a834b3a6628008347264d89</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/1</id>
- <inline>0xcd1095d23b17e6cfbd1c59476bd60751bb743a42ab8673414cfaf3e7,0x89b8deb522b178eb7a8ad262ce9e99a472797448d598ce64a2116b03</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0xb</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/2</id>
- <inline>0xe442f9e86c386800f2ae5982f3be77c833663e8b673121fed69282f4,0x2a94e1cd72999b32a6b1fc71328b63bb4857f045a4acda509991145b</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0x2f</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/3</id>
- <inline>0x25c4b228af197210904546d9f6dda2385b9a0a0cbe2211af65341cb9,0x3f5c565a48b1b8d05adbc9ca94ade61e0e45cc9e9f1248c963d5784c</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0x2e0273</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/4</id>
- <inline>0x5e7b261f83fa2b59e6bf4c7c9edf8e9c6ad418f4e9b3f9cec09f66d9,0x59033a890a85f95fc514abfa27e01bb010c3699f9430057b7235c1fd</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0x268160f</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/5</id>
- <inline>0x8d9a10823de47bc73a12ae57fe97a34373ae59f16d61a3b82a46f68e,0x622fd6f6069294c902a82d3583d88816675e44fcafa47a0a433990a6</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0xf3bac7aa52cf</desc>
-</pubkey>
-<pubkey>
- <id>secp224r1/6</id>
- <inline>0x99bfcc79f6c38a9b3d773506f827eccde507531d2886af8770f69f43,0x0e4e90ae87d71816c2bef3d55f0dfe7b54c16f9aadd8ea3b56e9663b</inline>
- <curve>secg/secp224r1</curve>
- <desc>twist order = 0x22340ff0f7eba57b33ac73e28a14d1</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp256k1.xml b/src/cz/crcs/ectester/data/twist/secg/secp256k1.xml
deleted file mode 100644
index 467641e..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp256k1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp256k1/0</id>
- <inline>0x1f5f34663a612761136c07de53d91039f82644aa7706e90b37ac2dc5154d79ed,0xb32d76a9b3c7a9fac50c6da11a9953d11b262206cf26f33a9feb20a6bb1bb70c</inline>
- <curve>secg/secp256k1</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/1</id>
- <inline>0x9537931b68257bb2ef5782a3df24719668c70029522ba296c076996231e5c790,0x236617decf9b2f14223d798de8de3bca791fe36603a312e572048e89609379d4</inline>
- <curve>secg/secp256k1</curve>
- <desc>twist order = 0xd</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/2</id>
- <inline>0xaa45c03ebb0dd5ef1eb604802b97cef9694d5b9f37b253a475be99927dc28d55,0xb6762cffb2eacc3504b6c2e25908c4b9af12a62450fab97690c137a1102d64d4</inline>
- <curve>secg/secp256k1</curve>
- <desc>twist order = 0xcf7</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/3</id>
- <inline>0x4c5029ee7f3f340b328d6db4e6195a21a43ddc42152137922e7ed27a2723ff87,0x2309f5db4cb59337fabd8ca6b1b8866fd3a96429c4aec311e315983bf3b6864f</inline>
- <curve>secg/secp256k1</curve>
- <desc>twist order = 0x586f</desc>
-</pubkey>
-<pubkey>
- <id>secp256k1/4</id>
- <inline>0x4234a6acce09563862bc78f46c93dbb9e8ca3579ec58d08f273911178ae88e25,0x5d3e9733e02e6b94f297d8d5905265d1ddfeacb2633f0db3fd255d0177d2de46</inline>
- <curve>secg/secp256k1</curve>
- <desc>twist order = 0x99ee564ea5d84f508913936a761b0d5d792a426a7779817ae2f5b67</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp256r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp256r1.xml
deleted file mode 100644
index b385548..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp256r1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp256r1/0</id>
- <inline>0xd43dd5ce6c8e557e282bdc3535609e72bc46c1f91c166c63fc298b5a2ef64ea5,0x53cdb347774d9feef822754c289a8a7aab6e4bf5168a5155b0c25016f6ff47ad</inline>
- <curve>secg/secp256r1</curve>
- <desc>twist order = 0x3</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/1</id>
- <inline>0x44b4e6293d9efcb1b655b7f90b81dabceb5925a258780aa22381292af84e4615,0x39efc0650cd2289cb1d6c2bd2bd7139f4f4c97e43f536c47b7782e5e5b627428</inline>
- <curve>secg/secp256r1</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/2</id>
- <inline>0x588e38eb7a4adf969daea9e2beabe2616ac8c0a7a52d920f10ed1d2f81986b6e,0x3b728114a2421a73d047338f60a324ee1b25d81f8f207ba762765b45576d009d</inline>
- <curve>secg/secp256r1</curve>
- <desc>twist order = 0xd</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/3</id>
- <inline>0x0d8e8d6f9b9bec935475145bde3b80b76884b57d136afe327d80e13677a915f5,0x6bc1fc461c4dcec55a6ceadb7950aaffb5621ea428b13e7091b1d7a90642b270</inline>
- <curve>secg/secp256r1</curve>
- <desc>twist order = 0xb3</desc>
-</pubkey>
-<pubkey>
- <id>secp256r1/4</id>
- <inline>0x84cdc23c802dd6ae90ae1257884709fc522206adf114b8f0ea715e0dc77d2bad,0x92a4b98b60c8204cbdf947839663229d2fd36184504ff0e308eaa1761c138d7a</inline>
- <curve>secg/secp256r1</curve>
- <desc>twist order = 0x1e0a75640070a738557cc30f68bd56eaea65c94f98411d17ac4e16ece1a47</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp384r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp384r1.xml
deleted file mode 100644
index 2ddbe9b..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp384r1.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp384r1/0</id>
- <inline>0xe623940e96d6ce70b3a3185b1b49560532daafbc36f8fcc9167500b186682ac19c1bc959c0b9ae6e2f620449358c9367,0x97c91ddd90946df34ee5c540a04175d45a5ebad666439b8384ec64cd95b2f0a438bedfc36ca80a7d7e9a38a7c26925bf</inline>
- <curve>secg/secp384r1</curve>
- <desc>twist order = 0x1000000000000000000000000000000000000000000000000389cb27e0bc8d21ea7e5f24bb74f58851313e697333ad68d</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/secp521r1.xml b/src/cz/crcs/ectester/data/twist/secg/secp521r1.xml
deleted file mode 100644
index 105efa3..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/secp521r1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>secp521r1/0</id>
- <inline>0x0099cfe88fe446b8eaeefc4094833b1ab0853c7bc4d906aef04d9f57be2de53e3678551217b736cd26d1b217dcb806c747f17e29bee7490161f86726d59f2129c16b,0x0079651e0bf51bd1bd86a1f520c528705862589c5b78843d523be3e980e93ef3ddf3366175a1567b88d54689e6bfcafee863ad3d93411d54ca3db6ad2ce27eae309d</inline>
- <curve>secg/secp521r1</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/1</id>
- <inline>0x0140ba8e264bfcbc2dae3e498236fdb502cdbcd053476d148143bb0a38f72d4bb4d0c53b971cd36ba19f0a35cfb6af2f82c1a9bc5978873e0edf753282e11fdfd045,0x0041833aebb70b75c471c35ca5cdbbdfb8c64dd10f2e977e254f081e2566e8010e80d69ff11cf3140561586e917070d2a0443d3f3eba20688f0e48e4132d0eb0a5b4</inline>
- <curve>secg/secp521r1</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/2</id>
- <inline>0x00925139c9b4c7788add3ec38be6c9799dcd4794f9f3e708bd66130b2d21abc953035a3bd6cbae7fc2cc02b0be12cd0b0fbfe0d190844bb3e346899f6c03908bb73b,0x006a86cb7307e9901bcf819e1cf2deecc0e2a35b0cb06998ec1e354267294a17f872179cad4f80e79ad06fd4200cbf142d18779a8e4633824265a0cae30aacd38418</inline>
- <curve>secg/secp521r1</curve>
- <desc>twist order = 0x4277ffb</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/3</id>
- <inline>0x013dec992b39d75718ca8ea86f481bec0d4717e18b86f0716e807374317bf4bd93cd036f6969d2d85e19f2b9a375c0c5cc3a46af11048671bb9c8aac21bd8a02bb9d,0x01f629b94eadd014680a318a29a743585e7b8a9a315accccf7dcd8b2f6d012f301eeb2477fb8c822b07f09cc2089c3be07896502cbf1e86f72635718dd2ae3004c65</inline>
- <curve>secg/secp521r1</curve>
- <desc>twist order = 0x25e6d2cd</desc>
-</pubkey>
-<pubkey>
- <id>secp521r1/4</id>
- <inline>0x013189c93b04b69426269fbadbee6379a6752ca1cbbe972ca1f14edbb4fefdc437bd96912266a83fb0482b6a291d74326a1d2b6a170f0cd24896e93323049fea281d,0x01a05a94d5e7481d42d3af74994f6f7bfacd231123cd6abcd31e3e99c571a84d032aeee65aa3fff8cda497aa77900910a897188f87fc4d502162349ec1d2345a307e</inline>
- <curve>secg/secp521r1</curve>
- <desc>twist order = 0x17c8b8fa594c0fc63a5c0043ab498c1762d92f18fdfe2fea8f074695615d886d81bf930a0ac77d01bf9dd8c1a1ae121dab4e860c5dc18e265de3</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect163k1.xml b/src/cz/crcs/ectester/data/twist/secg/sect163k1.xml
deleted file mode 100644
index 754e8e6..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect163k1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect163k1/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000001</inline>
- <curve>secg/sect163k1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect163k1/1</id>
- <inline>0x05f78762dcf07272474326134cd9afb8ec82b6b9af,0x05ae3cb5265210c388e0fb9787c7dc7c40ef03acae</inline>
- <curve>secg/sect163k1</curve>
- <desc>twist order = 0x28d</desc>
-</pubkey>
-<pubkey>
- <id>sect163k1/2</id>
- <inline>0x01626b92c13b6eaf8a07353707e3ee25b69d56b403,0x0066a86e6fd8c5fa73245eef10159b5b428efface3</inline>
- <curve>secg/sect163k1</curve>
- <desc>twist order = 0x1979</desc>
-</pubkey>
-<pubkey>
- <id>sect163k1/3</id>
- <inline>0x072da789cdf1e91288880d47aade6d19206a3eef8b,0x006405496db1049f579e035d9047f554152d215933</inline>
- <curve>secg/sect163k1</curve>
- <desc>twist order = 0x7926bec180108d</desc>
-</pubkey>
-<pubkey>
- <id>sect163k1/4</id>
- <inline>0x059f4674675ce9134f7c6095e57f0f2da73b303ab0,0x03cdd4b8e4efa8c96ed4b2b349f6e1b47bc33f145c</inline>
- <curve>secg/sect163k1</curve>
- <desc>twist order = 0x10a6989de57d15c65ba229</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect163r1.xml b/src/cz/crcs/ectester/data/twist/secg/sect163r1.xml
deleted file mode 100644
index dd7d798..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect163r1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect163r1/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x009917a2556e1856bc7ea9a472cd01bfb889b95835</inline>
- <curve>secg/sect163r1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect163r1/1</id>
- <inline>0x06deb836183f1f185aa782845b7e30b87aac87cc86,0x02a07ec119c487e132b464ea54e7f2264103fbf6f3</inline>
- <curve>secg/sect163r1</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>sect163r1/2</id>
- <inline>0x01dbb909b594a1b8db65b2de7cffe586d10ea658c8,0x031e430590c0ca5707f54a0463dbd329ca9088d1f2</inline>
- <curve>secg/sect163r1</curve>
- <desc>twist order = 0x923</desc>
-</pubkey>
-<pubkey>
- <id>sect163r1/3</id>
- <inline>0x029d7e51e1b8552d0fe88a48bcfb1913b4d0adac52,0x073688d2e575b20328f70560be4ba53b575498d23d</inline>
- <curve>secg/sect163r1</curve>
- <desc>twist order = 0xcd4110cf690bd</desc>
-</pubkey>
-<pubkey>
- <id>sect163r1/4</id>
- <inline>0x010175375db66e9ce0060fc3785804ebe2d96b8a3a,0x04d4cc08f4975602d69520023bb0505fe701339146</inline>
- <curve>secg/sect163r1</curve>
- <desc>twist order = 0x9fc0d375facf703681f32693</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect163r2.xml b/src/cz/crcs/ectester/data/twist/secg/sect163r2.xml
deleted file mode 100644
index 421887d..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect163r2.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect163r2/0</id>
- <inline>0x000000000000000000000000000000000000000000,0x02c25b85badf8927593d21c366da89c03969f34da5</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect163r2/1</id>
- <inline>0x0176fb3d1e1035f04de3297dafb0033baeee694e97,0x0602840f8148fc8afc1f695df529e4dd48337243a4</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0x1f</desc>
-</pubkey>
-<pubkey>
- <id>sect163r2/2</id>
- <inline>0x017d5799f3c55c7f0941240a0030cd1f6a4077e627,0x02a19d01c1bd140363e68414e8f35a9fdf8a5345ea</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0x38b</desc>
-</pubkey>
-<pubkey>
- <id>sect163r2/3</id>
- <inline>0x01aff9f7655201dc4800b811f5c983d4ca9933b947,0x07bdfdfc15dc948a4dc91d8565a69659c6c88bf5f3</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0x1208485</desc>
-</pubkey>
-<pubkey>
- <id>sect163r2/4</id>
- <inline>0x0332053427eaa5d8f365c5306fb301be9627647e81,0x0696da25692ba254884fb945caa12fe68c05a0416c</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0xb78fc77</desc>
-</pubkey>
-<pubkey>
- <id>sect163r2/5</id>
- <inline>0x02556ec8322e21c3de7444a6fcdfff37629d657018,0x0324ab964dd8012423c2607dd9094393b60c725c10</inline>
- <curve>secg/sect163r2</curve>
- <desc>twist order = 0x5c4bf9b1205a07afbe718429</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect233k1.xml b/src/cz/crcs/ectester/data/twist/secg/sect233k1.xml
deleted file mode 100644
index cf8524c..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect233k1.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect233k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/1</id>
- <inline>0x014cdc219c9370a243ae5a9456fe5e3a421c7363727f3e4018c497e30705,0x01a88dbabe626a8941b5394278f7de54d63edfa7e70c15a815aa75bc5072</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0x1686d</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/2</id>
- <inline>0x00bba31978663bc010dc6620c8241e44417b1a56212b82d4d63751d234cf,0x01b3cda86c83bb59b8e3f3ba2d025adc35abd11acb19ba561491c34fd9c7</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0x6d8a417</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/3</id>
- <inline>0x01512cc87e6cd2a418857736c96688476b641b9d3a838eb4f9207751e021,0x01dc01ca001b69c64322a5d5c2cf81a9ae0ed04d8d10e8b06ccbcf9ef911</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0x7c02977</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/4</id>
- <inline>0x01c61af41b217ec78ffb3572df845fe33c8efecb2d05f2033c2824784e5b,0x0138f83ba05a3957721d5db5a5bd247ab02a4f6a3e1c2163027116996730</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0x46403a035013f70d</desc>
-</pubkey>
-<pubkey>
- <id>sect233k1/5</id>
- <inline>0x00e9f2cc9d6665352aa77575f3f7bd42642c924388b8c741134eeda9ccb7,0x01e74c2549cce5d6587a11dfd625e099f2519691653c80dbe335aa61c789</inline>
- <curve>secg/sect233k1</curve>
- <desc>twist order = 0xc7cb3894752e561e6abf871db</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect233r1.xml b/src/cz/crcs/ectester/data/twist/secg/sect233r1.xml
deleted file mode 100644
index 45eecf4..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect233r1.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect233r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x0187f85627b97874e747ee31e06d71caaeea52f21253e5f946d061da9138</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/1</id>
- <inline>0x00c5f754b03ae354c9cce8386a31436157eaa590a9cfb892dc40d56f66cf,0x01294608d589c250bed15f0e63887c961fa149c68881c1ec242e441ad1a3</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x5</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/2</id>
- <inline>0x0024806b9e973c082da34fadd43d94d6966e16b147450db7ddd6e5a3f4e2,0x0083fb9fa68aba9805c0a747897fd1bf12defaa7d8efee174060ac0ef3b0</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x11b</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/3</id>
- <inline>0x004bde91214e1b76dbe01fe34c68135178639f0453632209fd9da04d22fc,0x0030256812c97f8763815acc7fd00ca87d86cde0517ad2afc92b21c593d7</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x21d</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/4</id>
- <inline>0x00ca85e22408b271206c05630370c75c7c678392eb5ed54903ed3196eb5e,0x00c3e55b408782683364c3ea0191e4aaadc888f95c5d4a0e0e06e979f77c</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x22dba0b9</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/5</id>
- <inline>0x0159c22cd6ea5fe56041b75f3b21594ae94161363576338717d9b393ed85,0x00ec9f09736dbd80af6efd0f16419fd24982f9d5de455414057a6b57ac0c</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x2a7504c0fda95a2311</desc>
-</pubkey>
-<pubkey>
- <id>sect233r1/6</id>
- <inline>0x00fe6311a7ee2de94e57f9e632e184a8f9cc21d6a5865a820b6dd62371c3,0x0002dfd2fbdb68965f56f478b7a345950a5ef1e7a7f570962d389efc4612</inline>
- <curve>secg/sect233r1</curve>
- <desc>twist order = 0x1e53fa33649df4ef97d6b29ded5a7</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect239k1.xml b/src/cz/crcs/ectester/data/twist/secg/sect239k1.xml
deleted file mode 100644
index bc17d4f..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect239k1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect239k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect239k1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/1</id>
- <inline>0x027dc44bed0f67a40050ce79eea889f65a856864c1ece7ae4b2d05887b3b,0x330b3b1520d30c012146cd13e3af3d32ee02f0eaebacac36611bda4b9483</inline>
- <curve>secg/sect239k1</curve>
- <desc>twist order = 0x10771acb9</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/2</id>
- <inline>0x2253fa673642a0046615d33a2853062d60e5959144bd608385ad7f4a6686,0x728f3a8f45ff239c5f1ab44cec36278be6312571486cde0a4205a3afb20f</inline>
- <curve>secg/sect239k1</curve>
- <desc>twist order = 0x3eaaf7f039f</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/3</id>
- <inline>0x38b81ec85fcdcea4a29a8b0326fcf122eee852754476b8490bbb5362efeb,0x2b8e9442ffb0eb8be55636cf7f12bc5402a985e8f7ea89ff0233ddb76a1c</inline>
- <curve>secg/sect239k1</curve>
- <desc>twist order = 0x1e3607543aabf52e8d8f7</desc>
-</pubkey>
-<pubkey>
- <id>sect239k1/4</id>
- <inline>0x5dbc5cbd7a0c046aeabff4b2abb49fb58763ea2c7e4ca9507ed3d54f9af2,0x0a389cf9dc455db54fc3de75a361b408e2cb679cfb2e1fbed312ff09c048</inline>
- <curve>secg/sect239k1</curve>
- <desc>twist order = 0x868c9487ea27642c47f97</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect283k1.xml b/src/cz/crcs/ectester/data/twist/secg/sect283k1.xml
deleted file mode 100644
index 65ecb63..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect283k1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect283k1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/sect283k1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect283k1/1</id>
- <inline>0x01f5a4ad35352d19e37108222909b2a7002516cdf68afb899e9fca4056f77e889d15a7d0,0x04464034359d8bbf2e34f3d0a863d50ea325b804d8882dbf7a36c56d3f782451320799aa</inline>
- <curve>secg/sect283k1</curve>
- <desc>twist order = 0x400000000000000000000000000000000002ca3a25f1511b3440100d775c3f3c3d3873f</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/twist/secg/sect283r1.xml b/src/cz/crcs/ectester/data/twist/secg/sect283r1.xml
deleted file mode 100644
index e2913a0..0000000
--- a/src/cz/crcs/ectester/data/twist/secg/sect283r1.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<pubkey>
- <id>sect283r1/0</id>
- <inline>0x000000000000000000000000000000000000000000000000000000000000000000000000,0x072bcc9c5792b1ebe81983089fb6f835a2fd220a304424ca17c082ae17442aede9b9b3f6</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x2</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/1</id>
- <inline>0x0297e6d1f2b857a79f5dc85c2f1259d5d801c61a4d0a4312a04f65f09a887a7b93cf7ae1,0x051963c38ac61f05fef93707abcfbda7bc0f39eacddb2bdd3077f19c0e65c8be66ecb30e</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x7</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/2</id>
- <inline>0x06909a8eacbed1942bc0a6d606ad1ce284dd223d8ce569dba8525c5a5f799f137112c7ad,0x02e4300b6ce278700db70764e810c1a8d4645b57db3d3974027a1a106598ceba86a61ab5</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x13</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/3</id>
- <inline>0x01287256c9848e3bd11dddf8f34ecca845b535e84adfdf0154f0e7c4ae1a9f0e6719b9b2,0x0119bf5a2c413f730a1576f577873a6f0a603fd571084d584df0a12601b80fe9b607401f</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x1623ab619</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/4</id>
- <inline>0x0598a8e3f2a3e06680ab11b84a01d59adee54f329dfc2b65f8a517c2a5f03b8f1aedb021,0x02943952200eb1ab69c2ac5811d32ea4a528af7cc917d2f2883ca5ca55e464f673f5c2f0</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x2a4aa67aaaf5413fb</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/5</id>
- <inline>0x02e22724a4462bbca361607163bb9ab9926e8fe6859adb397e5eeb8d0972de359e37eebc,0x05b15d8c245bfd0c2ed3930a5742f747e12f4fe0e018ab32fc790711bfdb060514cf8400</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x25a8cdb1f2e470f3ac1ba7</desc>
-</pubkey>
-<pubkey>
- <id>sect283r1/6</id>
- <inline>0x032a8c3ac7583c8f599fe6cba343b26f66fe13906c96e11db396ad939d43b55260e5fcef,0x046a4cbc0d05bf6ebad4b5f2bfa6f1a486519ff332ebc49136067916f188af2f5bce0782</inline>
- <curve>secg/sect283r1</curve>
- <desc>twist order = 0x606749a9c147da03ad3f37</desc>
-</pubkey>
diff --git a/src/cz/crcs/ectester/data/wrong/curves.xml b/src/cz/crcs/ectester/data/wrong/curves.xml
deleted file mode 100644
index 2a51474..0000000
--- a/src/cz/crcs/ectester/data/wrong/curves.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>wrongp128</id>
- <bits>128</bits>
- <field>prime</field>
- <file>wrongp128.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp160</id>
- <bits>160</bits>
- <field>prime</field>
- <file>wrongp160.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp192</id>
- <bits>192</bits>
- <field>prime</field>
- <file>wrongp192.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp224</id>
- <bits>224</bits>
- <field>prime</field>
- <file>wrongp224.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp256</id>
- <bits>256</bits>
- <field>prime</field>
- <file>wrongp256.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp384</id>
- <bits>384</bits>
- <field>prime</field>
- <file>wrongp384.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongp521</id>
- <bits>521</bits>
- <field>prime</field>
- <file>wrongp521.csv</file>
- <desc>The field is not prime.</desc>
- </curve>
- <curve>
- <id>wrongt163</id>
- <bits>163</bits>
- <field>binary</field>
- <file>wrongt163.csv</file>
- <desc>The field polynomial is not irreducible in F_2^163[x].</desc>
- </curve>
- <curve>
- <id>wrongt233</id>
- <bits>233</bits>
- <field>binary</field>
- <file>wrongt233.csv</file>
- <desc>The field polynomial is not irreducible in F_2^233[x].</desc>
- </curve>
- <curve>
- <id>wrongt239</id>
- <bits>239</bits>
- <field>binary</field>
- <file>wrongt239.csv</file>
- <desc>The field polynomial is not irreducible in F_2^239[x].</desc>
- </curve>
- <curve>
- <id>wrongt283</id>
- <bits>283</bits>
- <field>binary</field>
- <file>wrongt283.csv</file>
- <desc>The field polynomial is not irreducible in F_2^283[x].</desc>
- </curve>
- <curve>
- <id>wrongt409</id>
- <bits>409</bits>
- <field>binary</field>
- <file>wrongt409.csv</file>
- <desc>The field polynomial is not irreducible in F_2^409[x].</desc>
- </curve>
- <curve>
- <id>wrongt571</id>
- <bits>571</bits>
- <field>binary</field>
- <file>wrongt571.csv</file>
- <desc>The field polynomial is not irreducible in F_2^571[x].</desc>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/keys.xml b/src/cz/crcs/ectester/data/wrong/keys.xml
deleted file mode 100644
index 4be8b4d..0000000
--- a/src/cz/crcs/ectester/data/wrong/keys.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <pubkey>
- <id>default_pub</id>
- <inline>0x116d77bea845d4bd0204cb8b954c957431c23a7111a0eda94d41a3c774260e37,0x9589952dcc2034be9cb36411c59e8978fc40a7ebce5dc296d8c693a25b637969</inline>
- <curve>secg/secp256r1</curve>
- <desc>A random public key for default_priv.</desc>
- </pubkey>
- <privkey>
- <id>default_priv</id>
- <inline>0x92d375aebbc233bc9b60124ff7adf963917ab77bfc254418900f7ba51c85cc09</inline>
- <curve>secg/secp256r1</curve>
- <desc>A random private key for default_pub.</desc>
- </privkey>
- <pubkey>
- <id>negated_pub</id>
- <inline>0x116d77bea845d4bd0204cb8b954c957431c23a7111a0eda94d41a3c774260e37,0x6a766ad133dfcb42634c9bee3a61768703bf581531a23d6927396c5da49c8696</inline>
- <curve>secg/secp256r1</curve>
- <desc>A negation of default_pub(public key for negated_priv).</desc>
- </pubkey>
- <privkey>
- <id>negated_priv</id>
- <inline>0x6d2c8a50443dcc44649fedb00852069c2b6c4331aaf25a6c63aa4f1ddfdd5948</inline>
- <curve>secg/secp256r1</curve>
- <desc>A negation of default_priv(private key for negated_pub).</desc>
- </privkey>
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/results.xml b/src/cz/crcs/ectester/data/wrong/results.xml
deleted file mode 100644
index e3f0967..0000000
--- a/src/cz/crcs/ectester/data/wrong/results.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <sigResult>
- <id>ok/random</id>
- <sig>SHA1</sig>
- <inline>0x304402203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <raw>0xABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB</raw>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>A correct signature by the default key.</desc>
- </sigResult>
- <sigResult>
- <id>nok/negated</id>
- <sig>SHA1</sig>
- <inline>0x304402203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <raw>0xABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB</raw>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/negated_priv</signkey>
- <verifykey>wrong/negated_pub</verifykey>
- <desc>A signature made by the default key, to be verified by the negated one.</desc>
- </sigResult>
- <sigResult>
- <id>nok/random</id>
- <sig>SHA1</sig>
- <inline>0x30440220e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02206baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>A random, well-formed but invalid signature.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r0</id>
- <sig>SHA1</sig>
- <inline>0x3044022000000000000000000000000000000000000000000000000000000000000000000220d0837b07fe63d225733391e6808a081fd8aeb1359511feba7ca4f266727f968e</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 0.</desc>
- </sigResult>
- <sigResult>
- <id>nok/s0</id>
- <sig>SHA1</sig>
- <inline>0x304402206bea66d439da6b0b4a0e45b51e76d53336f27f7aa8e35f2008b77a8e021eff0a02200000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with s = 0.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r1</id>
- <sig>SHA1</sig>
- <inline>0x3044022000000000000000000000000000000000000000000000000000000000000000010220e660f19ddc20a30adda6ca175577b492e238ef8734b904a31045d453825974d4</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 1.</desc>
- </sigResult>
- <sigResult>
- <id>nok/s1</id>
- <sig>SHA1</sig>
- <inline>0x30440220d30ab3301d7132edbead77c0d622bbb7be8626c9ac5ee6c536281e6c18e79ab002200000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with s = 1.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r0s0</id>
- <sig>SHA1</sig>
- <inline>0x30440220000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 0 and s = 0.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r0s1</id>
- <sig>SHA1</sig>
- <inline>0x30440220000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 0 and s = 1.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r1s0</id>
- <sig>SHA1</sig>
- <inline>0x30440220000000000000000000000000000000000000000000000000000000000000000102200000000000000000000000000000000000000000000000000000000000000000</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 1 and s = 0.</desc>
- </sigResult>
- <sigResult>
- <id>nok/r1s1</id>
- <sig>SHA1</sig>
- <inline>0x30440220000000000000000000000000000000000000000000000000000000000000000102200000000000000000000000000000000000000000000000000000000000000001</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with r = 1 and s = 1.</desc>
- </sigResult>
- <sigResult>
- <id>nok/sp</id>
- <sig>SHA1</sig>
- <inline>0x30440220fc48281b60b73752f3e20c25e8a06b335122d5890db28d2969d3145fcd384e7b0220ffffffff00000001000000000000000000000000ffffffffffffffffffffffff</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature s = p.</desc>
- </sigResult>
- <sigResult>
- <id>nok/s2p</id>
- <sig>SHA1</sig>
- <inline>0x30450220feba982489753a51a69fd582673d2e62b6b07cc6374237c1424f1e469cb00a98022101fffffffe00000002000000000000000000000001fffffffffffffffffffffffe</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Well-formed invalid signature with s = 2 * p.</desc>
- </sigResult>
- <sigResult>
- <id>nok/length_overflow16</id>
- <sig>SHA1</sig>
- <inline>0x3083ff000002203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, that is shorter than specified in its ASN.1 SEQUENCE length header and its length overflows 16bits.</desc>
- </sigResult>
- <sigResult>
- <id>nok/length_overflow32</id>
- <sig>SHA1</sig>
- <inline>0x3085ff0000000002203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, that is shorter than specified in its ASN.1 SEQUENCE length header and its length overflows 32bits.</desc>
- </sigResult>
- <sigResult>
- <id>nok/length_overflow64</id>
- <sig>SHA1</sig>
- <inline>0x3089ff000000000000000002203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, that is shorter than specified in its ASN.1 SEQUENCE length header and its length overflows 64bits.</desc>
- </sigResult>
- <sigResult>
- <id>nok/length_indefinite</id>
- <sig>SHA1</sig>
- <inline>0x308002203988322ab9f52c7f11d5d1aa92a2ac0b00275bcad8e934682257323fda672482022052231597382268e8f3b82b99e386ebb7c7db1a8b4a8bdacd496190314e4c5bad</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, with indefinite length.</desc>
- </sigResult>
- <sigResult>
- <id>nok/long</id>
- <sig>SHA1</sig>
- <inline>0x30420220e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02206baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, that is longer than specified in its ASN.1 SEQUENCE length header.</desc>
- </sigResult>
- <sigResult>
- <id>nok/short</id>
- <sig>SHA1</sig>
- <inline>0x30460220e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02206baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, that is shorter than specified in its ASN.1 SEQUENCE length header.</desc>
- </sigResult>
- <sigResult>
- <id>nok/long_r</id>
- <sig>SHA1</sig>
- <inline>0x3044021ee641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02206baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, where r is longer than specified in its ASN.1 length header.</desc>
- </sigResult>
- <sigResult>
- <id>nok/long_s</id>
- <sig>SHA1</sig>
- <inline>0x30440220e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c021e6baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, where s is longer than specified in its ASN.1 length header.</desc>
- </sigResult>
- <sigResult>
- <id>nok/short_r</id>
- <sig>SHA1</sig>
- <inline>0x30440222e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02206baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, where r is shorter than specified in its ASN.1 length header.</desc>
- </sigResult>
- <sigResult>
- <id>nok/short_s</id>
- <sig>SHA1</sig>
- <inline>0x30440220e641671e6415629dc8398e35ae1362cb647f293a92553b1594d57fff58df302c02226baafface035e3758eea0dd9ef734976c70b6dd06f4d81d33f5e28bfb8730624</inline>
- <curve>secg/secp256r1</curve>
- <signkey>wrong/default_priv</signkey>
- <verifykey>wrong/default_pub</verifykey>
- <desc>Invalid signature, where s is shorter than specified in its ASN.1 length header.</desc>
- </sigResult>
-</results> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp128.csv b/src/cz/crcs/ectester/data/wrong/wrongp128.csv
deleted file mode 100644
index d24da0e..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp128.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf9c44412b2cca89ba4f1ca271d143323,0x9f5d27633551f202cd129e15712f0c64,0xdd1cdcde6e8da4b594bd4055bd601dca,0x27d3f8fea47ec1814569080b2aec652f,0xebf29da39d7a387fdc3ee3a6e1898d0d,0x53416c063b998d8936fb4337f4300dcf,0x3 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp160.csv b/src/cz/crcs/ectester/data/wrong/wrongp160.csv
deleted file mode 100644
index 20dea88..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp160.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x4353148e2ad8805dff87bfd7fd6b78da022417dd,0x3e41d827a2fc528cfead39f1c38699073daa2e8c,0x12a5b38d121e1274d92be25459340117189b6aa9,0x12ee1c85d8270955746c2262915d9af9ec5864bb,0x3458e410d63535a091e43785ad9b48b5cb26f3f2,0x0d77041c6ef819ac664e599199157d655c5dbc83,0x5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp192.csv b/src/cz/crcs/ectester/data/wrong/wrongp192.csv
deleted file mode 100644
index 7d2241c..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp192.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x9eb2bb2b250ffded1686035b63e7e5d995ba781a011d3b22,0x4e167abc2774f53d04a800d3a45c83a2a63b671b21a4550d,0x142b292e4b02ede63ed10aa901d9b51fe119f27d57a3a063,0x916f6535f2781de3c6c9e84fbe27d5f46287fa6827a6c8f5,0x93bceca98e0f1ba4f52838f80d057f9b364e01f235c55719,0x34e63e63b70554a45cd75673cbf7f748873e140ff2e02e30,0x3 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp224.csv b/src/cz/crcs/ectester/data/wrong/wrongp224.csv
deleted file mode 100644
index aeaaae4..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp224.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7fc961151375f20321881d4a704c5263d09d0270fa799aac8265a7d9,0x6d9aac79206bc67534b41e623995fcf15584bac41e0a5e309c2ac6d7,0x1a0167d5a679d3524753df6be9d797990838d2ff222b1d9b64c4fc8b,0x124f913cdf8e182956eef18ab9456d2114e38d9262dbf06285d9a4a2,0x7501d823647e2fbe9e9e1fd7f2eaac15cb84680ba290775c7338c569,0x198ead04371796cd6d1b390ee34276e0c3529a168953d9a4cb78e25b,0x5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp256.csv b/src/cz/crcs/ectester/data/wrong/wrongp256.csv
deleted file mode 100644
index 6902618..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp256.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xf93f4bfacd5dc41609ec790ace7b58b3a8466b533440a986a1b6252657840329,0xdedd6767ca13b7ed136d0725772e7665f7b8d7450541e747ebb22b188b0298cd,0xcb32f6d3febf6b2558e583de19180b286a0d0ca4cbc0b5ae40b2684ca5fa0549,0xe9f44e8e52268d84a2ac538a35469f041e5096b1c885922d7068c24c4f7986ab,0x927d137b6af7330546218ca73fd396483a1ca02e43bfd9e8e1266fe182cc6108,0x5315195399c9ec0758a42858ef7e72e68d6cce71116ae323eb0a5313fec656ca,0x3 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp384.csv b/src/cz/crcs/ectester/data/wrong/wrongp384.csv
deleted file mode 100644
index 694ae78..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp384.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xe5c59884cfefc22682cbc0f1d18b574c2cec33ace6ff00246db133dd25b6b8eca6e192324f73815c131e06ac129cf3c6,0x738b368de5c4b0be23c8c197df7d098372e49ef6719c02c64833a8834518cd8c0d9241f72100cb5051db0657f75a1c23,0x69754b463614c2e2dbcf6dccf623cc0f1acdc19e54cb228dbaf071459f4af4c8b6665e814653ec77937f93aba77d5c83,0x74019d327322b23f79888df61d0549c60983e967f9d783298c9fabb05d3f50380b75b9c0925016ab8606a3c7cb304fee,0x319d25a6e657db46b06dc875f23a25cd7dd85312706b98f7d42e5fef6205efa94c9e3de358442bbba0078c836474b886,0x2df451b429965a07b3c259c9f6b577dc08fc0a55c7cc99a0e2bd0a5f6df1582f549383a3a97d80459d6c67bc03b8fd8e,0x5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongp521.csv b/src/cz/crcs/ectester/data/wrong/wrongp521.csv
deleted file mode 100644
index 76fe2f2..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongp521.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x189a60ffc98c7183895a913cce35a6a9eb598dd37031ef413b22efdfce0c66a39adbc7807185d2f9258e236d97fcefbc399d96b21367b72d96aa4db8e17e085eb6b,0x14fa01ed55832127e87f87781de9dd477302be69dec9d55ca741569bddebf3f4356ded7a21173937426b7e28cd25704c715e85d677d1ebfe4349943269fa3f420b2,0x151ff15174ae4126937a8a1ab0f1d64f85fdf6edebd29615e822ffa44b6e2a951b918f49444ffc4bfc09f0f8bda8c30f095ab5d8aa5bcc26a16245d848e0beb9d88,0x1544b864fe3e9891aedcf537c6f7d3de1f77ee74ef1d3122f0c2d891189895f56362be7d031503b1d23ca7bd978650a49efce4d437dedec0e3325ca40c1f8ef2ee0,0x140197a9f062bad1e447eb6c1f4385f7dde488f0d1ba76a83750d2e9d59db3b7826c0bdb2294c8a2fb08e62152824a05a67dfd8528084b1865018e0a6c6204057c8,0x189a60ffc98c7183895a913cce35a6a9eb598dd37031ef413b22efdfce0c66a39adbc7807185d2f9258e236d97fcefbc399d96b21367b72d96aa4db8e17e085eb6a,0x5 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt163.csv b/src/cz/crcs/ectester/data/wrong/wrongt163.csv
deleted file mode 100644
index 88b142e..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt163.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00a3,0x0002,0x0000,0x0000,0x55e202b98d7e864b2c9c560dc8f8b4047743a84ad,0x4cf310ee7a37cb2bacafa5e5a5ffcc8464a51162d,0x58ae9952e3b62978ccc1bfd060564b2620d154049,0x5ed1e3aa306f09a955feff97757bc4e599c64bb9f,0x2aaaaaaaaaaaaaaaaaaaaaaaaaabc02b61ca4c651,0x3
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt233.csv b/src/cz/crcs/ectester/data/wrong/wrongt233.csv
deleted file mode 100644
index 291cdfe..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt233.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00e9,0x0001,0x0000,0x0000,0x14228234ca1e8900adcfef49a037d560c8e2c2ed4227d4a2cda8703079d,0x18f33f0e925e6af86764a84dae2e09eeb0ce218e21ad9638eeb9d2e2600,0x182a21d656972aeca534df8f8e8c5aa0f553cde1e025a75610f10ae9db5,0x118732c490d8788716e9ac581c37c140116d12e2e9abd56262a1a255472,0xc59f46db5ba025578d418f86dc556bec9d212b740ab595b83abd008ec0,0x2
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt239.csv b/src/cz/crcs/ectester/data/wrong/wrongt239.csv
deleted file mode 100644
index bef2e14..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt239.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x00ef,0x0001,0x0000,0x0000,0x513e8b6997328b69d60decd7fa034c1b3bd862717164e7785eb06dcc5b88,0x63510c1cc1053a916b68f258e9d3f7c2ba054e4af05f3e4d61b3de772d2a,0x509d82beb7ef27b5b7421ac1e93ccffea76c4f0874991cf3facf0eab9ef6,0x42a9207ae1cc90d3d29c42a87f754321ccbeaed2e18957ce5a9b01f56812,0x28759505089d94226a73eefded3f7bf2f81673517715cb032daeddbb68f7,0x2
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt283.csv b/src/cz/crcs/ectester/data/wrong/wrongt283.csv
deleted file mode 100644
index 736fe15..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt283.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x011b,0x0002,0x0000,0x0000,0x7e2a42c7f5af962ff0f58711703462947d0a4eb3555b123aa33088a9c566424f0126157,0x6f317d6314dd7069b6be8cfb5fd0c563b9dbb2f9b8ca2618dd8cd4e7d1a368452aa3c34,0x5beb9f0130f758148a16a5c65b9228836af1c7afbab4afeffed328ed04ec1bf015f9c16,0x68996bd05c007c329738a29893a6215c99fbfa460e143090d588d9b157c99843e91c976,0x2552bf070faa392ab3b7fa07e443e5a45dc9bb3e1a6fe44d1440fdde6752c90899d4197,0x3
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt409.csv b/src/cz/crcs/ectester/data/wrong/wrongt409.csv
deleted file mode 100644
index fe7e040..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt409.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x0199,0x0002,0x0000,0x0000,0x1cc6efad1333dd213e812bdc9909754ff20c102fb9c9a2a7fdbd23ca7d414bec401bc45532980dff9cc869b4622c7f5b65e2afb,0x1cfc909e058af6762da1c2d85ec911d4e393dcd4539aa6c6d755b3dfdf9c4c338c84b984f533479d2f2bb5169b4fae6a25159f6,0x1ef44edd1100313984d059e3ecae6c866d83bfb9931e616abafcb9f1461ec264509260b4c62a09f1f03595c404e530d467dc14c,0x1055f15e3b4272c3bf6ecaeb59204470b96111eb38eb395066b26fbae646ab57b7ae6cda5722a98b01aade1bcf3b6db950d2957,0xc3b9b6e10f6ed3a458388e94c4d567e1a2272bb996892a919e65a8da15c0907ac735eb2f9a7cee28ac90193dabd2408e232839,0x2
diff --git a/src/cz/crcs/ectester/data/wrong/wrongt571.csv b/src/cz/crcs/ectester/data/wrong/wrongt571.csv
deleted file mode 100644
index 2fcd0df..0000000
--- a/src/cz/crcs/ectester/data/wrong/wrongt571.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x023b,0x0002,0x0000,0x0000,0x4d3b833ae38b91e89061c4fae9e38264f2e88b4969778aa935eeec50fd1d66a994589e835aeb590566f0adafba2c40c1866865e62cae00f1d235038139d8d25b32d842a7a8b03b0,0x736974cc00c08dfbd1d23a6bea984c1c1af6ceae0a8b48ecd84b8a4fedbb46d61ab94efa8f53e50b6aa0c0599c2121af733dc36c07ccb7762d210bef02aa8611fe464d369f8a923,0x4f3bb81214f966e73a2f64423738ab7cd642b871ce7fb0e5f302a3a658aafd68e25d38c432d5e48334a2c03f472defa43ca0933fd13c98138bab6d7ca228ab860c79cd9114d4549,0x6355104090026816f380b1b406e84f93e12cbaa9f23adcef1eab09bd0418f7906195b102daed369ba72b9370e24a12c7676263c20bf7c7f3018c7a84ee80f586cc8fb16dd526110,0x397cad72a3fefe82d79a96e18009f5f9b661a9fa2ee53a5eb9f4016d2deaf249e2969b9af649fa363f4c2d5ec837792d932748f7344a16f8ab4be63341812d1c4f52a7b3fa65757,0x2
diff --git a/src/cz/crcs/ectester/data/wycheproof/keys.xml b/src/cz/crcs/ectester/data/wycheproof/keys.xml
deleted file mode 100644
index ee7280c..0000000
--- a/src/cz/crcs/ectester/data/wycheproof/keys.xml
+++ /dev/null
@@ -1,892 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <privkey>
- <id>addsub/secp224r1/1s</id>
- <inline>0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c29b7</inline>
- <curve>secg/secp224r1</curve>
- <desc>tcId = 34</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp224r1/1w</id>
- <inline>0x478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac230,0x2e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504</inline>
- <!-- 304e301006072a8648ce3d020106052b81040021033a0004478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac2302e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504 -->
- <curve>secg/secp224r1</curve>
- <desc>tcId = 34</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp224r1/2s</id>
- <inline>0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a37</inline>
- <curve>secg/secp224r1</curve>
- <desc>tcId = 35</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp224r1/2w</id>
- <inline>0x478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac230,0x2e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504</inline>
- <!-- 304e301006072a8648ce3d020106052b81040021033a0004478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac2302e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504 -->
- <curve>secg/secp224r1</curve>
- <desc>tcId = 35</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp224r1/3s</id>
- <inline>0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3b</inline>
- <curve>secg/secp224r1</curve>
- <desc>tcId = 37</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp224r1/3w</id>
- <inline>0x478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac230,0x2e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504</inline>
- <!-- 304e301006072a8648ce3d020106052b81040021033a0004478e73465bb1183583f4064e67e8b4343af4a05d29dfc04eb60ac2302e5b9a3a1b32e4208d4c284ff26822e09c3a9a4683443e4a35175504 -->
- <curve>secg/secp224r1</curve>
- <desc>tcId = 37</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256r1/1s</id>
- <inline>0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6324f3</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 106</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256r1/1w</id>
- <inline>0x31028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f1167447,0x43a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d0301070342000431028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f116744743a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 106</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256r1/2s</id>
- <inline>0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632533</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 107</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256r1/2w</id>
- <inline>0x31028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f1167447,0x43a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d0301070342000431028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f116744743a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 107</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256r1/3s</id>
- <inline>0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632543</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 108</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256r1/3w</id>
- <inline>0x31028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f1167447,0x43a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d0301070342000431028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f116744743a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 108</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256r1/4s</id>
- <inline>0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254b</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 109</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256r1/4w</id>
- <inline>0x31028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f1167447,0x43a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d0301070342000431028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f116744743a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 109</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256r1/5s</id>
- <inline>0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254f</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 111</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256r1/5w</id>
- <inline>0x31028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f1167447,0x43a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d0301070342000431028f3377fc8f2b1967edaab90213acad0da9f50897f08f57537f78f116744743a1930189363bbde2ac4cbd1649cdc6f451add71dd2f16a8a867f2b17caa16b -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 111</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp384r1/1s</id>
- <inline>0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52959</inline>
- <curve>secg/secp384r1</curve>
- <desc>tcId = 192</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp384r1/1w</id>
- <inline>0xe9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c0,0x20156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e</inline>
- <!-- 3076301006072a8648ce3d020106052b8104002203620004e9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c020156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e -->
- <curve>secg/secp384r1</curve>
- <desc>tcId = 192</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp384r1/2s</id>
- <inline>0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52969</inline>
- <curve>secg/secp384r1</curve>
- <desc>tcId = 193</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp384r1/2w</id>
- <inline>0xe9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c0,0x20156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e</inline>
- <!-- 3076301006072a8648ce3d020106052b8104002203620004e9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c020156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e -->
- <curve>secg/secp384r1</curve>
- <desc>tcId = 193</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp384r1/3s</id>
- <inline>0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52971</inline>
- <curve>secg/secp384r1</curve>
- <desc>tcId = 195</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp384r1/3w</id>
- <inline>0xe9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c0,0x20156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e</inline>
- <!-- 3076301006072a8648ce3d020106052b8104002203620004e9dfaaab808b3aac1ccca7cc6242a7ee583249afe8ee8f66b904cc8eec34ad334456e00f33a94de8b5169cf0199550c020156e9651734ff999c5f3ea62b83d0083a6093f234457251ecf72c41e4df7cea2420b5454a7f690034380bac981e92e -->
- <curve>secg/secp384r1</curve>
- <desc>tcId = 195</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/1s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e9138631b</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 273</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/1w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 273</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/2s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e9138639b</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 274</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/2w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 274</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/3s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e913863db</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 275</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/3w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 275</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/4s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e913863fb</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 276</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/4w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 276</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/5s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386403</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 277</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/5w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 277</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp521r1/6s</id>
- <inline>0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386407</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 279</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp521r1/6w</id>
- <inline>0x01ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b9,0x00854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000401ad5043591dbe81657fe3d1c3d7a516606ad9d320a35fce8aaec8a950fb53f95388f3fc48be998e99334ad9e9234cded14471fe86caccaa07d058ee8771733ac3b900854de36366590b9ee4d0370ea6b00f7ebd8156ccf14e99f1a5344a9b4964fbb8348b081a8840c6b64be77997ad8bebfea5e7d9f7a6a7fa6d7655c50b2b7835f314 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 279</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/1s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03640c3</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 362</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/1w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 362</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/2s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364103</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 363</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/2w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 363</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/3s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364123</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 364</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/3w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 364</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/4s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364133</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 365</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/4w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 365</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/5s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd036413b</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 366</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/5w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 366</desc>
- </pubkey>
- <privkey>
- <id>addsub/secp256k1/6s</id>
- <inline>0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd036413f</inline>
- <curve>secg/secp256k1</curve>
- <desc>tcId = 368</desc>
- </privkey>
- <pubkey>
- <id>addsub/secp256k1/6w</id>
- <inline>0x32bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e,0x981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b</inline>
- <!-- 3056301006072a8648ce3d020106052b8104000a0342000432bdd978eb62b1f369a56d0949ab8551a7ad527d9602e891ce457586c2a8569e981e67fae053b03fc33e1a291f0a3beb58fceb2e85bb1205dacee1232dfd316b -->
- <curve>secg/secp256k1</curve>
- <desc>tcId = 368</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224r1/1s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a792dd</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 441</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224r1/1w</id>
- <inline>0xaaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d126,0x8c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010105033a0004aaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d1268c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66 -->
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 441</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224r1/2s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7935d</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 442</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224r1/2w</id>
- <inline>0xaaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d126,0x8c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010105033a0004aaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d1268c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66 -->
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 442</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224r1/3s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939d</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 444</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224r1/3w</id>
- <inline>0xaaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d126,0x8c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010105033a0004aaf040d6cad2c18b953de46420b387fa83474d74c6767ed708b9d1268c82a09310bc35b5caf2d9b46318b895e4c097ed501d2dcb14d30a66 -->
- <curve>brainpool/brainpoolP224r1</curve>
- <desc>tcId = 444</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256r1/1s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974855f5</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 524</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256r1/1w</id>
- <inline>0xa4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b3,0x77d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b</inline>
- <!-- 305a301406072a8648ce3d020106092b240303020801010703420004a4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b377d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b -->
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 524</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256r1/2s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e8297485675</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 525</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256r1/2w</id>
- <inline>0xa4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b3,0x77d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b</inline>
- <!-- 305a301406072a8648ce3d020106092b240303020801010703420004a4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b377d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b -->
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 525</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256r1/3s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e8297485695</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 526</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256r1/3w</id>
- <inline>0xa4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b3,0x77d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b</inline>
- <!-- 305a301406072a8648ce3d020106092b240303020801010703420004a4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b377d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b -->
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 526</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256r1/4s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a5</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 528</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256r1/4w</id>
- <inline>0xa4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b3,0x77d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b</inline>
- <!-- 305a301406072a8648ce3d020106092b240303020801010703420004a4597cfee2797aaace662caa92a444592c9f626f04beca98a06b6dfcaf53f4b377d67b1c109154309bcf3d2f3928e58747806f08a8cf88436ac1b2110b83493b -->
- <curve>brainpool/brainpoolP256r1</curve>
- <desc>tcId = 528</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/1s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59233</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 604</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/1w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 604</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/2s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c592b3</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 605</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/2w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 605</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/3s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c592f3</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 606</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/3w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 606</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/4s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59303</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 607</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/4w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 607</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/5s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c5930b</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 608</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/5w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 608</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320r1/6s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c5930f</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 610</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320r1/6w</id>
- <inline>0x4e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfe,0xd230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d</inline>
- <!-- 306a301406072a8648ce3d020106092b2403030208010109035200044e73d59ec474e679414d0922de22e06d0dad990ba4746c3d026bdea52e7bbeaac928d0ddaab29dfed230dde60fd57d4ef8e935b23cb7d4216b278b17a3f02d70454fa0e45da2054b91b0c4b663ab243d -->
- <curve>brainpool/brainpoolP320r1</curve>
- <desc>tcId = 610</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384r1/1s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904652f</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 684</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384r1/1w</id>
- <inline>0x09d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf,0x03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010b0362000409d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf -->
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 684</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384r1/2s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904654f</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 685</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384r1/2w</id>
- <inline>0x09d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf,0x03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010b0362000409d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf -->
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 685</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384r1/3s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904655f</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 686</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384r1/3w</id>
- <inline>0x09d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf,0x03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010b0362000409d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf -->
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 686</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384r1/4s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046563</inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 688</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384r1/4w</id>
- <inline>0x09d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf,0x03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010b0362000409d897b6d1452a2f91c4c37fbb06d82f9ebf722298cafb135e582cded3e3210033e4cd07703c34acf36ba72b401c30bf03b161af6e11309a1122145c431996047a7e7808cf8314b6ec37c61a817d08c7d00c8c7b5d258f2674378c832f682edf -->
- <curve>brainpool/brainpoolP384r1</curve>
- <desc>tcId = 688</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512r1/1s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca9003b</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 774</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512r1/1w</id>
- <inline>0x2ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc,0x99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010d03818200042ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd -->
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 774</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512r1/2s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca9005b</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 775</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512r1/2w</id>
- <inline>0x2ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc,0x99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010d03818200042ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd -->
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 775</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512r1/3s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90063</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 776</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512r1/3w</id>
- <inline>0x2ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc,0x99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010d03818200042ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd -->
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 776</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512r1/4s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90067</inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 778</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512r1/4w</id>
- <inline>0x2ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc,0x99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010d03818200042ee402777200a1c9e7eceb61feb070af49429f9240d7c0bab9b2f01c5ee145683df47cbe852ff6f99198f6fdfaef1925eb96bd25e03d6d70f709eb1922308acc99a3fbc1e982db7a7b3bbf7827ea70912ee677bb0ba70bfabec38d4b993af165c40727680fe79ad0fbb55d1e9568d978b11f77cc4e72aa7ca5c391034078b8bd -->
- <curve>brainpool/brainpoolP512r1</curve>
- <desc>tcId = 778</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224t1/1s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a792dd</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 854</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224t1/1w</id>
- <inline>0x1b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c2,0x6709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010106033a00041b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c26709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1 -->
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 854</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224t1/2s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7935d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 855</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224t1/2w</id>
- <inline>0x1b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c2,0x6709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010106033a00041b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c26709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1 -->
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 855</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP224t1/3s</id>
- <inline>0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939d</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 857</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP224t1/3w</id>
- <inline>0x1b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c2,0x6709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1</inline>
- <!-- 3052301406072a8648ce3d020106092b2403030208010106033a00041b801b9b969daaddbc40876ef79201c5dd8e480f003a043e818862c26709e1b2f6d8826ae4257a5db46b78848091c56a54577248185936b1 -->
- <curve>brainpool/brainpoolP224t1</curve>
- <desc>tcId = 857</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256t1/1s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974855f5</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 935</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256t1/1w</id>
- <inline>0x2053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b,0x02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245</inline>
- <!-- 305a301406072a8648ce3d020106092b2403030208010108034200042053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245 -->
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 935</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256t1/2s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e8297485675</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 936</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256t1/2w</id>
- <inline>0x2053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b,0x02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245</inline>
- <!-- 305a301406072a8648ce3d020106092b2403030208010108034200042053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245 -->
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 936</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256t1/3s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e8297485695</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 937</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256t1/3w</id>
- <inline>0x2053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b,0x02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245</inline>
- <!-- 305a301406072a8648ce3d020106092b2403030208010108034200042053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245 -->
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 937</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP256t1/4s</id>
- <inline>0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a5</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 939</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP256t1/4w</id>
- <inline>0x2053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b,0x02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245</inline>
- <!-- 305a301406072a8648ce3d020106092b2403030208010108034200042053bf936c82599d38aef8ec650f502ad9dce3be818d32de66009a3137604f5b02317c894b1138b873b612714c95527021b4240edd45ad26ee96d507954c3245 -->
- <curve>brainpool/brainpoolP256t1</curve>
- <desc>tcId = 939</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/1s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59233</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1015</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/1w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1015</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/2s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c592b3</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1016</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/2w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1016</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/3s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c592f3</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1017</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/3w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1017</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/4s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59303</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1018</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/4w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1018</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/5s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c5930b</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1019</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/5w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1019</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP320t1/6s</id>
- <inline>0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c5930f</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1021</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP320t1/6w</id>
- <inline>0xaac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b97225,0x3955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd</inline>
- <!-- 306a301406072a8648ce3d020106092b240303020801010a03520004aac3566c8e494d7d52976b107a9b9058e65e541c01dab5d4bba90658a655890fd2c48d29f0b972253955fdbd31c6328df2e893fe5b401ddc529c4ed70a9c46badb80843277b8f9874538312460d54dfd -->
- <curve>brainpool/brainpoolP320t1</curve>
- <desc>tcId = 1021</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384t1/1s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904652f</inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1093</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384t1/1w</id>
- <inline>0x1e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf,0x88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010c036200041e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71 -->
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1093</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384t1/2s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904654f</inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1094</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384t1/2w</id>
- <inline>0x1e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf,0x88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010c036200041e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71 -->
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1094</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384t1/3s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e904655f</inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1095</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384t1/3w</id>
- <inline>0x1e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf,0x88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010c036200041e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71 -->
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1095</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP384t1/4s</id>
- <inline>0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046563</inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1097</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP384t1/4w</id>
- <inline>0x1e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf,0x88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71</inline>
- <!-- 307a301406072a8648ce3d020106092b240303020801010c036200041e6c405358fab0f63c09eddacc372dd29c17d0eebcffe37975ee3c6bf05c7b8db09f104fcf6cc1a0576c44c12637b4bf88938d33d2d9390c1075f3af467937074db4022a44e2ea2e9cbff6bfcb4af4909fbb8bd3ab627e1dd1649d5faec28a71 -->
- <curve>brainpool/brainpoolP384t1</curve>
- <desc>tcId = 1097</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512t1/1s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca9003b</inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1185</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512t1/1w</id>
- <inline>0x242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd079,0x3d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010e0381820004242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd0793d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed -->
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1185</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512t1/2s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca9005b</inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1186</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512t1/2w</id>
- <inline>0x242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd079,0x3d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010e0381820004242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd0793d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed -->
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1186</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512t1/3s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90063</inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1187</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512t1/3w</id>
- <inline>0x242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd079,0x3d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010e0381820004242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd0793d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed -->
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1187</desc>
- </pubkey>
- <privkey>
- <id>addsub/brainpoolP512t1/4s</id>
- <inline>0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90067</inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1189</desc>
- </privkey>
- <pubkey>
- <id>addsub/brainpoolP512t1/4w</id>
- <inline>0x242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd079,0x3d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed</inline>
- <!-- 30819b301406072a8648ce3d020106092b240303020801010e0381820004242748b1fa44edac413a79ee1cdcc3d4bab5fa125d4d692208ac52764377b84fe3472dbe8f292572f1f3dbf3e927624d983d5c0f4bfca5224dc0739889ddd0793d1f2089639992a74a3c1783d2f1bd50f85ad77540adfa78b1a6581bcd74b3ef0dd996be2809ed16434c42b3a29cb81b1a39720cede1b640f018788afa61cbed -->
- <curve>brainpool/brainpoolP512t1</curve>
- <desc>tcId = 1189</desc>
- </pubkey>
-
- <!-- CVE-2017-8932 tests -->
- <privkey>
- <id>cve_2017_8932/secp256r1/1s</id>
- <inline>0x2a265f8bcbdcaf94d58519141e578124cb40d64a501fba9c11847b28965bc737</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 112</desc>
- </privkey>
- <pubkey>
- <id>cve_2017_8932/secp256r1/1w</id>
- <inline>0x023819813ac969847059028ea88a1f30dfbcde03fc791d3a252c6b41211882ea,0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d03010703420004023819813ac969847059028ea88a1f30dfbcde03fc791d3a252c6b41211882eaf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 112</desc>
- </pubkey>
- <privkey>
- <id>cve_2017_8932/secp256r1/2s</id>
- <inline>0x313f72ff9fe811bf573176231b286a3bdb6f1b14e05c40146590727a71c3bccd</inline>
- <curve>secg/secp256r1</curve>
- <desc>tcId = 113</desc>
- </privkey>
- <pubkey>
- <id>cve_2017_8932/secp256r1/2w</id>
- <inline>0xcc11887b2d66cbae8f4d306627192522932146b42f01d3c6f92bd5c8ba739b06,0xa2f08a029cd06b46183085bae9248b0ed15b70280c7ef13a457f5af382426031</inline>
- <!-- 3059301306072a8648ce3d020106082a8648ce3d03010703420004cc11887b2d66cbae8f4d306627192522932146b42f01d3c6f92bd5c8ba739b06a2f08a029cd06b46183085bae9248b0ed15b70280c7ef13a457f5af382426031 -->
- <curve>secg/secp256r1</curve>
- <desc>tcId = 113</desc>
- </pubkey>
-
- <!-- CVE-2017-10176 tests -->
- <privkey>
- <id>cve_2017_10176/secp521r1/1s</id>
- <inline>0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e913863f7</inline>
- <curve>secg/secp521r1</curve>
- <desc>tcId = 280</desc>
- </privkey>
- <pubkey>
- <id>cve_2017_10176/secp521r1/1w</id>
- <inline>0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66,0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650</inline>
- <!-- 30819b301006072a8648ce3d020106052b81040023038186000400c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650 -->
- <curve>secg/secp521r1</curve>
- <desc>tcId = 280</desc>
- </pubkey>
-</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wycheproof/results.xml b/src/cz/crcs/ectester/data/wycheproof/results.xml
deleted file mode 100644
index 094043c..0000000
--- a/src/cz/crcs/ectester/data/wycheproof/results.xml
+++ /dev/null
@@ -1,589 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <kaResult>
- <id>addsub/secp224r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x475fd96e0eb8cb8f100a5d7fe043a7a6851d1d611da2643a3c6ae708</inline>
- <curve>secg/secp224r1</curve>
- <onekey>wycheproof/addsub/secp224r1/1s</onekey>
- <otherkey>wycheproof/addsub/secp224r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp224r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x41ef931d669d1f57d8bb95a01a92321da74be8c6cbc3bbe0b2e73ebd</inline>
- <curve>secg/secp224r1</curve>
- <onekey>wycheproof/addsub/secp224r1/2s</onekey>
- <otherkey>wycheproof/addsub/secp224r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp224r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x11ff15126411299cbd49e2b7542e69e91ef132e2551a16ecfebb23a3</inline>
- <curve>secg/secp224r1</curve>
- <onekey>wycheproof/addsub/secp224r1/3s</onekey>
- <otherkey>wycheproof/addsub/secp224r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xf7407d61fdf581be4f564621d590ca9b7ba37f31396150f9922f1501da8c83ef</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/addsub/secp256r1/1s</onekey>
- <otherkey>wycheproof/addsub/secp256r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x82236fd272208693e0574555ca465c6cc512163486084fa57f5e1bd2e2ccc0b3</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/addsub/secp256r1/2s</onekey>
- <otherkey>wycheproof/addsub/secp256r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x06537149664dba1a9924654cb7f787ed224851b0df25ef53fcf54f8f26cd5f3f</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/addsub/secp256r1/3s</onekey>
- <otherkey>wycheproof/addsub/secp256r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xf2b38539bce995d443c7bfeeefadc9e42cc2c89c60bf4e86eac95d51987bd112</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/addsub/secp256r1/4s</onekey>
- <otherkey>wycheproof/addsub/secp256r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256r1/5test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x027b013a6f166db655d69d643c127ef8ace175311e667dff2520f5b5c75b7659</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/addsub/secp256r1/5s</onekey>
- <otherkey>wycheproof/addsub/secp256r1/5w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp384r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x2ecf9dc47e8b07ae61ddbd1680ead02698e9e8469f78d5a28328e48d0c9d7a2ac787e50cba58cc44a32fb1235d2d7027
- </inline>
- <curve>secg/secp384r1</curve>
- <onekey>wycheproof/addsub/secp384r1/1s</onekey>
- <otherkey>wycheproof/addsub/secp384r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp384r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x06ee9f55079d3d3c18c683ba33e0d2521be97c4fbf7917bf3b6287d58ffcde2df88842e3f5530b39549ac20974b1b60e
- </inline>
- <curve>secg/secp384r1</curve>
- <onekey>wycheproof/addsub/secp384r1/2s</onekey>
- <otherkey>wycheproof/addsub/secp384r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp384r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x024c5281487216058270cd1cfe259e948310e4adc263a9edaa4da0bc3f5f8ce8ffc88ae41b2c050bf6dd9c8c66857237
- </inline>
- <curve>secg/secp384r1</curve>
- <onekey>wycheproof/addsub/secp384r1/3s</onekey>
- <otherkey>wycheproof/addsub/secp384r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x00286cefaaf38ca4c6657eb9b187d8614d51775fd71c1a79b4c0ef1a0d4ce72b6f5b2bc854a4e78283530942a3f4fd2a8586d5ea51513c89d3d29de5de06321e118e
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/1s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x014790de14c481f1336fcb7d33a8bf8e23eb594cc48608e9edfe0e326e106b67e7eaa3f04ec9985599178f632a5ee6419e11217060e9fcd5958a43882bf8cd3be6ba
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/2s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x01ae775dbc4096a3aea7977b1a0af4b2830ecf9ca927a6247fba4cccb46b3f71d0e7abb8dda72d1c1ee7bb5b875b4773cc8df40f732819c4147da330775d1742ea35
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/3s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x01979fb05e068a12a3f20cfdfb9eaee9f22b356edcc7655383ed38124b86814f86a6f2216a34f3fc2299d403ee42408f95d08c5c6cd11db72cbf299a4a3c2545be25
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/4s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/5test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x0197ebe26798bf67f06ff0282773af75115531f41d94c093d87481b76bef707bc222f2d6672f84a00fa20c5ed27027ab4006b68d93ee2151016c9ddbe014346272e2
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/5s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/5w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp521r1/6test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x01c168314cdc85757ade34a52a9e5379ffa5968f084b7e404939a8033a0fc698e26211754b9b2c04cf8a1420abe6e986ef1a238bbb91dd402b72e0ed50a876f1a83e
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/addsub/secp521r1/6s</onekey>
- <otherkey>wycheproof/addsub/secp521r1/6w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x09c7337df6c2b35edf3a21382511cc5add1a71a84cbf8d3396a5be548d92fa67</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/1s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xd16caedd25793666f9e26f5331382106f54095b3d20d40c745b68ca76c0e6983</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/2s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xb8ae1e21d8b34ce4caffed7167a26868ec80a7d4a6a98b639d4d05cd226504de</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/3s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x02776315fe147a36a4b0987492b6503acdea60f926450e5eddb9f88fc82178d3</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/4s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/5test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x3988c9c7050a28794934e5bd67629b556d97a4858d22812835f4a37dca351943</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/5s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/5w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/secp256k1/6test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x4b52257d8b3ba387797fdf7a752f195ddc4f7d76263de61d0d52a5ec14a36cbf</inline>
- <curve>secg/secp256k1</curve>
- <onekey>wycheproof/addsub/secp256k1/6s</onekey>
- <otherkey>wycheproof/addsub/secp256k1/6w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x1be0d59d1f0f3a743ae19c5246099391098f71444223831e16cfa0c5</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <onekey>wycheproof/addsub/brainpoolP224r1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x7e00a9267243cea4ba7617860b6fcf404e0357d1202d8c85dc5e07d3</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <onekey>wycheproof/addsub/brainpoolP224r1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xaac6a805f4ce1b6dcc13ec4ed16a889dc4d708f7f6f1e23471338324</inline>
- <curve>brainpool/brainpoolP224r1</curve>
- <onekey>wycheproof/addsub/brainpoolP224r1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x1950b7ce510d4d8648e80c6385a42d005433fc5ca61e2022a1405fe18142c246</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>wycheproof/addsub/brainpoolP256r1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x5c05c4d877a0e2af5ffa004c122630bb87157cf346dbeb8ae13017162da208f4</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>wycheproof/addsub/brainpoolP256r1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x9639bbd4e22194ce3892a814c82eddbd21dde05cfac20e99396e3d6ef0841f7c</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>wycheproof/addsub/brainpoolP256r1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x341cbdf61f9dd620ba6873a74804afe30a06b0a113a6916a4104d2d4cc196aec</inline>
- <curve>brainpool/brainpoolP256r1</curve>
- <onekey>wycheproof/addsub/brainpoolP256r1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xc0038da858441f559a864dcd6c4558437f9ad091a67c3fda69a9e0cb6f446a8b47ae95edc2f4eade</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x8258131a80bc9f2b8ba532ef1253ef39dce25e6deb85227c670273521c311dbb9bf1a56dd29107b3</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xae752e75684a9adfc6198e6c1ce9249d26743104e8b0bd0417998c62982622ea2fdf6917413d547c</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x37bfbb637fce27ee80b3af326546303e0bd8af01b72f591830a548609055bda489d9a4e6b5e3f43e</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/5test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x854ce9516e73c6cc8d0d6ce3cdf933541a719578712440f02a86829af1398fcab2bb0949c1d63106</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/5s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/5w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320r1/6test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x7dfd07c1cfe70db4772cf9f6bb6b58a10bbc9509e5ce86651d5c395f3544f62d6d8f8109edba441a</inline>
- <curve>brainpool/brainpoolP320r1</curve>
- <onekey>wycheproof/addsub/brainpoolP320r1/6s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320r1/6w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x3729bcd215b41c658b832686c81362b3485d75b09478c6dde3b5e278564ef4162bdd6ff65afc6e8213bba9b6c54ba1eb
- </inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>wycheproof/addsub/brainpoolP384r1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x12ba4622daf1f2f950aad6d54aaab821885a47a98573afea49bc1896041ee9501acef82810f3755ff284e16665bd0f62
- </inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>wycheproof/addsub/brainpoolP384r1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x7fb5398519857f2c17cddd0a9d2c1660ac35b4723e4a049ba5c58c458b742dfa813a5c7175e1c0974b514bfaeb0039f8
- </inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>wycheproof/addsub/brainpoolP384r1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x0f0a1d20ba6a7b2c48154b43870be4890979d9261950736de96c29f371233b1ef94a79c2ab698868f00cea7e912deb94
- </inline>
- <curve>brainpool/brainpoolP384r1</curve>
- <onekey>wycheproof/addsub/brainpoolP384r1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x194871645bbfc309eba92c5613ca7c6aa566fdab45635f656148ec7122d71c825f36852f52722ea949c2572dbb6b894a21f96a05c9bee0df6c6b4faa3197079a
- </inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>wycheproof/addsub/brainpoolP512r1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x3a6e57858d4e61c7ed2cb93c124221210293a345b47f7644910543ac03117f48b0343ddebd2cf9925e3dc5e1ea590739ed2c2372e1146f84fd262ac7d8eebacd
- </inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>wycheproof/addsub/brainpoolP512r1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512r1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512r1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x8e0a186a51eae08a86fdd476bcfd961d02be74966ce3c2d937c808db518f2ddc4760bfc924af72f85eb188ebc70edde6d12f402735f58b9006f8b8e283ef9fbe
- </inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>wycheproof/addsub/brainpoolP512r1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512r1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512r1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x300b1d80d9dc5587076b7d850ccd00cf8961f389c4ded60bf910d98f196f67c3839d2197101607612b335871a818d50d8f4bb6163cc839cf41af0b742c7254f4
- </inline>
- <curve>brainpool/brainpoolP512r1</curve>
- <onekey>wycheproof/addsub/brainpoolP512r1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512r1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224t1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x97ded4c2e06b5a13c9109be3fa42dc2ca93a306fdf9e85ac4bb02e22</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <onekey>wycheproof/addsub/brainpoolP224t1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224t1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224t1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x686798270c7e188e6ab3e28a10754f965d5d02f33d30d8faf38155f4</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <onekey>wycheproof/addsub/brainpoolP224t1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224t1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP224t1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xd64f68debaf751d63da1883668822031c69e913cc53b969e5fbae845</inline>
- <curve>brainpool/brainpoolP224t1</curve>
- <onekey>wycheproof/addsub/brainpoolP224t1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP224t1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256t1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x4875ed4b2bc7e7a0cb89d93b359fa72ddaf0377ddeddd33f62ec2450cd80e7cd</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <onekey>wycheproof/addsub/brainpoolP256t1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256t1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256t1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x315637f94d6776cc3928c1ffbe3c7004aa70b787cc0687faee1da5f9324a36c4</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <onekey>wycheproof/addsub/brainpoolP256t1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256t1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256t1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x54d1009ab7d3cb9d4314ea7512f7bc4d916ecd47bc9e491ad4a6d65a40672554</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <onekey>wycheproof/addsub/brainpoolP256t1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256t1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP256t1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x892923527eb529de963e902641c01701a66cd999d1b665717d7b11cbb5a96f7c</inline>
- <curve>brainpool/brainpoolP256t1</curve>
- <onekey>wycheproof/addsub/brainpoolP256t1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP256t1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x147c9b3b4880f7f6d4eb96f891672cb0d09a6bef15574ab2a43f09ae7f8090cdfa81517e098dac1e</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x47f4412278edc51ba0635853a82e033b164a68194d4c3e2492017432daaa8c35684c343f701f6b02</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xa64c2b075abf446a9ba43f6ffcefda795835ab2e1c4d19bd9c9ede59cd9eaf9c831a520b1e0ce269</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xb3b25821ac9b07c614f6fce7f9a1c2325d3cbd51cac82dadeb79037a23bce03b0352407ccd447af8</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/5test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x594aebd8010757d15f79631af0e481310359e0086e4e988ab5525a9303aaf800cd4ef123ceb68875</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/5s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/5w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP320t1/6test</id>
- <ka>DH_PLAIN</ka>
- <inline>0xc7e67dc2f64d0e66841777a6f014340b8a63f42024c6cd5ac5e10cec3b02a2d050c2fd8f078a754f</inline>
- <curve>brainpool/brainpoolP320t1</curve>
- <onekey>wycheproof/addsub/brainpoolP320t1/6s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP320t1/6w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384t1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x22d772bd2104c3d24b8505b3e7d1f3f00ca2dacb493ca729170854ef2158407a0ffab006153d5cb7781e9cb57cda505f
- </inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <onekey>wycheproof/addsub/brainpoolP384t1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384t1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384t1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x2b2c617f8c84713f8440e5e273341d69edf9e6ea2056af38ccfc6ee733a9c11e1f9aa63cb3615d2b3cebe69d8360a2bd
- </inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <onekey>wycheproof/addsub/brainpoolP384t1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384t1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384t1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x28518f75e020e00095d47166f7825f1767b6425172decde390c9266764c8b631608dc323b8415c39c9d0b8a24cd337ac
- </inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <onekey>wycheproof/addsub/brainpoolP384t1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384t1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP384t1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x4424a1b48eba0524e4aa82455e282b35cf0d13d8536fe6c410cd5050f3d4d1739254945a8f580d43ee0245b1df67de56
- </inline>
- <curve>brainpool/brainpoolP384t1</curve>
- <onekey>wycheproof/addsub/brainpoolP384t1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP384t1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512t1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x71f9265fcb0a1a899c5a3c8dc31d2fc3c87955285687e73928aab9c5cc750a83760292d514d4cde457fc8e05bb49eac1fb677ffa5f9dc9fa62e1126a9eded5a4
- </inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <onekey>wycheproof/addsub/brainpoolP512t1/1s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512t1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512t1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x79cc52b05b942dec984ea1d88675fcff93f87103b58bd0f7153c7b36b205ea39f99e85017e97ba89726d15e7d7fe5eb1525827011b3852e1121753dea15cfbb9
- </inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <onekey>wycheproof/addsub/brainpoolP512t1/2s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512t1/2w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512t1/3test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x618f57d971efa605cb141993a1149dff87d01c773fb8f2a8db5726eb1703522568cc55abca616dae5727f390c90cfa792d4349856820f2d0b5df7da418328e7f
- </inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <onekey>wycheproof/addsub/brainpoolP512t1/3s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512t1/3w</otherkey>
- </kaResult>
- <kaResult>
- <id>addsub/brainpoolP512t1/4test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x34998a162b0463d81a96dda6c4e256b94ed35f89cb0b69a9af70123bec61b387bb358451e1994d6c29acbec66c50c61f36b66da33782db21521415952b55fa48
- </inline>
- <curve>brainpool/brainpoolP512t1</curve>
- <onekey>wycheproof/addsub/brainpoolP512t1/4s</onekey>
- <otherkey>wycheproof/addsub/brainpoolP512t1/4w</otherkey>
- </kaResult>
- <kaResult>
- <id>cve_2017_10176/secp521r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>
- 0x01bc33425e72a12779eacb2edcc5b63d1281f7e86dbc7bf99a7abd0cfe367de4666d6edbb8525bffe5222f0702c3096dec0884ce572f5a15c423fdf44d01dd99c61d
- </inline>
- <curve>secg/secp521r1</curve>
- <onekey>wycheproof/cve_2017_10176/secp521r1/1s</onekey>
- <otherkey>wycheproof/cve_2017_10176/secp521r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>cve_2017_8932/secp256r1/1test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x4d4de80f1534850d261075997e3049321a0864082d24a917863366c0724f5ae3</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/cve_2017_8932/secp256r1/1s</onekey>
- <otherkey>wycheproof/cve_2017_8932/secp256r1/1w</otherkey>
- </kaResult>
- <kaResult>
- <id>cve_2017_8932/secp256r1/2test</id>
- <ka>DH_PLAIN</ka>
- <inline>0x831c3f6b5f762d2f461901577af41354ac5f228c2591f84f8a6e51e2e3f17991</inline>
- <curve>secg/secp256r1</curve>
- <onekey>wycheproof/cve_2017_8932/secp256r1/2s</onekey>
- <otherkey>wycheproof/cve_2017_8932/secp256r1/2w</otherkey>
- </kaResult>
-</results> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/curves.xml b/src/cz/crcs/ectester/data/x962/curves.xml
deleted file mode 100644
index eee64ad..0000000
--- a/src/cz/crcs/ectester/data/x962/curves.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema.xsd">
- <curve>
- <id>prime192v1</id>
- <bits>192</bits>
- <field>prime</field>
- <file>prime192v1.csv</file>
- </curve>
- <curve>
- <id>prime192v2</id>
- <bits>192</bits>
- <field>prime</field>
- <file>prime192v2.csv</file>
- </curve>
- <curve>
- <id>prime192v3</id>
- <bits>192</bits>
- <field>prime</field>
- <file>prime192v3.csv</file>
- </curve>
-
- <curve>
- <id>prime239v1</id>
- <bits>239</bits>
- <field>prime</field>
- <file>prime239v1.csv</file>
- </curve>
- <curve>
- <id>prime239v2</id>
- <bits>239</bits>
- <field>prime</field>
- <file>prime239v2.csv</file>
- </curve>
- <curve>
- <id>prime239v3</id>
- <bits>239</bits>
- <field>prime</field>
- <file>prime239v3.csv</file>
- </curve>
-
- <curve>
- <id>prime256v1</id>
- <bits>256</bits>
- <field>prime</field>
- <file>prime256v1.csv</file>
- </curve>
-</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime192v1.csv b/src/cz/crcs/ectester/data/x962/prime192v1.csv
deleted file mode 100644
index 07f9154..0000000
--- a/src/cz/crcs/ectester/data/x962/prime192v1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffffffffffffff,0xfffffffffffffffffffffffffffffffefffffffffffffffc,0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1,0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012,0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811,0xffffffffffffffffffffffff99def836146bc9b1b4d22831,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime192v2.csv b/src/cz/crcs/ectester/data/x962/prime192v2.csv
deleted file mode 100644
index ee6f1a2..0000000
--- a/src/cz/crcs/ectester/data/x962/prime192v2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffffffffffffff,0xfffffffffffffffffffffffffffffffefffffffffffffffc,0xcc22d6dfb95c6b25e49c0d6364a4e5980c393aa21668d953,0xeea2bae7e1497842f2de7769cfe9c989c072ad696f48034a,0x6574d11d69b6ec7a672bb82a083df2f2b0847de970b2de15,0xfffffffffffffffffffffffe5fb1a724dc80418648d8dd31,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime192v3.csv b/src/cz/crcs/ectester/data/x962/prime192v3.csv
deleted file mode 100644
index f80fd5b..0000000
--- a/src/cz/crcs/ectester/data/x962/prime192v3.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xfffffffffffffffffffffffffffffffeffffffffffffffff,0xfffffffffffffffffffffffffffffffefffffffffffffffc,0x22123dc2395a05caa7423daeccc94760a7d462256bd56916,0x7d29778100c65a1da1783716588dce2b8b4aee8e228f1896,0x38a90f22637337334b49dcb66a6dc8f9978aca7648a943b0,0xffffffffffffffffffffffff7a62d031c83f4294f640ec13,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime239v1.csv b/src/cz/crcs/ectester/data/x962/prime239v1.csv
deleted file mode 100644
index c9d704b..0000000
--- a/src/cz/crcs/ectester/data/x962/prime239v1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7fffffffffffffffffffffff7fffffffffff8000000000007fffffffffff,0x7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc,0x6b016c3bdcf18941d0d654921475ca71a9db2fb27d1d37796185c2942c0a,0x0ffa963cdca8816ccc33b8642bedf905c3d358573d3f27fbbd3b3cb9aaaf,0x7debe8e4e90a5dae6e4054ca530ba04654b36818ce226b39fccb7b02f1ae,0x7fffffffffffffffffffffff7fffff9e5e9a9f5d9071fbd1522688909d0b,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime239v2.csv b/src/cz/crcs/ectester/data/x962/prime239v2.csv
deleted file mode 100644
index 100e60b..0000000
--- a/src/cz/crcs/ectester/data/x962/prime239v2.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7fffffffffffffffffffffff7fffffffffff8000000000007fffffffffff,0x7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc,0x617fab6832576cbbfed50d99f0249c3fee58b94ba0038c7ae84c8c832f2c,0x38af09d98727705120c921bb5e9e26296a3cdcf2f35757a0eafd87b830e7,0x5b0125e4dbea0ec7206da0fc01d9b081329fb555de6ef460237dff8be4ba,0x7fffffffffffffffffffffff800000cfa7e8594377d414c03821bc582063,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime239v3.csv b/src/cz/crcs/ectester/data/x962/prime239v3.csv
deleted file mode 100644
index ce8b38a..0000000
--- a/src/cz/crcs/ectester/data/x962/prime239v3.csv
+++ /dev/null
@@ -1 +0,0 @@
-0x7fffffffffffffffffffffff7fffffffffff8000000000007fffffffffff,0x7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc,0x255705fa2a306654b1f4cb03d6a750a30c250102d4988717d9ba15ab6d3e,0x6768ae8e18bb92cfcf005c949aa2c6d94853d0e660bbf854b1c9505fe95a,0x1607e6898f390c06bc1d552bad226f3b6fcfe48b6e818499af18e3ed6cf3,0x7fffffffffffffffffffffff7fffff975deb41b3a6057c3c432146526551,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/x962/prime256v1.csv b/src/cz/crcs/ectester/data/x962/prime256v1.csv
deleted file mode 100644
index c5a2440..0000000
--- a/src/cz/crcs/ectester/data/x962/prime256v1.csv
+++ /dev/null
@@ -1 +0,0 @@
-0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff,0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc,0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b,0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296,0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5,0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551,0x1 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/reader/CardMngr.java b/src/cz/crcs/ectester/reader/CardMngr.java
deleted file mode 100644
index 0a01d9e..0000000
--- a/src/cz/crcs/ectester/reader/CardMngr.java
+++ /dev/null
@@ -1,478 +0,0 @@
-package cz.crcs.ectester.reader;
-
-import com.licel.jcardsim.io.JavaxSmartCardInterface;
-import cz.crcs.ectester.common.util.ByteUtil;
-import javacard.framework.AID;
-import javacard.framework.Applet;
-import javacard.framework.ISO7816;
-
-import javax.smartcardio.*;
-import java.util.*;
-
-/**
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardMngr {
- private CardTerminal terminal = null;
- private CardChannel channel = null;
- private Card card = null;
-
- // Simulator related attributes
- private JavaxSmartCardInterface simulator = null;
-
- private boolean simulate = false;
- private boolean verbose = true;
- private boolean chunking = false;
-
- private final byte[] selectCM = {
- (byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x07, (byte) 0xa0, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x18, (byte) 0x43, (byte) 0x4d};
-
- public static final byte OFFSET_CLA = 0x00;
- public static final byte OFFSET_INS = 0x01;
- public static final byte OFFSET_P1 = 0x02;
- public static final byte OFFSET_P2 = 0x03;
- public static final byte OFFSET_LC = 0x04;
- public static final byte OFFSET_DATA = 0x05;
- public static final byte HEADER_LENGTH = 0x05;
-
- public static final short DATA_RECORD_LENGTH = (short) 0x80; // 128B per record
- public static final short NUMBER_OF_RECORDS = (short) 0x0a; // 10 records
-
- public CardMngr() {
- }
-
- public CardMngr(boolean verbose) {
- this.verbose = verbose;
- }
-
- public CardMngr(boolean verbose, boolean simulate) {
- this(verbose);
- this.simulate = simulate;
- }
-
- private void connectWithHighest() throws CardException {
- try {
- card = terminal.connect("T=1");
- } catch (CardException ex) {
- if (verbose)
- System.out.println("T=1 failed, trying protocol '*'");
- card = terminal.connect("*");
- if (card.getProtocol().equals("T=0")) {
- chunking = true;
- }
- }
- }
-
- public boolean connectToCard() throws CardException {
- if (simulate)
- return true;
-
- // TRY ALL READERS, FIND FIRST SELECTABLE
- List<CardTerminal> terminalList = getReaderList();
-
- if (terminalList == null || terminalList.isEmpty()) {
- System.err.println("No terminals found");
- return false;
- }
-
- //List numbers of Card readers
- boolean cardFound = false;
- for (int i = 0; i < terminalList.size(); i++) {
-
- if (verbose)
- System.out.println(i + " : " + terminalList.get(i));
-
- terminal = terminalList.get(i);
- if (terminal.isCardPresent()) {
- connectWithHighest();
-
- if (verbose)
- System.out.println("card: " + card);
- channel = card.getBasicChannel();
-
- //reset the card
- if (verbose)
- System.out.println(ByteUtil.bytesToHex(card.getATR().getBytes()));
-
- cardFound = true;
- }
- }
-
- return cardFound;
- }
-
- public boolean connectToCardSelect() throws CardException {
- if (simulate)
- return true;
-
- // Test available card - if more present, let user to select one
- List<CardTerminal> terminalList = CardMngr.getReaderList();
- if (terminalList == null || terminalList.isEmpty()) {
- System.err.println("ERROR: No suitable reader with card detected. Please check your reader connection");
- return false;
- } else {
- if (terminalList.size() == 1) {
- terminal = terminalList.get(0); // return first and only reader
- } else {
- int terminalIndex = 1;
- // Let user select target terminal
- for (CardTerminal terminal : terminalList) {
- Card card;
- try {
- card = terminal.connect("*");
- ATR atr = card.getATR();
- System.out.println(terminalIndex + " : " + terminal.getName() + " - " + ByteUtil.bytesToHex(atr.getBytes()));
- terminalIndex++;
- } catch (CardException ex) {
- ex.printStackTrace(System.out);
- }
- }
- System.out.print("Select index of target reader you like to use 1.." + (terminalIndex - 1) + ": ");
- Scanner sc = new Scanner(System.in);
- int answ = sc.nextInt();
- System.out.println(String.format("%d", answ));
- answ--; // is starting with 0
- // BUGBUG; verify allowed index range
- terminal = terminalList.get(answ);
- }
- }
-
- if (terminal != null) {
- connectWithHighest();
- if (verbose)
- System.out.println("card: " + card);
- channel = card.getBasicChannel();
- }
-
- return true;
- }
-
- public boolean reconnectToCard(byte[] selectAPDU) throws CardException {
- if (simulate)
- return true;
-
- if (connected()) {
- disconnectFromCard();
- }
-
- boolean result = connectToCard();
- if (result) {
- // Select our application on card
- send(selectAPDU);
- }
- return result;
- }
-
- public boolean connected() {
- return simulate || card != null;
- }
-
- public void disconnectFromCard() throws CardException {
- if (simulate)
- return;
-
- if (card != null) {
- card.disconnect(false);
- card = null;
- }
- }
-
- public void setChunking(boolean state) {
- chunking = state;
- }
-
- public String getProtocol() {
- if (simulate) {
- return simulator.getProtocol();
- } else {
- if (card != null) {
- return card.getProtocol();
- } else {
- return null;
- }
- }
- }
-
- // Functions for CPLC taken and modified from https://github.com/martinpaljak/GlobalPlatformPro
- private static final byte CLA_GP = (byte) 0x80;
- private static final byte ISO7816_INS_GET_DATA = (byte) 0xCA;
- private static final byte[] FETCH_GP_CPLC_APDU = {CLA_GP, ISO7816_INS_GET_DATA, (byte) 0x9F, (byte) 0x7F, (byte) 0x00};
- private static final byte[] FETCH_ISO_CPLC_APDU = {ISO7816.CLA_ISO7816, ISO7816_INS_GET_DATA, (byte) 0x9F, (byte) 0x7F, (byte) 0x00};
- private static final byte[] FETCH_GP_CARDDATA_APDU = {CLA_GP, ISO7816_INS_GET_DATA, (byte) 0x00, (byte) 0x66, (byte) 0x00};
-
- public byte[] fetchCPLC() throws CardException {
- // Try CPLC via GP
- ResponseAPDU resp = send(FETCH_GP_CPLC_APDU);
- // If GP CLA fails, try with ISO
- if (resp.getSW() == (ISO7816.SW_CLA_NOT_SUPPORTED & 0xffff)) {
- resp = send(FETCH_ISO_CPLC_APDU);
- }
- if (resp.getSW() == (ISO7816.SW_NO_ERROR & 0xffff)) {
- return resp.getData();
- }
- return null;
- }
-
- public static final class CPLC {
- public enum Field {
- ICFabricator,
- ICType,
- OperatingSystemID,
- OperatingSystemReleaseDate,
- OperatingSystemReleaseLevel,
- ICFabricationDate,
- ICSerialNumber,
- ICBatchIdentifier,
- ICModuleFabricator,
- ICModulePackagingDate,
- ICCManufacturer,
- ICEmbeddingDate,
- ICPrePersonalizer,
- ICPrePersonalizationEquipmentDate,
- ICPrePersonalizationEquipmentID,
- ICPersonalizer,
- ICPersonalizationDate,
- ICPersonalizationEquipmentID
- }
-
- private Map<Field, byte[]> values = new TreeMap<>();
-
- public CPLC(byte[] data) {
- if (data == null) {
- return;
- }
- if (data.length < 3 || data[2] != 0x2A) {
- throw new IllegalArgumentException("CPLC must be 0x2A bytes long");
- }
- //offset = TLVUtils.skipTag(data, offset, (short)0x9F7F);
- short offset = 3;
- values.put(Field.ICFabricator, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICType, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.OperatingSystemID, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.OperatingSystemReleaseDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.OperatingSystemReleaseLevel, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICFabricationDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICSerialNumber, Arrays.copyOfRange(data, offset, offset + 4));
- offset += 4;
- values.put(Field.ICBatchIdentifier, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICModuleFabricator, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICModulePackagingDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICCManufacturer, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICEmbeddingDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICPrePersonalizer, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICPrePersonalizationEquipmentDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICPrePersonalizationEquipmentID, Arrays.copyOfRange(data, offset, offset + 4));
- offset += 4;
- values.put(Field.ICPersonalizer, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICPersonalizationDate, Arrays.copyOfRange(data, offset, offset + 2));
- offset += 2;
- values.put(Field.ICPersonalizationEquipmentID, Arrays.copyOfRange(data, offset, offset + 4));
- offset += 4;
- }
-
- public Map<Field, byte[]> values() {
- return values;
- }
- }
-
- public ATR getATR() {
- if (simulate) {
- return new ATR(simulator.getATR());
- } else {
- if (card != null) {
- return card.getATR();
- } else {
- return null;
- }
- }
- }
-
- public CPLC getCPLC() throws CardException {
- byte[] data = fetchCPLC();
- return new CPLC(data);
- }
-
- public static String mapCPLCField(CPLC.Field field, byte[] value) {
- switch (field) {
- case ICFabricator:
- String id = ByteUtil.bytesToHex(value, false);
- String fabricatorName = "unknown";
- if (id.equals("3060")) {
- fabricatorName = "Renesas";
- }
- if (id.equals("4090")) {
- fabricatorName = "Infineon";
- }
- if (id.equals("4180")) {
- fabricatorName = "Atmel";
- }
- if (id.equals("4250")) {
- fabricatorName = "Samsung";
- }
- if (id.equals("4790")) {
- fabricatorName = "NXP";
- }
- return id + " (" + fabricatorName + ")";
- default:
- return ByteUtil.bytesToHex(value, false);
- }
- }
-
-
- public static List<CardTerminal> getReaderList() {
- try {
- TerminalFactory factory = TerminalFactory.getDefault();
- return factory.terminals().list();
- } catch (CardException ex) {
- System.err.println("Exception : " + ex);
- return null;
- }
- }
-
- private CommandAPDU chunk(CommandAPDU apdu) throws CardException {
- if (verbose) {
- System.out.print("Chunking:");
- }
- byte[] data = apdu.getBytes();
- int numChunks = (data.length + 254) / 255;
- for (int i = 0; i < numChunks; ++i) {
- int chunkStart = i * 255;
- int chunkLength = 255;
- if (chunkStart + chunkLength > data.length) {
- chunkLength = data.length - chunkStart;
- }
- if (verbose) {
- System.out.print(" " + chunkLength);
- }
- byte[] chunk = new byte[chunkLength];
- System.arraycopy(data, chunkStart, chunk, 0, chunkLength);
- CommandAPDU cmd = new CommandAPDU(apdu.getCLA(), 0x7a, 0, 0, chunk);
- ResponseAPDU resp;
- if (simulate) {
- resp = simulator.transmitCommand(cmd);
- } else {
- resp = channel.transmit(cmd);
- }
- if ((short) resp.getSW() != ISO7816.SW_NO_ERROR) {
- throw new CardException("Chunking failed!");
- }
- }
- if (verbose)
- System.out.println();
- return new CommandAPDU(apdu.getCLA(), 0x7b, 0, 0, 0xff);
- }
-
- public ResponseAPDU sendAPDU(CommandAPDU apdu) throws CardException {
- if (verbose) {
- System.out.println(">>>>");
- System.out.println(apdu);
-
- System.out.println(ByteUtil.bytesToHex(apdu.getBytes()));
- }
-
- long elapsed;
- if (chunking && apdu.getNc() >= 0xff) {
- apdu = chunk(apdu);
- }
-
- elapsed = -System.nanoTime();
-
- ResponseAPDU responseAPDU = channel.transmit(apdu);
-
- elapsed += System.nanoTime();
-
- if (verbose) {
- System.out.println(responseAPDU);
- System.out.println(ByteUtil.bytesToHex(responseAPDU.getBytes()));
- }
-
- if (responseAPDU.getSW1() == (byte) 0x61) {
- CommandAPDU apduToSend = new CommandAPDU((byte) 0x00,
- (byte) 0xC0, (byte) 0x00, (byte) 0x00,
- responseAPDU.getSW2());
-
- responseAPDU = channel.transmit(apduToSend);
- if (verbose)
- System.out.println(ByteUtil.bytesToHex(responseAPDU.getBytes()));
- }
-
- if (verbose) {
- System.out.println("<<<<");
- System.out.println("Elapsed time (ms): " + elapsed / 1000000);
- System.out.println("---------------------------------------------------------");
- }
- return responseAPDU;
- }
-
- public ResponseAPDU sendAPDU(byte[] apdu) throws CardException {
- CommandAPDU commandAPDU = new CommandAPDU(apdu);
- return sendAPDU(commandAPDU);
- }
-
- public boolean prepareLocalSimulatorApplet(byte[] appletAIDArray, byte[] installData, Class<? extends Applet> appletClass) {
- simulator = new JavaxSmartCardInterface();
- AID appletAID = new AID(appletAIDArray, (short) 0, (byte) appletAIDArray.length);
-
- simulator.installApplet(appletAID, appletClass, installData, (short) 0, (byte) installData.length);
- return simulator.selectApplet(appletAID);
- }
-
- public ResponseAPDU sendAPDUSimulator(CommandAPDU apdu) throws CardException {
- if (verbose) {
- System.out.println(">>>>");
- System.out.println(apdu);
- System.out.println(ByteUtil.bytesToHex(apdu.getBytes()));
- }
-
- if (chunking && apdu.getNc() >= 0xff) {
- apdu = chunk(apdu);
- }
-
- ResponseAPDU response = simulator.transmitCommand(apdu);
- byte[] responseBytes = response.getBytes();
-
- if (verbose) {
- System.out.println(response);
- System.out.println(ByteUtil.bytesToHex(responseBytes));
- System.out.println("<<<<");
- }
-
- return response;
- }
-
- public ResponseAPDU sendAPDUSimulator(byte[] apdu) throws CardException {
- CommandAPDU commandAPDU = new CommandAPDU(apdu);
- return sendAPDUSimulator(commandAPDU);
- }
-
- public ResponseAPDU send(CommandAPDU apdu) throws CardException {
- ResponseAPDU response;
- if (simulate) {
- response = sendAPDUSimulator(apdu);
- } else {
- response = sendAPDU(apdu);
- }
- return response;
- }
-
- public ResponseAPDU send(byte[] apdu) throws CardException {
- CommandAPDU commandAPDU = new CommandAPDU(apdu);
- return send(commandAPDU);
- }
-}
diff --git a/src/cz/crcs/ectester/reader/ECTesterReader.java b/src/cz/crcs/ectester/reader/ECTesterReader.java
deleted file mode 100644
index fdfb4cb..0000000
--- a/src/cz/crcs/ectester/reader/ECTesterReader.java
+++ /dev/null
@@ -1,1104 +0,0 @@
-/*
- * ECTester, tool for testing Elliptic curve cryptography implementations.
- * Copyright (c) 2016-2019 Petr Svenda <petr@svenda.com>
- * Copyright (c) 2016-2019 Jan Jancar <johny@neuromancer.sk>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-package cz.crcs.ectester.reader;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.cli.CLITools;
-import cz.crcs.ectester.common.cli.Colors;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.OutputLogger;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.util.Util;
-import cz.crcs.ectester.common.util.*;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.output.FileTestWriter;
-import cz.crcs.ectester.reader.output.ResponseWriter;
-import cz.crcs.ectester.reader.response.Response;
-import cz.crcs.ectester.reader.test.*;
-import javacard.framework.ISO7816;
-import javacard.security.KeyPair;
-import org.apache.commons.cli.*;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import javax.smartcardio.CardException;
-import javax.smartcardio.ResponseAPDU;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.*;
-import java.math.BigInteger;
-import java.net.URL;
-import java.nio.file.Files;
-import java.security.Security;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-import java.util.jar.Manifest;
-
-import static cz.crcs.ectester.applet.EC_Consts.KeyAgreement_ALG_EC_SVDP_DH;
-import static cz.crcs.ectester.applet.EC_Consts.Signature_ALG_ECDSA_SHA;
-
-/**
- * Reader part of ECTester, a tool for testing Elliptic curve support on javacards.
- *
- * @author Petr Svenda petr@svenda.com
- * @author Jan Jancar johny@neuromancer.sk
- * @version v0.3.3
- */
-public class ECTesterReader {
- private CardMngr cardManager;
- private OutputLogger logger;
- private ResponseWriter respWriter;
- private Config cfg;
-
- private Options opts = new Options();
- public static final String VERSION = "v0.3.3";
- public static String GIT_COMMIT = "";
- private static String DESCRIPTION;
- private static String LICENSE = "MIT Licensed\nCopyright © 2016-2019 Petr Svenda <petr@svenda.com>\nCopyright © 2016-2019 Jan Jancar <johny@neuromancer.sk>";
- private static String CLI_HEADER;
- private static String CLI_FOOTER = "\n" + LICENSE;
-
- private static final byte[] SELECT_PREFIX = {(byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x0c};
- private static final byte[] AID_PREFIX = {(byte) 0x45, (byte) 0x43, (byte) 0x54, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x72};
- private static final byte[] AID_CURRENT_VERSION = {(byte) 0x30, (byte) 0x33, (byte) 0x33}; // VERSION v0.3.3
- private static final byte[] AID_SUFFIX_221 = {(byte) 0x62};
- private static final byte[] AID_SUFFIX_222 = {(byte) 0x78};
- private static final byte[] INSTALL_DATA = new byte[10];
- private static final int TRY_VERSIONS = 10;
-
- static {
- ClassLoader cl = ECTesterReader.class.getClassLoader();
- try {
- URL url = cl.getResource("META-INF/MANIFEST.MF");
- Manifest manifest = new Manifest(url.openStream());
- String commit = manifest.getMainAttributes().getValue("Git-Commit");
- GIT_COMMIT = (commit == null) ? "" : "(git " + commit + ")";
- } catch (Exception ignored) {
- }
-
- DESCRIPTION = "ECTesterReader " + VERSION + GIT_COMMIT + ", a javacard Elliptic Curve Cryptography support tester/utility.";
- CLI_HEADER = "\n" + DESCRIPTION + "\n\n";
- }
-
- private void run(String[] args) {
- try {
- CommandLine cli = parseArgs(args);
-
- cfg = new Config();
- boolean optsOk = cfg.readOptions(cli);
-
- //if help, print and quit
- if (cli.hasOption("help")) {
- CLITools.help("ECTesterReader.jar", CLI_HEADER, opts, CLI_FOOTER, true);
- return;
- } else if (cli.hasOption("version")) {
- CLITools.version(DESCRIPTION, LICENSE);
- return;
- }
-
- //if opts failed, quit
- if (!optsOk) {
- return;
- }
-
- //if list, print and quit
- if (cli.hasOption("list-named")) {
- CLITools.listNamed(EC_Store.getInstance(), cli.getOptionValue("list-named"));
- return;
- }
-
- if (cli.hasOption("list-suites")) {
- listSuites();
- return;
- }
-
- //init CardManager
- cardManager = new CardMngr(cfg.verbose, cfg.simulate);
-
- //connect or simulate connection
- if (cfg.simulate) {
- if (!cardManager.prepareLocalSimulatorApplet(ByteUtil.concatenate(AID_PREFIX, AID_CURRENT_VERSION, AID_SUFFIX_221), INSTALL_DATA, ECTesterApplet.class)) {
- System.err.println(Colors.error("Failed to establish a simulator."));
- System.exit(1);
- } else {
- cardManager.setChunking(true);
- }
- } else {
- if (!cardManager.connectToCardSelect()) {
- System.err.println(Colors.error("Failed to connect to card."));
- System.exit(1);
- }
- //Try the highest known version first
- byte[] versionByte = AID_CURRENT_VERSION.clone();
- boolean selected = false;
- for (int i = 0; i < TRY_VERSIONS; ++i) {
- byte[] select222 = ByteUtil.concatenate(SELECT_PREFIX, AID_PREFIX, versionByte, AID_SUFFIX_222);
- ResponseAPDU selectResp = cardManager.send(select222);
- if ((short) selectResp.getSW() != ISO7816.SW_NO_ERROR) {
- byte[] select221 = ByteUtil.concatenate(SELECT_PREFIX, AID_PREFIX, versionByte, AID_SUFFIX_221);
- selectResp = cardManager.send(select221);
- if ((short) selectResp.getSW() == ISO7816.SW_NO_ERROR) {
- cardManager.setChunking(true);
- selected = true;
- break;
- }
- } else {
- selected = true;
- break;
- }
- // Count down by versions
- if (versionByte[2] == 0x30) {
- if (versionByte[1] == 0x30) {
- if (versionByte[0] == 0x30) {
- break;
- } else {
- versionByte[0]--;
- versionByte[1] = 0x39;
- versionByte[2] = 0x39;
- }
- } else {
- versionByte[1]--;
- versionByte[2] = 0x39;
- }
- } else {
- versionByte[2]--;
- }
- }
- if (!selected) {
- System.err.println(Colors.error("Failed to select ECTester applet, is it installed?"));
- cardManager.disconnectFromCard();
- System.exit(1);
- }
- }
-
- // Setup logger and respWriter
- logger = new OutputLogger(true, cfg.log);
- respWriter = new ResponseWriter(logger.getPrintStream());
-
- // Try adding the BouncyCastleProvider, which might be used in some parts of ECTester.
- try {
- Security.addProvider(new BouncyCastleProvider());
- } catch (SecurityException | NoClassDefFoundError ignored) {
- }
- // Make BouncyCastle more lenient when we work with signatures in ASN.1 DER format,
- // cards sometimes are not fully compliant.
- System.setProperty("org.bouncycastle.asn1.allow_unsafe_integer", "true");
-
- //do action
- if (cli.hasOption("export")) {
- export();
- } else if (cli.hasOption("generate")) {
- generate();
- } else if (cli.hasOption("test")) {
- test();
- } else if (cli.hasOption("ecdh") || cli.hasOption("ecdhc")) {
- ecdh();
- } else if (cli.hasOption("ecdsa")) {
- ecdsa();
- } else if (cli.hasOption("info")) {
- info();
- }
-
- //disconnect
- cardManager.disconnectFromCard();
- logger.close();
-
- } catch (MissingOptionException moex) {
- System.err.println(Colors.error("Missing required options, one of:"));
- for (Object opt : moex.getMissingOptions().toArray()) {
- if (opt instanceof OptionGroup) {
- for (Option o : ((OptionGroup) opt).getOptions()) {
- System.err.print("-" + o.getOpt());
-
- if (o.hasLongOpt()) {
- System.err.print("\t/ --" + o.getLongOpt() + " ");
- }
-
- if (o.hasArg()) {
- if (o.hasOptionalArg()) {
- System.err.print("[" + o.getArgName() + "] ");
- } else {
- System.err.print("<" + o.getArgName() + "> ");
- }
- }
-
- if (o.getDescription() != null) {
- System.err.print("\t\t\t" + o.getDescription());
- }
- System.err.println();
- }
- } else if (opt instanceof String) {
- System.err.println(opt);
- }
- }
- } catch (MissingArgumentException maex) {
- System.err.println(Colors.error("Option, " + maex.getOption().getOpt() + " requires an argument: " + maex.getOption().getArgName()));
- } catch (NumberFormatException nfex) {
- System.err.println(Colors.error("Not a number. " + nfex.getMessage()));
- } catch (FileNotFoundException fnfe) {
- System.err.println(Colors.error("File " + fnfe.getMessage() + " not found."));
- } catch (ParseException | IOException ex) {
- System.err.println(Colors.error(ex.getMessage()));
- } catch (CardException ex) {
- if (logger != null)
- logger.println(ex.getMessage());
- ex.printStackTrace();
- } catch (ParserConfigurationException e) {
- e.printStackTrace();
- } finally {
- if (logger != null)
- logger.flush();
- }
- }
-
- /**
- * Parses command-line options.
- *
- * @param args cli arguments
- * @return parsed CommandLine object
- * @throws ParseException if there are any problems encountered while parsing the command line tokens
- */
- private CommandLine parseArgs(String[] args) throws ParseException {
- OptionGroup actions = new OptionGroup();
- actions.setRequired(true);
- actions.addOption(Option.builder("V").longOpt("version").desc("Print version info.").build());
- actions.addOption(Option.builder("h").longOpt("help").desc("Print help.").build());
- actions.addOption(Option.builder("ln").longOpt("list-named").desc("Print the list of supported named curves and keys.").hasArg().argName("what").optionalArg(true).build());
- actions.addOption(Option.builder("ls").longOpt("list-suites").desc("List supported test suites.").build());
- actions.addOption(Option.builder("e").longOpt("export").desc("Export the defaut curve parameters of the card(if any).").build());
- actions.addOption(Option.builder("g").longOpt("generate").desc("Generate <amount> of EC keys.").hasArg().argName("amount").optionalArg(true).build());
- actions.addOption(Option.builder("t").longOpt("test").desc("Test ECC support. Optionally specify a test number to run only a part of a test suite. <test_suite>:\n- default\n- compression\n- invalid\n- twist\n- degenerate\n- cofactor\n- wrong\n- signature\n- composite\n- test-vectors\n- edge-cases\n- miscellaneous").hasArg().argName("test_suite[:from[:to]]").optionalArg(true).build());
- actions.addOption(Option.builder("dh").longOpt("ecdh").desc("Do EC KeyAgreement (ECDH...), [count] times.").hasArg().argName("count").optionalArg(true).build());
- actions.addOption(Option.builder("dsa").longOpt("ecdsa").desc("Sign data with ECDSA, [count] times.").hasArg().argName("count").optionalArg(true).build());
- actions.addOption(Option.builder("nf").longOpt("info").desc("Get applet info.").build());
-
- opts.addOptionGroup(actions);
-
- opts.addOption(Option.builder("b").longOpt("bit-size").desc("Set curve size.").hasArg().argName("bits").build());
- opts.addOption(Option.builder("fp").longOpt("prime-field").desc("Use a prime field.").build());
- opts.addOption(Option.builder("f2m").longOpt("binary-field").desc("Use a binary field.").build());
-
- OptionGroup curve = new OptionGroup();
- curve.addOption(Option.builder("nc").longOpt("named-curve").desc("Use a named curve, from CurveDB: <cat/id>").hasArg().argName("cat/id").build());
- curve.addOption(Option.builder("c").longOpt("curve").desc("Use curve from file <curve_file> (field,a,b,gx,gy,r,k).").hasArg().argName("curve_file").build());
- curve.addOption(Option.builder("u").longOpt("custom").desc("Use a custom curve (applet-side embedded, SECG curves).").build());
- opts.addOptionGroup(curve);
-
- OptionGroup pub = new OptionGroup();
- pub.addOption(Option.builder("npub").longOpt("named-public").desc("Use public key from KeyDB: <cat/id>").hasArg().argName("cat/id").build());
- pub.addOption(Option.builder("pub").longOpt("public").desc("Use public key from file <pubkey_file> (wx,wy).").hasArg().argName("pubkey_file").build());
- opts.addOptionGroup(pub);
-
- OptionGroup priv = new OptionGroup();
- priv.addOption(Option.builder("npriv").longOpt("named-private").desc("Use private key from KeyDB: <cat/id>").hasArg().argName("cat/id").build());
- priv.addOption(Option.builder("priv").longOpt("private").desc("Use private key from file <privkey_file> (s).").hasArg().argName("privkey_file").build());
- opts.addOptionGroup(priv);
-
- OptionGroup key = new OptionGroup();
- key.addOption(Option.builder("nk").longOpt("named-key").desc("Use keyPair from KeyDB: <cat/id>").hasArg().argName("cat/id").build());
- key.addOption(Option.builder("k").longOpt("key").desc("Use keyPair from file <key_file> (wx,wy,s).").hasArg().argName("key_file").build());
- opts.addOptionGroup(key);
-
- opts.addOption(Option.builder("i").longOpt("input").desc("Input from file <input_file>, for ECDSA signing.").hasArg().argName("input_file").build());
- opts.addOption(Option.builder("o").longOpt("output").desc("Output into file <output_file>. The file can be prefixed by the format (one of text,yml,xml), such as: xml:<output_file>.").hasArgs().argName("output_file").build());
- opts.addOption(Option.builder("l").longOpt("log").desc("Log output into file [log_file].").hasArg().argName("log_file").optionalArg(true).build());
- opts.addOption(Option.builder("v").longOpt("verbose").desc("Turn on verbose logging.").build());
- opts.addOption(Option.builder().longOpt("format").desc("Output format to use. One of: text,yml,xml.").hasArg().argName("format").build());
-
- opts.addOption(Option.builder("kb").longOpt("key-builder").desc("Allocate KeyPair using KeyBuilder.").build());
- opts.addOption(Option.builder().longOpt("fixed").desc("Generate key(s) only once, keep them for later operations.").build());
- opts.addOption(Option.builder().longOpt("fixed-private").desc("Generate private key only once, keep it for later ECDH.").build());
- opts.addOption(Option.builder().longOpt("fixed-public").desc("Generate public key only once, keep it for later ECDH.").build());
- opts.addOption(Option.builder("f").longOpt("fresh").desc("Generate fresh keys (set domain parameters before every generation).").build());
- opts.addOption(Option.builder().longOpt("time").desc("Output better timing values, by running command in dry run mode and normal mode, and subtracting the two.").build());
- opts.addOption(Option.builder().longOpt("time-unit").desc("Use given time unit in measurement, one of: milli, micro, nano.").hasArg().argName("unit").build());
- opts.addOption(Option.builder().longOpt("cleanup").desc("Send the cleanup command trigerring JCSystem.requestObjectDeletion() after some operations.").build());
- opts.addOption(Option.builder("s").longOpt("simulate").desc("Simulate a card with jcardsim instead of using a terminal.").build());
- opts.addOption(Option.builder("y").longOpt("yes").desc("Accept all warnings and prompts.").build());
- opts.addOption(Option.builder("to").longOpt("test-options").desc("Test options to use:\n- preset: Use preset semi-random private keys (derived from curve) instead of generating keypairs on the cards when the test needs one.\n- random: Use fully random private keys instead of generating keypairs.").hasArg().argName("options").build());
-
- opts.addOption(Option.builder("ka").longOpt("ka-type").desc("Set KeyAgreement object [type], corresponds to JC.KeyAgreement constants.").hasArg().argName("type").optionalArg(true).build());
- opts.addOption(Option.builder("sig").longOpt("sig-type").desc("Set Signature object [type], corresponds to JC.Signature constants.").hasArg().argName("type").optionalArg(true).build());
- opts.addOption(Option.builder("C").longOpt("color").desc("Print stuff with color, requires ANSI terminal.").build());
-
- CommandLineParser parser = new DefaultParser();
- return parser.parse(opts, args);
- }
-
- private void listSuites() {
- CardTestSuite[] suites = new CardTestSuite[]{
- new CardDefaultSuite(null, null, null),
- new CardTestVectorSuite(null, null, null),
- new CardCompressionSuite(null, null, null),
- new CardWrongSuite(null, null, null),
- new CardDegenerateSuite(null, null, null),
- new CardCofactorSuite(null, null, null),
- new CardCompositeSuite(null, null, null),
- new CardInvalidSuite(null, null, null),
- new CardEdgeCasesSuite(null, null, null),
- new CardSignatureSuite(null, null, null),
- new CardTwistSuite(null, null, null),
- new CardMiscSuite(null, null, null)};
- for (CardTestSuite suite : suites) {
- System.out.println(" - " + Colors.bold(suite.getName()));
- for (String line : suite.getDescription()) {
- System.out.println("\t" + line);
- }
- if (suite.getOptions() != null) {
- System.out.println("\t" + Colors.underline("Options:") + " " + Arrays.toString(suite.getOptions()));
- }
- }
- System.out.println();
- System.out.println("For more information, look at the documentation at https://github.com/crocs-muni/ECTester.");
- }
-
- private void info() throws CardException {
- Response.GetInfo info = new Command.GetInfo(cardManager).send();
- System.out.println(String.format("Card ATR:\t\t\t\t%s", ByteUtil.bytesToHex(cardManager.getATR().getBytes(), false)));
- System.out.println(String.format("Card protocol:\t\t\t\t%s", cardManager.getProtocol()));
- System.out.println(String.format("ECTester applet version:\t\t%s", info.getVersion()));
- System.out.println(String.format("ECTester applet APDU support:\t\t%s", (info.getBase() == ECTesterApplet.BASE_221) ? "basic" : "extended length"));
- System.out.println(String.format("JavaCard API version:\t\t\t%.1f", info.getJavaCardVersion()));
- System.out.println(String.format("JavaCard supports system cleanup:\t%s", info.getCleanupSupport()));
- System.out.println(String.format("Array sizes (apduBuf,ram,ram2,apduArr):\t%d %d %d %d", info.getApduBufferLength(), info.getRamArrayLength(), info.getRamArray2Length(), info.getApduArrayLength()));
- }
-
- /**
- * Exports default card/simulation EC domain parameters to output file.
- *
- * @throws CardException if APDU transmission fails
- * @throws IOException if an IO error occurs when writing to key file.
- */
- private void export() throws CardException, IOException {
- byte keyClass = cfg.primeField ? KeyPair.ALG_EC_FP : KeyPair.ALG_EC_F2M;
-
- List<Response> sent = new LinkedList<>();
- sent.add(new Command.Allocate(cardManager, ECTesterApplet.KEYPAIR_LOCAL, cfg.keyBuilder, cfg.bits, keyClass).send());
- //sent.add(new Command.Clear(cardManager, ECTesterApplet.KEYPAIR_LOCAL).send());
- sent.add(new Command.Generate(cardManager, ECTesterApplet.KEYPAIR_LOCAL).send());
-
- // Also support exporting set parameters, to verify they are set correctly.
- Command curve = Command.prepareCurve(cardManager, cfg, ECTesterApplet.KEYPAIR_LOCAL, cfg.bits, keyClass);
- if (curve != null) {
- sent.add(curve.send());
- }
-
- // Cofactor generally isn't set on the default curve parameters on cards,
- // since its not necessary for ECDH, only ECDHC which not many cards implement
- // TODO: check if its assumend to be == 1?
- short domain = cfg.primeField ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M;
- Response.Export export = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_PUBLIC, domain).send();
- if (!export.successful()) {
- domain = (short) (domain ^ EC_Consts.PARAMETER_K);
- export = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_PUBLIC, domain).send();
- }
- sent.add(export);
-
- for (Response r : sent) {
- respWriter.outputResponse(r);
- }
- if (cfg.cleanup) {
- Response cleanup = new Command.Cleanup(cardManager).send();
- respWriter.outputResponse(cleanup);
- }
-
- PrintStream out = new PrintStream(FileUtil.openStream(cfg.outputs));
- byte[][] params = export.getParams();
- for (int i = 0; i < params.length; ++i) {
- out.print(ByteUtil.bytesToHex(params[i], false));
- if (i != params.length - 1) {
- out.print(",");
- }
- }
- out.close();
- }
-
- /**
- * Generates EC keyPairs and outputs them to output file.
- *
- * @throws CardException if APDU transmission fails
- * @throws IOException if an IO error occurs when writing to key file.
- */
- private void generate() throws CardException, IOException {
- byte keyClass = cfg.primeField ? KeyPair.ALG_EC_FP : KeyPair.ALG_EC_F2M;
- Command curve = Command.prepareCurve(cardManager, cfg, ECTesterApplet.KEYPAIR_LOCAL, cfg.bits, keyClass);
-
- Response allocate = new Command.Allocate(cardManager, ECTesterApplet.KEYPAIR_LOCAL, cfg.keyBuilder, cfg.bits, keyClass).send();
- respWriter.outputResponse(allocate);
-
- OutputStreamWriter keysFile = FileUtil.openFiles(cfg.outputs);
- keysFile.write(String.format("index;genTime[%s];exportTime[%s];pubW;privS\n", cfg.timeUnit, cfg.timeUnit));
-
- int generated = 0;
- int retry = 0;
- while (generated < cfg.generateAmount || cfg.generateAmount == 0) {
- if ((cfg.fresh || generated == 0) && curve != null) {
- Response fresh = curve.send();
- respWriter.outputResponse(fresh);
- }
-
- Command.Generate generate = new Command.Generate(cardManager, ECTesterApplet.KEYPAIR_LOCAL);
- long time = 0;
- if (cfg.time) {
- time = -Command.dryRunTime(cardManager, generate, 2, respWriter);
- }
- Response.Generate response = generate.send();
- time += response.getDuration();
- respWriter.outputResponse(response);
-
- Response.Export export = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_BOTH, EC_Consts.PARAMETERS_KEYPAIR).send();
- respWriter.outputResponse(export);
-
- if (!response.successful() || !export.successful()) {
- if (retry < 10) {
- retry++;
- continue;
- } else {
- System.err.println(Colors.error("Keys could not be generated/exported."));
- break;
- }
- }
-
- String pub = ByteUtil.bytesToHex(export.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_W), false);
- String priv = ByteUtil.bytesToHex(export.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_S), false);
- String line = String.format("%d;%d;%d;%s;%s\n", generated, Util.convertTime(time, cfg.timeUnit), Util.convertTime(export.getDuration(), cfg.timeUnit), pub, priv);
- keysFile.write(line);
- keysFile.flush();
- generated++;
- }
- if (cfg.cleanup) {
- Response cleanup = new Command.Cleanup(cardManager).send();
- respWriter.outputResponse(cleanup);
- }
-
- keysFile.close();
- }
-
- /**
- * Tests Elliptic curve support for a given curve/curves.
- *
- * @throws IOException if an IO error occurs
- */
- private void test() throws ParserConfigurationException, IOException {
- TestWriter writer = new FileTestWriter(cfg.format, true, cfg.outputs);
-
- CardTestSuite suite;
-
- switch (cfg.testSuite) {
- case "default":
- suite = new CardDefaultSuite(writer, cfg, cardManager);
- break;
- case "test-vectors":
- suite = new CardTestVectorSuite(writer, cfg, cardManager);
- break;
- case "compression":
- suite = new CardCompressionSuite(writer, cfg, cardManager);
- break;
- case "miscellaneous":
- suite = new CardMiscSuite(writer, cfg, cardManager);
- break;
- case "signature":
- suite = new CardSignatureSuite(writer, cfg, cardManager);
- break;
- default:
- // These run are dangerous, prompt before them.
- System.out.println("The test you selected (" + cfg.testSuite + ") is potentially dangerous.");
- System.out.println("Some of these run have caused temporary(or even permanent) DoS of some cards.");
- if (!cfg.yes) {
- System.out.print("Do you want to proceed? (y/n): ");
- Scanner in = new Scanner(System.in);
- String confirmation = in.nextLine().toLowerCase();
- if (!Arrays.asList("yes", "y").contains(confirmation)) {
- return;
- }
- in.close();
- }
- switch (cfg.testSuite) {
- case "wrong":
- suite = new CardWrongSuite(writer, cfg, cardManager);
- break;
- case "composite":
- suite = new CardCompositeSuite(writer, cfg, cardManager);
- break;
- case "invalid":
- suite = new CardInvalidSuite(writer, cfg, cardManager);
- break;
- case "degenerate":
- suite = new CardDegenerateSuite(writer, cfg, cardManager);
- break;
- case "twist":
- suite = new CardTwistSuite(writer, cfg, cardManager);
- break;
- case "cofactor":
- suite = new CardCofactorSuite(writer, cfg, cardManager);
- break;
- case "edge-cases":
- suite = new CardEdgeCasesSuite(writer, cfg, cardManager);
- break;
- default:
- System.err.println(Colors.error("Unknown test suite."));
- return;
- }
- break;
- }
-
- suite.run(cfg.testFrom, cfg.testTo);
- }
-
- /**
- * Performs ECDH key exchange.
- *
- * @throws CardException if APDU transmission fails
- * @throws IOException if an IO error occurs when writing to key file.
- */
- private void ecdh() throws IOException, CardException {
- byte keyClass = cfg.primeField ? KeyPair.ALG_EC_FP : KeyPair.ALG_EC_F2M;
- Command curve = Command.prepareCurve(cardManager, cfg, ECTesterApplet.KEYPAIR_BOTH, cfg.bits, keyClass);
- List<Response> prepare = new LinkedList<>();
- prepare.add(new Command.AllocateKeyAgreement(cardManager, cfg.ECKAType).send()); // Prepare KeyAgreement or required type
- prepare.add(new Command.Allocate(cardManager, ECTesterApplet.KEYPAIR_BOTH, cfg.keyBuilder, cfg.bits, keyClass).send());
- if (curve != null)
- prepare.add(curve.send());
-
- for (Response r : prepare) {
- respWriter.outputResponse(r);
- }
-
- OutputStreamWriter out = null;
- if (cfg.outputs != null) {
- out = FileUtil.openFiles(cfg.outputs);
- out.write(String.format("index;time[%s];pubW;privS;secret[%s]\n", cfg.timeUnit, CardUtil.getKexHashName(cfg.ECKAType)));
- }
-
- Response gen = new Command.Generate(cardManager, ECTesterApplet.KEYPAIR_BOTH).send();
- respWriter.outputResponse(gen);
- if (cfg.anyPublicKey || cfg.anyKey) {
- Response prep = Command.prepareKey(cardManager, EC_Store.getInstance(), cfg, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.PARAMETER_W).send();
- respWriter.outputResponse(prep);
- }
- if (cfg.anyPrivateKey || cfg.anyKey) {
- Response prep = Command.prepareKey(cardManager, EC_Store.getInstance(), cfg, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_S).send();
- respWriter.outputResponse(prep);
- }
-
- byte kp = ECTesterApplet.KEYPAIR_BOTH;
- if (cfg.fixedPrivate || cfg.anyPrivateKey) {
- kp ^= ECTesterApplet.KEYPAIR_LOCAL;
- }
- if (cfg.fixedPublic || cfg.anyPublicKey) {
- kp ^= ECTesterApplet.KEYPAIR_REMOTE;
- }
- if (cfg.fixedKey || cfg.anyKey) {
- kp = 0;
- }
-
- Command generate = null;
- if (kp != 0) {
- generate = new Command.Generate(cardManager, kp);
- }
-
- int retry = 0;
- int done = 0;
- while (done < cfg.ECKACount || cfg.ECKACount == 0) {
- if (generate != null) {
- Response regen = generate.send();
- respWriter.outputResponse(regen);
- }
-
- Response.Export exportRemote = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.KEY_PUBLIC, EC_Consts.PARAMETER_W).send();
- respWriter.outputResponse(exportRemote);
- Response.Export exportLocal = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_PRIVATE, EC_Consts.PARAMETER_S).send();
- respWriter.outputResponse(exportLocal);
- byte[] pubkey_bytes = exportRemote.getParameter(ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.PARAMETER_W);
- byte[] privkey_bytes = exportLocal.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_S);
-
- Command.ECDH perform = new Command.ECDH(cardManager, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, cfg.ECKAType);
-
- long time = 0;
- if (cfg.time) {
- time = -Command.dryRunTime(cardManager, perform, 2, respWriter);
- }
-
- Response.ECDH result = perform.send();
- respWriter.outputResponse(result);
-
- if (!result.successful() || !result.hasSecret()) {
- if (retry < 10) {
- ++retry;
- continue;
- } else {
- System.err.println(Colors.error("Couldn't obtain ECDH secret from card response."));
- break;
- }
- }
-
- if (out != null) {
- time += result.getDuration();
-
- out.write(String.format("%d;%d;%s;%s;%s\n", done, Util.convertTime(time, cfg.timeUnit), ByteUtil.bytesToHex(pubkey_bytes, false), ByteUtil.bytesToHex(privkey_bytes, false), ByteUtil.bytesToHex(result.getSecret(), false)));
- out.flush();
- }
-
- ++done;
- }
- if (cfg.cleanup) {
- Response cleanup = new Command.Cleanup(cardManager).send();
- respWriter.outputResponse(cleanup);
- }
-
- if (out != null)
- out.close();
- }
-
- /**
- * Performs ECDSA signature, on random or provided data.
- *
- * @throws CardException if APDU transmission fails
- * @throws IOException if an IO error occurs when writing to key file.
- */
- private void ecdsa() throws CardException, IOException {
- //read file, if asked to sign
- byte[] data;
- if (cfg.input != null) {
- File in = new File(cfg.input);
- long len = in.length();
- if (len == 0) {
- throw new FileNotFoundException(cfg.input);
- }
- data = Files.readAllBytes(in.toPath());
- } else {
- Random rand = new Random();
- data = new byte[32];
- rand.nextBytes(data);
- }
-
- Command generate;
- if (cfg.anyKeypart) {
- generate = Command.prepareKey(cardManager, EC_Store.getInstance(), cfg, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETERS_KEYPAIR);
- } else {
- generate = new Command.Generate(cardManager, ECTesterApplet.KEYPAIR_LOCAL);
- }
-
- byte keyClass = cfg.primeField ? KeyPair.ALG_EC_FP : KeyPair.ALG_EC_F2M;
- List<Response> prepare = new LinkedList<>();
- prepare.add(new Command.AllocateSignature(cardManager, cfg.ECDSAType).send());
- prepare.add(new Command.Allocate(cardManager, ECTesterApplet.KEYPAIR_LOCAL, cfg.keyBuilder, cfg.bits, keyClass).send());
- Command curve = Command.prepareCurve(cardManager, cfg, ECTesterApplet.KEYPAIR_LOCAL, cfg.bits, keyClass);
- if (curve != null)
- prepare.add(curve.send());
-
- for (Response r : prepare) {
- respWriter.outputResponse(r);
- }
-
- OutputStreamWriter out = FileUtil.openFiles(cfg.outputs);
- if (out != null) {
- out.write(String.format("index;signTime[%s];verifyTime[%s];data;pubW;privS;signature[%s];nonce;valid\n", cfg.timeUnit, cfg.timeUnit, CardUtil.getSigHashAlgo(cfg.ECDSAType)));
- }
-
- Command.Export export = new Command.Export(cardManager, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_BOTH, EC_Consts.PARAMETERS_KEYPAIR);
- Response.Export exported = null;
- if (cfg.fixedKey) {
- respWriter.outputResponse(generate.send());
- exported = export.send();
- respWriter.outputResponse(exported);
- }
-
- int retry = 0;
- int done = 0;
- while (done < cfg.ECDSACount || cfg.ECDSACount == 0) {
- if (!cfg.fixedKey) {
- respWriter.outputResponse(generate.send());
- exported = export.send();
- respWriter.outputResponse(exported);
- }
-
- Command.ECDSA_sign sign = new Command.ECDSA_sign(cardManager, ECTesterApplet.KEYPAIR_LOCAL, cfg.ECDSAType, ECTesterApplet.EXPORT_TRUE, data);
-
- long signTime = 0;
- if (cfg.time) {
- signTime = -Command.dryRunTime(cardManager, sign, 2, respWriter);
- }
-
- Response.ECDSA signResp = sign.send();
- signTime += signResp.getDuration();
- respWriter.outputResponse(signResp);
- if (!signResp.successful() || !signResp.hasSignature()) {
- if (retry < 10) {
- ++retry;
- continue;
- } else {
- System.err.println(Colors.error("Couldn't obtain ECDSA signature from card response."));
- break;
- }
- }
- byte[] signature = signResp.getSignature();
- Command.ECDSA_verify verify = new Command.ECDSA_verify(cardManager, ECTesterApplet.KEYPAIR_LOCAL, cfg.ECDSAType, data, signature);
- long verifyTime = 0;
- if (cfg.time) {
- verifyTime = -Command.dryRunTime(cardManager, verify, 2, respWriter);
- }
- Response.ECDSA verifyResp = verify.send();
- verifyTime += verifyResp.getDuration();
- respWriter.outputResponse(verifyResp);
-
- if (verifyResp.error()) {
- if (retry < 10) {
- ++retry;
- continue;
- } else {
- System.err.println(Colors.error("Couldn't obtain ECDSA signature from card response."));
- break;
- }
- }
-
- if (out != null) {
- String pub = ByteUtil.bytesToHex(exported.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_W), false);
- String priv = ByteUtil.bytesToHex(exported.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_S), false);
- String dataString = (cfg.input != null) ? "" : ByteUtil.bytesToHex(data, false);
- BigInteger privkey = new BigInteger(1, exported.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_S));
- EC_Curve actualCurve = Command.findCurve(cfg, cfg.bits, keyClass);
- String k = "";
- if (actualCurve != null) {
- ECParameterSpec params = actualCurve.toSpec();
- BigInteger kValue = ECUtil.recoverSignatureNonce(signature, data, privkey, params, CardUtil.getSigHashName(cfg.ECDSAType), "ECDSA");
- if (kValue != null) {
- k = ByteUtil.bytesToHex(kValue.toByteArray(), false);
- }
- }
- out.write(String.format("%d;%d;%d;%s;%s;%s;%s;%s;%d\n", done, Util.convertTime(signTime, cfg.timeUnit), Util.convertTime(verifyTime, cfg.timeUnit), dataString, pub, priv, ByteUtil.bytesToHex(signature, false), k, verifyResp.successful() ? 1 : 0));
- out.flush();
- }
-
- ++done;
- }
- if (cfg.cleanup) {
- Response cleanup = new Command.Cleanup(cardManager).send();
- respWriter.outputResponse(cleanup);
- }
- if (out != null)
- out.close();
- }
-
- public static void main(String[] args) {
- ECTesterReader app = new ECTesterReader();
- app.run(args);
- }
-
- public static class Config {
-
- //Options
- public short bits;
- public boolean all;
- public boolean primeField = false;
- public boolean binaryField = false;
-
-
- public String namedCurve;
- public String curveFile;
- public boolean customCurve = false;
-
- public boolean anyPublicKey = false;
- public String namedPublicKey;
- public String publicKey;
-
- public boolean anyPrivateKey = false;
- public String namedPrivateKey;
- public String privateKey;
-
- public boolean anyKey = false;
- public String namedKey;
- public String key;
-
- public boolean anyKeypart = false;
- public boolean fixedKey = false;
- public boolean fixedPrivate = false;
- public boolean fixedPublic = false;
- public byte keyBuilder;
-
- public String log;
-
- public boolean verbose = false;
- public String input;
- public String[] outputs;
- public boolean fresh = false;
- public boolean time = false;
- public String timeUnit;
- public boolean cleanup = false;
- public boolean simulate = false;
- public boolean yes = false;
- public String format;
- public boolean color;
-
- //Action-related options
- public String listNamed;
- public String testSuite;
- public int testFrom;
- public int testTo;
- public int generateAmount;
- public int ECKACount;
- public byte ECKAType = KeyAgreement_ALG_EC_SVDP_DH;
- public int ECDSACount;
- public byte ECDSAType = Signature_ALG_ECDSA_SHA;
- public Set<String> testOptions;
-
- /**
- * Reads and validates options, also sets defaults.
- *
- * @param cli cli object, with parsed args
- * @return whether the options are valid.
- */
- boolean readOptions(CommandLine cli) {
- bits = Short.parseShort(cli.getOptionValue("bit-size", "0"));
- all = cli.hasOption("all");
- primeField = cli.hasOption("fp");
- binaryField = cli.hasOption("f2m");
-
-
- namedCurve = cli.getOptionValue("named-curve");
- customCurve = cli.hasOption("custom");
- curveFile = cli.getOptionValue("curve");
-
- namedPublicKey = cli.getOptionValue("named-public");
- publicKey = cli.getOptionValue("public");
- anyPublicKey = (publicKey != null) || (namedPublicKey != null);
-
- namedPrivateKey = cli.getOptionValue("named-private");
- privateKey = cli.getOptionValue("private");
- anyPrivateKey = (privateKey != null) || (namedPrivateKey != null);
-
- namedKey = cli.getOptionValue("named-key");
- key = cli.getOptionValue("key");
- anyKey = (key != null) || (namedKey != null);
- anyKeypart = anyKey || anyPublicKey || anyPrivateKey;
- fixedKey = cli.hasOption("fixed");
- fixedPrivate = cli.hasOption("fixed-private");
- fixedPublic = cli.hasOption("fixed-public");
- keyBuilder = cli.hasOption("key-builder") ? ECTesterApplet.BUILD_KEYBUILDER : ECTesterApplet.BUILD_KEYPAIR;
-
- if (cli.hasOption("log")) {
- log = cli.getOptionValue("log", String.format("ECTESTER_log_%d.log", System.currentTimeMillis() / 1000));
- }
-
- verbose = cli.hasOption("verbose");
- input = cli.getOptionValue("input");
- outputs = cli.getOptionValues("output");
- fresh = cli.hasOption("fresh");
- time = cli.hasOption("time");
- cleanup = cli.hasOption("cleanup");
- simulate = cli.hasOption("simulate");
- yes = cli.hasOption("yes");
- color = cli.hasOption("color");
- Colors.enabled = color;
-
- timeUnit = cli.getOptionValue("time-unit", "micro");
- String[] times = new String[]{"milli", "micro", "nano"};
- if (!Arrays.asList(times).contains(timeUnit)) {
- System.err.println(Colors.error("Wrong time unit " + timeUnit + ". Should be one of " + Arrays.toString(times)));
- return false;
- }
-
- if (cli.hasOption("list-named")) {
- listNamed = cli.getOptionValue("list-named");
- return true;
- }
-
- format = cli.getOptionValue("format");
- String[] formats = new String[]{"text", "xml", "yaml", "yml"};
- if (format != null && !Arrays.asList(formats).contains(format)) {
- System.err.println(Colors.error("Wrong output format " + format + ". Should be one of " + Arrays.toString(formats)));
- return false;
- }
-
- if ((key != null || namedKey != null) && (anyPublicKey || anyPrivateKey)) {
- System.err.print(Colors.error("Can only specify the whole key with --key/--named-key or pubkey and privkey with --public/--named-public and --private/--named-private."));
- return false;
- }
- if (bits < 0) {
- System.err.println(Colors.error("Bit-size must not be negative."));
- return false;
- }
-
- if (key != null && namedKey != null || publicKey != null && namedPublicKey != null || privateKey != null && namedPrivateKey != null) {
- System.err.println(Colors.error("You cannot specify both a named key and a key file."));
- return false;
- }
-
- if (cli.hasOption("export")) {
- if (primeField == binaryField) {
- System.err.print(Colors.error("Need to specify field with -fp or -f2m. (not both)"));
- return false;
- }
- if (anyKeypart) {
- System.err.println(Colors.error("Keys should not be specified when exporting curve params."));
- return false;
- }
- if (outputs == null) {
- System.err.println(Colors.error("You have to specify an output file for curve parameter export."));
- return false;
- }
- if (all || bits == 0) {
- System.err.println(Colors.error("You have to specify curve bit-size with -b"));
- return false;
- }
- } else if (cli.hasOption("generate")) {
- if (primeField == binaryField) {
- System.err.print(Colors.error("Need to specify field with -fp or -f2m. (not both)"));
- return false;
- }
- if (anyKeypart) {
- System.err.println(Colors.error("Keys should not be specified when generating keys."));
- return false;
- }
- if (outputs == null) {
- System.err.println(Colors.error("You have to specify an output file for the key generation process."));
- return false;
- }
- if (all || bits == 0) {
- System.err.println(Colors.error("You have to specify curve bit-size with -b"));
- return false;
- }
-
- generateAmount = Integer.parseInt(cli.getOptionValue("generate", "0"));
- if (generateAmount < 0) {
- System.err.println(Colors.error("Amount of keys generated cant be negative."));
- return false;
- }
- } else if (cli.hasOption("test")) {
- if (!(binaryField || primeField)) {
- binaryField = true;
- primeField = true;
- }
-
- String suiteOpt = cli.getOptionValue("test", "default").toLowerCase();
- if (suiteOpt.contains(":")) {
- String[] parts = suiteOpt.split(":");
- testSuite = parts[0];
- try {
- testFrom = Integer.parseInt(parts[1]);
- } catch (NumberFormatException nfe) {
- System.err.println("Invalid test_from number: " + parts[1] + ".");
- return false;
- }
- if (parts.length == 3) {
- try {
- testTo = Integer.parseInt(parts[2]);
- } catch (NumberFormatException nfe) {
- System.err.println("Invalid test_to number: " + parts[2] + ".");
- return false;
- }
- } else if (parts.length != 2) {
- System.err.println("Invalid test suite selection.");
- return false;
- } else {
- testTo = -1;
- }
- } else {
- testSuite = suiteOpt;
- testFrom = 0;
- testTo = -1;
- }
-
- String[] tests = new String[]{"default", "composite", "compression", "invalid", "degenerate", "test-vectors", "wrong", "twist", "cofactor", "edge-cases", "miscellaneous", "signature"};
- String selected = null;
- for (String test : tests) {
- if (test.startsWith(testSuite)) {
- if (selected != null) {
- System.err.println(Colors.error("Test suite ambiguous " + test + " or " + selected + "?"));
- return false;
- } else {
- selected = test;
- }
- }
- }
- if (selected == null) {
- System.err.println(Colors.error("Unknown test suite " + testSuite + ". Should be one of: " + Arrays.toString(tests)));
- return false;
- } else {
- testSuite = selected;
- }
-
- String[] opts = cli.getOptionValue("test-options", "").split(",");
- List<String> validOpts = Arrays.asList("preset", "random");
- testOptions = new HashSet<>();
- for (String opt : opts) {
- if (opt.equals("")) {
- continue;
- }
- if (!validOpts.contains(opt)) {
- System.err.println(Colors.error("Unknown test option " + opt + ". Should be one of: " + Arrays.toString(validOpts.toArray())));
- return false;
- } else {
- testOptions.add(opt);
- }
- }
-
- if (testOptions.contains("preset") && testOptions.contains("random")) {
- System.err.println("Cannot have both preset and random option enabled.");
- return false;
- }
- } else if (cli.hasOption("ecdh")) {
- if (primeField == binaryField) {
- System.err.print(Colors.error("Need to specify field with -fp or -f2m. (not both)"));
- return false;
- }
- if (all || bits == 0) {
- System.err.println(Colors.error("You have to specify curve bit-size with -b"));
- return false;
- }
-
- ECKACount = Integer.parseInt(cli.getOptionValue("ecdh", "1"));
- if (ECKACount < 0) {
- System.err.println(Colors.error("ECDH count cannot be < 0."));
- return false;
- }
-
- ECKAType = CardUtil.parseKAType(cli.getOptionValue("ka-type", "1"));
- } else if (cli.hasOption("ecdsa")) {
- if (primeField == binaryField) {
- System.err.print(Colors.error("Need to specify field with -fp or -f2m. (but not both)"));
- return false;
- }
- if (all || bits == 0) {
- System.err.println(Colors.error("You have to specify curve bit-size with -b"));
- return false;
- }
-
- if ((anyPublicKey) != (anyPrivateKey) && !anyKey) {
- System.err.println(Colors.error("You cannot only specify a part of a keypair."));
- return false;
- }
-
- ECDSACount = Integer.parseInt(cli.getOptionValue("ecdsa", "1"));
- if (ECDSACount < 0) {
- System.err.println(Colors.error("ECDSA count cannot be < 0."));
- return false;
- }
-
- ECDSAType = CardUtil.parseSigType(cli.getOptionValue("sig-type", "17"));
- }
- return true;
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/ISO7816_status_words.txt b/src/cz/crcs/ectester/reader/ISO7816_status_words.txt
deleted file mode 100644
index bf5af2b..0000000
--- a/src/cz/crcs/ectester/reader/ISO7816_status_words.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-public interface ISO7816 {
-
- // Fields
- public static final byte INS_EXTERNAL_AUTHENTICATE = -126;
- public static final byte INS_SELECT = -92;
- public static final byte CLA_ISO7816 = 0;
- public static final byte OFFSET_CDATA = 5;
- public static final byte OFFSET_LC = 4;
- public static final byte OFFSET_P2 = 3;
- public static final byte OFFSET_P1 = 2;
- public static final byte OFFSET_INS = 1;
- public static final byte OFFSET_CLA = 0;
- public static final short SW_FILE_FULL = 27268; 0x6A84
- public static final short SW_UNKNOWN = 28416; 0x6F00
- public static final short SW_CLA_NOT_SUPPORTED = 28160; 0x6E00
- public static final short SW_INS_NOT_SUPPORTED = 27904; 0x6D00
- public static final short SW_CORRECT_LENGTH_00 = 27648; 0x6C00
- public static final short SW_WRONG_P1P2 = 27392; 0x6B00
- public static final short SW_INCORRECT_P1P2 = 27270; 0x6A86
- public static final short SW_RECORD_NOT_FOUND = 27267; 0x6A83
- public static final short SW_FILE_NOT_FOUND = 27266; 0x6A82
- public static final short SW_FUNC_NOT_SUPPORTED = 27265; 0x6A81
- public static final short SW_WRONG_DATA = 27264; 0x6A80
- public static final short SW_APPLET_SELECT_FAILED = 27033; 0x6999
- public static final short SW_COMMAND_NOT_ALLOWED = 27014; 0x6986
- public static final short SW_CONDITIONS_NOT_SATISFIED = 27013; 0x6985
- public static final short SW_DATA_INVALID = 27012; 0x6984
- public static final short SW_FILE_INVALID = 27011; 0x6983
- public static final short SW_SECURITY_STATUS_NOT_SATISFIED = 27010; 0x6982
- public static final short SW_WRONG_LENGTH = 26368; 0x6700
- public static final short SW_BYTES_REMAINING_00 = 24832; 0x6100
- public static final short SW_NO_ERROR = -28672; 0x9000
-}
-
-public interface JCStatus {
-static int ALGORITHM_NOT_SUPPORTED = 0x9484;
-static int APPLET_INVALIDATED = 0x6283;
-static int APPLET_SELECT_FAILED = 0x6999
-static int AUTHENTICATION_FAILED = 0x6300
-static int AUTHORIZATION_FAILED = 0x9482
-static int CHECKSUM_FAILED = 0x9584
-static int CLA_NOT_SUPPORTED = 0x6E00
-static int COMMAND_NOT_ALLOWED = 0x6986
-static int CONDITIONS_NOT_SATISFIED = 0x6985
-static int CORRECT_LENGTH_00 = 0x6C00
-static int DATA_INVALID = 0x6984
-static int DECRYPTION_FAILED = 0x9583
-static int FILE_FULL = 0x6A84
-static int FILE_INVALID = 0x6983
-static int FILE_NOT_FOUND = 0x6A82
-static int FUNC_NOT_SUPPORTED = 0x6A81
-static int INCORRECT_P1P2 = 0x6A86
-static int INS_NOT_SUPPORTED = 0x6D00
-static int INSTALLATION_FAILED = 0x9585
-static int INVALID_STATE = 0x9481
-static int NO_ERROR = 0x9000
-static int NO_SPECIFIC_DIAGNOSIS = 0x6400
-static int PIN_REQUIRED = 0x6982
-static int RECORD_NOT_FOUND = 0x6A83
-static int REFERENCE_DATA_NOT_FOUND = 0x6A88
-static int REGISTRATION_FAILED = 0x9586
-static int SECURITY_STATUS_NOT_SATISFIED = 0x6982
-static int SIGNATURE_CHECK_FAILED = 0x9582
-static int SM_INCORRECT = 0x6988
-static int SM_MISSING = 0x6987
-static int TRUNCATED_DATA = 0x6100
-static int UNKNOWN = 0x6F00
-static int WRONG_DATA = 0x6A80
-static int WRONG_LENGTH = 0x6700
-static int WRONG_P1P2 = 0x6B00
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/reader/command/Command.java b/src/cz/crcs/ectester/reader/command/Command.java
deleted file mode 100644
index 61e3900..0000000
--- a/src/cz/crcs/ectester/reader/command/Command.java
+++ /dev/null
@@ -1,920 +0,0 @@
-package cz.crcs.ectester.reader.command;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Params;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.output.ResponseWriter;
-import cz.crcs.ectester.reader.response.Response;
-import javacard.security.KeyPair;
-
-import javax.smartcardio.CardException;
-import javax.smartcardio.CommandAPDU;
-import javax.smartcardio.ResponseAPDU;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class Command implements Cloneable {
- CommandAPDU cmd;
- CardMngr cardManager;
- // Workaround for a stupid Java bug that went unfixed for !12! years,
- // and for the even more stupid module system, which cannot properly work
- // with the fact that JCardSim has some java.* packages...
- final byte[] GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM = new byte[]{0};
-
-
- Command(CardMngr cardManager) {
- this.cardManager = cardManager;
- }
-
- public CommandAPDU getAPDU() {
- return cmd;
- }
-
- public abstract Response send() throws CardException;
-
- public static List<Response> sendAll(List<Command> commands) throws CardException {
- List<Response> result = new ArrayList<>();
- for (Command cmd : commands) {
- result.add(cmd.send());
- }
- return result;
- }
-
- public abstract String getDescription();
-
- @Override
- protected Command clone() throws CloneNotSupportedException {
- return (Command) super.clone();
- }
-
- public static EC_Curve findCurve(ECTesterReader.Config cfg, short keyLength, byte keyClass) throws IOException {
- if (cfg.customCurve) {
- byte curveId = EC_Consts.getCurve(keyLength, keyClass);
- return EC_Store.getInstance().getObject(EC_Curve.class, "secg", CardUtil.getCurveName(curveId));
- } else if (cfg.namedCurve != null) {
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, cfg.namedCurve);
- if (curve == null) {
- throw new IOException("Curve could no be found.");
- }
- if (curve.getBits() != keyLength) {
- throw new IOException("Curve bits mismatch: " + curve.getBits() + " vs " + keyLength + " entered.");
- }
- if (curve.getField() != keyClass) {
- throw new IOException("Curve field mismatch.");
- }
- return curve;
- } else if (cfg.curveFile != null) {
- EC_Curve curve = new EC_Curve(null, keyLength, keyClass);
-
- FileInputStream in = new FileInputStream(cfg.curveFile);
- curve.readCSV(in);
- in.close();
- return curve;
- } else {
- return null;
- }
- }
-
-
- /**
- * @param keyPair which keyPair/s (local/remote) to set curve domain parameters on
- * @param keyLength key length to choose
- * @param keyClass key class to choose
- * @return a Command to send in order to prepare the curve on the keypairs.
- * @throws IOException if curve file cannot be found/opened
- */
- public static Command prepareCurve(CardMngr cardManager, ECTesterReader.Config cfg, byte keyPair, short keyLength, byte keyClass) throws IOException {
- if (cfg.customCurve) {
- // Set custom curve (one of the SECG curves embedded applet-side)
- short domainParams = keyClass == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M;
- return new Command.Set(cardManager, keyPair, EC_Consts.getCurve(keyLength, keyClass), domainParams, null);
- }
-
- EC_Curve curve = findCurve(cfg, keyLength, keyClass);
- if ((curve == null || curve.flatten() == null) && (cfg.namedCurve != null || cfg.curveFile != null)) {
- if (cfg.namedCurve != null) {
- throw new IOException("Couldn't read named curve data.");
- }
- throw new IOException("Couldn't read the curve file correctly.");
- } else if (curve == null) {
- return null;
- }
- return new Command.Set(cardManager, keyPair, EC_Consts.CURVE_external, curve.getParams(), curve.flatten());
- }
-
-
- /**
- * @param cardManager
- * @param dataStore
- * @param cfg
- * @param keyPair which keyPair/s to set the key params on
- * @param allowedParams
- * @return a CommandAPDU setting params loaded on the keyPair/s
- * @throws IOException if any of the key files cannot be found/opened
- */
- public static Command prepareKey(CardMngr cardManager, EC_Store dataStore, ECTesterReader.Config cfg, byte keyPair, short allowedParams) throws IOException {
- short params = EC_Consts.PARAMETERS_NONE;
- byte[] data = null;
-
- if (cfg.key != null || cfg.namedKey != null) {
- params |= EC_Consts.PARAMETERS_KEYPAIR;
- EC_Params keypair = ECUtil.loadParams(EC_Consts.PARAMETERS_KEYPAIR, cfg.namedKey, cfg.key);
- if (keypair == null) {
- throw new IOException("KeyPair not found.");
- }
-
- data = keypair.flatten();
- if (data == null) {
- throw new IOException("Couldn't read the key file correctly.");
- }
- }
-
- if ((cfg.publicKey != null || cfg.namedPublicKey != null) && ((allowedParams & EC_Consts.PARAMETER_W) != 0)) {
- params |= EC_Consts.PARAMETER_W;
- EC_Params pub = ECUtil.loadParams(EC_Consts.PARAMETER_W, cfg.namedPublicKey, cfg.publicKey);
- if (pub == null) {
- throw new IOException("Public key not found.");
- }
-
- byte[] pubkey = pub.flatten(EC_Consts.PARAMETER_W);
- if (pubkey == null) {
- throw new IOException("Couldn't read the public key file correctly.");
- }
- data = pubkey;
- }
-
- if ((cfg.privateKey != null || cfg.namedPrivateKey != null) && ((allowedParams & EC_Consts.PARAMETER_S) != 0)) {
- params |= EC_Consts.PARAMETER_S;
- EC_Params priv = ECUtil.loadParams(EC_Consts.PARAMETER_S, cfg.namedPrivateKey, cfg.privateKey);
- if (priv == null) {
- throw new IOException("Private key not found.");
- }
-
- byte[] privkey = priv.flatten(EC_Consts.PARAMETER_S);
- if (privkey == null) {
- throw new IOException("Couldn't read the private key file correctly.");
- }
- data = ByteUtil.concatenate(data, privkey);
- }
- return new Command.Set(cardManager, keyPair, EC_Consts.CURVE_external, params, data);
- }
-
- public static long dryRunTime(CardMngr cardManager, Command cmd, int num, ResponseWriter respWriter) throws CardException {
- long time = 0;
- respWriter.outputResponse(new Command.SetDryRunMode(cardManager, ECTesterApplet.MODE_DRY_RUN).send());
- for (int i = 0; i < num; ++i) {
- Response dry = cmd.send();
- respWriter.outputResponse(dry);
- time += dry.getDuration();
- }
- time /= num;
- respWriter.outputResponse(new Command.SetDryRunMode(cardManager, ECTesterApplet.MODE_NORMAL).send());
- return time;
- }
-
- /**
- *
- */
- public static class AllocateKeyAgreement extends Command {
- private byte kaType;
-
- /**
- * Creates the INS_ALLOCATE_KA instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param kaType which type of KeyAgreement to use
- */
- public AllocateKeyAgreement(CardMngr cardManager, byte kaType) {
- super(cardManager);
- this.kaType = kaType;
- byte[] data = new byte[]{kaType};
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ALLOCATE_KA, 0x00, 0x00, data);
- }
-
- @Override
- public Response.AllocateKeyAgreement send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.AllocateKeyAgreement(response, getDescription(), elapsed, kaType);
- }
-
- @Override
- public String getDescription() {
- return String.format("Allocate KeyAgreement(%s) object", CardUtil.getKATypeString(kaType));
- }
- }
-
- /**
- *
- */
- public static class AllocateSignature extends Command {
- private byte sigType;
-
- /**
- * Creates the INS_ALLOCATE_SIG instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param sigType which type of Signature to use
- */
- public AllocateSignature(CardMngr cardManager, byte sigType) {
- super(cardManager);
- this.sigType = sigType;
- byte[] data = new byte[]{sigType};
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ALLOCATE_SIG, 0x00, 0x00, data);
- }
-
- @Override
- public Response.AllocateSignature send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.AllocateSignature(response, getDescription(), elapsed, sigType);
- }
-
- @Override
- public String getDescription() {
- return String.format("Allocate Signature(%s) object", CardUtil.getSigTypeString(sigType));
- }
- }
-
- /**
- *
- */
- public static class Allocate extends Command {
- private byte keyPair;
- private byte build;
- private short keyLength;
- private byte keyClass;
-
- /**
- * Creates the INS_ALLOCATE instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair which keyPair to use, local/remote (KEYPAIR_* | ...)
- * @param build whether to use KeyBuilder or Keypair alloc
- * @param keyLength key length to set
- * @param keyClass key class to allocate
- */
- public Allocate(CardMngr cardManager, byte keyPair, byte build, short keyLength, byte keyClass) {
- super(cardManager);
- this.keyPair = keyPair;
- this.build = build;
- this.keyLength = keyLength;
- this.keyClass = keyClass;
-
- byte[] data = new byte[]{0, 0, keyClass};
- ByteUtil.setShort(data, 0, keyLength);
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ALLOCATE, keyPair, build, data);
- }
-
- public Allocate(CardMngr cardManager, byte keyPair, short keyLength, byte keyClass) {
- this(cardManager, keyPair, (byte) (ECTesterApplet.BUILD_KEYPAIR | ECTesterApplet.BUILD_KEYBUILDER), keyLength, keyClass);
- }
-
- @Override
- public Response.Allocate send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Allocate(response, getDescription(), elapsed, keyPair, keyLength, keyClass);
- }
-
- @Override
- public String getDescription() {
- String field = keyClass == KeyPair.ALG_EC_FP ? "ALG_EC_FP" : "ALG_EC_F2M";
- String key;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- key = "both keypairs";
- } else {
- key = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Allocate %s %db %s", key, keyLength, field);
- }
- }
-
- /**
- *
- */
- public static class Clear extends Command {
- private byte keyPair;
-
- /**
- * @param cardManager cardManager to send APDU through
- * @param keyPair which keyPair clear, local/remote (KEYPAIR_* || ...)
- */
- public Clear(CardMngr cardManager, byte keyPair) {
- super(cardManager);
- this.keyPair = keyPair;
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_CLEAR, keyPair, 0x00, GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM);
- }
-
- @Override
- public Response.Clear send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Clear(response, getDescription(), elapsed, keyPair);
- }
-
- @Override
- public String getDescription() {
- String key;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- key = "both keypairs";
- } else {
- key = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Clear %s", key);
- }
- }
-
- /**
- *
- */
- public static class Set extends Command {
- private byte keyPair;
- private byte curve;
- private short params;
- private byte[] external;
-
- /**
- * Creates the INS_SET instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair which keyPair to set params on, local/remote (KEYPAIR_* || ...)
- * @param curve curve to set (EC_Consts.CURVE_*)
- * @param params parameters to set (EC_Consts.PARAMETER_* | ...)
- * @param external external curve data, can be null
- */
- public Set(CardMngr cardManager, byte keyPair, byte curve, short params, byte[] external) {
- super(cardManager);
- this.keyPair = keyPair;
- this.curve = curve;
- this.params = params;
- this.external = external;
-
- int len = external != null ? 2 + external.length : 2;
- byte[] data = new byte[len];
- ByteUtil.setShort(data, 0, params);
- if (external != null) {
- System.arraycopy(external, 0, data, 2, external.length);
- }
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_SET, keyPair, curve, data);
- }
-
- @Override
- public Response.Set send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Set(response, getDescription(), elapsed, keyPair, curve, params);
- }
-
- @Override
- public String getDescription() {
- String name = CardUtil.getCurveName(curve);
- String what = CardUtil.getParameterString(params);
-
- String pair;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- pair = "both keypairs";
- } else {
- pair = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Set %s %s parameters on %s", name, what, pair);
- }
- }
-
- /**
- *
- */
- public static class Transform extends Command {
- private byte keyPair;
- private byte key;
- private short params;
- private short transformation;
-
- /**
- * @param cardManager cardManager to send APDU through
- * @param keyPair which keyPair to transform, local/remote (KEYPAIR_* || ...)
- * @param key key to transform (EC_Consts.KEY_* | ...)
- * @param params parameters to transform (EC_Consts.PARAMETER_* | ...)
- * @param transformation transformation type (EC_Consts.TRANSFORMATION_*)
- */
- public Transform(CardMngr cardManager, byte keyPair, byte key, short params, short transformation) {
- super(cardManager);
- this.keyPair = keyPair;
- this.key = key;
- this.params = params;
- this.transformation = transformation;
-
- byte[] data = new byte[4];
- ByteUtil.setShort(data, 0, params);
- ByteUtil.setShort(data, 2, transformation);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_TRANSFORM, keyPair, key, data);
- }
-
- @Override
- public Response.Transform send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Transform(response, getDescription(), elapsed, keyPair, key, params, transformation);
- }
-
- @Override
- public String getDescription() {
- String stringParams = CardUtil.getParams(params);
- String transform = CardUtil.getTransformation(transformation);
-
- String pair;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- pair = "both keypairs";
- } else {
- pair = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Transform params %s of %s, %s", stringParams, pair, transform);
- }
- }
-
- /**
- *
- */
- public static class Generate extends Command {
- private byte keyPair;
-
- /**
- * Creates the INS_GENERATE instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair which keyPair to generate, local/remote (KEYPAIR_* || ...)
- */
- public Generate(CardMngr cardManager, byte keyPair) {
- super(cardManager);
- this.keyPair = keyPair;
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_GENERATE, keyPair, 0, GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM);
- }
-
- @Override
- public Response.Generate send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Generate(response, getDescription(), elapsed, keyPair);
- }
-
- @Override
- public String getDescription() {
- String key;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- key = "both keypairs";
- } else {
- key = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Generate %s", key);
- }
- }
-
- /**
- *
- */
- public static class Export extends Command {
- private byte keyPair;
- private byte key;
- private short params;
-
- /**
- * Creates the INS_EXPORT instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair keyPair to export from (KEYPAIR_* | ...)
- * @param key key to export from (EC_Consts.KEY_* | ...)
- * @param params params to export (EC_Consts.PARAMETER_* | ...)
- */
- public Export(CardMngr cardManager, byte keyPair, byte key, short params) {
- super(cardManager);
- this.keyPair = keyPair;
- this.key = key;
- this.params = params;
-
- byte[] data = new byte[2];
- ByteUtil.setShort(data, 0, params);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_EXPORT, keyPair, key, data);
- }
-
- @Override
- public Response.Export send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Export(response, getDescription(), elapsed, keyPair, key, params);
- }
-
- @Override
- public String getDescription() {
- String what = CardUtil.getParameterString(params);
-
- String source;
- if (key == EC_Consts.KEY_BOTH) {
- source = "both keys";
- } else {
- source = ((key == EC_Consts.KEY_PUBLIC) ? "public" : "private") + " key";
- }
- String pair;
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- pair = "both keypairs";
- } else {
- pair = ((keyPair == ECTesterApplet.KEYPAIR_LOCAL) ? "local" : "remote") + " keypair";
- }
- return String.format("Export %s params from %s of %s", what, source, pair);
- }
- }
-
- /**
- *
- */
- public static class ECDH extends Command {
- private byte pubkey;
- private byte privkey;
- private byte export;
- private short transformation;
- private byte type;
-
- /**
- * Creates the INS_ECDH instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param pubkey keyPair to use for public key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param privkey keyPair to use for private key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param export whether to export ECDH secret
- * @param transformation whether to transform the pubkey before ECDH (EC_Consts.TRANSFORMATION_* | ...)
- * @param type ECDH algorithm type (EC_Consts.KA_* | ...)
- */
- public ECDH(CardMngr cardManager, byte pubkey, byte privkey, byte export, short transformation, byte type) {
- super(cardManager);
- this.pubkey = pubkey;
- this.privkey = privkey;
- this.export = export;
- this.transformation = transformation;
- this.type = type;
-
- byte[] data = new byte[]{export, 0, 0, type};
- ByteUtil.setShort(data, 1, transformation);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDH, pubkey, privkey, data);
- }
-
- @Override
- public Response.ECDH send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.ECDH(response, getDescription(), elapsed, pubkey, privkey, export, transformation, type);
- }
-
- @Override
- public String getDescription() {
- String algo = CardUtil.getKATypeString(type);
-
- String pub = pubkey == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
- String priv = privkey == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
-
- String validity;
- if (transformation == EC_Consts.TRANSFORMATION_NONE) {
- validity = "";
- } else {
- validity = String.format("(%s point)", CardUtil.getTransformation(transformation));
- }
- return String.format("%s of %s pubkey and %s privkey%s", algo, pub, priv, validity);
- }
- }
-
- /**
- *
- */
- public static class ECDH_direct extends Command {
- private byte privkey;
- private byte export;
- private short transformation;
- private byte type;
- private byte[] pubkey;
-
- /**
- * Creates the INS_ECDH_DIRECT instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param privkey keyPair to use for private key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param export whether to export ECDH secret
- * @param transformation whether to transform the pubkey before ECDH (EC_Consts.TRANSFORMATION_* | ...)
- * @param type EC KeyAgreement type
- * @param pubkey pubkey data to do ECDH with.
- */
- public ECDH_direct(CardMngr cardManager, byte privkey, byte export, short transformation, byte type, byte[] pubkey) {
- super(cardManager);
- this.privkey = privkey;
- this.export = export;
- this.transformation = transformation;
- this.type = type;
- this.pubkey = pubkey;
-
- byte[] data = new byte[3 + pubkey.length];
- ByteUtil.setShort(data, 0, transformation);
- data[2] = type;
- System.arraycopy(pubkey, 0, data, 3, pubkey.length);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDH_DIRECT, privkey, export, data);
- }
-
- @Override
- public Response.ECDH send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.ECDH(response, getDescription(), elapsed, ECTesterApplet.KEYPAIR_REMOTE, privkey, export, transformation, type);
- }
-
- @Override
- public String getDescription() {
- String algo = CardUtil.getKATypeString(type);
-
- String priv = privkey == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
-
- String validity;
- if (transformation == EC_Consts.TRANSFORMATION_NONE) {
- validity = "";
- } else {
- validity = String.format("(%s point)", CardUtil.getTransformation(transformation));
- }
- return String.format("%s of external pubkey and %s privkey%s", algo, priv, validity);
- }
- }
-
- public static class ECDSA extends Command {
- private byte keyPair;
- private byte sigType;
- private byte export;
- private byte[] raw;
-
- /**
- * Creates the INS_ECDSA instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair keyPair to use for signing and verification (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param sigType Signature type to use
- * @param export whether to export ECDSA signature
- * @param raw data to sign, can be null, in which case random data is signed.
- */
- public ECDSA(CardMngr cardManager, byte keyPair, byte sigType, byte export, byte[] raw) {
- super(cardManager);
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- throw new IllegalArgumentException();
- }
-
- this.keyPair = keyPair;
- this.sigType = sigType;
- this.export = export;
- this.raw = raw;
-
- int len = raw != null ? raw.length : 0;
- byte[] data = new byte[3 + len];
- data[0] = sigType;
- ByteUtil.setShort(data, 1, (short) len);
- if (raw != null) {
- System.arraycopy(raw, 0, data, 3, len);
- }
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDSA, keyPair, export, data);
- }
-
- @Override
- public Response.ECDSA send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.ECDSA(response, getDescription(), elapsed, keyPair, sigType, export, raw);
- }
-
- @Override
- public String getDescription() {
- String algo = CardUtil.getSigTypeString(sigType);
- String key = keyPair == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
- String data = raw == null ? "random" : "provided";
- return String.format("%s with %s keypair(%s data)", algo, key, data);
- }
- }
-
- public static class ECDSA_sign extends Command {
- private byte keyPair;
- private byte sigType;
- private byte export;
- private byte[] raw;
-
- /**
- * Creates the INS_ECDSA_SIGN instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair keyPair to use for signing and verification (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param sigType Signature type to use
- * @param export whether to export ECDSA signature
- * @param raw data to sign, can be null, in which case random data is signed.
- */
- public ECDSA_sign(CardMngr cardManager, byte keyPair, byte sigType, byte export, byte[] raw) {
- super(cardManager);
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- throw new IllegalArgumentException();
- }
-
- this.keyPair = keyPair;
- this.sigType = sigType;
- this.export = export;
- this.raw = raw;
-
- int len = raw != null ? raw.length : 0;
- byte[] data = new byte[3 + len];
- data[0] = sigType;
- ByteUtil.setShort(data, 1, (short) len);
- if (raw != null) {
- System.arraycopy(raw, 0, data, 3, len);
- }
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDSA_SIGN, keyPair, export, data);
- }
-
- @Override
- public Response.ECDSA send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.ECDSA(response, getDescription(), elapsed, keyPair, sigType, export, raw);
- }
-
- @Override
- public String getDescription() {
- String algo = CardUtil.getSigTypeString(sigType);
- String key = keyPair == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
- String data = raw == null ? "random" : "provided";
- return String.format("%s signature with %s keypair(%s data)", algo, key, data);
- }
- }
-
- public static class ECDSA_verify extends Command {
- private byte keyPair;
- private byte sigType;
- private byte[] raw;
- private byte[] signature;
-
- /**
- * Creates the INS_ECDSA_VERIFY instruction.
- *
- * @param cardManager cardManager to send APDU through
- * @param keyPair keyPair to use for signing and verification (KEYPAIR_LOCAL || KEYPAIR_REMOTE)
- * @param sigType Signature type to use
- * @param raw data to sign
- * @param signature signature data
- */
- public ECDSA_verify(CardMngr cardManager, byte keyPair, byte sigType, byte[] raw, byte[] signature) {
- super(cardManager);
- if (keyPair == ECTesterApplet.KEYPAIR_BOTH) {
- throw new IllegalArgumentException();
- }
- if (raw == null || signature == null) {
- throw new IllegalArgumentException();
- }
-
- this.keyPair = keyPair;
- this.sigType = sigType;
- this.raw = raw;
- this.signature = signature;
-
- byte[] data = new byte[4 + raw.length + signature.length];
- ByteUtil.setShort(data, 0, (short) raw.length);
- System.arraycopy(raw, 0, data, 2, raw.length);
- ByteUtil.setShort(data, 2 + raw.length, (short) signature.length);
- System.arraycopy(signature, 0, data, 2 + raw.length + 2, signature.length);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDSA_VERIFY, keyPair, sigType, data);
- }
-
- @Override
- public Response.ECDSA send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.ECDSA(response, getDescription(), elapsed, keyPair, sigType, ECTesterApplet.EXPORT_FALSE, raw);
- }
-
- @Override
- public String getDescription() {
- String algo = CardUtil.getSigTypeString(sigType);
- String key = keyPair == ECTesterApplet.KEYPAIR_LOCAL ? "local" : "remote";
- String data = raw == null ? "random" : "provided";
- return String.format("%s verification with %s keypair(%s data)", algo, key, data);
- }
- }
-
- /**
- *
- */
- public static class Cleanup extends Command {
-
- /**
- * @param cardManager cardManager to send APDU through
- */
- public Cleanup(CardMngr cardManager) {
- super(cardManager);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_CLEANUP, 0, 0, GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM);
- }
-
- @Override
- public Response.Cleanup send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.Cleanup(response, getDescription(), elapsed);
- }
-
- @Override
- public String getDescription() {
- return "Request JCSystem object deletion";
- }
- }
-
- /**
- *
- */
- public static class GetInfo extends Command {
-
- /**
- * @param cardManager cardManager to send APDU through
- */
- public GetInfo(CardMngr cardManager) {
- super(cardManager);
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_GET_INFO, 0, 0, GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM);
- }
-
- @Override
- public Response.GetInfo send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.GetInfo(response, getDescription(), elapsed);
- }
-
- @Override
- public String getDescription() {
- return "Get applet info";
- }
- }
-
- /**
- *
- */
- public static class SetDryRunMode extends Command {
- private byte dryRunMode;
-
- /**
- * @param cardManager
- * @param dryRunMode
- */
- public SetDryRunMode(CardMngr cardManager, byte dryRunMode) {
- super(cardManager);
- this.dryRunMode = dryRunMode;
-
- this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_SET_DRY_RUN_MODE, dryRunMode, 0, GOD_DAMN_JAVA_BUG_6474858_AND_GOD_DAMN_JAVA_12_MODULE_SYSTEM);
- }
-
- @Override
- public Response.SetDryRunMode send() throws CardException {
- long elapsed = -System.nanoTime();
- ResponseAPDU response = cardManager.send(cmd);
- elapsed += System.nanoTime();
- return new Response.SetDryRunMode(response, getDescription(), elapsed);
- }
-
- @Override
- public String getDescription() {
- return (dryRunMode == ECTesterApplet.MODE_NORMAL ? "Disable" : "Enable") + " dry run mode";
- }
- }
-}
-
diff --git a/src/cz/crcs/ectester/reader/output/FileTestWriter.java b/src/cz/crcs/ectester/reader/output/FileTestWriter.java
deleted file mode 100644
index 69e5f41..0000000
--- a/src/cz/crcs/ectester/reader/output/FileTestWriter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cz.crcs.ectester.reader.output;
-
-import cz.crcs.ectester.common.output.TeeTestWriter;
-import cz.crcs.ectester.common.output.TestWriter;
-
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-import java.util.regex.Pattern;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class FileTestWriter extends TeeTestWriter {
-
- private static final Pattern PREFIX = Pattern.compile("(text|xml|yaml|yml):.+");
-
- public FileTestWriter(String defaultFormat, boolean systemOut, String[] files) throws ParserConfigurationException, FileNotFoundException {
- int fLength = files == null ? 0 : files.length;
- writers = new TestWriter[systemOut ? fLength + 1 : fLength];
- if (systemOut) {
- writers[0] = createWriter(defaultFormat, System.out);
- }
- for (int i = 0; i < fLength; ++i) {
- String fName = files[i];
- String format = null;
- if (PREFIX.matcher(fName).matches()) {
- String[] split = fName.split(":", 2);
- format = split[0];
- fName = split[1];
- }
- writers[i + 1] = createWriter(format, new PrintStream(new FileOutputStream(fName)));
- }
- }
-
- private TestWriter createWriter(String format, PrintStream out) throws ParserConfigurationException {
- if (format == null) {
- return new TextTestWriter(out);
- }
- switch (format) {
- case "text":
- return new TextTestWriter(out);
- case "xml":
- return new XMLTestWriter(out);
- case "yaml":
- case "yml":
- return new YAMLTestWriter(out);
- default:
- return null;
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/output/ResponseWriter.java b/src/cz/crcs/ectester/reader/output/ResponseWriter.java
deleted file mode 100644
index 85bf79a..0000000
--- a/src/cz/crcs/ectester/reader/output/ResponseWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.crcs.ectester.reader.output;
-
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.reader.response.Response;
-
-import java.io.PrintStream;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class ResponseWriter {
- private PrintStream output;
-
- public ResponseWriter(PrintStream output) {
- this.output = output;
- }
-
- public String responseSuffix(Response r) {
- StringBuilder suffix = new StringBuilder();
- for (int j = 0; j < r.getNumSW(); ++j) {
- short sw = r.getSW(j);
- if (sw != 0) {
- suffix.append(" ").append(CardUtil.getSWString(sw));
- }
- }
- if (suffix.length() == 0) {
- suffix.append(" [").append(CardUtil.getSW(r.getNaturalSW())).append(String.format(" 0x%04x", r.getNaturalSW())).append("]");
- }
- return String.format("%4d ms ┃ %s", r.getDuration() / 1000000, suffix);
- }
-
- public String responseString(Response r) {
- String out = "";
- out += String.format("%-70s", r.getDescription()) + " ┃ ";
- out += responseSuffix(r);
- return out;
- }
-
- public void outputResponse(Response r) {
- output.println(responseString(r));
- output.flush();
- }
-}
diff --git a/src/cz/crcs/ectester/reader/output/TextTestWriter.java b/src/cz/crcs/ectester/reader/output/TextTestWriter.java
deleted file mode 100644
index 2775647..0000000
--- a/src/cz/crcs/ectester/reader/output/TextTestWriter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package cz.crcs.ectester.reader.output;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.common.cli.Colors;
-import cz.crcs.ectester.common.output.BaseTextTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import cz.crcs.ectester.reader.test.CardTestSuite;
-import cz.crcs.ectester.reader.test.CommandTestable;
-
-import javax.smartcardio.CardException;
-import java.io.PrintStream;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TextTestWriter extends BaseTextTestWriter {
- private ResponseWriter writer;
-
- public TextTestWriter(PrintStream output) {
- super(output);
- this.writer = new ResponseWriter(output);
- }
-
- @Override
- protected String testableString(Testable t) {
- if (t instanceof CommandTestable) {
- CommandTestable cmd = (CommandTestable) t;
- Response response = cmd.getResponse();
- if (response != null) {
- return writer.responseSuffix(response);
- }
- }
- return "";
- }
-
- @Override
- protected String deviceString(TestSuite suite) {
- if (suite instanceof CardTestSuite) {
- CardTestSuite cardSuite = (CardTestSuite) suite;
- StringBuilder sb = new StringBuilder();
- try {
- sb.append("═══ ").append(Colors.underline("ECTester version:")).append(" ").append(ECTesterReader.VERSION).append(ECTesterReader.GIT_COMMIT).append(System.lineSeparator());
- Response.GetInfo info = new Command.GetInfo(cardSuite.getCard()).send();
- sb.append("═══ ").append(Colors.underline("ECTester applet version:")).append(" ").append(info.getVersion()).append(info.getBase() == ECTesterApplet.BASE_221 ? "" : " (extended length)").append(System.lineSeparator());
- sb.append("═══ ").append(Colors.underline("Card ATR:")).append(" ").append(ByteUtil.bytesToHex(cardSuite.getCard().getATR().getBytes(), false)).append(System.lineSeparator());
- sb.append("═══ ").append(Colors.underline("JavaCard version:")).append(" ").append(info.getJavaCardVersion()).append(System.lineSeparator());
- sb.append("═══ ").append(Colors.underline("Array sizes (apduBuf, ram, ram2, apduArr):")).append(" ").append(String.format("%d %d %d %d", info.getApduBufferLength(), info.getRamArrayLength(), info.getRamArray2Length(), info.getApduArrayLength())).append(System.lineSeparator());
- sb.append("═══ ").append(Colors.underline("Test options:")).append(" ").append(String.join(",", cardSuite.getCfg().testOptions)).append(System.lineSeparator());
- CardMngr.CPLC cplc = cardSuite.getCard().getCPLC();
- if (!cplc.values().isEmpty()) {
- sb.append("═══ ").append(Colors.underline("Card CPLC data:")).append(System.lineSeparator());
- for (Map.Entry<CardMngr.CPLC.Field, byte[]> entry : cplc.values().entrySet()) {
- CardMngr.CPLC.Field field = entry.getKey();
- byte[] value = entry.getValue();
- sb.append("═══ ").append(field.name()).append(": ").append(CardMngr.mapCPLCField(field, value));
- }
- }
- } catch (CardException ignored) {
- }
- return sb.toString();
- }
- return "";
- }
-}
diff --git a/src/cz/crcs/ectester/reader/output/XMLTestWriter.java b/src/cz/crcs/ectester/reader/output/XMLTestWriter.java
deleted file mode 100644
index fc41805..0000000
--- a/src/cz/crcs/ectester/reader/output/XMLTestWriter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package cz.crcs.ectester.reader.output;
-
-import cz.crcs.ectester.common.output.BaseXMLTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import cz.crcs.ectester.reader.test.CardTestSuite;
-import cz.crcs.ectester.reader.test.CommandTestable;
-import org.w3c.dom.Element;
-
-import javax.smartcardio.CardException;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.OutputStream;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class XMLTestWriter extends BaseXMLTestWriter {
- public XMLTestWriter(OutputStream output) throws ParserConfigurationException {
- super(output);
- }
-
- private Element commandElement(Command c) {
- Element commandElem = doc.createElement("command");
- if (c == null) {
- return commandElem;
- }
-
- Element apdu = doc.createElement("apdu");
- apdu.setTextContent(ByteUtil.bytesToHex(c.getAPDU().getBytes()));
- commandElem.appendChild(apdu);
-
- Element description = doc.createElement("desc");
- description.setTextContent(c.getDescription());
- commandElem.appendChild(description);
-
- return commandElem;
- }
-
- private Element responseElement(Response r) {
- Element responseElem = doc.createElement("response");
- if (r == null) {
- return responseElem;
- }
-
- responseElem.setAttribute("successful", r.successful() ? "true" : "false");
-
- Element apdu = doc.createElement("apdu");
- apdu.setTextContent(ByteUtil.bytesToHex(r.getAPDU().getBytes()));
- responseElem.appendChild(apdu);
-
- Element naturalSW = doc.createElement("natural-sw");
- naturalSW.setTextContent(String.valueOf(Short.toUnsignedInt(r.getNaturalSW())));
- responseElem.appendChild(naturalSW);
-
- Element sws = doc.createElement("sws");
- for (int i = 0; i < r.getNumSW(); ++i) {
- Element sw = doc.createElement("sw");
- sw.setTextContent(String.valueOf(Short.toUnsignedInt(r.getSW(i))));
- sws.appendChild(sw);
- }
- responseElem.appendChild(sws);
-
- Element duration = doc.createElement("duration");
- duration.setTextContent(String.valueOf(r.getDuration()));
- responseElem.appendChild(duration);
-
- Element description = doc.createElement("desc");
- description.setTextContent(r.getDescription());
- responseElem.appendChild(description);
-
- return responseElem;
- }
-
- @Override
- protected Element testableElement(Testable t) {
- if (t instanceof CommandTestable) {
- CommandTestable cmd = (CommandTestable) t;
- Element result = doc.createElement("test");
- result.setAttribute("type", "command");
- result.appendChild(commandElement(cmd.getCommand()));
- result.appendChild(responseElement(cmd.getResponse()));
- return result;
- }
- return null;
- }
-
- private Element cplcElement(CardMngr card) {
- Element result = doc.createElement("cplc");
- try {
- CardMngr.CPLC cplc = card.getCPLC();
- if (!cplc.values().isEmpty()) {
- for (Map.Entry<CardMngr.CPLC.Field, byte[]> entry : cplc.values().entrySet()) {
- CardMngr.CPLC.Field field = entry.getKey();
- byte[] value = entry.getValue();
- Element keyVal = doc.createElement(field.name());
- keyVal.setTextContent(ByteUtil.bytesToHex(value, false));
- result.appendChild(keyVal);
- }
- }
- } catch (CardException ignored) {
- }
- return result;
- }
-
- private Element appletElement(CardMngr card) {
- Element result = doc.createElement("applet");
- try {
- Response.GetInfo info = new Command.GetInfo(card).send();
- result.setAttribute("version", info.getVersion());
- result.setAttribute("javacard", String.format("%.1f", info.getJavaCardVersion()));
- result.setAttribute("base", String.format("%#x", info.getBase()));
- result.setAttribute("cleanup", String.valueOf(info.getCleanupSupport()));
- Element arrays = doc.createElement("arrays");
- Element apduBuf = doc.createElement("length");
- apduBuf.setAttribute("name", "apduBuf");
- apduBuf.setTextContent(String.valueOf(info.getApduBufferLength()));
- Element ramArray = doc.createElement("length");
- ramArray.setAttribute("name", "ramArray");
- ramArray.setTextContent(String.valueOf(info.getRamArrayLength()));
- Element ramArray2 = doc.createElement("length");
- ramArray2.setAttribute("name", "ramArray2");
- ramArray2.setTextContent(String.valueOf(info.getRamArray2Length()));
- Element apduArray = doc.createElement("length");
- apduArray.setAttribute("name", "apduArray");
- apduArray.setTextContent(String.valueOf(info.getApduArrayLength()));
- arrays.appendChild(apduBuf);
- arrays.appendChild(ramArray);
- arrays.appendChild(ramArray2);
- arrays.appendChild(apduArray);
- result.appendChild(arrays);
- } catch (CardException ignored) {
- }
- return result;
- }
-
- @Override
- protected Element deviceElement(TestSuite suite) {
- if (suite instanceof CardTestSuite) {
- CardTestSuite cardSuite = (CardTestSuite) suite;
- Element result = doc.createElement("device");
- result.setAttribute("type", "card");
- result.setAttribute("ectester", ECTesterReader.VERSION + ECTesterReader.GIT_COMMIT);
- result.appendChild(cplcElement(cardSuite.getCard()));
- result.appendChild(appletElement(cardSuite.getCard()));
-
- Element atr = doc.createElement("ATR");
- atr.setTextContent(ByteUtil.bytesToHex(cardSuite.getCard().getATR().getBytes(), false));
- result.appendChild(atr);
- return result;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/reader/output/YAMLTestWriter.java b/src/cz/crcs/ectester/reader/output/YAMLTestWriter.java
deleted file mode 100644
index 56ecb71..0000000
--- a/src/cz/crcs/ectester/reader/output/YAMLTestWriter.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package cz.crcs.ectester.reader.output;
-
-import cz.crcs.ectester.common.output.BaseYAMLTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import cz.crcs.ectester.reader.test.CardTestSuite;
-import cz.crcs.ectester.reader.test.CommandTestable;
-
-import javax.smartcardio.CardException;
-import java.io.PrintStream;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class YAMLTestWriter extends BaseYAMLTestWriter {
- public YAMLTestWriter(PrintStream output) {
- super(output);
- }
-
- private Map<String, Object> commandObject(Command c) {
- Map<String, Object> commandObj = new LinkedHashMap<>();
- if (c == null) {
- return commandObj;
- }
- commandObj.put("apdu", ByteUtil.bytesToHex(c.getAPDU().getBytes()));
- commandObj.put("desc", c.getDescription());
- return commandObj;
- }
-
- private Map<String, Object> responseObject(Response r) {
- Map<String, Object> responseObj = new LinkedHashMap<>();
- if (r == null) {
- return responseObj;
- }
- responseObj.put("successful", r.successful());
- responseObj.put("apdu", ByteUtil.bytesToHex(r.getAPDU().getBytes()));
- responseObj.put("natural_sw", Short.toUnsignedInt(r.getNaturalSW()));
- List<Integer> sws = new LinkedList<>();
- for (int i = 0; i < r.getNumSW(); ++i) {
- sws.add(Short.toUnsignedInt(r.getSW(i)));
- }
- responseObj.put("sws", sws);
- responseObj.put("duration", r.getDuration());
- responseObj.put("desc", r.getDescription());
- return responseObj;
- }
-
- @Override
- protected Map<String, Object> testableObject(Testable t) {
- if (t instanceof CommandTestable) {
- CommandTestable cmd = (CommandTestable) t;
- Map<String, Object> result = new LinkedHashMap<>();
- result.put("type", "command");
- result.put("command", commandObject(cmd.getCommand()));
- result.put("response", responseObject(cmd.getResponse()));
- return result;
- }
- return null;
- }
-
- private Map<String, Object> cplcObject(CardMngr card) {
- Map<String, Object> result = new LinkedHashMap<>();
- try {
- CardMngr.CPLC cplc = card.getCPLC();
- if (!cplc.values().isEmpty()) {
- for (Map.Entry<CardMngr.CPLC.Field, byte[]> entry : cplc.values().entrySet()) {
- CardMngr.CPLC.Field field = entry.getKey();
- byte[] value = entry.getValue();
- result.put(field.name(), ByteUtil.bytesToHex(value, false));
- }
- }
- } catch (CardException ignored) {
- }
- return result;
- }
-
- private Map<String, Object> appletObject(CardMngr card) {
- Map<String, Object> result = new LinkedHashMap<>();
- try {
- Response.GetInfo info = new Command.GetInfo(card).send();
- result.put("version", info.getVersion());
- result.put("javacard", info.getJavaCardVersion());
- result.put("base", info.getBase());
- result.put("cleanup", info.getCleanupSupport());
- Map<String, Integer> arrays = new LinkedHashMap<>();
- arrays.put("apduBuf", Short.toUnsignedInt(info.getApduBufferLength()));
- arrays.put("ramArray", Short.toUnsignedInt(info.getRamArrayLength()));
- arrays.put("ramArray2", Short.toUnsignedInt(info.getRamArray2Length()));
- arrays.put("apduArray", Short.toUnsignedInt(info.getApduArrayLength()));
- result.put("arrays", arrays);
- } catch (CardException ignored) {
- }
- return result;
- }
-
- @Override
- protected Map<String, Object> deviceObject(TestSuite suite) {
- if (suite instanceof CardTestSuite) {
- CardTestSuite cardSuite = (CardTestSuite) suite;
- Map<String, Object> result = new LinkedHashMap<>();
- result.put("type", "card");
- result.put("ectester", ECTesterReader.VERSION + ECTesterReader.GIT_COMMIT);
- result.put("cplc", cplcObject(cardSuite.getCard()));
- result.put("applet", appletObject(cardSuite.getCard()));
- result.put("ATR", ByteUtil.bytesToHex(cardSuite.getCard().getATR().getBytes(), false));
- return result;
- }
- return null;
- }
-}
diff --git a/src/cz/crcs/ectester/reader/response/Response.java b/src/cz/crcs/ectester/reader/response/Response.java
deleted file mode 100644
index f36d087..0000000
--- a/src/cz/crcs/ectester/reader/response/Response.java
+++ /dev/null
@@ -1,526 +0,0 @@
-package cz.crcs.ectester.reader.response;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.util.ByteUtil;
-import javacard.framework.ISO7816;
-
-import javax.smartcardio.ResponseAPDU;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class Response {
- private ResponseAPDU resp;
- private long time;
- private short[] sws;
- private int numSW = 0;
- private byte[][] params;
- private boolean success = true;
- private boolean error = false;
- private String description;
-
- public Response(ResponseAPDU response, String description, long time) {
- this.resp = response;
- this.description = description;
- this.time = time;
- }
-
- boolean parse(int numSW, int numParams) {
- this.numSW = numSW;
- this.sws = new short[numSW];
-
- byte[] data = resp.getData();
- int offset = 0;
-
- //parse SWs in response
- for (int i = 0; i < numSW; ++i) {
- if (getLength() >= (offset + 2)) {
- short sw = ByteUtil.getShort(data, offset);
- offset += 2;
- sws[i] = sw;
- if (sw != ISO7816.SW_NO_ERROR) {
- success = false;
- }
- } else {
- success = false;
- error = true;
- }
- }
-
- if ((short) resp.getSW() != ISO7816.SW_NO_ERROR) {
- success = false;
- error = true;
- }
-
-
- //try to parse numParams..
- params = new byte[numParams][];
- for (int i = 0; i < numParams; i++) {
- if (data.length - offset < 2) {
- success = false;
- error = true;
- break;
- }
- short paramLength = ByteUtil.getShort(data, offset);
- offset += 2;
- if (data.length < offset + paramLength) {
- error = true;
- success = false;
- break;
- }
- params[i] = new byte[paramLength];
- System.arraycopy(data, offset, params[i], 0, paramLength);
- offset += paramLength;
- }
- return success;
- }
-
- public ResponseAPDU getAPDU() {
- return resp;
- }
-
- public byte[] getData() {
- return resp.getData();
- }
-
- public long getDuration() {
- return time;
- }
-
- public short getNaturalSW() {
- return (short) resp.getSW();
- }
-
- public short[] getSWs() {
- return sws;
- }
-
- public short getSW(int index) {
- return sws[index];
- }
-
- public int getNumSW() {
- return numSW;
- }
-
- public boolean hasParam(int index) {
- return params.length >= index + 1 && params[index] != null;
- }
-
- public int getParamLength(int index) {
- return params[index].length;
- }
-
- public byte[] getParam(int index) {
- return params[index];
- }
-
- public byte[][] getParams() {
- return params;
- }
-
- public int getLength() {
- return resp.getNr();
- }
-
- public boolean successful() {
- return this.success;
- }
-
- public boolean error() {
- return this.error;
- }
-
- public String getDescription() {
- return description;
- }
-
- /**
- *
- */
- public static class AllocateKeyAgreement extends Response {
- private byte kaType;
-
- public AllocateKeyAgreement(ResponseAPDU response, String description, long time, byte kaType) {
- super(response, description, time);
- this.kaType = kaType;
-
- parse(1, 0);
- }
- }
-
- /**
- *
- */
- public static class AllocateSignature extends Response {
- private byte sigType;
-
- public AllocateSignature(ResponseAPDU response, String description, long time, byte sigType) {
- super(response, description, time);
- this.sigType = sigType;
-
- parse(1, 0);
- }
- }
-
- /**
- *
- */
- public static class Allocate extends Response {
- private byte keyPair;
- private short keyLength;
- private byte keyClass;
-
- public Allocate(ResponseAPDU response, String description, long time, byte keyPair, short keyLength, byte keyClass) {
- super(response, description, time);
- this.keyPair = keyPair;
- this.keyLength = keyLength;
- this.keyClass = keyClass;
-
- int pairs = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) pairs++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) pairs++;
- parse(pairs, 0);
- }
- }
-
- /**
- *
- */
- public static class Clear extends Response {
- private byte keyPair;
-
- public Clear(ResponseAPDU response, String description, long time, byte keyPair) {
- super(response, description, time);
- this.keyPair = keyPair;
-
- int pairs = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) pairs++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) pairs++;
- parse(pairs, 0);
- }
- }
-
- /**
- *
- */
- public static class Set extends Response {
- private byte keyPair;
- private byte curve;
- private short parameters;
-
- public Set(ResponseAPDU response, String description, long time, byte keyPair, byte curve, short parameters) {
- super(response, description, time);
- this.keyPair = keyPair;
- this.curve = curve;
- this.parameters = parameters;
-
- int pairs = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) pairs++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) pairs++;
-
- parse(pairs, 0);
- }
- }
-
- /**
- *
- */
- public static class Transform extends Response {
- private byte keyPair;
- private byte key;
- private short params;
- private short transformation;
-
- public Transform(ResponseAPDU response, String description, long time, byte keyPair, byte key, short params, short transformation) {
- super(response, description, time);
- this.keyPair = keyPair;
- this.key = key;
- this.params = params;
- this.transformation = transformation;
-
- int pairs = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) pairs++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) pairs++;
-
- parse(pairs, 0);
- }
- }
-
- /**
- *
- */
- public static class Generate extends Response {
- private byte keyPair;
-
- public Generate(ResponseAPDU response, String description, long time, byte keyPair) {
- super(response, description, time);
- this.keyPair = keyPair;
-
- int generated = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) generated++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) generated++;
- parse(generated, 0);
- }
- }
-
- /**
- *
- */
- public static class Export extends Response {
- private byte keyPair;
- private byte key;
- private short parameters;
-
- public Export(ResponseAPDU response, String description, long time, byte keyPair, byte key, short parameters) {
- super(response, description, time);
- this.keyPair = keyPair;
- this.key = key;
- this.parameters = parameters;
-
- int exported = 0;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) exported++;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) exported++;
- int keys = 0;
- if ((key & EC_Consts.KEY_PUBLIC) != 0) keys++;
- if ((key & EC_Consts.KEY_PRIVATE) != 0) keys++;
- int paramCount = 0;
- short mask = EC_Consts.PARAMETER_FP;
- while (mask <= EC_Consts.PARAMETER_K) {
- if ((mask & parameters) != 0) {
- paramCount++;
- }
- mask = (short) (mask << 1);
- }
- int other = 0;
- if ((key & EC_Consts.KEY_PUBLIC) != 0 && (parameters & EC_Consts.PARAMETER_W) != 0) other++;
- if ((key & EC_Consts.KEY_PRIVATE) != 0 && (parameters & EC_Consts.PARAMETER_S) != 0) other++;
-
- parse(exported, exported * keys * paramCount + exported * other);
- }
-
- private int getIndex(byte keyPair, short param) {
- byte pair = ECTesterApplet.KEYPAIR_LOCAL;
- int index = 0;
- while (pair <= ECTesterApplet.KEYPAIR_REMOTE) {
- short mask = EC_Consts.PARAMETER_FP;
- while (mask <= EC_Consts.PARAMETER_S) {
- if (pair == keyPair && param == mask) {
- return index;
- }
- if ((parameters & mask) != 0 && (pair & this.keyPair) != 0) {
- if (mask == EC_Consts.PARAMETER_W) {
- if ((key & EC_Consts.KEY_PUBLIC) != 0)
- index++;
- } else if (mask == EC_Consts.PARAMETER_S) {
- if ((key & EC_Consts.KEY_PRIVATE) != 0)
- index++;
- } else {
- index++;
- }
- }
- mask = (short) (mask << 1);
- }
-
- pair = (byte) (pair << 1);
- }
- return -1;
- }
-
- public boolean hasParameters(byte keyPair, short params) {
- if ((keyPair & this.keyPair) == 0 || (params ^ parameters) != 0) {
- return false;
- }
- short param = EC_Consts.PARAMETER_FP;
- while (param <= EC_Consts.PARAMETER_S) {
- short masked = (short) (param & params);
- if (masked != 0 && !hasParameter(keyPair, masked)) {
- return false;
- }
- param = (short) (param << 1);
- }
- return true;
- }
-
- public boolean hasParameter(byte keyPair, short param) {
- if ((keyPair & this.keyPair) == 0 || (parameters & param) == 0) {
- return false;
- }
- int index = getIndex(keyPair, param);
- return index != -1 && hasParam(index);
- }
-
- public byte[] getParameter(byte keyPair, short param) {
- return getParam(getIndex(keyPair, param));
- }
- }
-
- /**
- *
- */
- public static class ECDH extends Response {
- private byte pubkey;
- private byte privkey;
- private byte export;
- private short transformation;
- private byte type;
-
- public ECDH(ResponseAPDU response, String description, long time, byte pubkey, byte privkey, byte export, short transformation, byte type) {
- super(response, description, time);
- this.pubkey = pubkey;
- this.privkey = privkey;
- this.export = export;
- this.transformation = transformation;
- this.type = type;
-
- parse(1, (export == ECTesterApplet.EXPORT_TRUE) ? 1 : 0);
- }
-
- public short getTransformation() {
- return transformation;
- }
-
- public byte getType() {
- return type;
- }
-
- public boolean hasSecret() {
- return hasParam(0);
- }
-
- public byte[] getSecret() {
- return getParam(0);
- }
-
- public int secretLength() {
- return getParamLength(0);
- }
- }
-
- /**
- *
- */
- public static class ECDSA extends Response {
- private byte keyPair;
- private byte sigType;
- private byte export;
- private byte[] raw;
-
- public ECDSA(ResponseAPDU response, String description, long time, byte keyPair, byte sigType, byte export, byte[] raw) {
- super(response, description, time);
- this.keyPair = keyPair;
- this.sigType = sigType;
- this.export = export;
- this.raw = raw;
-
- parse(1, (export == ECTesterApplet.EXPORT_TRUE) ? 1 : 0);
- }
-
- public boolean hasSignature() {
- return hasParam(0);
- }
-
- public byte[] getSignature() {
- return getParam(0);
- }
- }
-
- /**
- *
- */
- public static class Cleanup extends Response {
-
- public Cleanup(ResponseAPDU response, String description, long time) {
- super(response, description, time);
-
- parse(1, 0);
- }
- }
-
- /**
- *
- */
- public static class GetInfo extends Response {
- private short base;
- private short jcVersion;
- private short cleanupSupport;
- private short apduBufferLength;
- private short ramArrayLength;
- private short ramArray2Length;
- private short apduArrayLength;
-
- public GetInfo(ResponseAPDU response, String description, long time) {
- super(response, description, time);
-
- parse(1, 1);
- int offset = 2 + 2 + getParamLength(0);
- byte[] data = getData();
- base = ByteUtil.getShort(data, offset);
- offset += 2;
- jcVersion = ByteUtil.getShort(data, offset);
- offset += 2;
- cleanupSupport = ByteUtil.getShort(data, offset);
- offset += 2;
- apduBufferLength = ByteUtil.getShort(data, offset);
- offset += 2;
- ramArrayLength = ByteUtil.getShort(data, offset);
- offset += 2;
- ramArray2Length = ByteUtil.getShort(data, offset);
- offset += 2;
- apduArrayLength = ByteUtil.getShort(data, offset);
- }
-
- public String getVersion() {
- return new String(getParam(0));
- }
-
- public short getBase() {
- return base;
- }
-
- public float getJavaCardVersion() {
- byte major = (byte) (jcVersion >> 8);
- byte minor = (byte) (jcVersion & 0xff);
- int minorSize;
- if (minor == 0) {
- minorSize = 1;
- } else {
- minorSize = (int) Math.ceil(Math.log10(minor));
- }
- return (major + ((float) (minor) / (minorSize * 10)));
- }
-
- public boolean getCleanupSupport() {
- return cleanupSupport == 1;
- }
-
- public short getApduBufferLength() {
- return apduBufferLength;
- }
-
- public short getRamArrayLength() {
- return ramArrayLength;
- }
-
- public short getRamArray2Length() {
- return ramArray2Length;
- }
-
- public short getApduArrayLength() {
- return apduArrayLength;
- }
- }
-
- /**
- *
- */
- public static class SetDryRunMode extends Response {
-
- public SetDryRunMode(ResponseAPDU response, String description, long time) {
- super(response, description, time);
-
- parse(1, 0);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java b/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
deleted file mode 100644
index d1eb2b1..0000000
--- a/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardCofactorSuite extends CardTestSuite {
- public CardCofactorSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "cofactor", new String[]{"preset", "random"}, "The cofactor test suite tests whether the card correctly rejects points on the curve",
- "but not in the subgroup generated by the generator(so of small order, dividing the cofactor) during ECDH.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "cofactor");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- Test allocate = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS);
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.SUCCESS);
- Test generate = setupKeypairs(curve, ExpectedValue.SUCCESS, ECTesterApplet.KEYPAIR_LOCAL);
-
- Test prepare = CompoundTest.all(ExpectedValue.SUCCESS, "Prepare and generate keypair on " + curve.getId() + ".", allocate, set, generate);
-
- List<Test> ecdhTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- Test setPub = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pub.getParams(), pub.flatten()), Result.ExpectedValue.FAILURE);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), Result.ExpectedValue.FAILURE);
- Test objectEcdh = CompoundTest.any(Result.ExpectedValue.SUCCESS, CardUtil.getKATypeString(EC_Consts.KeyAgreement_ALG_EC_SVDP_DH) + " test with cofactor pubkey.", setPub, ecdh);
- Command ecdhCommand = new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, pub.flatten());
- Test rawEcdh = CommandTest.expect(ecdhCommand, ExpectedValue.FAILURE, "Card correctly rejected point on non-generator subgroup.", "Card incorrectly accepted point on non-generator subgroup.");
- ecdhTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " cofactor key test.", objectEcdh, rawEcdh));
- }
- Test ecdh = CompoundTest.all(ExpectedValue.SUCCESS, "Perform ECDH with public points on non-generator subgroup.", ecdhTests.toArray(new Test[0]));
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.ANY);
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Cofactor test of " + curve.getId() + ".", prepare, ecdh, cleanup));
- } else {
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Cofactor test of " + curve.getId() + ".", prepare, ecdh));
- }
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java b/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java
deleted file mode 100644
index babe732..0000000
--- a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardCompositeSuite extends CardTestSuite {
-
- public CardCompositeSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "composite", new String[]{"preset", "random"}, "The composite suite runs ECDH over curves with composite order.",
- "Various types of compositeness is tested: smooth numbers, Carmichael pseudo-prime, prime square, product of two large primes.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_Key> keys = EC_Store.getInstance().getObjects(EC_Key.class, "composite");
- Map<EC_Curve, List<EC_Key>> mappedKeys = EC_Store.mapKeyToCurve(keys.values());
- for (Map.Entry<EC_Curve, List<EC_Key>> curveKeys : mappedKeys.entrySet()) {
- EC_Curve curve = curveKeys.getKey();
- List<Test> tests = new LinkedList<>();
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_LOCAL, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()) + ".", allocate));
- continue;
- }
- tests.add(allocate);
- tests.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.ANY));
-
- String name;
- if (cfg.testOptions.contains("preset")) {
- name = "preset semi-random private key";
- } else {
- name = "generated private key";
- }
- tests.add(setupKeypairs(curve, ExpectedValue.ANY, ECTesterApplet.KEYPAIR_LOCAL));
- for (EC_Key key : curveKeys.getValue()) {
- Command ecdhCommand = new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, key.flatten());
- Test ecdh = CommandTest.expect(ecdhCommand, ExpectedValue.FAILURE, "Card correctly rejected to do ECDH over a composite order curve.", "Card incorrectly does ECDH over a composite order curve, leaks bits of private key.");
- tests.add(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ", with " + name + ", " + key.getDesc(), ecdh));
- }
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ".", tests.toArray(new Test[0])));
- }
-
-
- Map<String, EC_Curve> results = EC_Store.getInstance().getObjects(EC_Curve.class, "composite");
- Map<String, List<EC_Curve>> groups = EC_Store.mapToPrefix(results.values());
- /* Test the whole curves with both keypairs generated on card(no small-order public points provided).
- */
- List<EC_Curve> wholeCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("whole")).findFirst().get().getValue();
- testGroup(wholeCurves, "Composite generator order", ExpectedValue.FAILURE, "Card rejected to do ECDH with composite order generator.", "Card did not reject to do ECDH with composite order generator.");
-
- /* Also test having a G of small order, so small R.
- */
- List<EC_Curve> smallRCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("small")).findFirst().get().getValue();
- testGroup(smallRCurves, "Small generator order", ExpectedValue.FAILURE, "Card correctly rejected to do ECDH over a small order generator.", "Card incorrectly does ECDH over a small order generator.");
-
- /* Test increasingly larger prime R, to determine where/if card behavior changes.
- */
- List<EC_Curve> varyingCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("varying")).findFirst().get().getValue();
- testGroup(varyingCurves, null, ExpectedValue.ANY, "", "");
-
- /* Also test having a G of large but composite order, R = p * q,
- */
- List<EC_Curve> pqCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("pq")).findFirst().get().getValue();
- testGroup(pqCurves, null, ExpectedValue.ANY, "", "");
-
- /* Also test having G or large order being a Carmichael pseudoprime, R = p * q * r,
- */
- List<EC_Curve> ppCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("pp")).findFirst().get().getValue();
- testGroup(ppCurves, "Generator order = Carmichael pseudo-prime", ExpectedValue.ANY, "", "");
-
- /* Also test rg0 curves.
- */
- List<EC_Curve> rg0Curves = groups.entrySet().stream().filter((e) -> e.getKey().equals("rg0")).findFirst().get().getValue();
- testGroup(rg0Curves, null, ExpectedValue.ANY, "", "");
- }
-
- private void testGroup(List<EC_Curve> curves, String testName, ExpectedValue dhValue, String ok, String nok) throws Exception {
- for (EC_Curve curve : curves) {
- Test allocate = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS);
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.ANY);
- Test generate = setupKeypairs(curve, ExpectedValue.ANY, ECTesterApplet.KEYPAIR_BOTH);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), dhValue, ok, nok);
- Test ecdsa = CommandTest.expect(new Command.ECDSA_sign(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.Signature_ALG_ECDSA_SHA, ECTesterApplet.EXPORT_FALSE, null), dhValue, ok, nok);
-
- String description;
- if (testName == null) {
- description = curve.getDesc() + " test of " + curve.getId() + ".";
- } else {
- description = testName + " test of " + curve.getId() + ".";
- }
-
- Test perform = CompoundTest.all(ExpectedValue.SUCCESS, "Perform ECDH and ECDSA.", ecdh, ecdsa);
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.ANY);
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, perform, cleanup));
- } else {
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, perform));
- }
- }
-
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardCompressionSuite.java b/src/cz/crcs/ectester/reader/test/CardCompressionSuite.java
deleted file mode 100644
index 9eed814..0000000
--- a/src/cz/crcs/ectester/reader/test/CardCompressionSuite.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import javacard.security.KeyPair;
-
-import java.security.spec.ECPoint;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardCompressionSuite extends CardTestSuite {
- public CardCompressionSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "compression", null, "The compression test suite tests cards support for compressed points in ECDH (as per ANSI X9.62).",
- "It also tests for handling of bogus input in ECDH by using the point at infinity and a hybrid point with the y coordinate corrupted.",
- "It also tests handling of compressed point in ECDH, where the x coordinate is invalid and therefore",
- "a quadratic non-residue will be computed and (square root-ed) during decompression.");
- }
-
- @Override
- protected void runTests() throws Exception {
- //iterate over default curve sizes
- // for Fp
- // - allocate, set custom curve, generate keypairs, -> export generated.
- // - test ecdh with local and remote simply(no compression)
- // - test local privkey, remote pubkey (compressed)
- // - test local privkey, remote pubkey (hybrid)
- // - test local privkey, remote pubkey (hybrid with wrong y)
- // - test local privkey, remote pubkey (point at infinity)
- if (cfg.primeField) {
- runCompression(KeyPair.ALG_EC_FP);
- }
- // for F2m
- // - allocate, set custom curve, generate keypairs, -> export generated.
- // - test ecdh with local and remote simply(no compression)
- // - test local privkey, remote pubkey (compressed)
- // - test local privkey, remote pubkey (hybrid)
- // - test local privkey, remote pubkey (hybrid with wrong y)
- // - test local privkey, remote pubkey (point at infinity)
- if (cfg.binaryField) {
- runCompression(KeyPair.ALG_EC_F2M);
- }
-
- // Now, do ECDH over SECG curves and give the implementation a compressed key that is not a quadratic residue in
- // decompression.
- runNonResidue();
- }
-
- private void runCompression(byte field) throws Exception {
- short[] keySizes = field == KeyPair.ALG_EC_FP ? EC_Consts.FP_SIZES : EC_Consts.F2M_SIZES;
- short domain = field == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M;
-
- for (short keyLength : keySizes) {
- String spec = keyLength + "b " + CardUtil.getKeyTypeString(field);
- byte curveId = EC_Consts.getCurve(keyLength, field);
-
- Test allocateFirst = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, field), Result.ExpectedValue.SUCCESS));
- if (!allocateFirst.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for compression test on " + spec + ".", allocateFirst));
- continue;
- }
-
- List<Test> compressionTests = new LinkedList<>();
- compressionTests.add(allocateFirst);
- Test setCustom = runTest(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, curveId, domain, null), Result.ExpectedValue.SUCCESS));
- Test genCustom = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), Result.ExpectedValue.SUCCESS));
- compressionTests.add(setCustom);
- compressionTests.add(genCustom);
-
- Response.Export key = new Command.Export(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.KEY_PUBLIC, EC_Consts.PARAMETER_W).send();
- byte[] pubkey = key.getParameter(ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.KEY_PUBLIC);
- EC_Curve secgCurve = EC_Store.getInstance().getObject(EC_Curve.class, "secg", CardUtil.getCurveName(curveId));
- ECPoint pub;
- try {
- pub = ECUtil.fromX962(pubkey, secgCurve.toCurve());
- } catch (IllegalArgumentException iae) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "", compressionTests.toArray(new Test[0])));
- continue;
- }
-
- List<Test> kaTests = new LinkedList<>();
- for (byte kaType : EC_Consts.KA_TYPES) {
- List<Test> thisTests = new LinkedList<>();
- Test allocate = runTest(CommandTest.expect(new Command.AllocateKeyAgreement(this.card, kaType), Result.ExpectedValue.SUCCESS));
- if (allocate.ok()) {
- Test ka = runTest(CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, kaType), Result.ExpectedValue.SUCCESS));
-
- thisTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyAgreement setup and basic test.", allocate, ka));
- if (ka.ok()) {
- // tests of the good stuff
- Test kaCompressed = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_COMPRESS, kaType), Result.ExpectedValue.SUCCESS);
- Test kaHybrid = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_COMPRESS_HYBRID, kaType), Result.ExpectedValue.SUCCESS);
- thisTests.add(CompoundTest.any(Result.ExpectedValue.SUCCESS, "Tests of compressed and hybrid form.", kaCompressed, kaHybrid));
-
- // tests the bad stuff here
- byte[] pubHybrid = ECUtil.toX962Hybrid(pub, keyLength);
- pubHybrid[pubHybrid.length - 1] ^= 1;
- byte[] pubHybridEncoded = ByteUtil.prependLength(pubHybrid);
- Test kaBadHybrid = CommandTest.expect(new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, kaType, pubHybridEncoded), Result.ExpectedValue.FAILURE);
-
- byte[] pubInfinityEncoded = {0x01, 0x00};
- Test kaBadInfinity = CommandTest.expect(new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, kaType, pubInfinityEncoded), Result.ExpectedValue.FAILURE);
- thisTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests of corrupted hybrid form and infinity.", kaBadHybrid, kaBadInfinity));
- }
- kaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyAgreement tests of " + CardUtil.getKATypeString(kaType) + ".", thisTests.toArray(new Test[0])));
- }
- }
- compressionTests.addAll(kaTests);
- if (cfg.cleanup) {
- compressionTests.add(CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY));
- }
-
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Compression test of " + spec + ".", compressionTests.toArray(new Test[0])));
- }
- }
-
- private void runNonResidue() {
- Map<String, EC_Key.Public> otherKeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "misc");
- List<EC_Key.Public> compressionKeys = EC_Store.mapToPrefix(otherKeys.values()).get("compression");
-
- for (EC_Key.Public key : compressionKeys) {
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, key.getCurve());
- List<Test> tests = new LinkedList<>();
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_LOCAL, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for non-residue test on " + curve.getBits() + "b " + curve.getId() + ".", allocate));
- continue;
- }
- tests.add(allocate);
- tests.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS));
- tests.add(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), Result.ExpectedValue.SUCCESS));
- byte[] pointData = ECUtil.toX962Compressed(key.getParam(EC_Consts.PARAMETER_W));
- byte[] pointDataEncoded = ByteUtil.prependLength(pointData);
- tests.add(CommandTest.expect(new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, pointDataEncoded), Result.ExpectedValue.FAILURE));
- doTest(CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Non-residue test of " + curve.getId() + ".", tests.toArray(new Test[0])));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java b/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java
deleted file mode 100644
index 8814c37..0000000
--- a/src/cz/crcs/ectester/reader/test/CardDefaultSuite.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import javacard.security.KeyPair;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-import static cz.crcs.ectester.common.test.Result.Value;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardDefaultSuite extends CardTestSuite {
-
- public CardDefaultSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "default", null, "The default test suite tests basic support and performance of ECDH and ECDSA.");
- }
-
- @Override
- protected void runTests() throws Exception {
- if (cfg.primeField) {
- runDefault(KeyPair.ALG_EC_FP);
- }
- if (cfg.binaryField) {
- runDefault(KeyPair.ALG_EC_F2M);
- }
- }
-
- private void runDefault(byte field) throws Exception {
- short[] keySizes = field == KeyPair.ALG_EC_FP ? EC_Consts.FP_SIZES : EC_Consts.F2M_SIZES;
- short domain = field == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M;
- for (short keyLength : keySizes) {
-
- List<Test> supportTests = new LinkedList<>();
- Test allocateFirst = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, field), ExpectedValue.SUCCESS));
- if (!allocateFirst.ok()) {
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "No support for " + keyLength + "b " + CardUtil.getKeyTypeString(field) + ".", allocateFirst));
- continue;
- }
- supportTests.add(allocateFirst);
-
- Test genDefault = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.SUCCESS));
- Test allocateSecond = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, field), ExpectedValue.SUCCESS));
- Test setCustom = runTest(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.getCurve(keyLength, field), domain, null), ExpectedValue.SUCCESS));
- Test genCustom = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.SUCCESS));
- supportTests.add(genDefault);
- supportTests.add(allocateSecond);
- supportTests.add(setCustom);
- supportTests.add(genCustom);
-
- List<Test> kaTests = new LinkedList<>();
- for (byte kaType : EC_Consts.KA_TYPES) {
- Test allocate = runTest(CommandTest.expect(new Command.AllocateKeyAgreement(this.card, kaType), ExpectedValue.SUCCESS));
- if (allocate.ok()) {
- Command ecdh = new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, kaType);
- Test ka = runTest(CommandTest.expect(ecdh, ExpectedValue.SUCCESS));
- Test kaCompressed = runTest(CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_COMPRESS, kaType), ExpectedValue.SUCCESS));
-
- String kaDesc = "Test of the " + CardUtil.getKATypeString(kaType) + " KeyAgreement.";
- Function<Test[], Result> kaCallback = (tests) -> {
- if (tests[1].ok() || tests[2].ok()) {
- return new Result(Value.SUCCESS, "Some ECDH is supported.");
- } else {
- return new Result(Value.FAILURE, "ECDH failed.");
- }
- };
-
- Test compound;
- if (ka.ok()) {
- Test perfTest = runTest(PerformanceTest.repeat(this.card, ecdh, 10));
- compound = runTest(CompoundTest.function(kaCallback, kaDesc, allocate, ka, kaCompressed, perfTest));
- } else {
- compound = runTest(CompoundTest.function(kaCallback, kaDesc, allocate, ka, kaCompressed));
- }
-
- kaTests.add(compound);
- } else {
- runTest(allocate);
- kaTests.add(allocate);
- }
- }
- Test kaTest = runTest(CompoundTest.any(ExpectedValue.SUCCESS, "KeyAgreement tests.", kaTests.toArray(new Test[0])));
- supportTests.add(kaTest);
-
- List<Test> signTests = new LinkedList<>();
- for (byte sigType : EC_Consts.SIG_TYPES) {
- Test allocate = runTest(CommandTest.expect(new Command.AllocateSignature(this.card, sigType), ExpectedValue.SUCCESS));
- if (allocate.ok()) {
- Command ecdsa = new Command.ECDSA(this.card, ECTesterApplet.KEYPAIR_LOCAL, sigType, ECTesterApplet.EXPORT_FALSE, null);
- Test expect = runTest(CommandTest.expect(ecdsa, ExpectedValue.SUCCESS));
-
- String signDesc = "Test of the " + CardUtil.getSigTypeString(sigType) + " signature.";
-
- Random rand = new Random();
- byte[] sigData = new byte[64];
- rand.nextBytes(sigData);
-
- Test compound;
- if (expect.ok()) {
- Command ecdsaSign = new Command.ECDSA_sign(this.card, ECTesterApplet.KEYPAIR_LOCAL, sigType, ECTesterApplet.EXPORT_TRUE, sigData);
- PerformanceTest signTest = runTest(PerformanceTest.repeat(this.card, "Sign", ecdsaSign, 10));
- byte[] signature = signTest.getResponses()[0].getParam(0);
- Command ecdsaVerify = new Command.ECDSA_verify(this.card, ECTesterApplet.KEYPAIR_LOCAL, sigType, sigData, signature);
- PerformanceTest verifyTest = runTest(PerformanceTest.repeat(this.card, "Verify", ecdsaVerify, 10));
- compound = runTest(CompoundTest.all(ExpectedValue.SUCCESS, signDesc, allocate, expect, signTest, verifyTest));
- } else {
- compound = runTest(CompoundTest.all(ExpectedValue.SUCCESS, signDesc, allocate, expect));
- }
- signTests.add(compound);
- } else {
- signTests.add(allocate);
- }
- }
- Test signTest = runTest(CompoundTest.any(ExpectedValue.SUCCESS, "Signature tests.", signTests.toArray(new Test[0])));
- supportTests.add(signTest);
- ExpectedValue[] testExpects = {ExpectedValue.SUCCESS, ExpectedValue.ANY, ExpectedValue.SUCCESS, ExpectedValue.SUCCESS, ExpectedValue.SUCCESS, ExpectedValue.SUCCESS, ExpectedValue.SUCCESS};
- List<ExpectedValue> expects = Stream.of(testExpects).collect(Collectors.toList());
- if (cfg.cleanup) {
- supportTests.add(CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY));
- expects.add(ExpectedValue.ANY);
- }
-
- doTest(CompoundTest.mask(expects.toArray(new ExpectedValue[0]), "Tests of " + keyLength + "b " + CardUtil.getKeyTypeString(field) + " support.", supportTests.toArray(new Test[0])));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardDegenerateSuite.java b/src/cz/crcs/ectester/reader/test/CardDegenerateSuite.java
deleted file mode 100644
index f2e73b6..0000000
--- a/src/cz/crcs/ectester/reader/test/CardDegenerateSuite.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardDegenerateSuite extends CardTestSuite {
-
- public CardDegenerateSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "degenerate", null, "The degenerate suite tests whether the card rejects points outside of the curve during ECDH.",
- "The tested points lie on a part of the plane for which some Edwards, Hessian and Huff form addition formulas degenerate into exponentiation in the base finite field.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "degenerate");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getId() + ".", allocate));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), Result.ExpectedValue.SUCCESS);
-
- Test prepare = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Prepare and generate keypair on " + curve.getId() + ".", allocate, set, generate);
-
- List<Test> ecdhTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- Test setPub = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pub.getParams(), pub.flatten()), Result.ExpectedValue.FAILURE);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), Result.ExpectedValue.FAILURE, "Card correctly rejected point on degenerate curve.", "Card incorrectly accepted point on degenerate curve.");
- Test objectEcdh = CompoundTest.any(Result.ExpectedValue.SUCCESS, CardUtil.getKATypeString(EC_Consts.KeyAgreement_ALG_EC_SVDP_DH) + " test with degenerate pubkey.", setPub, ecdh);
- Command ecdhCommand = new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, pub.flatten());
- Test rawEcdh = CommandTest.expect(ecdhCommand, Result.ExpectedValue.FAILURE, "Card correctly rejected point on degenerate curve.", "Card incorrectly accepted point on degenerate curve.");
- ecdhTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " degenerate key test.", objectEcdh, rawEcdh));
- //TODO: actually get the result of ECDH here, as well as export privkey and compare to exponentiation in Fp^*.
- }
- Test ecdh = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform ECDH with degenerate public points.", ecdhTests.toArray(new Test[0]));
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY);
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Degenerate curve test of " + curve.getId() + ".", prepare, ecdh, cleanup));
- } else {
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Degenerate curve test of " + curve.getId() + ".", prepare, ecdh));
- }
-
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardEdgeCasesSuite.java b/src/cz/crcs/ectester/reader/test/CardEdgeCasesSuite.java
deleted file mode 100644
index 9257b3d..0000000
--- a/src/cz/crcs/ectester/reader/test/CardEdgeCasesSuite.java
+++ /dev/null
@@ -1,336 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_KAResult;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.ec.EC_Params;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestCallback;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import javacard.security.CryptoException;
-import javacard.security.KeyPair;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardEdgeCasesSuite extends CardTestSuite {
- public CardEdgeCasesSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "edge-cases", null, "The edge-cases test suite tests various inputs to ECDH which may cause an implementation to achieve a certain edge-case state during it.",
- "Some of the data is from the google/Wycheproof project. Tests include CVE-2017-10176 and CVE-2017-8932.",
- "Also tests values of the private key and public key that would trigger the OpenSSL modular multiplication bug on the P-256 curve.",
- "Various edge private key values are also tested.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_KAResult> results = EC_Store.getInstance().getObjects(EC_KAResult.class, "wycheproof");
- Map<String, List<EC_KAResult>> groups = EC_Store.mapToPrefix(results.values());
- for (Map.Entry<String, List<EC_KAResult>> e : groups.entrySet()) {
- String description = null;
- switch (e.getKey()) {
- case "addsub":
- description = "Tests for addition-subtraction chains.";
- break;
- case "cve_2017_10176":
- description = "Tests for CVE-2017-10176.";
- break;
- case "cve_2017_8932":
- description = "Tests for CVE-2017-8932.";
- break;
- }
-
- List<Test> groupTests = new LinkedList<>();
- Map<EC_Curve, List<EC_KAResult>> curveList = EC_Store.mapResultToCurve(e.getValue());
- for (Map.Entry<EC_Curve, List<EC_KAResult>> c : curveList.entrySet()) {
- EC_Curve curve = c.getKey();
-
- List<Test> curveTests = new LinkedList<>();
- Test allocate = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS);
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test prepareCurve = CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Prepare curve", allocate, set);
-
- List<EC_KAResult> values = c.getValue();
- for (EC_KAResult value : values) {
- String id = value.getId();
- String privkeyId = value.getOneKey();
- String pubkeyId = value.getOtherKey();
-
- EC_Key.Private privkey = EC_Store.getInstance().getObject(EC_Key.Private.class, privkeyId);
- EC_Key.Public pubkey = EC_Store.getInstance().getObject(EC_Key.Public.class, pubkeyId);
-
- Test setPrivkey = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, privkey.getParams(), privkey.flatten()), Result.ExpectedValue.SUCCESS);
- Test setPubkey = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pubkey.getParams(), pubkey.flatten()), Result.ExpectedValue.SUCCESS);
- Test ecdhPreTest = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), Result.ExpectedValue.SUCCESS);
- Test ecdh = CommandTest.function(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, value.getJavaCardKA()), new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- Response.ECDH dh = (Response.ECDH) testable.getResponse();
- if (dh.getSW(0) == CryptoException.NO_SUCH_ALGORITHM) {
- return new Result(Result.Value.SUCCESS, "ECDH algorithm unsupported.");
- }
- if (!dh.successful())
- return new Result(Result.Value.FAILURE, "ECDH was unsuccessful.");
- if (!dh.hasSecret())
- return new Result(Result.Value.FAILURE, "ECDH response did not contain the derived secret.");
- if (!ByteUtil.compareBytes(dh.getSecret(), 0, value.getData(0), 0, dh.secretLength())) {
- int firstDiff = ByteUtil.diffBytes(dh.getSecret(), 0, value.getData(0), 0, dh.secretLength());
- System.err.println(ByteUtil.bytesToHex(dh.getSecret()));
- System.err.println(ByteUtil.bytesToHex(value.getData(0)));
- return new Result(Result.Value.FAILURE, "ECDH derived secret does not match the test-vector, first difference was at byte " + firstDiff + ".");
- }
- return new Result(Result.Value.SUCCESS);
- }
- });
-
- Test prepare = CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Prepare", setPrivkey, setPubkey);
- Test ka = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do", ecdhPreTest, ecdh);
-
- Test one = CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Test " + id + ".", prepare, ka);
- curveTests.add(one);
- }
-
- if (cfg.cleanup) {
- curveTests.add(CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY));
- }
-
- Test curveTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests", curveTests.toArray(new Test[0]));
- groupTests.add(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Tests on " + curve.getId() + ".", prepareCurve, curveTest));
- }
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, description, groupTests.toArray(new Test[0])));
- }
-
- {
- EC_KAResult openssl_bug = EC_Store.getInstance().getObject(EC_KAResult.class, "misc", "openssl-bug");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, openssl_bug.getCurve());
- EC_Key.Private skey = EC_Store.getInstance().getObject(EC_Key.Private.class, openssl_bug.getOtherKey());
- EC_Key.Public pkey = EC_Store.getInstance().getObject(EC_Key.Public.class, openssl_bug.getOneKey());
- Test key = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), KeyPair.ALG_EC_FP), Result.ExpectedValue.SUCCESS);
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test setPrivate = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, EC_Consts.PARAMETER_S, skey.flatten(EC_Consts.PARAMETER_S)), Result.ExpectedValue.SUCCESS);
- Test setPublic = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, EC_Consts.PARAMETER_W, pkey.flatten(EC_Consts.PARAMETER_W)), Result.ExpectedValue.SUCCESS);
- Test ecdh = CommandTest.function(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, openssl_bug.getJavaCardKA()), new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- Response.ECDH dh = (Response.ECDH) testable.getResponse();
- if (!dh.successful())
- return new Result(Result.Value.FAILURE, "ECDH was unsuccessful.");
- if (!dh.hasSecret())
- return new Result(Result.Value.FAILURE, "ECDH response did not contain the derived secret.");
- if (ByteUtil.compareBytes(dh.getSecret(), 0, openssl_bug.getData(0), 0, dh.secretLength())) {
- return new Result(Result.Value.FAILURE, "OpenSSL bug is present, derived secret matches example.");
- }
- return new Result(Result.Value.SUCCESS);
- }
- });
-
- doTest(CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Test OpenSSL modular reduction bug.", key, set, setPrivate, setPublic, ecdh));
- }
-
- Map<String, EC_Curve> curveMap = EC_Store.getInstance().getObjects(EC_Curve.class, "secg");
- List<EC_Curve> curves = curveMap.entrySet().stream().filter((e) -> e.getKey().endsWith("r1") && e.getValue().getField() == KeyPair.ALG_EC_FP).map(Map.Entry::getValue).collect(Collectors.toList());
- curves.add(EC_Store.getInstance().getObject(EC_Curve.class, "cofactor/cofactor128p2"));
- curves.add(EC_Store.getInstance().getObject(EC_Curve.class, "cofactor/cofactor160p4"));
- Random rand = new Random();
- for (EC_Curve curve : curves) {
- Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), KeyPair.ALG_EC_FP), Result.ExpectedValue.SUCCESS));
- if (!key.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.FAILURE, "No support for " + curve.getBits() + "b " + curve.getId() + ".", key));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), Result.ExpectedValue.SUCCESS);
- CommandTest export = CommandTest.expect(new Command.Export(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_PUBLIC, EC_Consts.PARAMETER_W), Result.ExpectedValue.SUCCESS);
- Test setup = runTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyPair setup.", key, set, generate, export));
-
- /*
- byte[] pParam = curve.getParam(EC_Consts.PARAMETER_FP)[0];
- BigInteger p = new BigInteger(1, pParam);
- byte[] wParam = ((Response.Export) export.getResponse()).getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_W);
- byte[] xValue = new byte[(wParam.length - 1) / 2];
- byte[] yValue = new byte[(wParam.length - 1) / 2];
- System.arraycopy(wParam, 1, xValue, 0, xValue.length);
- System.arraycopy(wParam, (wParam.length / 2) + 1, yValue, 0, yValue.length);
- BigInteger y = new BigInteger(1, yValue);
- BigInteger negY = p.subtract(y);
- byte[] newY = ECUtil.toByteArray(negY, curve.getBits());
-
- EC_Params negYParams = new EC_Params(EC_Consts.PARAMETER_W, new byte[][]{xValue, newY});
- Test negYTest = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, negYParams.getParams(), negYParams.flatten()), "ECDH with pubkey negated.", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
- */
-
- Test zeroS = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, EC_Consts.PARAMETER_S, EC_Consts.TRANSFORMATION_ZERO), "ECDH with S = 0.", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
- Test oneS = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, EC_Consts.PARAMETER_S, EC_Consts.TRANSFORMATION_ONE), "ECDH with S = 1.", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
-
- byte[] rParam = curve.getParam(EC_Consts.PARAMETER_R)[0];
- BigInteger R = new BigInteger(1, rParam);
- BigInteger smaller = new BigInteger(curve.getBits(), rand).mod(R);
- BigInteger diff = R.divide(BigInteger.valueOf(10));
- BigInteger randDiff = new BigInteger(diff.bitLength(), rand).mod(diff);
- BigInteger larger = R.add(randDiff);
-
- BigInteger full = BigInteger.valueOf(1).shiftLeft(R.bitLength() - 1).subtract(BigInteger.ONE);
-
- BigInteger alternate = full;
- for (int i = 0; i < R.bitLength(); i += 2) {
- alternate = alternate.clearBit(i);
- }
-
- BigInteger alternateOther = alternate.xor(full);
-
- EC_Params alternateParams = makeParams(alternate);
- Test alternateS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, alternateParams.getParams(), alternateParams.flatten()), "ECDH with S = 101010101...01010.", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
-
- EC_Params alternateOtherParams = makeParams(alternateOther);
- Test alternateOtherS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, alternateOtherParams.getParams(), alternateOtherParams.flatten()), "ECDH with S = 010101010...10101.", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
-
- EC_Params fullParams = makeParams(full);
- Test fullS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, fullParams.getParams(), fullParams.flatten()), "ECDH with S = 111111111...11111 (but < r).", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
-
- EC_Params smallerParams = makeParams(smaller);
- Test smallerS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, smallerParams.getParams(), smallerParams.flatten()), "ECDH with S < r.", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
-
- EC_Params exactParams = makeParams(R);
- Test exactS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, exactParams.getParams(), exactParams.flatten()), "ECDH with S = r.", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
-
- EC_Params largerParams = makeParams(larger);
- Test largerS = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, largerParams.getParams(), largerParams.flatten()), "ECDH with S > r.", Result.ExpectedValue.ANY, Result.ExpectedValue.ANY);
-
- BigInteger rm1 = R.subtract(BigInteger.ONE);
- BigInteger rp1 = R.add(BigInteger.ONE);
-
- EC_Params rm1Params = makeParams(rm1);
- Test rm1S = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, rm1Params.getParams(), rm1Params.flatten()), "ECDH with S = r - 1.", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
-
- EC_Params rp1Params = makeParams(rp1);
- Test rp1S = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, rp1Params.getParams(), rp1Params.flatten()), "ECDH with S = r + 1.", Result.ExpectedValue.ANY, Result.ExpectedValue.ANY);
-
- byte[] k = curve.getParam(EC_Consts.PARAMETER_K)[0];
- BigInteger K = new BigInteger(1, k);
- BigInteger kr = K.multiply(R);
- BigInteger krm1 = kr.subtract(BigInteger.ONE);
- BigInteger krp1 = kr.add(BigInteger.ONE);
-
- Result.ExpectedValue kExpected = K.equals(BigInteger.ONE) ? Result.ExpectedValue.SUCCESS : Result.ExpectedValue.FAILURE;
-
- EC_Params krParams = makeParams(kr);
- Test krS /*ONE!*/ = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, krParams.getParams(), krParams.flatten()), "ECDH with S = k * r.", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
-
- EC_Params krm1Params = makeParams(krm1);
- Test krm1S = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, krm1Params.getParams(), krm1Params.flatten()), "ECDH with S = (k * r) - 1.", kExpected, kExpected);
-
- EC_Params krp1Params = makeParams(krp1);
- Test krp1S = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, krp1Params.getParams(), krp1Params.flatten()), "ECDH with S = (k * r) + 1.", Result.ExpectedValue.ANY, Result.ExpectedValue.ANY);
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with edge-case private key values over " + curve.getId() + ".", setup, zeroS, oneS, alternateS, alternateOtherS, fullS, smallerS, exactS, largerS, rm1S, rp1S, krS, krm1S, krp1S, cleanup));
- } else {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with edge-case private key values over " + curve.getId() + ".", setup, zeroS, oneS, alternateS, alternateOtherS, fullS, smallerS, exactS, largerS, rm1S, rp1S, krS, krm1S, krp1S));
- }
- }
-
- EC_Curve secp160r1 = EC_Store.getInstance().getObject(EC_Curve.class, "secg/secp160r1");
- byte[] pData = secp160r1.getParam(EC_Consts.PARAMETER_FP)[0];
- BigInteger p = new BigInteger(1, pData);
- byte[] rData = secp160r1.getParam(EC_Consts.PARAMETER_R)[0];
- BigInteger r = new BigInteger(1, rData);
-
- BigInteger range = r.subtract(p);
- BigInteger deviation = range.divide(BigInteger.valueOf(5));
- BigDecimal dev = new BigDecimal(deviation);
- BigDecimal smallDev = new BigDecimal(10000);
- int n = 10;
- BigInteger[] rs = new BigInteger[n];
- BigInteger[] ps = new BigInteger[n];
- BigInteger[] zeros = new BigInteger[n];
- for (int i = 0; i < n; ++i) {
- double sample;
- do {
- sample = rand.nextGaussian();
- } while (sample >= -1 && sample <= 1);
- BigInteger where = dev.multiply(new BigDecimal(sample)).toBigInteger();
- rs[i] = where.add(r);
- ps[i] = where.add(p);
- zeros[i] = smallDev.multiply(new BigDecimal(sample)).toBigInteger().abs();
- }
- Arrays.sort(rs);
- Arrays.sort(ps);
- Arrays.sort(zeros);
-
- Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, secp160r1.getBits(), KeyPair.ALG_EC_FP), Result.ExpectedValue.SUCCESS));
- if (!key.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.FAILURE, "No support for " + secp160r1.getBits() + "b secp160r1.", key));
- return;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, secp160r1.getParams(), secp160r1.flatten()), Result.ExpectedValue.SUCCESS);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), Result.ExpectedValue.SUCCESS);
- Test setup = CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyPair setup.", key, set, generate);
-
- Test[] zeroTests = new Test[n];
- int i = 0;
- for (BigInteger nearZero : zeros) {
- EC_Params params = makeParams(nearZero);
- zeroTests[i++] = ecdhTestBoth(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, params.getParams(), params.flatten()), nearZero.toString(16), Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
- }
- Test zeroTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near zero.", zeroTests);
-
- Test[] pTests = new Test[n];
- i = 0;
- for (BigInteger nearP : ps) {
- EC_Params params = makeParams(nearP);
- pTests[i++] = ecdhTestBoth(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, params.getParams(), params.flatten()), nearP.toString(16) + (nearP.compareTo(p) > 0 ? " (>p)" : " (<=p)"), Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
- }
- Test pTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near p.", pTests);
-
- Test[] rTests = new Test[n];
- i = 0;
- for (BigInteger nearR : rs) {
- EC_Params params = makeParams(nearR);
- if (nearR.compareTo(r) >= 0) {
- rTests[i++] = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, params.getParams(), params.flatten()), nearR.toString(16) + " (>=r)", Result.ExpectedValue.FAILURE, Result.ExpectedValue.FAILURE);
- } else {
- rTests[i++] = ecdhTestBoth(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, params.getParams(), params.flatten()), nearR.toString(16) + " (<r)", Result.ExpectedValue.SUCCESS, Result.ExpectedValue.SUCCESS);
- }
- }
- Test rTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near r.", rTests);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test private key values near zero, near p and near/larger than the order.", setup, zeroTest, pTest, rTest));
- }
-
- private Test ecdhTestBoth(Command setPriv, String desc, Result.ExpectedValue setExpect, Result.ExpectedValue ecdhExpect) {
- Test set = CommandTest.expect(setPriv, setExpect);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), ecdhExpect);
-
- return CompoundTest.all(Result.ExpectedValue.SUCCESS, desc, set, ecdh);
- }
-
- private Test ecdhTest(Command setPriv, String desc, Result.ExpectedValue setExpect, Result.ExpectedValue ecdhExpect) {
- Test set = CommandTest.expect(setPriv, setExpect);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), ecdhExpect);
-
- return CompoundTest.any(Result.ExpectedValue.SUCCESS, desc, set, ecdh);
- }
-
- private EC_Params makeParams(BigInteger s) {
- return makeParams(ECUtil.toByteArray(s, s.bitLength()));
- }
-
- private EC_Params makeParams(byte[] s) {
- return new EC_Params(EC_Consts.PARAMETER_S, new byte[][]{s});
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardInvalidSuite.java b/src/cz/crcs/ectester/reader/test/CardInvalidSuite.java
deleted file mode 100644
index 5df379e..0000000
--- a/src/cz/crcs/ectester/reader/test/CardInvalidSuite.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardInvalidSuite extends CardTestSuite {
-
- public CardInvalidSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "invalid", null, "The invalid curve suite tests whether the card rejects points outside of the curve during ECDH.");
- }
-
- @Override
- protected void runTests() throws Exception {
- /* Set original curves (secg/nist/brainpool). Generate local.
- * Try ECDH with invalid public keys of increasing order.
- */
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "invalid");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getId() + ".", allocate));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.SUCCESS);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), ExpectedValue.SUCCESS);
-
- Test prepare = CompoundTest.all(ExpectedValue.SUCCESS, "Prepare and generate keypair on " + curve.getId() + ".", allocate, set, generate);
-
- List<Test> ecdhTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- Test setPub = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pub.getParams(), pub.flatten()), Result.ExpectedValue.FAILURE);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), Result.ExpectedValue.FAILURE);
- Test objectEcdh = CompoundTest.any(Result.ExpectedValue.SUCCESS, CardUtil.getKATypeString(EC_Consts.KeyAgreement_ALG_EC_SVDP_DH) + " test with invalid pubkey.", setPub, ecdh);
- Command ecdhCommand = new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, pub.flatten());
- Test rawEcdh = CommandTest.expect(ecdhCommand, ExpectedValue.FAILURE, "Card correctly rejected point on invalid curve.", "Card incorrectly accepted point on invalid curve.");
- ecdhTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " invalid key test.", objectEcdh, rawEcdh));
- }
- Test ecdh = CompoundTest.all(ExpectedValue.SUCCESS, "Perform ECDH with invalid public points.", ecdhTests.toArray(new Test[0]));
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.ANY);
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Invalid curve test of " + curve.getId() + ".", prepare, ecdh, cleanup));
- } else {
- doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Invalid curve test of " + curve.getId() + ".", prepare, ecdh));
- }
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardMiscSuite.java b/src/cz/crcs/ectester/reader/test/CardMiscSuite.java
deleted file mode 100644
index dd49708..0000000
--- a/src/cz/crcs/ectester/reader/test/CardMiscSuite.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardMiscSuite extends CardTestSuite {
-
- public CardMiscSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "miscellaneous", new String[]{"preset", "random"}, "Some miscellaneous tests, tries ECDH and ECDSA over supersingular curves, anomalous curves,",
- "Barreto-Naehrig curves with small embedding degree and CM discriminant, MNT curves,",
- "some Montgomery curves transformed to short Weierstrass form and Curve25519 transformed to short Weierstrass form.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_Curve> anCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "anomalous");
- Map<String, EC_Curve> ssCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "supersingular");
- Map<String, EC_Curve> bnCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "Barreto-Naehrig");
- Map<String, EC_Curve> mntCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "MNT");
- List<EC_Curve> mCurves = new ArrayList<>();
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-221"));
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-383"));
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-511"));
- EC_Curve curve25519 = EC_Store.getInstance().getObject(EC_Curve.class, "other", "Curve25519");
-
- testCurves(anCurves.values(), "anomalous", Result.ExpectedValue.FAILURE);
- testCurves(ssCurves.values(), "supersingular", Result.ExpectedValue.FAILURE);
- testCurves(bnCurves.values(), "Barreto-Naehrig", Result.ExpectedValue.SUCCESS);
- testCurves(mntCurves.values(), "MNT", Result.ExpectedValue.SUCCESS);
- testCurves(mCurves, "Montgomery", Result.ExpectedValue.SUCCESS);
- testCurve(curve25519, "Montgomery", Result.ExpectedValue.SUCCESS);
- }
-
- private void testCurve(EC_Curve curve, String catName, Result.ExpectedValue expected) {
- Test allocateFirst = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS));
- if (!allocateFirst.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + catName + " curve: " + curve.getId() + ".", allocateFirst));
- return;
- }
-
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test generate = setupKeypairs(curve, Result.ExpectedValue.ANY, ECTesterApplet.KEYPAIR_BOTH);
- Test ka = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), expected);
- Test sig = CommandTest.expect(new Command.ECDSA_sign(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.Signature_ALG_ECDSA_SHA, ECTesterApplet.EXPORT_FALSE, null), expected);
- Test perform = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform ECDH and ECDSA.", ka, sig);
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY);
- doTest(CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Tests over " + curve.getBits() + "b " + catName + " curve: " + curve.getId() + ".", allocateFirst, set, generate, perform, cleanup));
- } else {
- doTest(CompoundTest.greedyAll(Result.ExpectedValue.SUCCESS, "Tests over " + curve.getBits() + "b " + catName + " curve: " + curve.getId() + ".", allocateFirst, set, generate, perform));
- }
- }
-
- private void testCurves(Collection<EC_Curve> curves, String catName, Result.ExpectedValue expected) {
- for (EC_Curve curve : curves) {
- testCurve(curve, catName, expected);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardSignatureSuite.java b/src/cz/crcs/ectester/reader/test/CardSignatureSuite.java
deleted file mode 100644
index 0e4ca8e..0000000
--- a/src/cz/crcs/ectester/reader/test/CardSignatureSuite.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.ec.EC_SigResult;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardSignatureSuite extends CardTestSuite {
- public CardSignatureSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "signature", null, "The signature test suite tests verifying various malformed and well-formed but invalid ECDSA signatures.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_SigResult> results = EC_Store.getInstance().getObjects(EC_SigResult.class, "wrong");
- Map<String, List<EC_SigResult>> groups = EC_Store.mapToPrefix(results.values());
-
- List<EC_SigResult> nok = groups.entrySet().stream().filter((e) -> e.getKey().equals("nok")).findFirst().get().getValue();
-
- byte[] data = "Some stuff that is not the actual data".getBytes();
- for (EC_SigResult sig : nok) {
- ecdsaTest(sig, Result.ExpectedValue.FAILURE, data);
- }
-
- List<EC_SigResult> ok = groups.entrySet().stream().filter((e) -> e.getKey().equals("ok")).findFirst().get().getValue();
- for (EC_SigResult sig : ok) {
- ecdsaTest(sig, Result.ExpectedValue.SUCCESS, null);
- }
- }
-
- private void ecdsaTest(EC_SigResult sig, Result.ExpectedValue expected, byte[] defaultData) {
- EC_Key.Public pubkey = EC_Store.getInstance().getObject(EC_Key.Public.class, sig.getVerifyKey());
-
- byte[] data = sig.getSigData();
- if (data == null) {
- data = defaultData;
- }
-
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, sig.getCurve());
- Test allocate = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_LOCAL, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS);
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test setVerifyKey = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, pubkey.getParams(), pubkey.flatten()), Result.ExpectedValue.SUCCESS);
- Test ecdsaVerify = CommandTest.expect(new Command.ECDSA_verify(this.card, ECTesterApplet.KEYPAIR_LOCAL, sig.getJavaCardSig(), data, sig.getData(0)), expected);
-
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "ECDSA test of " + sig.getId() + ".", allocate, set, setVerifyKey, ecdsaVerify, cleanup));
- } else {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "ECDSA test of " + sig.getId() + ".", allocate, set, setVerifyKey, ecdsaVerify));
- }
-
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardTestSuite.java b/src/cz/crcs/ectester/reader/test/CardTestSuite.java
deleted file mode 100644
index fc60ae5..0000000
--- a/src/cz/crcs/ectester/reader/test/CardTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Params;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.Arrays;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class CardTestSuite extends TestSuite {
- ECTesterReader.Config cfg;
- CardMngr card;
- String[] options;
-
- CardTestSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager, String name, String[] options, String... description) {
- super(writer, name, description);
- this.card = cardManager;
- this.cfg = cfg;
- this.options = options;
- }
-
- public CardMngr getCard() {
- return card;
- }
-
- public ECTesterReader.Config getCfg() {
- return cfg;
- }
-
- public String[] getOptions() {
- if (options != null) {
- return options.clone();
- } else {
- return options;
- }
- }
-
- public Test setupKeypairs(EC_Curve curve, Result.ExpectedValue expected, byte keyPair) {
- if ((Arrays.asList(options).contains("preset") && cfg.testOptions.contains("preset")) || (Arrays.asList(options).contains("random") && cfg.testOptions.contains("random"))) {
- Test setLocal = null;
- if ((keyPair & ECTesterApplet.KEYPAIR_LOCAL) != 0) {
- EC_Params priv;
- if (cfg.testOptions.contains("preset")) {
- priv = ECUtil.fixedRandomKey(curve);
- } else {
- priv = ECUtil.fullRandomKey(curve);
- }
- setLocal = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, priv.getParams(), priv.flatten()), expected);
- }
- Test setRemote = null;
- if ((keyPair & ECTesterApplet.KEYPAIR_REMOTE) != 0) {
- EC_Params pub;
- if (cfg.testOptions.contains("preset")) {
- pub = ECUtil.fixedRandomPoint(curve);
- } else {
- pub = ECUtil.fullRandomPoint(curve);
- }
- if (pub == null) {
- setRemote = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_REMOTE), expected);
- } else {
- setRemote = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pub.getParams(), pub.flatten()), expected);
- }
- }
-
- if (keyPair == ECTesterApplet.KEYPAIR_LOCAL) {
- return setLocal;
- } else if (keyPair == ECTesterApplet.KEYPAIR_REMOTE) {
- return setRemote;
- } else {
- String desc;
- if (cfg.testOptions.contains("preset")) {
- desc = "Set semi-random parameters.";
- } else {
- desc = "Set fully-random parameters.";
- }
- return CompoundTest.all(expected, desc, setLocal, setRemote);
- }
- } else {
- return CommandTest.expect(new Command.Generate(this.card, keyPair), expected);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardTestVectorSuite.java b/src/cz/crcs/ectester/reader/test/CardTestVectorSuite.java
deleted file mode 100644
index d143852..0000000
--- a/src/cz/crcs/ectester/reader/test/CardTestVectorSuite.java
+++ /dev/null
@@ -1,235 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestCallback;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-import javacard.security.KeyPair;
-
-import javax.crypto.KeyAgreement;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.*;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.ECPrivateKeySpec;
-import java.security.spec.ECPublicKeySpec;
-import java.security.spec.InvalidKeySpecException;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.BiFunction;
-import java.util.stream.Collectors;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-import static cz.crcs.ectester.common.test.Result.Value;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardTestVectorSuite extends CardTestSuite {
-
- public CardTestVectorSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "test-vectors", null, "The test-vectors suite contains a collection of test vectors which test basic ECDH correctness.");
- }
-
- @Override
- protected void runTests() throws Exception {
- /* Set original curves (secg/nist/brainpool). Set keypairs from test vectors.
- * Do ECDH both ways, export and verify that the result is correct.
- */
- Map<String, EC_KAResult> results = EC_Store.getInstance().getObjects(EC_KAResult.class, "test");
- for (EC_KAResult result : results.values()) {
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, result.getCurve());
- EC_Params onekey = EC_Store.getInstance().getObject(EC_Keypair.class, result.getOneKey());
- if (onekey == null) {
- onekey = EC_Store.getInstance().getObject(EC_Key.Private.class, result.getOneKey());
- }
- EC_Params otherkey = EC_Store.getInstance().getObject(EC_Keypair.class, result.getOtherKey());
- if (otherkey == null) {
- otherkey = EC_Store.getInstance().getObject(EC_Key.Public.class, result.getOtherKey());
- }
- if (onekey == null || otherkey == null) {
- throw new IOException("Test vector keys couldn't be located.");
- }
- List<Test> testVector = new LinkedList<>();
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()) + ".", allocate));
- continue;
- }
-
- testVector.add(allocate);
- testVector.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.SUCCESS));
- testVector.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.CURVE_external, EC_Consts.PARAMETER_S, onekey.flatten(EC_Consts.PARAMETER_S)), ExpectedValue.SUCCESS));
- testVector.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, EC_Consts.PARAMETER_W, otherkey.flatten(EC_Consts.PARAMETER_W)), ExpectedValue.SUCCESS));
- testVector.add(CommandTest.function(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, result.getJavaCardKA()), new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- Response.ECDH dh = (Response.ECDH) testable.getResponse();
- if (!dh.successful())
- return new Result(Value.FAILURE, "ECDH was unsuccessful.");
- if (!dh.hasSecret())
- return new Result(Value.FAILURE, "ECDH response did not contain the derived secret.");
- if (!ByteUtil.compareBytes(dh.getSecret(), 0, result.getData(0), 0, dh.secretLength())) {
- int firstDiff = ByteUtil.diffBytes(dh.getSecret(), 0, result.getData(0), 0, dh.secretLength());
- return new Result(Value.FAILURE, "ECDH derived secret does not match the test-vector, first difference was at byte " + firstDiff + ".");
- }
- return new Result(Value.SUCCESS);
- }
- }));
- if (cfg.cleanup) {
- testVector.add(CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.ANY));
- }
- doTest(CompoundTest.greedyAll(ExpectedValue.SUCCESS, "Test vector " + result.getId() + ".", testVector.toArray(new Test[0])));
- }
-
- KeyAgreement ka;
- Signature sig;
- KeyFactory kf;
- MessageDigest md;
- try {
- ka = KeyAgreement.getInstance("ECDH", "BC");
- sig = Signature.getInstance("ECDSAwithSHA1", "BC");
- kf = KeyFactory.getInstance("ECDH", "BC");
- md = MessageDigest.getInstance("SHA1", "BC");
- } catch (NoSuchAlgorithmException | NoSuchProviderException ex) {
- return;
- }
-
- List<EC_Curve> testCurves = new ArrayList<>();
- testCurves.addAll(EC_Store.getInstance().getObjects(EC_Curve.class, "secg").values().stream().filter((curve) -> curve.getField() == KeyPair.ALG_EC_FP).collect(Collectors.toList()));
- testCurves.addAll(EC_Store.getInstance().getObjects(EC_Curve.class, "brainpool").values().stream().filter((curve) -> curve.getField() == KeyPair.ALG_EC_FP).collect(Collectors.toList()));
- for (EC_Curve curve : testCurves) {
- List<Test> testVector = new LinkedList<>();
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()) + ".", allocate));
- continue;
- }
- testVector.add(allocate);
- testVector.add(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.SUCCESS));
- testVector.add(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.SUCCESS));
- CommandTest exportLocal = CommandTest.expect(new Command.Export(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.KEY_PUBLIC, EC_Consts.PARAMETER_W), ExpectedValue.ANY);
- CommandTest exportRemote = CommandTest.expect(new Command.Export(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.KEY_PRIVATE, EC_Consts.PARAMETER_S), ExpectedValue.ANY);
- testVector.add(exportLocal);
- testVector.add(exportRemote);
- BiFunction<Response.Export, Response.Export, Key[]> getKeys = (localData, remoteData) -> {
- byte[] pkey = localData.getParameter(ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.PARAMETER_W);
- byte[] skey = remoteData.getParameter(ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.PARAMETER_S);
- ECParameterSpec spec = curve.toSpec();
- ECPrivateKeySpec privKeySpec = new ECPrivateKeySpec(new BigInteger(1, skey), spec);
- ECPublicKeySpec pubKeySpec = new ECPublicKeySpec(ECUtil.fromX962(pkey, curve.toCurve()), spec);
- PrivateKey privKey;
- PublicKey pubKey;
- try {
- privKey = kf.generatePrivate(privKeySpec);
- pubKey = kf.generatePublic(pubKeySpec);
- } catch (InvalidKeySpecException ex) {
- return null;
- }
- return new Key[]{privKey, pubKey};
- };
- TestCallback<CommandTestable> kaCallback = new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- Response.ECDH ecdhData = (Response.ECDH) testable.getResponse();
- if (!ecdhData.successful())
- return new Result(Value.FAILURE, "ECDH was unsuccessful.");
- if (!ecdhData.hasSecret()) {
- return new Result(Value.FAILURE, "ECDH response did not contain the derived secret.");
- }
- byte[] secret = ecdhData.getSecret();
- Response.Export localData = (Response.Export) exportLocal.getResponse();
- Response.Export remoteData = (Response.Export) exportRemote.getResponse();
- Key[] keys = getKeys.apply(localData, remoteData);
- if (keys == null) {
- return new Result(Value.SUCCESS, "Result could not be verified. keyData unavailable.");
- }
- PrivateKey privKey = (PrivateKey) keys[0];
- PublicKey pubKey = (PublicKey) keys[1];
- try {
- ka.init(privKey);
- ka.doPhase(pubKey, true);
- byte[] derived = ka.generateSecret();
- int fieldSize = (curve.getBits() + 7) / 8;
- if (derived.length < fieldSize) {
- byte[] padded = new byte[fieldSize];
- System.arraycopy(derived, 0, padded, fieldSize - derived.length, derived.length);
- derived = padded;
- }
- if (ecdhData.getType() == EC_Consts.KeyAgreement_ALG_EC_SVDP_DH || ecdhData.getType() == EC_Consts.KeyAgreement_ALG_EC_SVDP_DHC) {
- derived = md.digest(derived);
- }
- if (secret.length != derived.length) {
- if (secret.length < derived.length) {
- return new Result(Value.FAILURE, String.format("Derived secret was shorter than expected: %d vs %d (expected).", secret.length, derived.length));
- } else {
- return new Result(Value.FAILURE, String.format("Derived secret was longer than expected: %d vs %d (expected).", secret.length, derived.length));
- }
- }
- int diff = ByteUtil.diffBytes(derived, 0, secret, 0, secret.length);
- if (diff == secret.length) {
- return new Result(Value.SUCCESS, "Derived secret matched expected value.");
- } else {
- return new Result(Value.FAILURE, "Derived secret does not match expected value, first difference was at byte " + diff + ".");
- }
- } catch (InvalidKeyException ex) {
- return new Result(Value.SUCCESS, "Result could not be verified. " + ex.getMessage());
- }
- }
- };
- Test ecdhTest = CommandTest.function(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), kaCallback);
- Test ecdhRawTest = CommandTest.function(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_TRUE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN), kaCallback);
- byte[] data = new byte[32];
- TestCallback<CommandTestable> sigCallback = new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- Response.ECDSA ecdsaData = (Response.ECDSA) testable.getResponse();
- if (!ecdsaData.successful())
- return new Result(Value.FAILURE, "ECDSA was unsuccessful.");
- if (!ecdsaData.hasSignature()) {
- return new Result(Value.FAILURE, "ECDSA response did not contain the signature.");
- }
- byte[] signature = ecdsaData.getSignature();
- Response.Export localData = (Response.Export) exportLocal.getResponse();
- Response.Export remoteData = (Response.Export) exportRemote.getResponse();
- Key[] keys = getKeys.apply(localData, remoteData);
- if (keys == null) {
- return new Result(Value.SUCCESS, "Result could not be verified. keyData unavailable.");
- }
- PublicKey pubKey = (PublicKey) keys[1];
- try {
- sig.initVerify(pubKey);
- sig.update(data);
- if (sig.verify(signature)) {
- return new Result(Value.SUCCESS, "Signature verified.");
- } else {
- return new Result(Value.FAILURE, "Signature failed to verify.");
- }
- } catch (InvalidKeyException | SignatureException ex) {
- return new Result(Value.SUCCESS, "Result could not be verified. " + ex.getMessage());
- }
- }
- };
- Test ecdsaTest = CommandTest.function(new Command.ECDSA_sign(this.card, ECTesterApplet.KEYPAIR_LOCAL, EC_Consts.Signature_ALG_ECDSA_SHA, ECTesterApplet.EXPORT_TRUE, data), sigCallback);
- testVector.add(CompoundTest.all(ExpectedValue.SUCCESS, "Test.", ecdhTest, ecdhRawTest, ecdsaTest));
- if (cfg.cleanup) {
- testVector.add(CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.ANY));
- }
- doTest(CompoundTest.greedyAll(ExpectedValue.SUCCESS, "Validation test on " + curve.getId() + ".", testVector.toArray(new Test[0])));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardTwistSuite.java b/src/cz/crcs/ectester/reader/test/CardTwistSuite.java
deleted file mode 100644
index a6bca6c..0000000
--- a/src/cz/crcs/ectester/reader/test/CardTwistSuite.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardTwistSuite extends CardTestSuite {
- public CardTwistSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "twist", null, "The twist test suite tests whether the card correctly rejects points on the quadratic twist of the curve during ECDH.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "twist");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- Test allocate = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS));
- if (!allocate.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getId() + ".", allocate));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), Result.ExpectedValue.SUCCESS);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_LOCAL), Result.ExpectedValue.SUCCESS);
-
- Test prepare = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Prepare and generate keypair on " + curve.getId() + ".", allocate, set, generate);
-
- List<Test> ecdhTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- Test setPub = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_REMOTE, EC_Consts.CURVE_external, pub.getParams(), pub.flatten()), Result.ExpectedValue.FAILURE);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), Result.ExpectedValue.FAILURE, "Card correctly rejected point on twist.", "Card incorrectly accepted point on twist.");
- Test objectEcdh = CompoundTest.any(Result.ExpectedValue.SUCCESS, CardUtil.getKATypeString(EC_Consts.KeyAgreement_ALG_EC_SVDP_DH) + " test with twist pubkey.", setPub, ecdh);
- Command ecdhCommand = new Command.ECDH_direct(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH, pub.flatten());
- Test rawEcdh = CommandTest.expect(ecdhCommand, Result.ExpectedValue.FAILURE, "Card correctly rejected point on twist.", "Card incorrectly accepted point on twist.");
- ecdhTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " twist key test.", objectEcdh, rawEcdh));
- }
- Test ecdh = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform ECDH with public points on twist.", ecdhTests.toArray(new Test[0]));
-
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", ecdh);
- if (cfg.cleanup) {
- Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), Result.ExpectedValue.ANY);
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Twist test of " + curve.getId() + ".", prepare, tests, cleanup));
- } else {
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Twist test of " + curve.getId() + ".", prepare, tests));
- }
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CardWrongSuite.java b/src/cz/crcs/ectester/reader/test/CardWrongSuite.java
deleted file mode 100644
index 13a3f8b..0000000
--- a/src/cz/crcs/ectester/reader/test/CardWrongSuite.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Params;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.CardUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.ECTesterReader;
-import cz.crcs.ectester.reader.command.Command;
-import javacard.security.KeyPair;
-
-import java.math.BigInteger;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import static cz.crcs.ectester.common.test.Result.ExpectedValue;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CardWrongSuite extends CardTestSuite {
-
- public CardWrongSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "wrong", new String[]{"preset", "random"}, "The wrong curve suite tests whether the card rejects domain parameters which are not curves.");
- }
-
- @Override
- protected void runTests() throws Exception {
- /* Just do the default run on the wrong curves.
- * These should generally fail, the curves aren't curves.
- */
- Map<String, EC_Curve> curves = EC_Store.getInstance().getObjects(EC_Curve.class, "wrong");
- for (Map.Entry<String, EC_Curve> e : curves.entrySet()) {
- EC_Curve curve = e.getValue();
- List<Test> tests = new LinkedList<>();
- Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS));
- if (!key.ok()) {
- doTest(CompoundTest.all(ExpectedValue.FAILURE, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()), key));
- continue;
- }
- tests.add(key);
- Test set = runTest(CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.FAILURE));
- Test generate = runTest(setupKeypairs(curve, ExpectedValue.SUCCESS, ECTesterApplet.KEYPAIR_BOTH));
- Test setup = runTest(CompoundTest.any(ExpectedValue.SUCCESS, "Set wrong curve and generate keypairs.", set, generate));
- tests.add(setup);
-
- for (byte kaType : EC_Consts.KA_TYPES) {
- Test allocate = runTest(CommandTest.expect(new Command.AllocateKeyAgreement(this.card, kaType), ExpectedValue.SUCCESS));
- if (allocate.ok()) {
- Test ka = runTest(CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, kaType), ExpectedValue.FAILURE));
- Test kaTest = runTest(CompoundTest.all(ExpectedValue.SUCCESS, "Allocate and perform KA.", allocate, ka));
- tests.add(kaTest);
- }
- }
- doTest(CompoundTest.function((tsts) -> {
- for (int i = 0; i < tsts.length; ++i) {
- if (i != 1 && !tsts[i].ok()) {
- return new Result(Result.Value.FAILURE, "Some tests did not have the expected result.");
- }
- }
- return new Result(Result.Value.SUCCESS, "All tests had the expected result.");
- }, "Wrong curve test of " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()), tests.toArray(new Test[0])));
- }
- /*
- * Do some interesting tests with corrupting the custom curves.
- * For prime field:
- * - p = 0
- * - p = 1
- * - p is a square of a prime
- * - p is a composite q * s with q, s primes
- * - TODO: p divides discriminant
- */
- Random r = new Random();
- for (short keyLength : EC_Consts.FP_SIZES) {
- byte curve = EC_Consts.getCurve(keyLength, KeyPair.ALG_EC_FP);
- Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, KeyPair.ALG_EC_FP), ExpectedValue.SUCCESS));
- if (!key.ok()) {
- doTest(CompoundTest.all(ExpectedValue.FAILURE, "No support for " + keyLength + "b ALG_EC_FP.", key));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, curve, EC_Consts.PARAMETERS_DOMAIN_FP, null), ExpectedValue.SUCCESS);
- Test setup = CompoundTest.all(ExpectedValue.SUCCESS, "KeyPair setup.", key, set);
-
- Test prime0 = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_FP, EC_Consts.TRANSFORMATION_ZERO), "Set p = 0.", "ECDH with p = 0.");
- Test prime1 = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_FP, EC_Consts.TRANSFORMATION_ONE), "Set p = 1.", "ECDH with p = 1.");
-
- short keyHalf = (short) (keyLength / 2);
- BigInteger prime = new BigInteger(keyHalf, 50, r);
- BigInteger primePow = prime.pow(2);
- byte[] primePowBytes = ECUtil.toByteArray(primePow, keyLength);
- EC_Params primePowData = new EC_Params(EC_Consts.PARAMETER_FP, new byte[][]{primePowBytes});
- Test primePower = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, primePowData.getParams(), primePowData.flatten()), "Set p = square of a prime.", "ECDH with p = q^2.");
-
- BigInteger q = new BigInteger(keyHalf, r);
- BigInteger s = new BigInteger(keyHalf, r);
- BigInteger compositeValue = q.multiply(s);
- byte[] compositeBytes = ECUtil.toByteArray(compositeValue, keyLength);
- EC_Params compositeData = new EC_Params(EC_Consts.PARAMETER_FP, new byte[][]{compositeBytes});
- Test composite = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, compositeData.getParams(), compositeData.flatten()), "Set p = product of two primes.", "ECDH with p = q * s.");
-
- Test wrongPrime = CompoundTest.all(ExpectedValue.SUCCESS, "Tests with corrupted prime parameter.", prime0, prime1, primePower, composite);
-
- Test resetSetup = CompoundTest.all(ExpectedValue.SUCCESS, "Reset keypair.", set.clone());
-
- Test randomG = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_G, (short) (EC_Consts.TRANSFORMATION_FULLRANDOM | EC_Consts.TRANSFORMATION_04_MASK)), "Set G = random non-point/point-like.", "ECDH with non-point G.");
- Test fullRandomG = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_G, EC_Consts.TRANSFORMATION_FULLRANDOM), "Set G = random data.", "ECDH with G = random data.");
- Test zeroG = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_G, EC_Consts.TRANSFORMATION_INFINITY), "Set G = inifnity.", "ECDH with G = infinity.");
- Test wrongG = CompoundTest.all(ExpectedValue.SUCCESS, "Tests with corrupted G parameter.", randomG, fullRandomG, zeroG);
-
- byte[] originalR = new byte[((keyLength + 7) / 8) + 1];
- short origRlen = EC_Consts.getCurveParameter(curve, EC_Consts.PARAMETER_R, originalR, (short) 0);
- if (origRlen != originalR.length) {
- byte[] copyR = new byte[origRlen];
- System.arraycopy(originalR, 0, copyR, 0, origRlen);
- originalR = copyR;
- }
- BigInteger originalBigR = new BigInteger(1, originalR);
-
- Test zeroR = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, EC_Consts.PARAMETER_R, EC_Consts.TRANSFORMATION_ZERO), "Set R = 0.", "ECDH with R = 0.");
- Test oneR = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, EC_Consts.PARAMETER_R, EC_Consts.TRANSFORMATION_ONE), "Set R = 1.", "ECDH with R = 1.");
-
- BigInteger prevPrimeR;
- do {
- prevPrimeR = BigInteger.probablePrime(originalBigR.bitLength() - 1, r);
- } while (prevPrimeR.compareTo(originalBigR) >= 0);
- byte[] prevRBytes = ECUtil.toByteArray(prevPrimeR, keyLength);
- EC_Params prevRData = new EC_Params(EC_Consts.PARAMETER_R, new byte[][]{prevRBytes});
- Test prevprimeWrongR = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, prevRData.getParams(), prevRData.flatten()), "Set R = some prime (but [r]G != infinity) smaller than original R.", "ECDH with wrong R, prevprime.");
-
- BigInteger nextPrimeR = originalBigR.nextProbablePrime();
- byte[] nextRBytes = ECUtil.toByteArray(nextPrimeR, keyLength);
- EC_Params nextRData = new EC_Params(EC_Consts.PARAMETER_R, new byte[][]{nextRBytes});
- Test nextprimeWrongR = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, nextRData.getParams(), nextRData.flatten()), "Set R = some prime (but [r]G != infinity) larger than original R.", "ECDH with wrong R, nextprime.");
-
- byte[] nonprimeRBytes = nextRBytes.clone();
- nonprimeRBytes[nonprimeRBytes.length - 1] ^= 1;
- EC_Params nonprimeWrongRData = new EC_Params(EC_Consts.PARAMETER_R, new byte[][]{nonprimeRBytes});
- Test nonprimeWrongR = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, nonprimeWrongRData.getParams(), nonprimeWrongRData.flatten()), "Set R = some composite (but [r]G != infinity).", "ECDH with wrong R, composite.");
-
- Test wrongR = CompoundTest.all(ExpectedValue.SUCCESS, "Tests with corrupted R parameter.", zeroR, oneR, prevprimeWrongR, nextprimeWrongR, nonprimeWrongR);
-
- byte[] kRaw = new byte[]{(byte) 0xff};
- EC_Params kData = new EC_Params(EC_Consts.PARAMETER_K, new byte[][]{kRaw});
- Test bigK = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, kData.getParams(), kData.flatten()), "", "");
-
- byte[] kZero = new byte[]{(byte) 0};
- EC_Params kZeroData = new EC_Params(EC_Consts.PARAMETER_K, new byte[][]{kZero});
- Test zeroK = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, kZeroData.getParams(), kZeroData.flatten()), "", "");
-
- Test wrongK = CompoundTest.all(ExpectedValue.SUCCESS, "Tests with corrupted K parameter.", bigK, zeroK);
-
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "Tests of " + keyLength + "b " + CardUtil.getKeyTypeString(KeyPair.ALG_EC_FP), setup, wrongPrime, resetSetup, wrongG, resetSetup.clone(), wrongR, resetSetup.clone(), wrongK, resetSetup.clone()));
- }
-
- /*
- * For binary field:
- * - e1, e2 or e3 is larger than m.
- * - e1 = e2 = e3 = 0
- */
- for (short keyLength : EC_Consts.F2M_SIZES) {
- byte curve = EC_Consts.getCurve(keyLength, KeyPair.ALG_EC_F2M);
- Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, keyLength, KeyPair.ALG_EC_F2M), ExpectedValue.SUCCESS));
- if (!key.ok()) {
- doTest(CompoundTest.all(ExpectedValue.FAILURE, "No support for " + keyLength + "b ALG_EC_F2M.", key));
- continue;
- }
- Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, curve, EC_Consts.PARAMETERS_DOMAIN_F2M, null), ExpectedValue.SUCCESS);
- Test setup = CompoundTest.all(ExpectedValue.SUCCESS, "KeyPair setup.", key, set);
-
- Test coeff0 = ecdhTest(new Command.Transform(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.KEY_BOTH, EC_Consts.PARAMETER_F2M, EC_Consts.TRANSFORMATION_ZERO), "Set e1 = e2 = e3 = 0.", "ECDH with wrong field polynomial: x^" + keyLength);
-
- short e1 = (short) (2 * keyLength);
- short e2 = (short) (3 * keyLength);
- short e3 = (short) (4 * keyLength);
- byte[][] coeffBytes = new byte[][]{
- ByteUtil.shortToBytes(keyLength),
- ByteUtil.shortToBytes(e1),
- ByteUtil.shortToBytes(e2),
- ByteUtil.shortToBytes(e3)};
- EC_Params coeffParams = new EC_Params(EC_Consts.PARAMETER_F2M, coeffBytes);
- Test coeffLarger = ecdhTest(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, coeffParams.getParams(), coeffParams.flatten()), "Set e1=" + e1 + ", e2=" + e2 + ", e3=" + e3, "ECDH with wrong field poly, powers larger than " + keyLength);
-
- Test wrong = CompoundTest.all(ExpectedValue.SUCCESS, "Tests with corrupted field polynomial parameter.", coeff0, coeffLarger);
- doTest(CompoundTest.all(ExpectedValue.SUCCESS, "Tests of " + keyLength + "b " + CardUtil.getKeyTypeString(KeyPair.ALG_EC_F2M), setup, wrong));
- }
-
- /*
- * TODO: tests for both Fp and F2m:
- * - generator not on curve,
- * - generator not on proper subgroup of curve(as specified by order/cofactor),
- * - wrong order,
- * - wrong cofactor.
- */
- }
-
- private Test ecdhTest(Command setupCmd, String prepareDesc, String fullDesc) {
- Test setup = CommandTest.expect(setupCmd, ExpectedValue.FAILURE);
- Test generate = CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), ExpectedValue.FAILURE);
- Test preparePhase = CompoundTest.any(ExpectedValue.SUCCESS, prepareDesc, setup, generate);
- Test allocateECDH = CommandTest.expect(new Command.AllocateKeyAgreement(this.card, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), ExpectedValue.SUCCESS);
- Test ecdh = CommandTest.expect(new Command.ECDH(this.card, ECTesterApplet.KEYPAIR_LOCAL, ECTesterApplet.KEYPAIR_REMOTE, ECTesterApplet.EXPORT_FALSE, EC_Consts.TRANSFORMATION_NONE, EC_Consts.KeyAgreement_ALG_EC_SVDP_DH), ExpectedValue.FAILURE);
-
-
- return CompoundTest.function((tests) -> {
- if (preparePhase.ok() | !allocateECDH.ok() | ecdh.ok()) {
- return new Result(Result.Value.SUCCESS, "All tests had the expected result.");
- } else {
- return new Result(Result.Value.FAILURE, "Some tests did not have the expected result.");
- }
- }, (tests) -> {
- preparePhase.run();
- if (preparePhase.ok()) {
- return;
- }
- allocateECDH.run();
- if (!allocateECDH.ok()) {
- return;
- }
- ecdh.run();
- }, fullDesc, preparePhase, allocateECDH, ecdh);
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CommandTest.java b/src/cz/crcs/ectester/reader/test/CommandTest.java
deleted file mode 100644
index b05d3e4..0000000
--- a/src/cz/crcs/ectester/reader/test/CommandTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-
-import java.util.Arrays;
-
-/**
- * A simple test that runs one Command to get and evaluate one Response
- * to get a Result and compare it with the expected one.
- *
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CommandTest extends SimpleTest<CommandTestable> {
- private CommandTest(CommandTestable command, TestCallback<CommandTestable> callback) {
- super(command, callback);
- }
-
- public static CommandTest function(CommandTestable command, TestCallback<CommandTestable> callback) {
- return new CommandTest(command, callback);
- }
-
- public static CommandTest function(Command command, TestCallback<CommandTestable> callback) {
- return function(new CommandTestable(command), callback);
- }
-
- public static CommandTest expect(CommandTestable command, Result.ExpectedValue expected, String ok, String nok) {
- return new CommandTest(command, new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable commandTestable) {
- Result.Value resultValue = Result.Value.fromExpected(expected, commandTestable.ok(), commandTestable.error());
- return new Result(resultValue, commandTestable.error() ? commandTestable.errorCause() : (resultValue.ok() ? ok : nok));
- }
- });
- }
-
- public static CommandTest expect(Command command, Result.ExpectedValue expectedValue, String ok, String nok) {
- return expect(new CommandTestable(command), expectedValue, ok, nok);
- }
-
- public static CommandTest expect(CommandTestable command, Result.ExpectedValue expected) {
- return expect(command, expected, null, null);
- }
-
- public static CommandTest expect(Command command, Result.ExpectedValue expectedValue) {
- return expect(command, expectedValue, null, null);
- }
-
- public static CommandTest expectSW(CommandTestable command, short... expectedSWS) {
- return new CommandTest(command, new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable commandTestable) {
- if (Arrays.equals(commandTestable.getResponse().getSWs(), expectedSWS)) {
- return new Result(Result.Value.SUCCESS);
- } else {
- return new Result(Result.Value.FAILURE);
- }
- }
- });
- }
-
- public static CommandTest expectSW(Command command, short... expectedSWS) {
- return expectSW(new CommandTestable(command), expectedSWS);
- }
-
- public Command getCommand() {
- return testable.getCommand();
- }
-
- public Response getResponse() {
- return testable.getResponse();
- }
-
- @Override
- public String getDescription() {
- if (hasRun) {
- return testable.getResponse().getDescription();
- } else {
- return testable.getCommand().getDescription();
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/CommandTestable.java b/src/cz/crcs/ectester/reader/test/CommandTestable.java
deleted file mode 100644
index f670534..0000000
--- a/src/cz/crcs/ectester/reader/test/CommandTestable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.common.test.BaseTestable;
-import cz.crcs.ectester.common.test.TestException;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-
-import javax.smartcardio.CardException;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CommandTestable extends BaseTestable {
- private Command command;
- private Response response;
-
- public CommandTestable(Command command) {
- this.command = command;
- }
-
- public Command getCommand() {
- return command;
- }
-
- public Response getResponse() {
- return response;
- }
-
- @Override
- public void run() {
- try {
- response = command.send();
- } catch (CardException e) {
- throw new TestException(e);
- }
-
- hasRun = true;
- if (response.error()) {
- error = true;
- } else if (response.successful()) {
- ok = true;
- }
- }
-}
diff --git a/src/cz/crcs/ectester/reader/test/PerformanceTest.java b/src/cz/crcs/ectester/reader/test/PerformanceTest.java
deleted file mode 100644
index f9cba46..0000000
--- a/src/cz/crcs/ectester/reader/test/PerformanceTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package cz.crcs.ectester.reader.test;
-
-import cz.crcs.ectester.applet.ECTesterApplet;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-import cz.crcs.ectester.common.test.TestException;
-import cz.crcs.ectester.reader.CardMngr;
-import cz.crcs.ectester.reader.command.Command;
-import cz.crcs.ectester.reader.response.Response;
-
-import javax.smartcardio.CardException;
-import java.util.Arrays;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class PerformanceTest extends SimpleTest<CommandTestable> {
- private CardMngr cardManager;
- private long[] times;
- private long[] reducedTimes;
- private Response[] responses;
- private long mean;
- private long median;
- private long mode;
- private int count;
- private String desc;
-
- private PerformanceTest(CardMngr cardManager, CommandTestable testable, int count, String desc) {
- super(testable, new TestCallback<CommandTestable>() {
- @Override
- public Result apply(CommandTestable testable) {
- return new Result(Result.Value.SUCCESS);
- }
- });
- this.cardManager = cardManager;
- this.count = count;
- this.desc = desc;
- }
-
- public static PerformanceTest repeat(CardMngr cardManager, Command cmd, int count) {
- return new PerformanceTest(cardManager, new CommandTestable(cmd), count, null);
- }
-
- public static PerformanceTest repeat(CardMngr cardManager, String desc, Command cmd, int count) {
- return new PerformanceTest(cardManager, new CommandTestable(cmd), count, desc);
- }
-
- @Override
- public String getDescription() {
- String rest = String.format("Mean = %d ns, Median = %d ns, Mode = %d ns", mean, median, mode);
- return (desc == null ? rest : desc + " (" + rest + ")");
- }
-
- @Override
- protected void runSelf() {
- long baseTime;
- try {
- new Command.SetDryRunMode(cardManager, ECTesterApplet.MODE_DRY_RUN).send();
- testable.run();
- baseTime = testable.getResponse().getDuration();
- testable.reset();
- testable.run();
- baseTime += testable.getResponse().getDuration();
- testable.reset();
- baseTime /= 2;
- new Command.SetDryRunMode(cardManager, ECTesterApplet.MODE_NORMAL).send();
- } catch (CardException ce) {
- throw new TestException(ce);
- }
-
- times = new long[count];
- reducedTimes = new long[count];
- responses = new Response[count];
- for (int i = 0; i < count; ++i) {
- testable.run();
- responses[i] = testable.getResponse();
- times[i] = responses[i].getDuration();
- reducedTimes[i] = times[i] - baseTime;
- testable.reset();
- }
-
- mean = Arrays.stream(reducedTimes).sum() / count;
-
- long[] sorted = reducedTimes.clone();
- Arrays.sort(sorted);
- if (count % 2 == 0) {
- median = (sorted[(count / 2) - 1] + sorted[count / 2]) / 2;
- } else {
- median = sorted[count / 2];
- }
-
- long max_occurences = 0;
- int i = 0;
- while (i < count) {
- long current_value = sorted[i];
- long current_occurences = 0;
- while (i < count && sorted[i] == current_value) {
- i++;
- current_occurences++;
- }
- if (current_occurences > max_occurences) {
- max_occurences = current_occurences;
- mode = current_value;
- }
- }
- result = callback.apply(testable);
- }
-
- public long getCount() {
- return count;
- }
-
- public Command getCommand() {
- return testable.getCommand();
- }
-
- public Response[] getResponses() {
- return responses;
- }
-
- public long[] getTimes() {
- return times;
- }
-
- public long[] getReducedTimes() {
- return reducedTimes;
- }
-
- public long getMean() {
- return mean;
- }
-
- public long getMedian() {
- return median;
- }
-
- public long getMode() {
- return mode;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/ECTesterStandalone.java b/src/cz/crcs/ectester/standalone/ECTesterStandalone.java
deleted file mode 100644
index a26cc7c..0000000
--- a/src/cz/crcs/ectester/standalone/ECTesterStandalone.java
+++ /dev/null
@@ -1,942 +0,0 @@
-/*
- * ECTester, tool for testing Elliptic curve cryptography implementations.
- * Copyright (c) 2016-2018 Petr Svenda <petr@svenda.com>
- * Copyright (c) 2016-2019 Jan Jancar <johny@neuromancer.sk>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-package cz.crcs.ectester.standalone;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.cli.*;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.TestException;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.common.util.FileUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.libs.*;
-import cz.crcs.ectester.standalone.output.TextTestWriter;
-import cz.crcs.ectester.standalone.output.XMLTestWriter;
-import cz.crcs.ectester.standalone.output.YAMLTestWriter;
-import cz.crcs.ectester.standalone.test.suites.*;
-import org.apache.commons.cli.*;
-
-import javax.crypto.KeyAgreement;
-import javax.crypto.SecretKey;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.InvocationTargetException;
-import java.math.BigInteger;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.security.*;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.spec.ECGenParameterSpec;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * Standalone part of ECTester, a tool for testing Elliptic curve implementations in software libraries.
- *
- * @author Jan Jancar johny@neuromancer.sk
- * @version v0.3.3
- */
-public class ECTesterStandalone {
- private ProviderECLibrary[] libs;
- private Config cfg;
-
- private Options opts = new Options();
- private TreeParser optParser;
- private TreeCommandLine cli;
- public static final String VERSION = "v0.3.3";
- private static final String DESCRIPTION = "ECTesterStandalone " + VERSION + ", an Elliptic Curve Cryptography support tester/utility.";
- private static final String LICENSE = "MIT Licensed\nCopyright © 2016-2019 Petr Svenda <petr@svenda.com>\nCopyright © 2016-2019 Jan Jancar <johny@neuromancer.sk>";
- private static final String CLI_HEADER = "\n" + DESCRIPTION + "\n\n";
- private static final String CLI_FOOTER = "\n" + LICENSE;
-
- public static String LIB_RESOURCE_DIR = "/cz/crcs/ectester/standalone/libs/jni/";
-
- private void run(String[] args) {
- try {
- cli = parseArgs(args);
-
- if (cli.hasOption("version")) {
- CLITools.version(DESCRIPTION, LICENSE);
- return;
- } else if (cli.hasOption("help") || cli.getNext() == null) {
- String command = cli.getOptionValue("help");
- if (command == null) {
- CLITools.help("ECTesterStandalone.jar", CLI_HEADER, opts, optParser, CLI_FOOTER, true);
- } else {
- CLITools.help(CLI_HEADER, optParser, CLI_FOOTER, command);
- }
- return;
- }
-
- Path reqs = FileUtil.getRequirementsDir();
- reqs.toFile().mkdirs();
-
- if (!System.getProperty("os.name").startsWith("Windows")) {
- FileUtil.writeNewer(LIB_RESOURCE_DIR + "lib_timing.so", reqs.resolve("lib_timing.so"));
- System.load(reqs.resolve("lib_timing.so").toString());
- }
-
- List<ProviderECLibrary> libObjects = new LinkedList<>();
- Class[] libClasses = new Class[]{SunECLib.class,
- BouncyCastleLib.class,
- TomcryptLib.class,
- BotanLib.class,
- CryptoppLib.class,
- OpensslLib.class,
- BoringsslLib.class,
- GcryptLib.class,
- MscngLib.class,
- WolfCryptLib.class,
- MbedTLSLib.class,
- IppcpLib.class,
- MatrixsslLib.class,
- NettleLib.class,
- LibresslLib.class};
- for (Class c : libClasses) {
- try {
- libObjects.add((ProviderECLibrary) c.getDeclaredConstructor().newInstance());
- } catch (NoSuchMethodException | InstantiationException | IllegalAccessException |
- InvocationTargetException e) {
-
- }
- }
- libs = libObjects.toArray(new ProviderECLibrary[0]);
-
- //TODO: push this further down to only initialize if necessary.
- // and only initialize the chosen lib (so give libs a name in Java only)
- for (ECLibrary lib : libs) {
- try {
- lib.initialize();
- } catch (Exception ex) {
- System.err.println(ex.getMessage());
- }
- }
-
- cfg = new Config(libs);
- if (!cfg.readOptions(cli)) {
- return;
- }
-
- if (cli.isNext("list-libs")) {
- listLibraries();
- } else if (cli.isNext("list-data")) {
- CLITools.listNamed(EC_Store.getInstance(), cli.getNext().getArg(0));
- } else if (cli.isNext("list-suites")) {
- listSuites();
- } else if (cli.isNext("list-types")) {
- listIdents();
- } else if (cli.isNext("ecdh")) {
- ecdh();
- } else if (cli.isNext("ecdsa")) {
- ecdsa();
- } else if (cli.isNext("generate")) {
- generate();
- } else if (cli.isNext("test")) {
- test();
- } else if (cli.isNext("export")) {
- export();
- }
-
- } catch (ParseException | ParserConfigurationException | IOException ex) {
- System.err.println(ex.getMessage());
- } catch (InvalidAlgorithmParameterException | InvalidParameterException e) {
- System.err.println("Invalid algorithm parameter: " + e.getMessage());
- } catch (NoSuchAlgorithmException nsaex) {
- System.err.println("Algorithm not supported by the selected library: " + nsaex.getMessage());
- } catch (InvalidKeyException | SignatureException e) {
- e.printStackTrace();
- }
- }
-
- private TreeCommandLine parseArgs(String[] args) throws ParseException {
- Map<String, ParserOptions> actions = new TreeMap<>();
-
- Option namedCurve = Option.builder("nc").longOpt("named-curve").desc("Use a named curve, from CurveDB: <cat/id>").hasArg().argName("cat/id").optionalArg(false).numberOfArgs(1).build();
- Option namedPublic = Option.builder("npub").longOpt("named-public").desc("Use a named public key, from CurveDB: <cat/id>").hasArg().argName("cat/id").optionalArg(false).numberOfArgs(1).build();
- Option filePublic = Option.builder("pub").longOpt("public").desc("Use a given public key from file.").hasArg().argName("pubkey").optionalArg(false).numberOfArgs(1).build();
- OptionGroup publicKey = new OptionGroup();
- publicKey.addOption(namedPublic);
- publicKey.addOption(filePublic);
- Option namedPrivate = Option.builder("npriv").longOpt("named-private").desc("Use a named private key, from CurveDB: <cat/id>").hasArg().argName("cat/id").optionalArg(false).numberOfArgs(1).build();
- Option filePrivate = Option.builder("priv").longOpt("private").desc("Use a given private key from file.").hasArg().argName("privkey").optionalArg(false).numberOfArgs(1).build();
- OptionGroup privateKey = new OptionGroup();
- privateKey.addOption(namedPrivate);
- privateKey.addOption(filePrivate);
- Option curveName = Option.builder("cn").longOpt("curve-name").desc("Use a named curve, search from curves supported by the library: <name>").hasArg().argName("name").optionalArg(false).numberOfArgs(1).build();
- Option bits = Option.builder("b").longOpt("bits").hasArg().argName("n").optionalArg(false).desc("What size of curve to use.").numberOfArgs(1).build();
- Option output = Option.builder("o").longOpt("output").desc("Output into file <output_file>.").hasArgs().argName("output_file").optionalArg(false).numberOfArgs(1).build();
- Option timeSource = Option.builder("ts").longOpt("time-source").desc("Use a given native timing source: {rdtsc, monotonic, monotonic-raw, cputime-process, cputime-thread, perfcount}").hasArgs().argName("source").optionalArg(false).numberOfArgs(1).build();
-
- Options testOpts = new Options();
- testOpts.addOption(bits);
- testOpts.addOption(namedCurve);
- testOpts.addOption(curveName);
- testOpts.addOption(Option.builder("gt").longOpt("kpg-type").desc("Set the KeyPairGenerator object [type].").hasArg().argName("type").optionalArg(false).build());
- testOpts.addOption(Option.builder("kt").longOpt("ka-type").desc("Set the KeyAgreement object [type].").hasArg().argName("type").optionalArg(false).build());
- testOpts.addOption(Option.builder("st").longOpt("sig-type").desc("Set the Signature object [type].").hasArg().argName("type").optionalArg(false).build());
- testOpts.addOption(Option.builder("f").longOpt("format").desc("Set the output format, one of text,yaml,xml.").hasArg().argName("format").optionalArg(false).build());
- testOpts.addOption(Option.builder().longOpt("key-type").desc("Set the key [algorithm] for which the key should be derived in KeyAgreements with KDF. Default is \"AES\".").hasArg().argName("algorithm").optionalArg(false).build());
- List<Argument> testArgs = new LinkedList<>();
- testArgs.add(new Argument("test-suite", "The test suite to run.", true));
- ParserOptions test = new ParserOptions(new TreeParser(Collections.emptyMap(), true, testArgs), testOpts, "Test a library.");
- actions.put("test", test);
-
- Options ecdhOpts = new Options();
- ecdhOpts.addOption(bits);
- ecdhOpts.addOption(namedCurve);
- ecdhOpts.addOption(curveName);
- ecdhOpts.addOption(output);
- ecdhOpts.addOption(timeSource);
- ecdhOpts.addOption(Option.builder("t").longOpt("type").desc("Set KeyAgreement object [type].").hasArg().argName("type").optionalArg(false).build());
- ecdhOpts.addOption(Option.builder().longOpt("key-type").desc("Set the key [algorithm] for which the key should be derived in KeyAgreements with KDF. Default is \"AES\".").hasArg().argName("algorithm").optionalArg(false).build());
- ecdhOpts.addOption(Option.builder("n").longOpt("amount").hasArg().argName("amount").optionalArg(false).desc("Do ECDH [amount] times.").build());
- ecdhOpts.addOptionGroup(publicKey);
- ecdhOpts.addOption(Option.builder().longOpt("fixed-private").desc("Perform ECDH with fixed private key.").build());
- ecdhOpts.addOptionGroup(privateKey);
- ecdhOpts.addOption(Option.builder().longOpt("fixed-public").desc("Perform ECDH with fixed public key.").build());
- ParserOptions ecdh = new ParserOptions(new DefaultParser(), ecdhOpts, "Perform EC based KeyAgreement.");
- actions.put("ecdh", ecdh);
-
- Options ecdsaOpts = new Options();
- ecdsaOpts.addOption(bits);
- ecdsaOpts.addOption(namedCurve);
- ecdsaOpts.addOption(curveName);
- ecdsaOpts.addOption(output);
- ecdsaOpts.addOption(timeSource);
- ecdsaOpts.addOptionGroup(privateKey);
- ecdsaOpts.addOptionGroup(publicKey);
- ecdsaOpts.addOption(Option.builder().longOpt("fixed").desc("Perform all ECDSA with fixed keypair.").build());
- ecdsaOpts.addOption(Option.builder("t").longOpt("type").desc("Set Signature object [type].").hasArg().argName("type").optionalArg(false).build());
- ecdsaOpts.addOption(Option.builder("n").longOpt("amount").hasArg().argName("amount").optionalArg(false).desc("Do ECDSA [amount] times.").build());
- ecdsaOpts.addOption(Option.builder("f").longOpt("file").hasArg().argName("file").optionalArg(false).desc("Input [file] to sign.").build());
- ParserOptions ecdsa = new ParserOptions(new DefaultParser(), ecdsaOpts, "Perform EC based Signature.");
- actions.put("ecdsa", ecdsa);
-
- Options generateOpts = new Options();
- generateOpts.addOption(bits);
- generateOpts.addOption(namedCurve);
- generateOpts.addOption(curveName);
- generateOpts.addOption(output);
- generateOpts.addOption(timeSource);
- generateOpts.addOption(Option.builder("n").longOpt("amount").hasArg().argName("amount").optionalArg(false).desc("Generate [amount] of EC keys.").build());
- generateOpts.addOption(Option.builder("t").longOpt("type").hasArg().argName("type").optionalArg(false).desc("Set KeyPairGenerator object [type].").build());
- ParserOptions generate = new ParserOptions(new DefaultParser(), generateOpts, "Generate EC keypairs.");
- actions.put("generate", generate);
-
- Options exportOpts = new Options();
- exportOpts.addOption(bits);
- exportOpts.addOption(output);
- exportOpts.addOption(Option.builder("t").longOpt("type").hasArg().argName("type").optionalArg(false).desc("Set KeyPair object [type].").build());
- ParserOptions export = new ParserOptions(new DefaultParser(), exportOpts, "Export default curve parameters.");
- actions.put("export", export);
-
- Options listDataOpts = new Options();
- List<Argument> listDataArgs = new LinkedList<>();
- listDataArgs.add(new Argument("what", "what to list.", false));
- ParserOptions listData = new ParserOptions(new TreeParser(Collections.emptyMap(), false, listDataArgs), listDataOpts, "List/show contained EC domain parameters/keys.");
- actions.put("list-data", listData);
-
- Options listLibsOpts = new Options();
- ParserOptions listLibs = new ParserOptions(new DefaultParser(), listLibsOpts, "List supported libraries.");
- actions.put("list-libs", listLibs);
-
- Options listSuitesOpts = new Options();
- ParserOptions listSuites = new ParserOptions(new DefaultParser(), listSuitesOpts, "List supported test suites.");
- actions.put("list-suites", listSuites);
-
- Options listIdentsOpts = new Options();
- ParserOptions listIdents = new ParserOptions(new DefaultParser(), listIdentsOpts, "List KeyPairGenerator, KeyAgreement and Signature types.");
- actions.put("list-types", listIdents);
-
- List<Argument> baseArgs = new LinkedList<>();
- baseArgs.add(new Argument("lib", "What library to use.", false));
- optParser = new TreeParser(actions, false, baseArgs);
-
- opts.addOption(Option.builder("V").longOpt("version").desc("Print version info.").build());
- opts.addOption(Option.builder("h").longOpt("help").desc("Print help(about <command>).").hasArg().argName("command").optionalArg(true).build());
- opts.addOption(Option.builder("C").longOpt("color").desc("Print stuff with color, requires ANSI terminal.").build());
-
- return optParser.parse(opts, args);
- }
-
- /**
- *
- */
- private void listLibraries() {
- for (ProviderECLibrary lib : libs) {
- if (lib.isInitialized() && (cfg.selected == null || lib == cfg.selected)) {
- System.out.println("\t- " + Colors.bold(lib.name()));
- System.out.println(Colors.bold("\t\t- Version: ") + String.format("%f", lib.getProvider().getVersion()));
- System.out.println(Colors.bold("\t\t- Supports native timing: ") + lib.getNativeTimingSupport().toString());
- Set<KeyPairGeneratorIdent> kpgs = lib.getKPGs();
- if (!kpgs.isEmpty()) {
- System.out.println(Colors.bold("\t\t- KeyPairGenerators: ") + String.join(", ", kpgs.stream().map(KeyPairGeneratorIdent::getName).collect(Collectors.toList())));
- }
- Set<KeyAgreementIdent> eckas = lib.getKAs();
- if (!eckas.isEmpty()) {
- System.out.println(Colors.bold("\t\t- KeyAgreements: ") + String.join(", ", eckas.stream().map(KeyAgreementIdent::getName).collect(Collectors.toList())));
- }
- Set<SignatureIdent> sigs = lib.getSigs();
- if (!sigs.isEmpty()) {
- System.out.println(Colors.bold("\t\t- Signatures: ") + String.join(", ", sigs.stream().map(SignatureIdent::getName).collect(Collectors.toList())));
- }
- Set<String> curves = lib.getCurves();
- if (!curves.isEmpty()) {
- System.out.println(Colors.bold("\t\t- Curves: ") + String.join(", ", curves));
- }
- System.out.println();
- }
- }
- }
-
- /**
- *
- */
- private void listSuites() {
- StandaloneTestSuite[] suites = new StandaloneTestSuite[]{
- new StandaloneDefaultSuite(null, null, null),
- new StandaloneTestVectorSuite(null, null, null),
- new StandaloneInvalidSuite(null, null, null),
- new StandaloneWrongSuite(null, null, null),
- new StandaloneDegenerateSuite(null, null, null),
- new StandaloneCofactorSuite(null, null, null),
- new StandaloneEdgeCasesSuite(null, null, null),
- new StandaloneSignatureSuite(null, null, null),
- new StandaloneCompositeSuite(null, null, null),
- new StandaloneTwistSuite(null, null, null),
- new StandaloneMiscSuite(null, null, null),
- new StandalonePerformanceSuite(null, null, null)};
- for (StandaloneTestSuite suite : suites) {
- System.out.println(" - " + suite.getName());
- for (String line : suite.getDescription()) {
- System.out.println("\t" + line);
- }
- }
- }
-
- /**
- *
- */
- private void listIdents() {
- System.out.println(Colors.bold("\t- KeyPairGenerator"));
- for (KeyPairGeneratorIdent kpgIdent : KeyPairGeneratorIdent.list()) {
- System.out.println("\t\t- " + Colors.underline(kpgIdent.getName()) + " " + kpgIdent.toString());
- }
- System.out.println(Colors.bold("\t- KeyAgreement"));
- for (KeyAgreementIdent kaIdent : KeyAgreementIdent.list()) {
- System.out.println("\t\t- " + Colors.underline(kaIdent.getName()) + " " + kaIdent.toString());
- }
- System.out.println(Colors.bold("\t- Signature"));
- for (SignatureIdent sigIdent : SignatureIdent.list()) {
- System.out.println("\t\t- " + Colors.underline(sigIdent.getName()) + " " + sigIdent.toString());
- }
- }
-
- /**
- *
- */
- private void ecdh() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IOException {
- ProviderECLibrary lib = cfg.selected;
-
- String algo = cli.getOptionValue("ecdh.type", "ECDH");
- String keyAlgo = cli.getOptionValue("ecdh.key-type", "AES");
- KeyAgreementIdent kaIdent = lib.getKAs().stream()
- .filter((ident) -> ident.contains(algo))
- .findFirst()
- .orElse(null);
-
- String baseAlgo;
- if (algo.contains("with")) {
- baseAlgo = algo.split("with")[0];
- } else {
- baseAlgo = algo;
- }
-
- KeyPairGeneratorIdent kpIdent = lib.getKPGs().stream()
- .filter((ident) -> ident.contains(algo))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains(baseAlgo))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains("ECDH"))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst()
- .orElse(null))));
-
- if (kaIdent == null || kpIdent == null) {
- throw new NoSuchAlgorithmException(algo);
- }
-
- KeyAgreement ka = kaIdent.getInstance(lib.getProvider());
- KeyPairGenerator kpg = kpIdent.getInstance(lib.getProvider());
- AlgorithmParameterSpec spec = null;
- if (cli.hasOption("ecdh.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("ecdh.bits"));
- kpg.initialize(bits);
- } else if (cli.hasOption("ecdh.named-curve")) {
- String curveName = cli.getOptionValue("ecdh.named-curve");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- if (curve == null) {
- System.err.println("Curve not found: " + curveName);
- return;
- }
- spec = curve.toSpec();
- kpg.initialize(spec);
- } else if (cli.hasOption("ecdh.curve-name")) {
- String curveName = cli.getOptionValue("ecdh.curve-name");
- spec = new ECGenParameterSpec(curveName);
- kpg.initialize(spec);
- }
-
- if (cli.hasOption("ecdh.time-source")) {
- if (!lib.setNativeTimingType(cli.getOptionValue("ecdh.time-source"))) {
- System.err.println("Couldn't set native time source.");
- return;
- }
- }
-
- PrintStream out;
- if (cli.hasOption("ecdh.output")) {
- out = new PrintStream(FileUtil.openStream(cli.getOptionValues("ecdh.output")));
- } else {
- out = System.out;
- }
-
- String timeUnit = "nano";
- if (!lib.getNativeTimingSupport().isEmpty()) {
- timeUnit = lib.getNativeTimingUnit();
- }
-
- String hashAlgo = kaIdent.getBaseAlgo() != null ? String.format("[%s]", kaIdent.getBaseAlgo()) : "[NONE]";
- out.println(String.format("index;time[%s];pubW;privS;secret%s", timeUnit, hashAlgo));
-
- KeyPair one = null;
- if (cli.hasOption("ecdh.fixed-private") && !cli.hasOption("ecdh.named-private") && !cli.hasOption("ecdh.private")) {
- one = kpg.genKeyPair();
- }
- KeyPair other = null;
- if (cli.hasOption("ecdh.fixed-public") && !cli.hasOption("ecdh.named-public") && !cli.hasOption("ecdh.public")) {
- other = kpg.genKeyPair();
- }
-
- ECPrivateKey privkey = (ECPrivateKey) ECUtil.loadKey(EC_Consts.PARAMETER_S, cli.getOptionValue("ecdh.named-private"), cli.getOptionValue("ecdh.private"), spec);
- ECPublicKey pubkey = (ECPublicKey) ECUtil.loadKey(EC_Consts.PARAMETER_W, cli.getOptionValue("ecdh.named-public"), cli.getOptionValue("ecdh.public"), spec);
-
- int amount = Integer.parseInt(cli.getOptionValue("ecdh.amount", "1"));
- for (int i = 0; i < amount || amount == 0; ++i) {
- if (!cli.hasOption("ecdh.fixed-private") && !cli.hasOption("ecdh.named-private") && !cli.hasOption("ecdh.private")) {
- one = kpg.genKeyPair();
- }
- if (!cli.hasOption("ecdh.fixed-public") && !cli.hasOption("ecdh.named-public") && !cli.hasOption("ecdh.public")) {
- other = kpg.genKeyPair();
- }
-
- if (!cli.hasOption("ecdh.named-private") && !cli.hasOption("ecdh.private")) {
- privkey = (ECPrivateKey) one.getPrivate();
- }
-
- if (!cli.hasOption("ecdh.named-public") && !cli.hasOption("ecdh.public")) {
- pubkey = (ECPublicKey) other.getPublic();
- }
-
- long elapsed = -System.nanoTime();
- if (spec instanceof ECParameterSpec && lib instanceof NativeECLibrary) {
- ka.init(privkey, spec);
- } else {
- ka.init(privkey);
- }
- ka.doPhase(pubkey, true);
- elapsed += System.nanoTime();
- SecretKey derived;
- byte[] result;
- elapsed -= System.nanoTime();
- if (kaIdent.requiresKeyAlgo()) {
- derived = ka.generateSecret(keyAlgo);
- result = derived.getEncoded();
- } else {
- result = ka.generateSecret();
- }
- elapsed += System.nanoTime();
- if (!lib.getNativeTimingSupport().isEmpty()) {
- elapsed = lib.getLastNativeTiming();
- }
- ka = kaIdent.getInstance(lib.getProvider());
-
- String pub = ByteUtil.bytesToHex(ECUtil.toX962Uncompressed(pubkey.getW(), pubkey.getParams()), false);
- String priv = ByteUtil.bytesToHex(privkey.getS().toByteArray(), false);
- String dh = ByteUtil.bytesToHex(result, false);
- out.println(String.format("%d;%d;%s;%s;%s", i, elapsed, pub, priv, dh));
- }
-
- if (cli.hasOption("ecdh.output")) {
- out.close();
- }
- }
-
- /**
- *
- */
- private void ecdsa() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IOException, SignatureException {
- byte[] data;
- String dataString;
- if (cli.hasOption("ecdsa.file")) {
- String fileName = cli.getOptionValue("ecdsa.file");
- File in = new File(fileName);
- long len = in.length();
- if (len == 0) {
- throw new FileNotFoundException(fileName);
- }
- data = Files.readAllBytes(in.toPath());
- dataString = "";
- } else {
- Random random = new Random();
- data = new byte[32];
- random.nextBytes(data);
- dataString = ByteUtil.bytesToHex(data, false);
- }
- ProviderECLibrary lib = cfg.selected;
- String algo = cli.getOptionValue("ecdsa.type", "ECDSA");
- SignatureIdent sigIdent = lib.getSigs().stream()
- .filter((ident) -> ident.contains(algo))
- .findFirst()
- .orElse(null);
-
- String baseAlgo;
- if (algo.contains("with")) {
- baseAlgo = algo.split("with")[1];
- } else {
- baseAlgo = algo;
- }
- KeyPairGeneratorIdent kpIdent = lib.getKPGs().stream()
- .filter((ident) -> ident.contains(algo))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains(baseAlgo))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains("ECDSA"))
- .findFirst()
- .orElse(lib.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst()
- .orElse(null))));
-
- if (sigIdent == null || kpIdent == null) {
- throw new NoSuchAlgorithmException(algo);
- }
- Signature sig = sigIdent.getInstance(lib.getProvider());
- KeyPairGenerator kpg = kpIdent.getInstance(lib.getProvider());
- ECParameterSpec spec = null;
- if (cli.hasOption("ecdsa.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("ecdsa.bits"));
- kpg.initialize(bits);
- } else if (cli.hasOption("ecdsa.named-curve")) {
- String curveName = cli.getOptionValue("ecdsa.named-curve");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- if (curve == null) {
- System.err.println("Curve not found: " + curveName);
- return;
- }
- spec = curve.toSpec();
- kpg.initialize(spec);
- } else if (cli.hasOption("ecdsa.curve-name")) {
- String curveName = cli.getOptionValue("ecdsa.curve-name");
- kpg.initialize(new ECGenParameterSpec(curveName));
- }
-
- if (cli.hasOption("ecdsa.time-source")) {
- if (!lib.setNativeTimingType(cli.getOptionValue("ecdsa.time-source"))) {
- System.err.println("Couldn't set native time source.");
- return;
- }
- }
-
- PrintStream out;
- if (cli.hasOption("ecdsa.output")) {
- out = new PrintStream(FileUtil.openStream(cli.getOptionValues("ecdsa.output")));
- } else {
- out = System.out;
- }
-
- String timeUnit = "nano";
- if (!lib.getNativeTimingSupport().isEmpty()) {
- timeUnit = lib.getNativeTimingUnit();
- }
-
- String hashAlgo = sigIdent.getHashAlgo() != null ? String.format("[%s]", sigIdent.getHashAlgo()) : "";
- out.println(String.format("index;signTime[%s];verifyTime[%s];data;pubW;privS;signature%s;nonce;verified", timeUnit, timeUnit, hashAlgo));
-
- ECPrivateKey privkey = (ECPrivateKey) ECUtil.loadKey(EC_Consts.PARAMETER_S, cli.getOptionValue("ecdsa.named-private"), cli.getOptionValue("ecdsa.private"), spec);
- ECPublicKey pubkey = (ECPublicKey) ECUtil.loadKey(EC_Consts.PARAMETER_W, cli.getOptionValue("ecdsa.named-public"), cli.getOptionValue("ecdsa.public"), spec);
-
- KeyPair one;
- if (cli.hasOption("ecdsa.fixed")) {
- one = kpg.genKeyPair();
- if (!cli.hasOption("ecdsa.named-private")) {
- privkey = (ECPrivateKey) one.getPrivate();
- }
- if (!cli.hasOption("ecdsa.named-public")) {
- pubkey = (ECPublicKey) one.getPublic();
- }
- }
-
-
- int amount = Integer.parseInt(cli.getOptionValue("ecdsa.amount", "1"));
- for (int i = 0; i < amount || amount == 0; ++i) {
- if ((!cli.hasOption("ecdsa.named-private") || !cli.hasOption("ecdsa.named-public")) && !cli.hasOption("ecdsa.fixed")) {
- one = kpg.genKeyPair();
-
- if (!cli.hasOption("ecdsa.named-private")) {
- privkey = (ECPrivateKey) one.getPrivate();
- }
- if (!cli.hasOption("ecdsa.named-public")) {
- pubkey = (ECPublicKey) one.getPublic();
- }
- }
-
- sig.initSign(privkey);
- sig.update(data);
-
- long signTime = -System.nanoTime();
- byte[] signature = sig.sign();
- signTime += System.nanoTime();
- if (!lib.getNativeTimingSupport().isEmpty()) {
- signTime = lib.getLastNativeTiming();
- }
-
- sig.initVerify(pubkey);
- sig.update(data);
-
- long verifyTime = -System.nanoTime();
- boolean verified = sig.verify(signature);
- verifyTime += System.nanoTime();
- if (!lib.getNativeTimingSupport().isEmpty()) {
- verifyTime = lib.getLastNativeTiming();
- }
-
- String pub = ByteUtil.bytesToHex(ECUtil.toX962Uncompressed(pubkey.getW(), pubkey.getParams()), false);
- String priv = ByteUtil.bytesToHex(privkey.getS().toByteArray(), false);
- String sign = ByteUtil.bytesToHex(signature, false);
- String k = "";
- ECParameterSpec kSpec = spec;
- if (kSpec == null) {
- kSpec = privkey.getParams();
- }
- if (kSpec != null) {
- BigInteger kValue = ECUtil.recoverSignatureNonce(signature, data, privkey.getS(), kSpec, sigIdent);
- if (kValue != null) {
- k = ByteUtil.bytesToHex(kValue.toByteArray(), false);
- }
- }
- out.println(String.format("%d;%d;%d;%s;%s;%s;%s;%s;%d", i, signTime, verifyTime, dataString, pub, priv, sign, k, verified ? 1 : 0));
- }
-
- if (cli.hasOption("ecdsa.output")) {
- out.close();
- }
- }
-
- /**
- *
- */
- private void generate() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, FileNotFoundException {
- ProviderECLibrary lib = cfg.selected;
- KeyPairGeneratorIdent ident = null;
- String algo = cli.getOptionValue("generate.type", "EC");
- for (KeyPairGeneratorIdent kpIdent : lib.getKPGs()) {
- if (kpIdent.contains(algo)) {
- ident = kpIdent;
- break;
- }
- }
- if (ident == null) {
- throw new NoSuchAlgorithmException(algo);
- }
- KeyPairGenerator kpg = ident.getInstance(lib.getProvider());
- if (cli.hasOption("generate.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("generate.bits"));
- kpg.initialize(bits);
- } else if (cli.hasOption("generate.named-curve")) {
- String curveName = cli.getOptionValue("generate.named-curve");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- if (curve == null) {
- System.err.println("Curve not found: " + curveName);
- return;
- }
- kpg.initialize(curve.toSpec());
- } else if (cli.hasOption("generate.curve-name")) {
- String curveName = cli.getOptionValue("generate.curve-name");
- kpg.initialize(new ECGenParameterSpec(curveName));
- }
-
- if (cli.hasOption("generate.time-source")) {
- if (!lib.setNativeTimingType(cli.getOptionValue("generate.time-source"))) {
- System.err.println("Couldn't set native time source.");
- return;
- }
- }
-
- String timeUnit = "nano";
- if (!lib.getNativeTimingSupport().isEmpty()) {
- timeUnit = lib.getNativeTimingUnit();
- }
-
- PrintStream out;
- if (cli.hasOption("generate.output")) {
- out = new PrintStream(FileUtil.openStream(cli.getOptionValues("generate.output")));
- } else {
- out = System.out;
- }
-
- out.println(String.format("index;time[%s];pubW;privS", timeUnit));
-
- int amount = Integer.parseInt(cli.getOptionValue("generate.amount", "1"));
- for (int i = 0; i < amount || amount == 0; ++i) {
- long elapsed = -System.nanoTime();
- KeyPair kp = kpg.genKeyPair();
- elapsed += System.nanoTime();
- if (!lib.getNativeTimingSupport().isEmpty()) {
- elapsed = lib.getLastNativeTiming();
- }
- ECPublicKey publicKey = (ECPublicKey) kp.getPublic();
- ECPrivateKey privateKey = (ECPrivateKey) kp.getPrivate();
-
- String pub = ByteUtil.bytesToHex(ECUtil.toX962Uncompressed(publicKey.getW(), publicKey.getParams()), false);
- String priv = ByteUtil.bytesToHex(privateKey.getS().toByteArray(), false);
- out.println(String.format("%d;%d;%s;%s", i, elapsed, pub, priv));
- }
-
- if (cli.hasOption("generate.output")) {
- out.close();
- }
- }
-
- /**
- *
- */
- private void test() throws TestException, ParserConfigurationException {
- TestWriter writer;
- switch (cli.getOptionValue("test.format", "text").toLowerCase()) {
- case "yaml":
- case "yml":
- writer = new YAMLTestWriter(System.out);
- break;
- case "xml":
- writer = new XMLTestWriter(System.out);
- break;
- case "text":
- default:
- writer = new TextTestWriter(System.out);
- break;
- }
-
- StandaloneTestSuite suite;
-
- switch (cli.getArg(0).toLowerCase()) {
- case "test-vectors":
- suite = new StandaloneTestVectorSuite(writer, cfg, cli);
- break;
- case "wrong":
- suite = new StandaloneWrongSuite(writer, cfg, cli);
- break;
- case "degenerate":
- suite = new StandaloneDegenerateSuite(writer, cfg, cli);
- break;
- case "cofactor":
- suite = new StandaloneCofactorSuite(writer, cfg, cli);
- break;
- case "composite":
- suite = new StandaloneCompositeSuite(writer, cfg, cli);
- break;
- case "invalid":
- suite = new StandaloneInvalidSuite(writer, cfg, cli);
- break;
- case "edge-cases":
- suite = new StandaloneEdgeCasesSuite(writer, cfg, cli);
- break;
- case "signature":
- suite = new StandaloneSignatureSuite(writer, cfg, cli);
- break;
- case "twist":
- suite = new StandaloneTwistSuite(writer, cfg, cli);
- break;
- case "miscellaneous":
- suite = new StandaloneMiscSuite(writer, cfg, cli);
- break;
- case "performance":
- suite = new StandalonePerformanceSuite(writer, cfg, cli);
- break;
- case "default":
- default:
- suite = new StandaloneDefaultSuite(writer, cfg, cli);
- }
-
- suite.run();
- }
-
- /**
- *
- */
- private void export() throws NoSuchAlgorithmException, IOException {
- ProviderECLibrary lib = cfg.selected;
- KeyPairGeneratorIdent ident = null;
- String algo = cli.getOptionValue("export.type", "EC");
- for (KeyPairGeneratorIdent kpIdent : lib.getKPGs()) {
- if (kpIdent.contains(algo)) {
- ident = kpIdent;
- break;
- }
- }
- if (ident == null) {
- throw new NoSuchAlgorithmException(algo);
- }
- KeyPairGenerator kpg = ident.getInstance(lib.getProvider());
- if (cli.hasOption("export.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("export.bits"));
- kpg.initialize(bits);
- }
- KeyPair kp = kpg.genKeyPair();
- ECPrivateKey privateKey = (ECPrivateKey) kp.getPrivate();
- ECParameterSpec params = privateKey.getParams();
- System.out.println(params);
- EC_Curve curve = EC_Curve.fromSpec(params);
- curve.writeCSV(System.out);
- }
-
- public static void main(String[] args) {
- ECTesterStandalone app = new ECTesterStandalone();
- app.run(args);
- }
-
-
- /**
- *
- */
- public static class Config {
- private ProviderECLibrary[] libs;
- public ProviderECLibrary selected = null;
- public boolean color = false;
-
- public Config(ProviderECLibrary[] libs) {
- this.libs = libs;
- }
-
- boolean readOptions(TreeCommandLine cli) {
- color = cli.hasOption("color");
- Colors.enabled = color;
-
- String next = cli.getNextName();
-
- if (cli.isNext("generate") || cli.isNext("export") || cli.isNext("ecdh") || cli.isNext("ecdsa") || cli.isNext("test")) {
- if (!cli.hasArg(-1)) {
- System.err.println("Missing library name argument.");
- return false;
- }
-
- boolean hasBits = cli.hasOption(next + ".bits");
- boolean hasNamedCurve = cli.hasOption(next + ".named-curve");
- boolean hasCurveName = cli.hasOption(next + ".curve-name");
- if (hasBits ^ hasNamedCurve ? hasCurveName : hasBits) {
- System.err.println("You can only specify bitsize or a named curve/curve name, nor both.");
- return false;
- }
-
- if (hasCurveName && (cli.hasOption(next + ".named-public") || cli.hasOption(next + ".named-private") || cli.hasOption(next + ".public") || cli.hasOption(next + ".private"))) {
- System.err.println("Cannot specify key with a curve name switch, needs explicit parameteres.");
- return false;
- }
- }
-
- if (!cli.isNext("list-data") && !cli.isNext("list-suites") && !cli.isNext("list-types")) {
- String libraryName = cli.getArg(-1);
- if (libraryName != null) {
- List<ProviderECLibrary> matchedLibs = new LinkedList<>();
- for (ProviderECLibrary lib : libs) {
- if (lib.isInitialized() && lib.name().toLowerCase().contains(libraryName.toLowerCase())) {
- matchedLibs.add(lib);
- }
- }
- if (matchedLibs.size() == 0) {
- System.err.println("No library " + libraryName + " found.");
- return false;
- } else if (matchedLibs.size() > 1) {
- System.err.println("Multiple matching libraries found: " + String.join(",", matchedLibs.stream().map(ECLibrary::name).collect(Collectors.toList())));
- return false;
- } else {
- selected = matchedLibs.get(0);
- }
- }
- }
-
- if (cli.hasOption("test.format")) {
- String fmt = cli.getOptionValue("test.format");
- String[] formats = new String[]{"text", "xml", "yaml", "yml"};
- if (!Arrays.asList(formats).contains(fmt.toLowerCase())) {
- System.err.println("Invalid format specified.");
- return false;
- }
- }
-
- if (cli.isNext("ecdh")) {
- if ((cli.hasOption("ecdh.public") || cli.hasOption("ecdh.private")) && !cli.hasOption("ecdh.named-curve")) {
- System.err.println("Need to specify a named curve when specifying public/private key in file.");
- return false;
- }
- }
-
- if (cli.isNext("ecdsa")) {
- if ((cli.hasOption("ecdsa.public") || cli.hasOption("ecdsa.private")) && !cli.hasOption("ecdsa.named-curve")) {
- System.err.println("Need to specify a named curve when specifying public/private key in file.");
- return false;
- }
- }
-
- if (cli.isNext("generate") || cli.isNext("ecdh") || cli.isNext("ecdsa")) {
- if (cli.hasOption(next + ".time-source")) {
- String source = cli.getOptionValue(next + ".time-source");
- if (!selected.getNativeTimingSupport().contains(source)) {
- System.err.println(String.format("Time source %s unavailable for library %s.", source, selected.name()));
- return false;
- }
- }
- }
-
- return true;
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/consts/Ident.java b/src/cz/crcs/ectester/standalone/consts/Ident.java
deleted file mode 100644
index fcc811d..0000000
--- a/src/cz/crcs/ectester/standalone/consts/Ident.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package cz.crcs.ectester.standalone.consts;
-
-import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.util.*;
-import java.util.function.BiFunction;
-
-public abstract class Ident {
- Set<String> idents;
- String name;
-
- public Ident(String name, String... aliases) {
- this.name = name;
- this.idents = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
- this.idents.add(name);
- this.idents.addAll(Arrays.asList(aliases));
- }
-
- public String getName() {
- return name;
- }
-
- public Set<String> getIdents() {
- return Collections.unmodifiableSet(idents);
- }
-
- public boolean contains(String other) {
- return name.equals(other) || idents.contains(other);
- }
-
- public boolean containsAny(List<String> others) {
- for(String other : others) {
- if(name.equals(other) || idents.contains(other)) {
- return true;
- }
- }
- return false;
- }
-
- <T> T getInstance(BiFunction<String, Provider, T> getter, Provider provider) throws NoSuchAlgorithmException {
- T instance = null;
- try {
- instance = getter.apply(name, provider);
- } catch (Exception ignored) {
- ignored.printStackTrace();
- }
-
- if (instance == null) {
- for (String alias : idents) {
- try {
- instance = getter.apply(alias, provider);
- if (instance != null) {
- break;
- }
- } catch (Exception ignored) {
- ignored.printStackTrace();
- }
- }
- }
-
- if (instance == null) {
- throw new NoSuchAlgorithmException(name);
- }
- return instance;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof Ident)) {
- return false;
- }
- Ident other = (Ident) obj;
- return idents.equals(other.getIdents());
- }
-
- @Override
- public int hashCode() {
- return idents.hashCode() + 37;
- }
-
- @Override
- public String toString() {
- return "(" + String.join(" | ", idents) + ")";
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java b/src/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java
deleted file mode 100644
index 9b912cb..0000000
--- a/src/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package cz.crcs.ectester.standalone.consts;
-
-import javax.crypto.KeyAgreement;
-import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class KeyAgreementIdent extends Ident {
- private boolean requiresKeyAlgo;
- private String kdf;
- private String algo;
-
- private static final List<KeyAgreementIdent> ALL = new LinkedList<>();
-
- static {
- //https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html
- // Basic ECDH and ECDHC (plain/raw)
- ALL.add(new KeyAgreementIdent("ECDH"));
- ALL.add(new KeyAgreementIdent("ECDHC", "ECCDH"));
- // ECDH and ECDHC with SHA as KDF, OIDs from RFC 3278
- ALL.add(new KeyAgreementIdent("ECDHwithSHA1KDF", true, "1.3.133.16.840.63.0.2"));
- ALL.add(new KeyAgreementIdent("ECCDHwithSHA1KDF", true, "1.3.133.16.840.63.0.3"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA224KDF", true, "1.3.132.1.11.0"));
- ALL.add(new KeyAgreementIdent("ECCDHwithSHA224KDF", true, "1.3.132.1.14.0"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA256KDF", true, "1.3.132.1.11.1"));
- ALL.add(new KeyAgreementIdent("ECCDHwithSHA256KDF", true, "1.3.132.1.14.1"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA384KDF", true, "1.3.132.1.11.2"));
- ALL.add(new KeyAgreementIdent("ECCDHwithSHA384KDF", true, "1.3.132.1.14.2"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA512KDF", true, "1.3.132.1.11.3"));
- ALL.add(new KeyAgreementIdent("ECCDHwithSHA512KDF", true, "1.3.132.1.14.3"));
- // Microsoft specific KDF
- ALL.add(new KeyAgreementIdent("ECDHwithSHA1KDF(CNG)"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA256KDF(CNG)"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA384KDF(CNG)"));
- ALL.add(new KeyAgreementIdent("ECDHwithSHA512KDF(CNG)"));
- // CKDF requires custom AlgorithmParameterSpec (only BouncyCastle)
- //ALL.add(new KeyAgreementIdent("ECDHwithSHA1CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECCDHwithSHA1CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECDHwithSHA256CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECCDHwithSHA256CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECDHwithSHA384CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECCDHwithSHA384CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECDHwithSHA512CKDF", true));
- //ALL.add(new KeyAgreementIdent("ECCDHwithSHA512CKDF", true));
- // ECMQV - Disable for now as it needs diferent params(too different from DH)
- //ALL.add(new KeyAgreementIdent("ECMQV"));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA1KDF", true));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA224KDF", true));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA256KDF", true));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA354KDF", true));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA512KDF", true));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA1CKDF", true, "1.3.133.16.840.63.0.16"));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA224CKDF", true, "1.3.132.1.15.0"));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA256CKDF", true, "1.3.132.1.15.1"));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA384CKDF", true, "1.3.132.1.15.2"));
- //ALL.add(new KeyAgreementIdent("ECMQVwithSHA512CKDF", true, "1.3.132.1.15.3"));
- // ECVKO - Disable for now as it needs diferent params(too different from DH)
- //ALL.add(new KeyAgreementIdent("ECVKO", "ECGOST3410", "1.2.643.2.2.19", "GOST-3410-2001", "1.2.643.2.2.96"));
- //ALL.add(new KeyAgreementIdent("ECVKO256", "ECGOST3410-2012-256", "1.2.643.7.1.1.6.1", "1.2.643.7.1.1.1.1"));
- //ALL.add(new KeyAgreementIdent("ECVKO512", "ECGOST3410-2012-512", "1.2.643.7.1.1.6.2", "1.2.643.7.1.1.1.2"));
- }
-
- public static KeyAgreementIdent get(String ident) {
- for (KeyAgreementIdent ka : ALL) {
- if (ka.getIdents().contains(ident)) {
- return ka;
- }
- }
- return null;
- }
-
- public static List<KeyAgreementIdent> list() {
- return Collections.unmodifiableList(ALL);
- }
-
- private KeyAgreementIdent(String name, String... aliases) {
- super(name, aliases);
- if (name.contains("with")) {
- int split = name.indexOf("with");
- this.algo = name.substring(0, split);
- this.kdf = name.substring(split + 4);
- } else {
- for (String alias : aliases) {
- if (alias.contains("with")) {
- int split = alias.indexOf("with");
- this.algo = alias.substring(0, split);
- this.kdf = alias.substring(split + 4);
- }
- }
- }
- }
-
- private KeyAgreementIdent(String name, boolean requiresKeyAlgo, String... aliases) {
- this(name, aliases);
- this.requiresKeyAlgo = requiresKeyAlgo;
- }
-
- public boolean requiresKeyAlgo() {
- return requiresKeyAlgo;
- }
-
- public String getKdfAlgo() {
- return kdf;
- }
-
- public String getBaseAlgo() {
- return algo;
- }
-
- public KeyAgreement getInstance(Provider provider) throws NoSuchAlgorithmException {
- KeyAgreement instance = getInstance((algorithm, provider1) -> {
- try {
- return KeyAgreement.getInstance(algorithm, provider1);
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- }, provider);
- instance.getProvider();
- return instance;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/consts/KeyPairGeneratorIdent.java b/src/cz/crcs/ectester/standalone/consts/KeyPairGeneratorIdent.java
deleted file mode 100644
index 83eef75..0000000
--- a/src/cz/crcs/ectester/standalone/consts/KeyPairGeneratorIdent.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package cz.crcs.ectester.standalone.consts;
-
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-public class KeyPairGeneratorIdent extends Ident {
- private static final List<KeyPairGeneratorIdent> ALL = new LinkedList<>();
-
- static {
- ALL.add(new KeyPairGeneratorIdent("EC"));
- ALL.add(new KeyPairGeneratorIdent("ECDH"));
- ALL.add(new KeyPairGeneratorIdent("ECDSA"));
- ALL.add(new KeyPairGeneratorIdent("ECDHC"));
- ALL.add(new KeyPairGeneratorIdent("ECMQV"));
- //ALL.add(new KeyPairGeneratorIdent("ECGOST3410"));
- //ALL.add(new KeyPairGeneratorIdent("ECGOST3410-2012"));
- // ECKCDSA? Botan provides.
- ALL.add(new KeyPairGeneratorIdent("ECKCDSA"));
- // ECGDSA? Botan provides.
- ALL.add(new KeyPairGeneratorIdent("ECGDSA"));
- }
-
- public static KeyPairGeneratorIdent get(String ident) {
- for (KeyPairGeneratorIdent kg : ALL) {
- if (kg.getIdents().contains(ident)) {
- return kg;
- }
- }
- return null;
- }
-
- public static List<KeyPairGeneratorIdent> list() {
- return Collections.unmodifiableList(ALL);
- }
-
- public KeyPairGeneratorIdent(String name, String... aliases) {
- super(name, aliases);
- }
-
- public KeyPairGenerator getInstance(Provider provider) throws NoSuchAlgorithmException {
- KeyPairGenerator instance = getInstance((algorithm, provider1) -> {
- try {
- return KeyPairGenerator.getInstance(algorithm, provider1);
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- }, provider);
- instance.getProvider();
- return instance;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/consts/SignatureIdent.java b/src/cz/crcs/ectester/standalone/consts/SignatureIdent.java
deleted file mode 100644
index c3913b7..0000000
--- a/src/cz/crcs/ectester/standalone/consts/SignatureIdent.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package cz.crcs.ectester.standalone.consts;
-
-import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.security.Signature;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class SignatureIdent extends Ident {
- private String hash;
- private String sig;
-
- private static final List<SignatureIdent> ALL = new LinkedList<>();
-
- static {
- //https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html
- // ECDSA
- ALL.add(new SignatureIdent("ECDSA", "SHA1withECDSA", "ECDSAwithSHA1", "1.2.840.10045.4.1", "1.3.36.3.3.2.1"));
- ALL.add(new SignatureIdent("NONEwithECDSA"));
- ALL.add(new SignatureIdent("SHA224withECDSA", "SHA224/ECDSA", "1.2.840.10045.4.3.1"));
- ALL.add(new SignatureIdent("SHA256withECDSA", "SHA256/ECDSA", "1.2.840.10045.4.3.2"));
- ALL.add(new SignatureIdent("SHA384withECDSA", "SHA384/ECDSA", "1.2.840.10045.4.3.3"));
- ALL.add(new SignatureIdent("SHA512withECDSA", "SHA512/ECDSA", "1.2.840.10045.4.3.4"));
- ALL.add(new SignatureIdent("SHA3-224withECDSA", "SHA3-224/ECDSA", "2.16.840.1.101.3.4.3.9"));
- ALL.add(new SignatureIdent("SHA3-256withECDSA", "SHA3-256/ECDSA", "2.16.840.1.101.3.4.3.10"));
- ALL.add(new SignatureIdent("SHA3-384withECDSA", "SHA3-384/ECDSA", "2.16.840.1.101.3.4.3.11"));
- ALL.add(new SignatureIdent("SHA3-512withECDSA", "SHA3-512/ECDSA", "2.16.840.1.101.3.4.3.12"));
- ALL.add(new SignatureIdent("RIPEMD160withECDSA", "RIPEMD160/ECDSA", "1.3.36.3.3.2.2"));
- // ECNR
- ALL.add(new SignatureIdent("SHA1withECNR"));
- ALL.add(new SignatureIdent("SHA224withECNR"));
- ALL.add(new SignatureIdent("SHA256withECNR"));
- ALL.add(new SignatureIdent("SHA512withECNR"));
- // CVC-ECDSA
- ALL.add(new SignatureIdent("SHA1withCVC-ECDSA", "SHA1/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.1"));
- ALL.add(new SignatureIdent("SHA224withCVC-ECDSA", "SHA224/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.2"));
- ALL.add(new SignatureIdent("SHA256withCVC-ECDSA", "SHA256/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.3"));
- ALL.add(new SignatureIdent("SHA384withCVC-ECDSA", "SHA384/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.4"));
- ALL.add(new SignatureIdent("SHA512withCVC-ECDSA", "SHA512/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.5"));
- // PLAIN-ECDSA
- ALL.add(new SignatureIdent("SHA1withPLAIN-ECDSA", "SHA1/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.1"));
- ALL.add(new SignatureIdent("SHA224withPLAIN-ECDSA", "SHA224/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.2"));
- ALL.add(new SignatureIdent("SHA256withPLAIN-ECDSA", "SHA256/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.3"));
- ALL.add(new SignatureIdent("SHA384withPLAIN-ECDSA", "SHA384/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.4"));
- ALL.add(new SignatureIdent("SHA512withPLAIN-ECDSA", "SHA512/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.5"));
- ALL.add(new SignatureIdent("RIPEMD160withPLAIN-ECDSA", "RIPEMD160/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.6"));
- // ECGOST
- ALL.add(new SignatureIdent("ECGOST3410", "ECGOST-3410", "GOST-3410-2001"));
- ALL.add(new SignatureIdent("GOST3411withECGOST3410", "GOST3411/ECGOST3410", "1.2.643.2.2.3"));
- ALL.add(new SignatureIdent("ECGOST3410-2012-256", "GOST-3410-2012-256"));
- ALL.add(new SignatureIdent("GOST3411-2012-256withECGOST3410-2012-256", "GOST3411-2012-256/ECGOST3410-2012-2560", "1.2.643.7.1.1.3.2"));
- ALL.add(new SignatureIdent("ECGOST3410-2012-512", "GOST-3410-2012-512"));
- ALL.add(new SignatureIdent("GOST3411-2012-512withECGOST3410-2012-512", "GOST3411-2012-512/ECGOST3410-2012-5120", "1.2.643.7.1.1.3.3"));
- ALL.add(new SignatureIdent("SM3withSM2"));
- // ECDDSA (rfc6979?)
- ALL.add(new SignatureIdent("ECDDSA", "SHA1withECDDSA", "SHA1withDETECDSA", "DETECDSA", "ECDETDSA"));
- ALL.add(new SignatureIdent("SHA224withECDDSA", "SHA224withDETECDSA"));
- ALL.add(new SignatureIdent("SHA256withECDDSA", "SHA256withDETECDSA"));
- ALL.add(new SignatureIdent("SHA384withECDDSA", "SHA384withDETECDSA"));
- ALL.add(new SignatureIdent("SHA512withECDDSA", "SHA512withDETECDSA"));
- ALL.add(new SignatureIdent("SHA3-224withECDDSA", "SHA3-224withDETECDSA"));
- ALL.add(new SignatureIdent("SHA3-256withECDDSA", "SHA3-256withDETECDSA"));
- ALL.add(new SignatureIdent("SHA3-384withECDDSA", "SHA3-384withDETECDSA"));
- ALL.add(new SignatureIdent("SHA3-512withECDDSA", "SHA3-512withDETECDSA"));
- // ECKCDSA? Botan provides.
- ALL.add(new SignatureIdent("ECKCDSA", "SHA1withECKCDSA", "1.2.410.200004.1.100.4.3"));
- ALL.add(new SignatureIdent("NONEwithECKCDSA"));
- ALL.add(new SignatureIdent("RIPEMD160withECKCDSA"));
- ALL.add(new SignatureIdent("SHA224withECKCDSA", "1.2.410.200004.1.100.4.4"));
- ALL.add(new SignatureIdent("SHA256withECKCDSA", "1.2.410.200004.1.100.4.5"));
- ALL.add(new SignatureIdent("SHA384withECKCDSA"));
- ALL.add(new SignatureIdent("SHA512withECKCDSA"));
- // ECGDSA? Botan provides.
- ALL.add(new SignatureIdent("ECGDSA", "SHA1withECGDSA", "1.3.36.3.3.2.5.4.2"));
- ALL.add(new SignatureIdent("NONEwithECGDSA"));
- ALL.add(new SignatureIdent("RIPEMD160withECGDSA", "1.3.36.3.3.2.5.4.1"));
- ALL.add(new SignatureIdent("SHA224withECGDSA", "1.3.36.3.3.2.5.4.3"));
- ALL.add(new SignatureIdent("SHA224withECGDSA", "1.3.36.3.3.2.5.4.4"));
- ALL.add(new SignatureIdent("SHA384withECGDSA", "1.3.36.3.3.2.5.4.5"));
- ALL.add(new SignatureIdent("SHA512withECGDSA", "1.3.36.3.3.2.5.4.6"));
- }
-
- public static SignatureIdent get(String ident) {
- for (SignatureIdent sig : ALL) {
- if (sig.getIdents().contains(ident)) {
- return sig;
- }
- }
- return null;
- }
-
- public static List<SignatureIdent> list() {
- return Collections.unmodifiableList(ALL);
- }
-
- private SignatureIdent(String name, String... aliases) {
- super(name, aliases);
- if (name.contains("with")) {
- int split = name.indexOf("with");
- this.hash = name.substring(0, split);
- this.sig = name.substring(split + 4);
- } else {
- for (String alias : aliases) {
- if (alias.contains("with")) {
- int split = alias.indexOf("with");
- this.hash = alias.substring(0, split);
- this.sig = alias.substring(split + 4);
- break;
- }
- }
- }
- }
-
- public Signature getInstance(Provider provider) throws NoSuchAlgorithmException {
- Signature instance = getInstance((algorithm, provider1) -> {
- try {
- return Signature.getInstance(algorithm, provider1);
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- }, provider);
- instance.getProvider();
- return instance;
- }
-
- public String toString() {
- return name;
- }
-
- public String getHashAlgo() {
- return hash;
- }
-
- public String getSigType() {
- return sig;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/BoringsslLib.java b/src/cz/crcs/ectester/standalone/libs/BoringsslLib.java
deleted file mode 100644
index 60ca5d9..0000000
--- a/src/cz/crcs/ectester/standalone/libs/BoringsslLib.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class BoringsslLib extends NativeECLibrary {
- public BoringsslLib() {
- super("boringssl_provider", "lib_boringssl.so");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/BotanLib.java b/src/cz/crcs/ectester/standalone/libs/BotanLib.java
deleted file mode 100644
index cd28791..0000000
--- a/src/cz/crcs/ectester/standalone/libs/BotanLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class BotanLib extends NativeECLibrary {
-
- public BotanLib() {
- super("botan_provider", "botan-2");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/BouncyCastleLib.java b/src/cz/crcs/ectester/standalone/libs/BouncyCastleLib.java
deleted file mode 100644
index c6600f9..0000000
--- a/src/cz/crcs/ectester/standalone/libs/BouncyCastleLib.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import org.bouncycastle.jce.ECNamedCurveTable;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.util.Enumeration;
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class BouncyCastleLib extends ProviderECLibrary {
-
- public BouncyCastleLib() {
- super(new BouncyCastleProvider());
- }
-
- @Override
- public Set<String> getCurves() {
- Set<String> result = new TreeSet<>();
- Enumeration names = ECNamedCurveTable.getNames();
- while (names.hasMoreElements()) {
- result.add((String) names.nextElement());
- }
- return result;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/CryptoppLib.java b/src/cz/crcs/ectester/standalone/libs/CryptoppLib.java
deleted file mode 100644
index 5112d7d..0000000
--- a/src/cz/crcs/ectester/standalone/libs/CryptoppLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class CryptoppLib extends NativeECLibrary {
-
- public CryptoppLib() {
- super("cryptopp_provider", "cryptopp");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/ECLibrary.java b/src/cz/crcs/ectester/standalone/libs/ECLibrary.java
deleted file mode 100644
index 0f81978..0000000
--- a/src/cz/crcs/ectester/standalone/libs/ECLibrary.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public interface ECLibrary {
- boolean initialize();
-
- boolean isInitialized();
-
- Set<String> getCurves();
-
- Set<KeyAgreementIdent> getKAs();
-
- Set<SignatureIdent> getSigs();
-
- Set<KeyPairGeneratorIdent> getKPGs();
-
- String name();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/GcryptLib.java b/src/cz/crcs/ectester/standalone/libs/GcryptLib.java
deleted file mode 100644
index a0a7fc8..0000000
--- a/src/cz/crcs/ectester/standalone/libs/GcryptLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class GcryptLib extends NativeECLibrary {
-
- public GcryptLib() {
- super("gcrypt_provider", "gcrypt", "gpg-error");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/IppcpLib.java b/src/cz/crcs/ectester/standalone/libs/IppcpLib.java
deleted file mode 100644
index 0dec0a2..0000000
--- a/src/cz/crcs/ectester/standalone/libs/IppcpLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class IppcpLib extends NativeECLibrary {
-
- public IppcpLib() {
- super("ippcp_provider", "lib_ippcp.so");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/LibresslLib.java b/src/cz/crcs/ectester/standalone/libs/LibresslLib.java
deleted file mode 100644
index cee4e4d..0000000
--- a/src/cz/crcs/ectester/standalone/libs/LibresslLib.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Matěj Grabovský matej@mgrabovsky.net
- */
-public class LibresslLib extends NativeECLibrary {
- public LibresslLib() {
- super("libressl_provider", "lib_libressl.so");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/MatrixsslLib.java b/src/cz/crcs/ectester/standalone/libs/MatrixsslLib.java
deleted file mode 100644
index fcc13ea..0000000
--- a/src/cz/crcs/ectester/standalone/libs/MatrixsslLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class MatrixsslLib extends NativeECLibrary {
-
- public MatrixsslLib() {
- super("matrixssl_provider");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/MbedTLSLib.java b/src/cz/crcs/ectester/standalone/libs/MbedTLSLib.java
deleted file mode 100644
index ace10d7..0000000
--- a/src/cz/crcs/ectester/standalone/libs/MbedTLSLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class MbedTLSLib extends NativeECLibrary {
-
- public MbedTLSLib() {
- super("mbedtls_provider", "mbedcrypto");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/MscngLib.java b/src/cz/crcs/ectester/standalone/libs/MscngLib.java
deleted file mode 100644
index 527a65b..0000000
--- a/src/cz/crcs/ectester/standalone/libs/MscngLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class MscngLib extends NativeECLibrary {
-
- public MscngLib() {
- super("mscng_provider", "bcrypt");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/NativeECLibrary.java b/src/cz/crcs/ectester/standalone/libs/NativeECLibrary.java
deleted file mode 100644
index db85b02..0000000
--- a/src/cz/crcs/ectester/standalone/libs/NativeECLibrary.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import cz.crcs.ectester.common.util.FileUtil;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class NativeECLibrary extends ProviderECLibrary {
- private String resource;
- private String[] requriements;
-
-
- public NativeECLibrary(String resource, String... requirements) {
- this.resource = resource;
- this.requriements = requirements;
- }
-
- @Override
- public boolean initialize() {
- try {
- /* Determine what OS are we running on and use appropriate suffix and path. */
- String suffix = FileUtil.getLibSuffix();
-
- /* Resolve and create the ECTester directories in appData. */
- Path libDir = FileUtil.getLibDir();
- Path libReqDir = FileUtil.getRequirementsDir();
- Path libPath = libDir.resolve(resource + "." + suffix);
-
- /* Write the shim. */
- FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + resource + "." + suffix, libPath);
-
- /* Load the requirements, if they are bundled, write them in and load them. */
- try {
- for (String requirement : requriements) {
- if (requirement.endsWith(suffix)) {
- /* The requirement is bundled, write it */
- Path reqPath = libReqDir.resolve(requirement);
- FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + requirement, reqPath);
- System.load(reqPath.toString());
- } else {
- System.loadLibrary(requirement);
- }
- }
- } catch (UnsatisfiedLinkError ule) {
- return false;
- }
-
- System.load(libPath.toString());
-
- provider = createProvider();
- return super.initialize();
- } catch (IOException | UnsatisfiedLinkError ignored) {
- }
- return false;
- }
-
-
- @Override
- public native Set<String> getNativeTimingSupport();
-
- @Override
- public native boolean setNativeTimingType(String type);
-
- @Override
- public native long getNativeTimingResolution();
-
- @Override
- public native String getNativeTimingUnit();
-
- @Override
- public native long getLastNativeTiming();
-
- abstract Provider createProvider();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/NettleLib.java b/src/cz/crcs/ectester/standalone/libs/NettleLib.java
deleted file mode 100644
index 00e3b39..0000000
--- a/src/cz/crcs/ectester/standalone/libs/NettleLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Michal Cech 445431@mail.muni.cz
- */
-public class NettleLib extends NativeECLibrary {
-
- public NettleLib() {
- super("nettle_provider", "nettle","hogweed", "gmp");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/OpensslLib.java b/src/cz/crcs/ectester/standalone/libs/OpensslLib.java
deleted file mode 100644
index e558336..0000000
--- a/src/cz/crcs/ectester/standalone/libs/OpensslLib.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class OpensslLib extends NativeECLibrary {
- public OpensslLib() {
- super("openssl_provider", "crypto");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/ProviderECLibrary.java b/src/cz/crcs/ectester/standalone/libs/ProviderECLibrary.java
deleted file mode 100644
index dd8e49c..0000000
--- a/src/cz/crcs/ectester/standalone/libs/ProviderECLibrary.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import cz.crcs.ectester.standalone.consts.Ident;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-
-import java.security.Provider;
-import java.security.Security;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.function.Function;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class ProviderECLibrary implements ECLibrary {
- Provider provider;
- private boolean initialized = false;
-
- public ProviderECLibrary() {
-
- }
-
- public ProviderECLibrary(Provider provider) {
- this.provider = provider;
- }
-
- @Override
- public boolean initialize() {
- try {
- int result = Security.addProvider(provider);
- if (result == -1) {
- provider = Security.getProvider(provider.getName());
- }
- initialized = true;
- } catch (NullPointerException | SecurityException ignored) {
- initialized = false;
- }
- return initialized;
- }
-
- @Override
- public boolean isInitialized() {
- return initialized;
- }
-
- private <T extends Ident> Set<T> getIdents(String type, Function<String, T> getter) {
- Set<T> results = new HashSet<>();
- if (!initialized) {
- return results;
- }
-
- for (Provider.Service service : provider.getServices()) {
- if (service.getType().equals(type)) {
- T id = getter.apply(service.getAlgorithm());
- if (id != null) {
- results.add(id);
- }
- }
- }
- return results;
- }
-
- public Set<String> getNativeTimingSupport() {
- return new HashSet<>();
- }
-
- public boolean setNativeTimingType(String type) {
- return false;
- }
-
- public long getNativeTimingResolution() {
- return 0;
- }
-
- public String getNativeTimingUnit() {
- return null;
- }
-
- public long getLastNativeTiming() {
- return 0;
- }
-
- @Override
- public Set<KeyAgreementIdent> getKAs() {
- return getIdents("KeyAgreement", KeyAgreementIdent::get);
- }
-
- @Override
- public Set<SignatureIdent> getSigs() {
- return getIdents("Signature", SignatureIdent::get);
- }
-
- @Override
- public Set<KeyPairGeneratorIdent> getKPGs() {
- return getIdents("KeyPairGenerator", KeyPairGeneratorIdent::get);
- }
-
- @Override
- public String name() {
- return provider.getInfo();
- }
-
- public Provider getProvider() {
- return provider;
- }
-
- @Override
- public String toString() {
- return name();
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/SunECLib.java b/src/cz/crcs/ectester/standalone/libs/SunECLib.java
deleted file mode 100644
index 3aec842..0000000
--- a/src/cz/crcs/ectester/standalone/libs/SunECLib.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import sun.security.ec.SunEC;
-
-import java.util.Set;
-import java.util.TreeSet;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class SunECLib extends ProviderECLibrary {
-
- public SunECLib() {
- super(new SunEC());
- }
-
- @Override
- public Set<String> getCurves() {
- String curves = provider.get("AlgorithmParameters.EC SupportedCurves").toString();
- String[] split = curves.split("\\|");
- Set<String> result = new TreeSet<>();
- for (String curve : split) {
- String body = curve.split(",")[0].substring(1);
- result.add(body);
- }
- return result;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/TomcryptLib.java b/src/cz/crcs/ectester/standalone/libs/TomcryptLib.java
deleted file mode 100644
index 78db00e..0000000
--- a/src/cz/crcs/ectester/standalone/libs/TomcryptLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TomcryptLib extends NativeECLibrary {
-
- public TomcryptLib() {
- super("tomcrypt_provider", "tommath", "tomcrypt");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java b/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java
deleted file mode 100644
index b58eb91..0000000
--- a/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import com.wolfssl.provider.jce.WolfCryptProvider;
-
-import java.util.HashSet;
-import java.util.Set;
-
-public class WolfCryptLib extends ProviderECLibrary {
-
- public WolfCryptLib() {
- super(new WolfCryptProvider());
- }
-
- @Override
- public Set<String> getCurves() {
- return new HashSet<>();
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/.clang-format b/src/cz/crcs/ectester/standalone/libs/jni/.clang-format
deleted file mode 100644
index 0aa8562..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/.clang-format
+++ /dev/null
@@ -1,90 +0,0 @@
----
-Language: Cpp
-# BasedOnStyle: Google
-AccessModifierOffset: -1
-AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: true
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: All
-AllowShortIfStatementsOnASingleLine: true
-AllowShortLoopsOnASingleLine: true
-AlwaysBreakAfterDefinitionReturnType: None
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: true
-AlwaysBreakTemplateDeclarations: true
-BinPackArguments: true
-BinPackParameters: true
-BraceWrapping:
- AfterClass: false
- AfterControlStatement: false
- AfterEnum: false
- AfterFunction: false
- AfterNamespace: false
- AfterObjCDeclaration: false
- AfterStruct: false
- AfterUnion: false
- BeforeCatch: false
- BeforeElse: false
- IndentBraces: false
-BreakBeforeBinaryOperators: None
-BreakBeforeBraces: Attach
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: false
-ColumnLimit: 140
-CommentPragmas: '^ IWYU pragma:'
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
-ConstructorInitializerIndentWidth: 4
-ContinuationIndentWidth: 4
-Cpp11BracedListStyle: true
-DerivePointerAlignment: true
-DisableFormat: false
-ExperimentalAutoDetectBinPacking: false
-ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
-IncludeCategories:
- - Regex: '^<.*\.h>'
- Priority: 1
- - Regex: '^<.*'
- Priority: 2
- - Regex: '.*'
- Priority: 3
-IndentCaseLabels: true
-IndentWidth: 4
-IndentWrappedFunctionNames: false
-KeepEmptyLinesAtTheStartOfBlocks: false
-MacroBlockBegin: ''
-MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
-NamespaceIndentation: None
-ObjCBlockIndentWidth: 2
-ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: false
-PenaltyBreakBeforeFirstCallParameter: 1
-PenaltyBreakComment: 300
-PenaltyBreakFirstLessLess: 120
-PenaltyBreakString: 1000
-PenaltyExcessCharacter: 10000
-PenaltyReturnTypeOnItsOwnLine: 200
-PointerAlignment: Left
-ReflowComments: true
-SortIncludes: true
-SpaceAfterCStyleCast: false
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 2
-SpacesInAngles: false
-SpacesInContainerLiterals: true
-SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Auto
-TabWidth: 4
-UseTab: ForIndentation
-...
-
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/.gitignore b/src/cz/crcs/ectester/standalone/libs/jni/.gitignore
deleted file mode 100644
index 7e8075a..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-libcore_s.a
-libcrypt_s.a
-matrixssl/
-
-CMakeLists.txt
-cmake-build-debug \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/Makefile b/src/cz/crcs/ectester/standalone/libs/jni/Makefile
deleted file mode 100644
index c3995e3..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/Makefile
+++ /dev/null
@@ -1,217 +0,0 @@
-###############################################################################
-## General CC setup.
-
-CC?=gcc
-CXX?=g++
-
-LFLAGS+=-fPIC -shared
-CFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I.
-CXXFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I.
-
-DEBUG ?= 0
-
-ifeq ($(DEBUG), 1)
- CFLAGS+=-g -Wall
- LFLAGS+=-g
- CXXFLAGS+=-g -Wall
-else
- CFLAGS+=-O2
- LFLAGS+=-O2
- CXXFLAGS+=-O2
-endif
-
-###############################################################################
-## Java JNI setup.
-
-ifeq ($(JAVA_HOME),)
- ifeq ($(OS),Windows_NT)
- which = $(shell where $1)
- else
- which = $(shell which $1)
- endif
- JAVAC ?= $(realpath $(call which,javac))
- JAVA_HOME = $(abspath $(dir $(JAVAC))..)
-endif
-
-ifneq ($(JAVA_HOME),)
- JNI_INCLUDEDIR ?= $(JAVA_HOME)/include
-endif
-
-ifeq ($(JNI_INCLUDEDIR),)
- $(error Could not determine JNI include dir. Try specifying either JAVA_HOME or JNI_INCLUDEDIR.)
-endif
-
-TARGETTRIPLET := $(shell $(CC) -dumpmachine)
-
-ifeq ($(JNI_PLATFORM),)
- ifeq ($(findstring mingw,$(TARGETTRIPLET)),mingw)
- JNI_PLATFORM:= win32
- else
- ifeq ($(findstring linux,$(TARGETTRIPLET)),linux)
- JNI_PLATFORM:= linux
- endif
- endif
-endif
-
-JNI_PLATFORMINCLUDEDIR ?= $(JNI_INCLUDEDIR)/$(JNI_PLATFORM)
-
-###############################################################################
-## Targets.
-
-all: tomcrypt botan cryptopp openssl boringssl gcrypt mbedtls ippcp matrixssl nettle libressl
-
-# Common utils
-c_utils.o: c_utils.c
- $(CC) $(CFLAGS) -c $<
-
-lib_timing.so: c_timing.c
- $(CC) -o $@ -shared $(CFLAGS) -Wl,-soname,lib_timing.so $<
-
-cpp_utils.o: cpp_utils.cpp
- $(CXX) $(CXXFLAGS) -c $<
-
-
-# OpenSSL shim
-openssl: openssl_provider.so
-
-openssl_provider.so: openssl.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell pkg-config --libs openssl) -l:lib_timing.so
-
-openssl.o: openssl.c
- $(CC) $(shell pkg-config --cflags openssl) $(CFLAGS) -c $<
-
-
-# BoringSSL shim
-boringssl: boringssl_provider.so
-
-lib_boringssl.so:
- cp ../../../../../../../ext/boringssl/build/crypto/libcrypto.so lib_boringssl.so
-
-boringssl_provider.so: boringssl.o c_utils.o | lib_timing.so lib_boringssl.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. lib_boringssl.so -l:lib_timing.so
-
-boringssl.o: boringssl.c
- $(CC) -I../../../../../../../ext/boringssl/include/ $(CFLAGS) -c $<
-
-
-# libgcrypt shim
-gcrypt: gcrypt_provider.so
-
-gcrypt_provider.so: gcrypt.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell libgcrypt-config --libs) -l:lib_timing.so
-
-gcrypt.o: gcrypt.c
- $(CC) $(shell libgcrypt-config --cflags) $(CFLAGS) -c $<
-
-
-# Libtomcrypt shim
-tomcrypt: tomcrypt_provider.so
-
-tomcrypt_provider.so: tomcrypt.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. -ltommath $(shell pkg-config --libs libtomcrypt) -l:lib_timing.so
-
-tomcrypt.o: tomcrypt.c
- $(CC) -DLTM_DESC $(shell pkg-config --cflags libtomcrypt) $(CFLAGS) -c $<
-
-
-# Botan-2 shim
-botan: botan_provider.so
-
-botan_provider.so: botan.o cpp_utils.o | lib_timing.so
- $(CXX) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell pkg-config --libs botan-2) -l:lib_timing.so
-
-botan.o: botan.cpp
- $(CXX) $(shell pkg-config --cflags botan-2) $(CXXFLAGS) -c $<
-
-
-# Crypto++ shim
-CRYPTOPP_NAME := "libcrypto++"
-ifeq ($(shell pkg-config --exists $(CRYPTOPP_NAME); echo $$?),1)
- CRYPTOPP_NAME := "libcryptopp"
-endif
-cryptopp: cryptopp_provider.so
-
-cryptopp_provider.so: cryptopp.o cpp_utils.o | lib_timing.so
- $(CXX) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell pkg-config --libs $(CRYPTOPP_NAME)) -l:lib_timing.so
-
-cryptopp.o: cryptopp.cpp
- $(CXX) $(shell pkg-config --cflags $(CRYPTOPP_NAME)) $(CXXFLAGS) -c $<
-
-
-# mbedTLS shim
-mbedtls: mbedtls_provider.so
-
-mbedtls_provider.so: mbedtls.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. -lmbedcrypto -l:lib_timing.so
-
-mbedtls.o: mbedtls.c
- $(CC) $(CFLAGS) -c $<
-
-
-# Intel Performance Primitives crypto shim
-ippcp: ippcp_provider.so
-
-lib_ippcp.so:
- cp ../../../../../../../ext/ipp-crypto/build/.build/RELEASE/lib/libippcp.so lib_ippcp.so
-
-ippcp_provider.so: ippcp.o c_utils.o | lib_timing.so lib_ippcp.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. lib_ippcp.so -l:lib_timing.so
-
-ippcp.o: ippcp.c
- $(CC) -I../../../../../../../ext/ipp-crypto/build/.build/RELEASE/include/ $(CFLAGS) -c $<
-
-
-# MatrixSSL shim
-matrixssl: matrixssl_provider.so
-
-matrixssl_provider.so: matrixssl.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' -L. $^ libcrypt_s.a libcore_s.a -l:lib_timing.so
-
-matrixssl.o: matrixssl.c
- $(CC) $(CFLAGS) -Imatrixssl/ -c $<
-
-
-# Nettle shim
-nettle: nettle_provider.so
-
-nettle_provider.so: nettle.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell pkg-config --libs nettle) -l:lib_timing.so $(shell pkg-config --libs hogweed) -lgmp
-
-nettle.o: nettle.c
- $(CC) $(shell pkg-config --cflags nettle) $(shell pkg-config --libs hogweed) -lgmp $(CFLAGS) -c $<
-
-
-# LibreSSL shim
-libressl: libressl_provider.so
-
-lib_libressl.so:
- cp ../../../../../../../ext/libressl/build/crypto/libcrypto.so lib_libressl.so
-
-libressl_provider.so: libressl.o c_utils.o | lib_timing.so lib_libressl.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. lib_libressl.so -l:lib_timing.so
-
-libressl.o: libressl.c
- $(CC) -I../../../../../../../ext/libressl/include/ $(CFLAGS) -c $<
-
-
-help:
- @echo "# This makefile builds the JNI shims necessary to test native libraries."
- @echo "# Targets:"
- @echo " - openssl"
- @echo " - boringssl"
- @echo " - gcrypt"
- @echo " - tomcrypt"
- @echo " - botan"
- @echo " - cryptopp"
- @echo " - mbedtls"
- @echo " - ippcp"
- @echo " - matrixssl"
- @echo " - nettle"
- @echo " - libressl"
-
-
-clean:
- rm -rf *.o
- rm -rf *.so
-
-.PHONY: all help clean openssl boringssl gcrypt tomcrypt botan cryptopp mbedtls ippcp matrixssl nettle libressl
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/Makefile.bat b/src/cz/crcs/ectester/standalone/libs/jni/Makefile.bat
deleted file mode 100755
index a8b51f4..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/Makefile.bat
+++ /dev/null
@@ -1,163 +0,0 @@
-@if not defined _echo echo off
-setlocal EnableDelayedExpansion
-
-:: ENV variables respected:
-:: - JAVA_HOME
-:: - CC
-:: - USE_EXT_MSCNG
-:: - DEBUG
-
-:: See if we are cleaning.
-if "%1" == "clean" (
- echo ** cleaning
- del *.dll *.exp *.lib *.obj
- exit
-)
-
-set TAB=
-
-
-:: Determine arch.
-reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL 2>&1 && (set ARCH=32& set ARCH_S=x86& set ARCH_VS=x86) || (set ARCH=64& set ARCH_S=x64& set ARCH_VS=amd64)
-
-echo ** ARCH%TAB%%TAB%%ARCH_S%
-
-
-:: Find a working visual studio environment.
-set found=0
-set vsw_path="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
-
-set vs_path=
-for /f "usebackq delims=" %%i in (`%vsw_path% -nologo -prerelease -latest -property installationPath`) do (
- if exist "%%i\Common7\Tools\vsdevcmd.bat" (
- echo ** VsDevCmd%TAB%%TAB%%%i\Common7\Tools\vsdevcmd.bat
- call "%%i\Common7\Tools\vsdevcmd.bat" -no_logo -arch=%ARCH_VS%
- if ERRORLEVEL 1 (
- echo nope.
- ) else (
- set found=1
- set vs_path=%%i
- break
- )
- )
-)
-
-:: Test if we have a visual studio env.
-if %found% EQU 0 (
- echo Working VsDevCmd not found.
- exit /b 2
-)
-
-echo ** VS_PATH%TAB%%TAB%%vs_path%
-
-
-:: Try to find vcruntime.
-set vc_base=%vs_path%\VC\Tools\MSVC\
-if exist %vc_base% (
- set vc_version=
- for /f "delims=" %%i in ('dir /b /on "!vc_base!"') do (
- set vc_version=%%i
- )
- echo ** VC_VERSION%TAB%!vc_version!
- set vc_include=%vc_base%!vc_version!\include
- set vc_lib=%vc_base%!vc_version!\lib\%ARCH_S%
-)
-
-
-:: Get the paths to Microsoft CNG SDK.
-set root_rel=..\..\..\..\..\..\..\
-set mscng_rel_include=ext\mscng\10\Include
-set mscng_rel_lib=ext\mscng\10\Lib
-
-pushd %root_rel%
-pushd %mscng_rel_include%
-set mscng_include=%CD%
-popd
-pushd %mscng_rel_lib%
-set mscng_lib=%CD%
-popd
-popd
-
-set mscng_lib_arch=%mscng_lib%\X%ARCH%
-
-echo ** CNG_INCLUDE%TAB%%mscng_include%
-echo ** CNG_LIB%TAB%%TAB%%mscng_lib_arch%
-
-
-:: Get the paths to Java JNI.
-if not defined JAVA_HOME (
- set jva=
- for /f "delims=" %%i in ('where javac') do (
- set jva=%%~dpi
- )
- pushd !jva!\..
- set JAVA_HOME=!CD!
- popd
-)
-
-echo ** JAVA_HOME%TAB%%JAVA_HOME%
-
-set JNI_INCLUDEDIR=%JAVA_HOME%\include
-set JNI_PLATFORMINCLUDEDIR=%JNI_INCLUDEDIR%\win32
-set JNI_LIBDIR=%JAVA_HOME%\lib
-
-
-:: Setup binaries.
-if not defined CC (
- set CC=cl.exe
-)
-
-echo ** CC%TAB%%TAB%%CC%
-
-
-:: Try to find uCRT.
-set ucrt_base=%ProgramFiles(x86)%\Windows Kits\10\
-if exist %ucrt_base% (
- set ucrt_version=
- for /f "delims=" %%i in ('dir /b /on "!ucrt_base!\Include"') do (
- set ucrt_version=%%i
- )
- echo ** uCRT%TAB%%TAB%!ucrt_version!
- set ucrt_include=%ucrt_base%Include\!ucrt_version!\ucrt
- set ucrt_lib=%ucrt_base%Lib\!ucrt_version!
- set ucrt_lib_arch=!ucrt_lib!\ucrt\%ARCH_S%
-)
-
-
-:: Setup INCLUDE paths.
-set INCLUDE_CLI=/I. /I"%JNI_INCLUDEDIR%" /I"%JNI_PLATFORMINCLUDEDIR%"
-
-if defined USE_EXT_MSCNG (
- set INCLUDE_CLI=!INCLUDE_CLI! /I"%mscng_include%"
-)
-
-echo ** INCLUDE%TAB%%TAB%%INCLUDE%
-echo ** INCLUDE_CLI%TAB%%INCLUDE_CLI%
-
-
-:: Setup LIB paths.
-set LIBPATH=/LIBPATH:"%JNI_LIBDIR%"
-
-if defined USE_EXT_MSCNG (
- set LIBPATH=!LIBPATH! /LIBPATH:"%mscng_lib_arch%"
-)
-
-echo ** LIB%TAB%%TAB%%LIB%
-echo ** LIBPATH%TAB%%TAB%%LIBPATH%
-
-
-:: Setup DEBUB options.
-set OTHER_CLI=
-if defined DEBUG (
- set OTHER_CLI=/Od /Z7
-) else (
- set OTHER_CLI=/O2
-)
-
-echo ** OTHER_CLI%TAB%%OTHER_CLI%
-echo.
-
-echo ^>^> %CC% /W2 /EHsc %OTHER_CLI% %INCLUDE_CLI% mscng.c c_utils.c c_timing.c bcrypt.lib jvm.lib kernel32.lib /Femscng_provider.dll /LD /link %LIBPATH% /nologo
-echo.
-
-%CC% /W2 /EHsc %OTHER_CLI% %INCLUDE_CLI% mscng.c c_utils.c c_timing.c bcrypt.lib jvm.lib kernel32.lib /Femscng_provider.dll /LD /link %LIBPATH% /nologo
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java
deleted file mode 100644
index 81bd387..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import cz.crcs.ectester.common.util.ByteUtil;
-import org.bouncycastle.util.Arrays;
-
-import java.math.BigInteger;
-import java.security.interfaces.ECPrivateKey;
-import java.security.spec.ECParameterSpec;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public abstract class NativeECPrivateKey implements ECPrivateKey {
- private String algorithm;
- private String format;
- ECParameterSpec params;
-
- public NativeECPrivateKey(String algorithm, String format, ECParameterSpec params) {
- this.algorithm = algorithm;
- this.format = format;
- this.params = params;
- }
-
- @Override
- public String getAlgorithm() {
- return algorithm;
- }
-
- @Override
- public String getFormat() {
- return format;
- }
-
- @Override
- public ECParameterSpec getParams() {
- return params;
- }
-
- public abstract byte[] getData();
-
- @SuppressWarnings("serial")
- private static class Raw extends NativeECPrivateKey {
- byte[] keyData;
-
- public Raw(byte[] keyData, ECParameterSpec params) {
- super("EC", "raw", params);
- this.keyData = Arrays.clone(keyData);
- }
-
- @Override
- public BigInteger getS() {
- return new BigInteger(1, keyData);
- }
-
- @Override
- public byte[] getEncoded() {
- return Arrays.clone(keyData);
- }
-
- public byte[] getData() {
- return getEncoded();
- }
- }
-
- @SuppressWarnings("serial")
- public static class TomCrypt extends Raw {
- public TomCrypt(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Botan extends Raw {
- public Botan(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Cryptopp extends Raw {
- public Cryptopp(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Openssl extends Raw {
- public Openssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Boringssl extends Raw {
- public Boringssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Gcrypt extends Raw {
- public Gcrypt(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class MbedTLS extends Raw {
- public MbedTLS(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Ippcp extends Raw {
- public Ippcp(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Matrixssl extends Raw {
- public Matrixssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Libressl extends Raw {
- public Libressl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Mscng extends Raw {
- // 0 -> implicit (meta = curveName UTF16, header = full);
- // 1 -> explicit (meta = null, header = full);
- // 2 -> nist (meta = null, header = full)
- private int flag;
- private byte[] meta = null;
- private byte[] header;
- private byte[] x;
- private byte[] y;
-
- public Mscng(int flag, byte[] meta, byte[] header, byte[] x, byte[] y, byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- this.flag = flag;
- this.meta = Arrays.clone(meta);
- this.header = Arrays.clone(header);
- this.x = Arrays.clone(x);
- this.y = Arrays.clone(y);
- }
-
- public int getFlag() {
- return flag;
- }
-
- public byte[] getMeta() {
- return Arrays.clone(meta);
- }
-
- public byte[] getHeader() {
- return Arrays.clone(header);
- }
-
- public byte[] getBlob() {
- return ByteUtil.concatenate(header, x, y, keyData);
- }
-
- @Override
- public byte[] getData() {
- return getBlob();
- }
- }
-
- @SuppressWarnings("serial")
- public static class Nettle extends Raw {
- public Nettle(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java
deleted file mode 100644
index 7a8de83..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java
+++ /dev/null
@@ -1,185 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import org.bouncycastle.util.Arrays;
-
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.ECPoint;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public abstract class NativeECPublicKey implements ECPublicKey {
- private String algorithm;
- private String format;
- ECParameterSpec params;
-
- public NativeECPublicKey(String algorithm, String format, ECParameterSpec params) {
- this.algorithm = algorithm;
- this.format = format;
- this.params = params;
- }
-
- @Override
- public String getAlgorithm() {
- return algorithm;
- }
-
- @Override
- public String getFormat() {
- return format;
- }
-
- @Override
- public ECParameterSpec getParams() {
- return params;
- }
-
- public abstract byte[] getData();
-
- @SuppressWarnings("serial")
- private static class ANSIX962 extends NativeECPublicKey {
- byte[] keyData;
-
- public ANSIX962(byte[] keyData, ECParameterSpec params) {
- super("EC", "ANSI X9.62", params);
- this.keyData = Arrays.clone(keyData);
- }
-
- @Override
- public ECPoint getW() {
- return ECUtil.fromX962(keyData, params.getCurve());
- }
-
- @Override
- public byte[] getEncoded() {
- return Arrays.clone(keyData);
- }
-
- public byte[] getData() {
- return ECUtil.toX962Uncompressed(getW(), params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class TomCrypt extends ANSIX962 {
- public TomCrypt(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Botan extends ANSIX962 {
- public Botan(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Cryptopp extends ANSIX962 {
- public Cryptopp(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Openssl extends ANSIX962 {
- public Openssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Boringssl extends ANSIX962 {
- public Boringssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Gcrypt extends ANSIX962 {
- public Gcrypt(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class MbedTLS extends ANSIX962 {
- public MbedTLS(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Ippcp extends ANSIX962 {
- public Ippcp(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Matrixssl extends ANSIX962 {
- public Matrixssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Libressl extends ANSIX962 {
- public Libressl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
- public static class Mscng extends ANSIX962 {
- // 0 -> implicit (meta = curveName UTF16, header = full);
- // 1 -> explicit (meta = null, header = full);
- // 2 -> nist (meta = null, header = full)
- private int flag;
- private byte[] meta = null;
- private byte[] header;
- private byte[] x;
- private byte[] y;
-
- public Mscng(int flag, byte[] meta, byte[] header, byte[] x, byte[] y, ECParameterSpec params) {
- super(ByteUtil.concatenate(new byte[]{0x04}, x, y), params);
- this.flag = flag;
- this.meta = Arrays.clone(meta);
- this.header = Arrays.clone(header);
- this.x = Arrays.clone(x);
- this.y = Arrays.clone(y);
- }
-
- public int getFlag() {
- return flag;
- }
-
- public byte[] getMeta() {
- return Arrays.clone(meta);
- }
-
- public byte[] getHeader() {
- return Arrays.clone(header);
- }
-
- public byte[] getBlob() {
- return ByteUtil.concatenate(header, x, y);
- }
-
- @Override
- public byte[] getData() {
- return getBlob();
- }
- }
-
- @SuppressWarnings("serial")
- public static class Nettle extends ANSIX962 {
- public Nettle(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
deleted file mode 100644
index 1e68f78..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
+++ /dev/null
@@ -1,449 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import cz.crcs.ectester.common.util.ECUtil;
-
-import javax.crypto.KeyAgreementSpi;
-import javax.crypto.SecretKey;
-import javax.crypto.ShortBufferException;
-import java.security.*;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.spec.ECGenParameterSpec;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.InvalidParameterSpecException;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
- ECPrivateKey privateKey;
- ECPublicKey publicKey;
- AlgorithmParameterSpec params;
-
- @Override
- protected void engineInit(Key key, SecureRandom random) throws InvalidKeyException {
- if (!(key instanceof ECPrivateKey)) {
- throw new InvalidKeyException
- ("Key must be instance of ECPrivateKey");
- }
- privateKey = (ECPrivateKey) key;
- this.params = privateKey.getParams();
- }
-
- @Override
- protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException {
- if (privateKey == null) {
- throw new IllegalStateException("Not initialized");
- }
- if (publicKey != null) {
- throw new IllegalStateException("Phase already executed");
- }
- if (!lastPhase) {
- throw new IllegalStateException
- ("Only two party agreement supported, lastPhase must be true");
- }
- if (!(key instanceof ECPublicKey)) {
- throw new InvalidKeyException
- ("Key must be an instance of ECPublicKey");
- }
- publicKey = (ECPublicKey) key;
- return null;
- }
-
- @Override
- protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException {
- byte[] secret = engineGenerateSecret();
- if (sharedSecret.length < offset + secret.length) {
- throw new ShortBufferException();
- }
- System.arraycopy(secret, 0, sharedSecret, offset, secret.length);
- return secret.length;
- }
-
- private abstract static class SimpleKeyAgreementSpi extends NativeKeyAgreementSpi {
-
- @Override
- protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
- if (!(params instanceof ECParameterSpec)) {
- throw new InvalidAlgorithmParameterException(params.toString());
- }
- engineInit(key, random);
- this.params = params;
- }
-
- private byte[] getPubkey() {
- if (publicKey instanceof NativeECPublicKey) {
- return ((NativeECPublicKey) publicKey).getData();
- } else {
- return ECUtil.toX962Uncompressed(publicKey.getW(), ((ECParameterSpec) params));
- }
- }
-
- private byte[] getPrivkey() {
- if (privateKey instanceof NativeECPrivateKey) {
- return ((NativeECPrivateKey) privateKey).getData();
- } else {
- return ECUtil.toByteArray(privateKey.getS(), ((ECParameterSpec) params).getOrder().bitLength());
- }
- }
-
- @Override
- protected byte[] engineGenerateSecret() throws IllegalStateException {
- return generateSecret(getPubkey(), getPrivkey(), (ECParameterSpec) params);
- }
-
- abstract byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- protected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException {
- if (algorithm == null) {
- throw new NoSuchAlgorithmException("Algorithm must not be null");
- }
- return generateSecret(getPubkey(), getPrivkey(), (ECParameterSpec) params, algorithm);
- }
-
- abstract SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- private abstract static class ExtendedKeyAgreementSpi extends NativeKeyAgreementSpi {
-
- @Override
- protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
- if (!(params instanceof ECParameterSpec || params instanceof ECGenParameterSpec)) {
- throw new InvalidAlgorithmParameterException();
- }
- engineInit(key, random);
- this.params = params;
- }
-
- @Override
- protected byte[] engineGenerateSecret() throws IllegalStateException {
- return generateSecret(publicKey, privateKey, params);
- }
-
- abstract byte[] generateSecret(ECPublicKey pubkey, ECPrivateKey privkey, AlgorithmParameterSpec params);
-
- @Override
- protected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException {
- if (algorithm == null) {
- throw new NoSuchAlgorithmException("Algorithm must not be null");
- }
- return generateSecret(publicKey, privateKey, params, algorithm);
- }
-
- abstract SecretKey generateSecret(ECPublicKey pubkey, ECPrivateKey privkey, AlgorithmParameterSpec params, String algorithm);
- }
-
-
- public static class TomCrypt extends SimpleKeyAgreementSpi {
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public abstract static class Botan extends SimpleKeyAgreementSpi {
- private String type;
-
- public Botan(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class BotanECDH extends Botan {
- public BotanECDH() {
- super("ECDH");
- }
- }
-
- public static class BotanECDHwithSHA1KDF extends Botan {
- public BotanECDHwithSHA1KDF() {
- super("ECDHwithSHA1KDF");
- }
- }
-
- public static class BotanECDHwithSHA224KDF extends Botan {
- public BotanECDHwithSHA224KDF() {
- super("ECDHwithSHA224KDF");
- }
- }
-
- public static class BotanECDHwithSHA256KDF extends Botan {
- public BotanECDHwithSHA256KDF() {
- super("ECDHwithSHA256KDF");
- }
- }
-
- public static class BotanECDHwithSHA384KDF extends Botan {
- public BotanECDHwithSHA384KDF() {
- super("ECDHwithSHA384KDF");
- }
- }
-
- public static class BotanECDHwithSHA512KDF extends Botan {
- public BotanECDHwithSHA512KDF() {
- super("ECDHwithSHA512KDF");
- }
- }
-
- public abstract static class Cryptopp extends SimpleKeyAgreementSpi {
- private String type;
-
- public Cryptopp(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class CryptoppECDH extends Cryptopp {
- public CryptoppECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Openssl extends SimpleKeyAgreementSpi {
- private String type;
-
- public Openssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class OpensslECDH extends Openssl {
- public OpensslECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Boringssl extends SimpleKeyAgreementSpi {
- private String type;
-
- public Boringssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class BoringsslECDH extends Boringssl {
- public BoringsslECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Gcrypt extends SimpleKeyAgreementSpi {
- private String type;
-
- public Gcrypt(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class GcryptECDH extends Gcrypt {
- public GcryptECDH() {
- super("ECDH");
- }
- }
-
-
- public abstract static class Mscng extends ExtendedKeyAgreementSpi {
- private String type;
-
- public Mscng(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(ECPublicKey pubkey, ECPrivateKey privkey, AlgorithmParameterSpec params);
-
- @Override
- native SecretKey generateSecret(ECPublicKey pubkey, ECPrivateKey privkey, AlgorithmParameterSpec params, String algorithm);
- }
-
- public static class MscngECDHwithSHA1KDF extends Mscng {
- public MscngECDHwithSHA1KDF() {
- super("ECDHwithSHA1KDF(CNG)");
- }
- }
-
- public static class MscngECDHwithSHA256KDF extends Mscng {
- public MscngECDHwithSHA256KDF() {
- super("ECDHwithSHA256KDF(CNG)");
- }
- }
-
- public static class MscngECDHwithSHA384KDF extends Mscng {
- public MscngECDHwithSHA384KDF() {
- super("ECDHwithSHA384KDF(CNG)");
- }
- }
-
- public static class MscngECDHwithSHA512KDF extends Mscng {
- public MscngECDHwithSHA512KDF() {
- super("ECDHwithSHA512KDF(CNG)");
- }
- }
-
- public abstract static class MbedTLS extends SimpleKeyAgreementSpi {
- private String type;
-
- public MbedTLS(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class MbedTLSECDH extends MbedTLS {
- public MbedTLSECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Ippcp extends SimpleKeyAgreementSpi {
- private String type;
-
- public Ippcp(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class IppcpECDH extends Ippcp {
- public IppcpECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Matrixssl extends SimpleKeyAgreementSpi {
- private String type;
-
- public Matrixssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class MatrixsslECDH extends Matrixssl {
- public MatrixsslECDH() {
- super("ECDH");
- }
- }
-
- public abstract static class Libressl extends SimpleKeyAgreementSpi {
- private String type;
-
- public Libressl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public abstract static class Nettle extends SimpleKeyAgreementSpi {
- private String type;
-
- public Nettle(String type) {
- this.type = type;
- }
-
- @Override
- byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params) {
- try {
- AlgorithmParameters tmp = AlgorithmParameters.getInstance("EC");
- tmp.init(params);
- ECGenParameterSpec spec = tmp.getParameterSpec(ECGenParameterSpec.class);
- switch (spec.getName()) {
- case "1.2.840.10045.3.1.7":
- spec = new ECGenParameterSpec("secp256r1");
- break;
- case "1.2.840.10045.3.1.1":
- spec = new ECGenParameterSpec("secp192r1");
- break;
- case "1.3.132.0.33":
- spec = new ECGenParameterSpec("secp224r1");
- break;
- case "1.3.132.0.34":
- spec = new ECGenParameterSpec("secp384r1");
- break;
- case "1.3.132.0.35":
- spec = new ECGenParameterSpec("secp521r1");
- break;
- default:
- return null;
-
- }
- return generateSecret(pubkey, privkey, spec);
-
- } catch (NoSuchAlgorithmException | InvalidParameterSpecException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECGenParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class NettleECDH extends Nettle {
- public NettleECDH() {
- super("ECDH");
- }
- }
- public static class LibresslECDH extends Libressl {
- public LibresslECDH() {
- super("ECDH");
- }
- }
-
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java
deleted file mode 100644
index 636f423..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java
+++ /dev/null
@@ -1,367 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.data.EC_Store;
-
-import java.security.*;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.AlgorithmParameters;
-import java.security.spec.ECGenParameterSpec;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.InvalidParameterSpecException;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class NativeKeyPairGeneratorSpi extends KeyPairGeneratorSpi {
- private int keysize;
- private SecureRandom random;
- private AlgorithmParameterSpec params;
- private boolean useKeysize;
- private boolean useParams;
-
- public static final int DEFAULT_KEYSIZE = 256;
-
- @Override
- public void initialize(int keysize, SecureRandom random) {
- if (!keysizeSupported(keysize)) {
- throw new InvalidParameterException("Keysize " + keysize + " not supported.");
- }
- this.keysize = keysize;
- this.random = random;
- this.useKeysize = true;
- this.useParams = false;
- }
-
- @Override
- public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException {
- if (!paramsSupported(params)) {
- throw new InvalidAlgorithmParameterException("Not supported.");
- }
- this.params = params;
- this.random = random;
- this.useParams = true;
- this.useKeysize = false;
- }
-
- @Override
- public KeyPair generateKeyPair() {
- if (!useKeysize && !useParams) {
- if (keysizeSupported(DEFAULT_KEYSIZE)) {
- initialize(DEFAULT_KEYSIZE, new SecureRandom());
- }
- }
-
- if (useKeysize) {
- return generate(keysize, random);
- } else if (useParams) {
- return generate(params, random);
- } else {
- throw new IllegalStateException("Uninitialized KeyPair.");
- }
- }
-
- abstract boolean keysizeSupported(int keysize);
-
- abstract boolean paramsSupported(AlgorithmParameterSpec params);
-
- abstract KeyPair generate(int keysize, SecureRandom random);
-
- abstract KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
-
-
- public static class TomCrypt extends NativeKeyPairGeneratorSpi {
-
- public TomCrypt() {
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static abstract class Botan extends NativeKeyPairGeneratorSpi {
- private String type;
-
- public Botan(String type) {
- this.type = type;
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class BotanECDH extends Botan {
-
- public BotanECDH() {
- super("ECDH");
- }
- }
-
- public static class BotanECDSA extends Botan {
-
- public BotanECDSA() {
- super("ECDSA");
- }
- }
-
- public static class BotanECKCDSA extends Botan {
-
- public BotanECKCDSA() {
- super("ECKCDSA");
- }
- }
-
- public static class BotanECGDSA extends Botan {
-
- public BotanECGDSA() {
- super("ECGDSA");
- }
- }
-
- public static abstract class Cryptopp extends NativeKeyPairGeneratorSpi {
- private String type;
-
- public Cryptopp(String type) {
- this.type = type;
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class CryptoppECDH extends Cryptopp {
-
- public CryptoppECDH() {
- super("ECDH");
- }
- }
-
- public static class CryptoppECDSA extends Cryptopp {
-
- public CryptoppECDSA() {
- super("ECDSA");
- }
- }
-
- public static class Openssl extends NativeKeyPairGeneratorSpi {
- public Openssl() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Boringssl extends NativeKeyPairGeneratorSpi {
- public Boringssl() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Gcrypt extends NativeKeyPairGeneratorSpi {
-
- public Gcrypt() {
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static abstract class Mscng extends NativeKeyPairGeneratorSpi {
- private String type;
-
- public Mscng(String type) {
- this.type = type;
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class MscngECDH extends Mscng {
-
- public MscngECDH() {
- super("ECDH");
- }
- }
-
- public static class MscngECDSA extends Mscng {
-
- public MscngECDSA() {
- super("ECDSA");
- }
- }
-
- public static class MbedTLS extends NativeKeyPairGeneratorSpi {
-
- public MbedTLS() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Ippcp extends NativeKeyPairGeneratorSpi {
-
- public Ippcp() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Matrixssl extends NativeKeyPairGeneratorSpi {
-
- public Matrixssl() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Libressl extends NativeKeyPairGeneratorSpi {
-
- public Libressl() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
-
- public static class Nettle extends NativeKeyPairGeneratorSpi {
- public Nettle() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- KeyPair generate(AlgorithmParameterSpec params, SecureRandom random) {
- if (params instanceof ECGenParameterSpec) {
- String curveName = ((ECGenParameterSpec) params).getName();
- if (curveName.contains("secp")) {
- curveName = "secg/" + curveName;
- }
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- ECParameterSpec spec = curve.toSpec();
- return generate(params, random, spec);
- }
- return null;
- }
-
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random, AlgorithmParameterSpec spec);
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java
deleted file mode 100644
index e036937..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.Provider;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-@SuppressWarnings("serial")
-public abstract class NativeProvider extends Provider {
-
- public NativeProvider(String name, double version, String info) {
- super(name, version, info);
-
- if (System.getSecurityManager() == null) {
- setup();
- } else {
- AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
- setup();
- return null;
- });
- }
- }
-
- abstract void setup();
-
- @SuppressWarnings("serial")
- public static class TomCrypt extends NativeProvider {
-
- public TomCrypt(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Botan extends NativeProvider {
-
- public Botan(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Cryptopp extends NativeProvider {
-
- public Cryptopp(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Openssl extends NativeProvider {
-
- public Openssl(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Boringssl extends NativeProvider {
-
- public Boringssl(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Gcrypt extends NativeProvider {
-
- public Gcrypt(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Mscng extends NativeProvider {
-
- public Mscng(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class MbedTLS extends NativeProvider {
-
- public MbedTLS(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Ippcp extends NativeProvider {
-
- public Ippcp(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Matrixssl extends NativeProvider {
-
- public Matrixssl(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Libressl extends NativeProvider {
-
- public Libressl(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
- public static class Nettle extends NativeProvider {
-
- public Nettle(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java
deleted file mode 100644
index d6e814c..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java
+++ /dev/null
@@ -1,657 +0,0 @@
-package cz.crcs.ectester.standalone.libs.jni;
-
-import cz.crcs.ectester.common.util.ECUtil;
-
-import java.io.ByteArrayOutputStream;
-import java.security.*;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECGenParameterSpec;
-import java.security.spec.ECParameterSpec;
-import java.security.spec.InvalidParameterSpecException;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class NativeSignatureSpi extends SignatureSpi {
- ECPublicKey verifyKey;
- ECPrivateKey signKey;
- ECParameterSpec params;
-
- ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-
- @Override
- protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException {
- if (!(publicKey instanceof ECPublicKey)) {
- throw new InvalidKeyException
- ("Key must be an instance of ECPublicKey");
- }
- verifyKey = (ECPublicKey) publicKey;
- params = verifyKey.getParams();
- buffer.reset();
- }
-
- @Override
- protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException {
- if (!(privateKey instanceof ECPrivateKey)) {
- throw new InvalidKeyException
- ("Key must be an instance of ECPrivateKey");
- }
- signKey = (ECPrivateKey) privateKey;
- params = signKey.getParams();
- buffer.reset();
- }
-
- @Override
- protected void engineUpdate(byte b) throws SignatureException {
- buffer.write(b);
- }
-
- @Override
- protected void engineUpdate(byte[] b, int off, int len) throws SignatureException {
- buffer.write(b, off, len);
- }
-
-
- @Override
- @Deprecated
- protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
- throw new UnsupportedOperationException("setParameter() not supported");
- }
-
- @Override
- @Deprecated
- protected Object engineGetParameter(String param) throws InvalidParameterException {
- throw new UnsupportedOperationException("getParameter() not supported");
- }
-
- private abstract static class SimpleSignatureSpi extends NativeSignatureSpi {
-
- @Override
- protected byte[] engineSign() throws SignatureException {
- byte[] privkey;
- if (signKey instanceof NativeECPrivateKey) {
- privkey = ((NativeECPrivateKey) signKey).getData();
- } else {
- privkey = ECUtil.toByteArray(signKey.getS(), params.getOrder().bitLength());
- }
- return sign(buffer.toByteArray(), privkey, params);
- }
-
- @Override
- protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
- byte[] pubkey;
- if (verifyKey instanceof NativeECPublicKey) {
- pubkey = ((NativeECPublicKey) verifyKey).getData();
- } else {
- pubkey = ECUtil.toX962Uncompressed(verifyKey.getW(), params);
- }
- return verify(sigBytes, buffer.toByteArray(), pubkey, params);
- }
-
- abstract byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- abstract boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- private abstract static class ExtendedSignatureSpi extends NativeSignatureSpi {
-
- @Override
- protected byte[] engineSign() throws SignatureException {
- return sign(buffer.toByteArray(), signKey, params);
- }
-
- @Override
- protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
- return verify(sigBytes, buffer.toByteArray(), verifyKey, params);
- }
-
- abstract byte[] sign(byte[] data, ECPrivateKey privkey, ECParameterSpec params);
-
- abstract boolean verify(byte[] signature, byte[] data, ECPublicKey pubkey, ECParameterSpec params);
- }
-
- public static class TomCryptRaw extends SimpleSignatureSpi {
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public abstract static class Botan extends SimpleSignatureSpi {
- private String type;
-
- public Botan(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class BotanECDSAwithNONE extends Botan {
-
- public BotanECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public static class BotanECDSAwithSHA1 extends Botan {
-
- public BotanECDSAwithSHA1() {
- super("SHA1withECDSA");
- }
- }
-
- public static class BotanECDSAwithSHA224 extends Botan {
-
- public BotanECDSAwithSHA224() {
- super("SHA224withECDSA");
- }
- }
-
- public static class BotanECDSAwithSHA256 extends Botan {
-
- public BotanECDSAwithSHA256() {
- super("SHA256withECDSA");
- }
- }
-
- public static class BotanECDSAwithSHA384 extends Botan {
-
- public BotanECDSAwithSHA384() {
- super("SHA384withECDSA");
- }
- }
-
- public static class BotanECDSAwithSHA512 extends Botan {
-
- public BotanECDSAwithSHA512() {
- super("SHA512withECDSA");
- }
- }
-
- public static class BotanECKCDSAwithNONE extends Botan {
-
- public BotanECKCDSAwithNONE() {
- super("NONEwithECKCDSA");
- }
- }
-
- public static class BotanECKCDSAwithSHA1 extends Botan {
-
- public BotanECKCDSAwithSHA1() {
- super("SHA1withECKCDSA");
- }
- }
-
- public static class BotanECKCDSAwithSHA224 extends Botan {
-
- public BotanECKCDSAwithSHA224() {
- super("SHA224withECKCDSA");
- }
- }
-
- public static class BotanECKCDSAwithSHA256 extends Botan {
-
- public BotanECKCDSAwithSHA256() {
- super("SHA256withECKCDSA");
- }
- }
-
- public static class BotanECKCDSAwithSHA384 extends Botan {
-
- public BotanECKCDSAwithSHA384() {
- super("SHA384withECKCDSA");
- }
- }
-
- public static class BotanECKCDSAwithSHA512 extends Botan {
-
- public BotanECKCDSAwithSHA512() {
- super("SHA512withECKCDSA");
- }
- }
-
- public static class BotanECGDSAwithNONE extends Botan {
-
- public BotanECGDSAwithNONE() {
- super("NONEwithECGDSA");
- }
- }
-
- public static class BotanECGDSAwithSHA1 extends Botan {
-
- public BotanECGDSAwithSHA1() {
- super("SHA1withECGDSA");
- }
- }
-
- public static class BotanECGDSAwithSHA224 extends Botan {
-
- public BotanECGDSAwithSHA224() {
- super("SHA224withECGDSA");
- }
- }
-
- public static class BotanECGDSAwithSHA256 extends Botan {
-
- public BotanECGDSAwithSHA256() {
- super("SHA256withECGDSA");
- }
- }
-
- public static class BotanECGDSAwithSHA384 extends Botan {
-
- public BotanECGDSAwithSHA384() {
- super("SHA384withECGDSA");
- }
- }
-
- public static class BotanECGDSAwithSHA512 extends Botan {
-
- public BotanECGDSAwithSHA512() {
- super("SHA512withECGDSA");
- }
- }
-
- public abstract static class Cryptopp extends SimpleSignatureSpi {
- private String type;
-
- public Cryptopp(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class CryptoppECDSAwithSHA1 extends Cryptopp {
-
- public CryptoppECDSAwithSHA1() {
- super("SHA1withECDSA");
- }
- }
-
- public static class CryptoppECDSAwithSHA224 extends Cryptopp {
-
- public CryptoppECDSAwithSHA224() {
- super("SHA224withECDSA");
- }
- }
-
- public static class CryptoppECDSAwithSHA256 extends Cryptopp {
-
- public CryptoppECDSAwithSHA256() {
- super("SHA256withECDSA");
- }
- }
-
- public static class CryptoppECDSAwithSHA384 extends Cryptopp {
-
- public CryptoppECDSAwithSHA384() {
- super("SHA384withECDSA");
- }
- }
-
- public static class CryptoppECDSAwithSHA512 extends Cryptopp {
-
- public CryptoppECDSAwithSHA512() {
- super("SHA512withECDSA");
- }
- }
-
- public abstract static class Openssl extends SimpleSignatureSpi {
- private String type;
-
- public Openssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class OpensslECDSAwithNONE extends Openssl {
-
- public OpensslECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Boringssl extends SimpleSignatureSpi {
- private String type;
-
- public Boringssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class BoringsslECDSAwithNONE extends Boringssl {
-
- public BoringsslECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Gcrypt extends SimpleSignatureSpi {
- private String type;
-
- public Gcrypt(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class GcryptECDSAwithNONE extends Gcrypt {
-
- public GcryptECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public static class GcryptECDSAwithSHA1 extends Gcrypt {
-
- public GcryptECDSAwithSHA1() {
- super("SHA1withECDSA");
- }
- }
-
- public static class GcryptECDSAwithSHA224 extends Gcrypt {
-
- public GcryptECDSAwithSHA224() {
- super("SHA224withECDSA");
- }
- }
-
- public static class GcryptECDSAwithSHA256 extends Gcrypt {
-
- public GcryptECDSAwithSHA256() {
- super("SHA256withECDSA");
- }
- }
-
- public static class GcryptECDSAwithSHA384 extends Gcrypt {
-
- public GcryptECDSAwithSHA384() {
- super("SHA384withECDSA");
- }
- }
-
- public static class GcryptECDSAwithSHA512 extends Gcrypt {
-
- public GcryptECDSAwithSHA512() {
- super("SHA512withECDSA");
- }
- }
-
- public static class GcryptECDDSAwithSHA1 extends Gcrypt {
-
- public GcryptECDDSAwithSHA1() {
- super("SHA1withECDDSA");
- }
- }
-
- public static class GcryptECDDSAwithSHA224 extends Gcrypt {
-
- public GcryptECDDSAwithSHA224() {
- super("SHA224withECDDSA");
- }
- }
-
- public static class GcryptECDDSAwithSHA256 extends Gcrypt {
-
- public GcryptECDDSAwithSHA256() {
- super("SHA256withECDDSA");
- }
- }
-
- public static class GcryptECDDSAwithSHA384 extends Gcrypt {
-
- public GcryptECDDSAwithSHA384() {
- super("SHA384withECDDSA");
- }
- }
-
- public static class GcryptECDDSAwithSHA512 extends Gcrypt {
-
- public GcryptECDDSAwithSHA512() {
- super("SHA512withECDDSA");
- }
- }
-
- public abstract static class MbedTLS extends SimpleSignatureSpi {
- private String type;
-
- public MbedTLS(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class MbedTLSECDSAwithNONE extends MbedTLS {
-
- public MbedTLSECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Ippcp extends SimpleSignatureSpi {
- private String type;
-
- public Ippcp(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class IppcpECDSAwithNONE extends Ippcp {
-
- public IppcpECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Libressl extends SimpleSignatureSpi {
- private String type;
-
- public Libressl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class LibresslECDSAwithNONE extends Libressl {
-
- public LibresslECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Matrixssl extends SimpleSignatureSpi {
- private String type;
-
- public Matrixssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class MatrixsslECDSAwithNONE extends Matrixssl {
-
- public MatrixsslECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
- public abstract static class Mscng extends ExtendedSignatureSpi {
- private String type;
-
- public Mscng(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, ECPrivateKey privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, ECPublicKey pubkey, ECParameterSpec params);
- }
-
- public static class MscngECDSAwithSHA1 extends Mscng {
-
- public MscngECDSAwithSHA1() {
- super("SHA1withECDSA");
- }
- }
-
- public static class MscngECDSAwithSHA256 extends Mscng {
-
- public MscngECDSAwithSHA256() {
- super("SHA256withECDSA");
- }
- }
-
- public static class MscngECDSAwithSHA384 extends Mscng {
-
- public MscngECDSAwithSHA384() {
- super("SHA384withECDSA");
- }
- }
-
- public static class MscngECDSAwithSHA512 extends Mscng {
-
- public MscngECDSAwithSHA512() {
- super("SHA512withECDSA");
- }
- }
-
- public abstract static class Nettle extends SimpleSignatureSpi {
- private String type;
-
- public Nettle(String type) {
- this.type = type;
- }
-
- @Override
- byte[] sign(byte[] data, byte[] privKey, ECParameterSpec params) {
- try {
- AlgorithmParameters tmp = AlgorithmParameters.getInstance("EC");
- tmp.init(params);
- ECGenParameterSpec spec = tmp.getParameterSpec(ECGenParameterSpec.class);
- switch (spec.getName()) {
- case "1.2.840.10045.3.1.7":
- spec = new ECGenParameterSpec("secp256r1");
- break;
- case "1.2.840.10045.3.1.1":
- spec = new ECGenParameterSpec("secp192r1");
- break;
- case "1.3.132.0.33":
- spec = new ECGenParameterSpec("secp224r1");
- break;
- case "1.3.132.0.34":
- spec = new ECGenParameterSpec("secp384r1");
- break;
- case "1.3.132.0.35":
- spec = new ECGenParameterSpec("secp521r1");
- break;
- default:
- return null;
-
- }
- return sign(data, privKey, spec);
-
- } catch (NoSuchAlgorithmException | InvalidParameterSpecException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- native byte[] sign(byte[] data, byte[] privKey, ECGenParameterSpec params);
-
- @Override
- boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params) {
- try {
- AlgorithmParameters tmp = AlgorithmParameters.getInstance("EC");
- tmp.init(params);
- ECGenParameterSpec spec = tmp.getParameterSpec(ECGenParameterSpec.class);
- switch (spec.getName()) {
- case "1.2.840.10045.3.1.7":
- spec = new ECGenParameterSpec("secp256r1");
- break;
- case "1.2.840.10045.3.1.1":
- spec = new ECGenParameterSpec("secp192r1");
- break;
- case "1.3.132.0.33":
- spec = new ECGenParameterSpec("secp224r1");
- break;
- case "1.3.132.0.34":
- spec = new ECGenParameterSpec("secp384r1");
- break;
- case "1.3.132.0.35":
- spec = new ECGenParameterSpec("secp521r1");
- break;
- default:
- return false;
- }
- return verify(signature, data, pubkey, spec);
-
- } catch (NoSuchAlgorithmException | InvalidParameterSpecException e) {
- e.printStackTrace();
- return false;
- }
- }
-
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECGenParameterSpec params);
- }
-
- public static class NettleECDSAwithNONE extends Nettle {
-
- public NettleECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/boringssl.c b/src/cz/crcs/ectester/standalone/libs/jni/boringssl.c
deleted file mode 100644
index bca2ead..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/boringssl.c
+++ /dev/null
@@ -1,516 +0,0 @@
-#include "native.h"
-#include <string.h>
-
-#include <openssl/conf.h>
-#include <openssl/opensslv.h>
-#include <openssl/objects.h>
-#include <openssl/obj_mac.h>
-#include <openssl/bn.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <openssl/ec.h>
-#include <openssl/ecdh.h>
-#include <openssl/ecdsa.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-
-static jclass provider_class;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BoringsslLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Boringssl");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, OPENSSL_VERSION_TEXT);
- long ver_hi = (OPENSSL_VERSION_NUMBER & 0xff000000L) >> 28;
- long ver_mid = (OPENSSL_VERSION_NUMBER & 0xff0000L) >> 20;
- long ver_low = (OPENSSL_VERSION_NUMBER & 0xff00L) >> 12;
- double version = (double)ver_hi + ((double)ver_mid/10) + ((double)ver_low/100);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Boringssl_setup(JNIEnv *env, jobject self) {
- ERR_load_crypto_strings();
- CRYPTO_library_init();
-
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, self, "EC", "Boringssl");
- ADD_KA(env, self, "ECDH", "BoringsslECDH");
- ADD_SIG(env, self, "NONEwithECDSA", "BoringsslECDSAwithNONE");
-
- init_classes(env, "Boringssl");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BoringsslLib_getCurves(JNIEnv *env, jobject self) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- jstring curve_name = (*env)->NewStringUTF(env, OBJ_nid2sn(curves[i].nid));
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_keysizeSupported(JNIEnv *env, jobject self, jint keysize) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- EC_GROUP *curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- EC_GROUP_free(curve);
- return JNI_TRUE;
- }
- EC_GROUP_free(curve);
- }
- return JNI_FALSE;
-}
-
-static jobject bignum_to_biginteger(JNIEnv *env, const BIGNUM *bn) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- int size = BN_num_bytes(bn);
- jbyteArray bytes = (*env)->NewByteArray(env, size);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- BN_bn2bin(bn, (unsigned char *) data);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static BIGNUM *biginteger_to_bignum(JNIEnv *env, jobject bigint) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, bigint, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- BIGNUM *result = BN_bin2bn((unsigned char *) byte_data, byte_length, NULL);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-static EC_GROUP *create_curve(JNIEnv *env, jobject params) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return NULL;
- }
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
- BIGNUM *a_bn = biginteger_to_bignum(env, a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
- BIGNUM *b_bn = biginteger_to_bignum(env, b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
- BIGNUM *gx_bn = biginteger_to_bignum(env, gx);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
- BIGNUM *gy_bn = biginteger_to_bignum(env, gy);
-
- EC_GROUP *result;
- EC_POINT *g_point;
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- BIGNUM *p_bn = biginteger_to_bignum(env, p);
- result = EC_GROUP_new_curve_GFp(p_bn, a_bn, b_bn, NULL);
- BN_free(p_bn);
- BN_free(a_bn);
- BN_free(b_bn);
-
- if (!result) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_new_curve_GFp.");
- BN_free(gx_bn); BN_free(gy_bn);
- return NULL;
- }
-
- g_point = EC_POINT_new(result);
- if(!EC_POINT_set_affine_coordinates_GFp(result, g_point, gx_bn, gy_bn, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_POINT_set_affine_coordinates_GFp.");
- BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- BIGNUM *n_bn = biginteger_to_bignum(env, n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint h = (*env)->CallIntMethod(env, params, get_h);
- BIGNUM *h_bn = BN_new();
- BN_set_word(h_bn, h);
-
- if (!EC_GROUP_set_generator(result, g_point, n_bn, h_bn)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_set_generator.");
- BN_free(n_bn); BN_free(h_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
-
- EC_POINT_free(g_point);
- BN_free(gx_bn);
- BN_free(gy_bn);
- BN_free(n_bn);
- BN_free(h_bn);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jboolean result = !curve;
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, const EC_GROUP *curve) {
- BIGNUM *a;
- BIGNUM *b;
-
- BIGNUM *gx;
- BIGNUM *gy;
- jobject field;
-
- BIGNUM *p = BN_new();
- a = BN_new();
- b = BN_new();
- if (!EC_GROUP_get_curve_GFp(curve, p, a, b, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_curve_GFp.");
- BN_free(p); BN_free(a); BN_free(b);
- return NULL;
- }
-
- jobject p_int = bignum_to_biginteger(env, p);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- field = (*env)->NewObject(env, fp_field_class, fp_field_init, p_int);
-
- BN_free(p);
-
- gx = BN_new();
- gy = BN_new();
- if (!EC_POINT_get_affine_coordinates_GFp(curve, EC_GROUP_get0_generator(curve), gx, gy, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_POINT_get_affine_coordinates_GFp.");
- BN_free(a); BN_free(b); BN_free(gx); BN_free(gy);
- return NULL;
- }
-
- jobject a_int = bignum_to_biginteger(env, a);
- jobject b_int = bignum_to_biginteger(env, b);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a_int, b_int);
-
- BN_free(a);
- BN_free(b);
-
- jobject gx_int = bignum_to_biginteger(env, gx);
- jobject gy_int = bignum_to_biginteger(env, gy);
-
- BN_free(gx);
- BN_free(gy);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx_int, gy_int);
-
- jobject order = bignum_to_biginteger(env, EC_GROUP_get0_order(curve));
- BIGNUM *h = BN_new();
- EC_GROUP_get_cofactor(curve, h, NULL);
- jint cofactor = BN_get_word(h);
- BN_free(h);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, order, cofactor);
-}
-
-static jobject generate_from_curve(JNIEnv *env, const EC_GROUP *curve) {
- jint keysize = EC_GROUP_get_degree(curve);
- unsigned long key_bytes = (keysize + 7) / 8;
-
- EC_KEY *key = EC_KEY_new();
- EC_KEY_set_group(key, curve);
-
- native_timing_start();
- int err = EC_KEY_generate_key(key);
- native_timing_stop();
-
- if (!err) {
- throw_new(env, "java/security/GeneralSecurityException", "Error generating key, EC_KEY_generate_key.");
- EC_KEY_free(key);
- return NULL;
- }
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, key_bytes);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- BN_bn2bin_padded((unsigned char *) key_priv, key_bytes, EC_KEY_get0_private_key(key));
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- unsigned long key_len = 2*key_bytes + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- EC_POINT_point2oct(curve, EC_KEY_get0_public_key(key), POINT_CONVERSION_UNCOMPRESSED, (unsigned char *) key_pub, key_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- EC_KEY_free(key);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- break;
- }
- EC_GROUP_free(curve);
- }
-
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject self, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-}
-
-EC_KEY *barray_to_pubkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray pub) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize pub_len = (*env)->GetArrayLength(env, pub);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- EC_POINT *pub_point = EC_POINT_new(curve);
- EC_POINT_oct2point(curve, pub_point, (unsigned char *) pub_data, pub_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, JNI_ABORT);
- EC_KEY_set_public_key(result, pub_point);
- EC_POINT_free(pub_point);
- return result;
-}
-
-EC_KEY *barray_to_privkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray priv) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize priv_len = (*env)->GetArrayLength(env, priv);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- BIGNUM *s = BN_bin2bn((unsigned char *) priv_data, priv_len, NULL);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, JNI_ABORT);
- EC_KEY_set_private_key(result, s);
- BN_free(s);
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Boringssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- int field_size = EC_GROUP_get_degree(curve);
- size_t secret_len = (field_size + 7)/8;
-
- //TODO: Do more KeyAgreements here, but will have to do the hash-fun manually,
- // probably using the ECDH_KDF_X9_62 by wrapping it and dynamically choosing the EVP_MD. from the type string.
- jbyteArray result = (*env)->NewByteArray(env, secret_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
-
- native_timing_start();
- int err = ECDH_compute_key(result_data, secret_len, EC_KEY_get0_public_key(pub), priv, NULL);
- native_timing_stop();
-
- if (err <= 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error computing ECDH, ECDH_compute_key.");
- EC_KEY_free(pub); EC_KEY_free(priv); EC_GROUP_free(curve);
- (*env)->ReleaseByteArrayElements(env, result, result_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- EC_KEY_free(pub);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Boringssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Boringssl_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- // TODO: Do more Signatures here, maybe use the EVP interface to get to the hashes easier and not hash manually?
-
- native_timing_start();
- ECDSA_SIG *signature = ECDSA_do_sign((unsigned char *) data_data, data_size, priv);
- native_timing_stop();
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- if (!signature) {
- throw_new(env, "java/security/GeneralSecurityException", "Error signing, ECDSA_do_sign.");
- EC_KEY_free(priv); EC_GROUP_free(curve);
- return NULL;
- }
-
- jsize sig_len = i2d_ECDSA_SIG(signature, NULL);
- jbyteArray result = (*env)->NewByteArray(env, sig_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- jbyte *result_data_ptr = result_data;
- i2d_ECDSA_SIG(signature, (unsigned char **)&result_data_ptr);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- ECDSA_SIG_free(signature);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Boringssl_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return JNI_FALSE;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
-
- jsize sig_len = (*env)->GetArrayLength(env, signature);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
- jbyte *sig_data_ptr = sig_data;
- ECDSA_SIG *sig_obj = d2i_ECDSA_SIG(NULL, (const unsigned char **)&sig_data_ptr, sig_len);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int result = ECDSA_do_verify((unsigned char *) data_data, data_size, sig_obj, pub);
- native_timing_stop();
-
- if (result < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error verifying, ECDSA_do_verify.");
- EC_KEY_free(pub); EC_GROUP_free(curve); ECDSA_SIG_free(sig_obj);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- return JNI_FALSE;
- }
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- ECDSA_SIG_free(sig_obj);
- EC_KEY_free(pub);
- EC_GROUP_free(curve);
- return (result == 1) ? JNI_TRUE : JNI_FALSE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/botan.cpp b/src/cz/crcs/ectester/standalone/libs/jni/botan.cpp
deleted file mode 100644
index c0d249c..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/botan.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-#include "native.h"
-#include <string>
-
-#include <botan/version.h>
-#include <botan/rng.h>
-#include <botan/secmem.h>
-#include <botan/auto_rng.h>
-
-#include <botan/ec_group.h>
-#include <botan/ecc_key.h>
-#include <botan/ecdsa.h>
-#include <botan/eckcdsa.h>
-#include <botan/ecgdsa.h>
-#include <botan/ecdh.h>
-#include <botan/pubkey.h>
-#include "cpp_utils.hpp"
-#include "c_timing.h"
-
-static jclass provider_class;
-static Botan::AutoSeeded_RNG rng;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BotanLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeProvider$Botan");
- provider_class = (jclass) env->NewGlobalRef(local_provider_class);
-
- jmethodID init = env->GetMethodID(local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- const char* info_str = Botan::version_cstr();
- const char* v_str = Botan::short_version_cstr();
- std::string name_str = Botan::short_version_string();
- name_str.insert(0, "Botan ");
-
- jstring name = env->NewStringUTF(name_str.c_str());
- double version = strtod(v_str, NULL);
- jstring info = env->NewStringUTF(info_str);
-
- return env->NewObject(provider_class, init, name, version, info);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Botan_setup(JNIEnv *env, jobject self){
- jmethodID provider_put = env->GetMethodID(provider_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
-
- add_kpg(env, "ECDH", "BotanECDH", self, provider_put);
- add_kpg(env, "ECDSA", "BotanECDSA", self, provider_put);
- add_kpg(env, "ECKCDSA", "BotanECKCDSA", self, provider_put);
- add_kpg(env, "ECGDSA", "BotanECGDSA", self, provider_put);
-
- add_ka(env, "ECDH", "BotanECDH", self, provider_put);
- add_ka(env, "ECDHwithSHA1KDF", "BotanECDHwithSHA1KDF", self, provider_put);
- add_ka(env, "ECDHwithSHA224KDF", "BotanECDHwithSHA224KDF", self, provider_put);
- add_ka(env, "ECDHwithSHA256KDF", "BotanECDHwithSHA256KDF", self, provider_put);
- add_ka(env, "ECDHwithSHA384KDF", "BotanECDHwithSHA384KDF", self, provider_put);
- add_ka(env, "ECDHwithSHA512KDF", "BotanECDHwithSHA512KDF", self, provider_put);
-
- add_sig(env, "NONEwithECDSA", "BotanECDSAwithNONE", self, provider_put);
- add_sig(env, "SHA1withECDSA", "BotanECDSAwithSHA1", self, provider_put);
- add_sig(env, "SHA224withECDSA", "BotanECDSAwithSHA224", self, provider_put);
- add_sig(env, "SHA256withECDSA", "BotanECDSAwithSHA256", self, provider_put);
- add_sig(env, "SHA384withECDSA", "BotanECDSAwithSHA384", self, provider_put);
- add_sig(env, "SHA512withECDSA", "BotanECDSAwithSHA512", self, provider_put);
-
- add_sig(env, "NONEwithECKCDSA", "BotanECKCDSAwithNONE", self, provider_put);
- add_sig(env, "SHA1withECKCDSA", "BotanECKCDSAwithSHA1", self, provider_put);
- add_sig(env, "SHA224withECKCDSA", "BotanECKCDSAwithSHA224", self, provider_put);
- add_sig(env, "SHA256withECKCDSA", "BotanECKCDSAwithSHA256", self, provider_put);
- add_sig(env, "SHA384withECKCDSA", "BotanECKCDSAwithSHA384", self, provider_put);
- add_sig(env, "SHA512withECKCDSA", "BotanECKCDSAwithSHA512", self, provider_put);
-
- add_sig(env, "NONEwithECGDSA", "BotanECGDSAwithNONE", self, provider_put);
- add_sig(env, "SHA1withECGDSA", "BotanECGDSAwithSHA1", self, provider_put);
- add_sig(env, "SHA224withECGDSA", "BotanECGDSAwithSHA224", self, provider_put);
- add_sig(env, "SHA256withECGDSA", "BotanECGDSAwithSHA256", self, provider_put);
- add_sig(env, "SHA384withECGDSA", "BotanECGDSAwithSHA384", self, provider_put);
- add_sig(env, "SHA512withECGDSA", "BotanECGDSAwithSHA512", self, provider_put);
-
- init_classes(env, "Botan");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BotanLib_getCurves(JNIEnv *env, jobject self){
- jclass set_class = env->FindClass("java/util/TreeSet");
-
- jmethodID set_ctr = env->GetMethodID(set_class, "<init>", "()V");
- jmethodID set_add = env->GetMethodID(set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = env->NewObject(set_class, set_ctr);
-
- const std::set<std::string>& curves = Botan::EC_Group::known_named_groups();
- for (auto it = curves.begin(); it != curves.end(); ++it) {
- std::string curve_name = *it;
- jstring name_str = env->NewStringUTF(curve_name.c_str());
- env->CallBooleanMethod(result, set_add, name_str);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_keysizeSupported(JNIEnv *env, jobject self, jint keysize){
- return JNI_TRUE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if (env->IsInstanceOf(params, ec_parameter_spec_class)) {
- jmethodID get_curve = env->GetMethodID(ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = env->CallObjectMethod(params, get_curve);
-
- jmethodID get_field = env->GetMethodID(elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = env->CallObjectMethod(curve, get_field);
-
- if (env->IsInstanceOf(field, fp_field_class)) {
- return JNI_TRUE;
- }
- } else if (env->IsInstanceOf(params, ecgen_parameter_spec_class)) {
- const std::set<std::string>& curves = Botan::EC_Group::known_named_groups();
- jmethodID get_name = env->GetMethodID(ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (jstring) env->CallObjectMethod(params, get_name);
- const char *utf_name = env->GetStringUTFChars(name, NULL);
- std::string str_name(utf_name);
- env->ReleaseStringUTFChars(name, utf_name);
- if (curves.find(str_name) != curves.end()) {
- return JNI_TRUE;
- }
- }
- return JNI_FALSE;
-}
-
-static jobject biginteger_from_bigint(JNIEnv *env, const Botan::BigInt& bigint) {
- std::vector<uint8_t> bigint_data = Botan::BigInt::encode(bigint);
- jbyteArray bigint_array = env->NewByteArray(bigint_data.size());
- jbyte * bigint_bytes = env->GetByteArrayElements(bigint_array, NULL);
- std::copy(bigint_data.begin(), bigint_data.end(), bigint_bytes);
- env->ReleaseByteArrayElements(bigint_array, bigint_bytes, 0);
-
- jmethodID biginteger_init = env->GetMethodID(biginteger_class, "<init>", "(I[B)V");
- return env->NewObject(biginteger_class, biginteger_init, (jint) 1, bigint_array);
-}
-
-static Botan::BigInt bigint_from_biginteger(JNIEnv *env, jobject biginteger) {
- jmethodID to_byte_array = env->GetMethodID(biginteger_class, "toByteArray", "()[B");
- jbyteArray byte_array = (jbyteArray) env->CallObjectMethod(biginteger, to_byte_array);
- jsize byte_length = env->GetArrayLength(byte_array);
- jbyte *byte_data = env->GetByteArrayElements(byte_array, NULL);
- Botan::BigInt result((unsigned char *) byte_data, byte_length);
- env->ReleaseByteArrayElements(byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-static Botan::EC_Group group_from_params(JNIEnv *env, jobject params) {
- if (env->IsInstanceOf(params, ec_parameter_spec_class)) {
- jmethodID get_curve = env->GetMethodID(ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = env->CallObjectMethod(params, get_curve);
-
- jmethodID get_field = env->GetMethodID(elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = env->CallObjectMethod(elliptic_curve, get_field);
-
- jmethodID get_a = env->GetMethodID(elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = env->CallObjectMethod(elliptic_curve, get_a);
-
- jmethodID get_b = env->GetMethodID(elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = env->CallObjectMethod(elliptic_curve, get_b);
-
- jmethodID get_p = env->GetMethodID(fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = env->CallObjectMethod(field, get_p);
-
- jmethodID get_g = env->GetMethodID(ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = env->CallObjectMethod(params, get_g);
-
- jmethodID get_x = env->GetMethodID(point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = env->CallObjectMethod(g, get_x);
-
- jmethodID get_y = env->GetMethodID(point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = env->CallObjectMethod(g, get_y);
-
- jmethodID get_n = env->GetMethodID(ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = env->CallObjectMethod(params, get_n);
-
- jmethodID get_h = env->GetMethodID(ec_parameter_spec_class, "getCofactor", "()I");
- jint h = env->CallIntMethod(params, get_h);
-
- Botan::BigInt pi = bigint_from_biginteger(env, p);
- Botan::BigInt ai = bigint_from_biginteger(env, a);
- Botan::BigInt bi = bigint_from_biginteger(env, b);
-
- Botan::BigInt gxi = bigint_from_biginteger(env, gx);
- Botan::BigInt gyi = bigint_from_biginteger(env, gy);
-
- Botan::BigInt ni = bigint_from_biginteger(env, n);
- Botan::BigInt hi(h);
-
- return Botan::EC_Group(pi, ai, bi, gxi, gyi, ni, hi);
- } else if (env->IsInstanceOf(params, ecgen_parameter_spec_class)) {
- jmethodID get_name = env->GetMethodID(ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (jstring) env->CallObjectMethod(params, get_name);
- const char *utf_name = env->GetStringUTFChars(name, NULL);
- std::string curve_name(utf_name);
- env->ReleaseStringUTFChars(name, utf_name);
- return Botan::EC_Group(curve_name);
- }
- return Botan::EC_Group();
-}
-
-static jobject params_from_group(JNIEnv *env, Botan::EC_Group group) {
- jobject p = biginteger_from_bigint(env, group.get_p());
-
- jmethodID fp_field_init = env->GetMethodID(fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject fp_field = env->NewObject(fp_field_class, fp_field_init, p);
-
- jobject a = biginteger_from_bigint(env, group.get_a());
- jobject b = biginteger_from_bigint(env, group.get_b());
-
- jmethodID elliptic_curve_init = env->GetMethodID(elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = env->NewObject(elliptic_curve_class, elliptic_curve_init, fp_field, a, b);
-
- const Botan::PointGFp& generator = group.get_base_point();
- jobject gx = biginteger_from_bigint(env, generator.get_affine_x());
- jobject gy = biginteger_from_bigint(env, generator.get_affine_y());
-
- jmethodID point_init = env->GetMethodID(point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = env->NewObject(point_class, point_init, gx, gy);
-
- const Botan::BigInt& order = group.get_order();
- jobject n = biginteger_from_bigint(env, order);
-
- const Botan::BigInt& cofactor = group.get_cofactor();
- jint h = (jint) cofactor.to_u32bit();
-
- jmethodID ec_parameter_spec_init = env->GetMethodID(ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return env->NewObject(ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, h);
-}
-
-static jobject generate_from_group(JNIEnv* env, jobject self, Botan::EC_Group group) {
- jclass botan_kpg_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi$Botan");
- jfieldID type_id = env->GetFieldID(botan_kpg_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char* type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- std::unique_ptr<Botan::EC_PrivateKey> skey;
- try {
- native_timing_start();
- if (type_str == "ECDH") {
- skey = std::make_unique<Botan::ECDH_PrivateKey>(rng, group);
- } else if (type_str == "ECDSA") {
- skey = std::make_unique<Botan::ECDSA_PrivateKey>(rng, group);
- } else if (type_str == "ECKCDSA") {
- skey = std::make_unique<Botan::ECKCDSA_PrivateKey>(rng, group);
- } else if (type_str == "ECGDSA") {
- skey = std::make_unique<Botan::ECGDSA_PrivateKey>(rng, group);
- }
- native_timing_stop();
- } catch (Botan::Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- return NULL;
- }
-
- jobject ec_param_spec = params_from_group(env, group);
-
- const Botan::PointGFp& pub_point = skey->public_point();
- std::vector<uint8_t> pub_data = pub_point.encode(Botan::PointGFp::UNCOMPRESSED);
-
- jbyteArray pub_bytearray = env->NewByteArray(pub_data.size());
- jbyte *pub_bytes = env->GetByteArrayElements(pub_bytearray, NULL);
- std::copy(pub_data.begin(), pub_data.end(), pub_bytes);
- env->ReleaseByteArrayElements(pub_bytearray, pub_bytes, 0);
-
- jobject ec_pub_param_spec = env->NewLocalRef(ec_param_spec);
- jmethodID ec_pub_init = env->GetMethodID(pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = env->NewObject(pubkey_class, ec_pub_init, pub_bytearray, ec_pub_param_spec);
-
- const Botan::BigInt& priv_scalar = skey->private_value();
- std::vector<uint8_t> priv_data = Botan::BigInt::encode(priv_scalar);
-
- jbyteArray priv_bytearray = env->NewByteArray(priv_data.size());
- jbyte *priv_bytes = env->GetByteArrayElements(priv_bytearray, NULL);
- std::copy(priv_data.begin(), priv_data.end(), priv_bytes);
- env->ReleaseByteArrayElements(priv_bytearray, priv_bytes, 0);
-
- jobject ec_priv_param_spec = env->NewLocalRef(ec_param_spec);
- jmethodID ec_priv_init = env->GetMethodID(privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = env->NewObject(privkey_class, ec_priv_init, priv_bytearray, ec_priv_param_spec);
-
- jmethodID keypair_init = env->GetMethodID(keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- return env->NewObject(keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random){
- const std::set<std::string>& curves = Botan::EC_Group::known_named_groups();
- for (auto it = curves.begin(); it != curves.end(); ++it) {
- Botan::EC_Group curve_group = Botan::EC_Group(*it);
- size_t curve_size = curve_group.get_p_bits();
- if (curve_size == (size_t) keysize) {
- //generate on this group. Even thou no default groups are present...
- return generate_from_group(env, self, curve_group);
- }
- }
-
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject self, jobject params, jobject random){
- Botan::EC_Group curve_group = group_from_params(env, params);
- return generate_from_group(env, self, curve_group);
-}
-
-static std::string get_kdf(const std::string& type_str, size_t *kdf_bits) {
- std::string kdf;
- size_t key_len = 0;
- if (type_str == "ECDH") {
- kdf = "Raw";
- //key len unused
- } else if (type_str == "ECDHwithSHA1KDF") {
- kdf = "KDF2(SHA-1)";
- key_len = 20;
- } else if (type_str == "ECDHwithSHA224KDF") {
- kdf = "KDF2(SHA-224)";
- key_len = 28;
- } else if (type_str == "ECDHwithSHA256KDF") {
- kdf = "KDF2(SHA-256)";
- key_len = 32;
- } else if (type_str == "ECDHwithSHA384KDF") {
- kdf = "KDF2(SHA-384)";
- key_len = 48;
- } else if (type_str == "ECDHwithSHA512KDF") {
- kdf = "KDF2(SHA-512)";
- key_len = 64;
- }
-
- if (*kdf_bits == 0) {
- *kdf_bits = key_len;
- }
-
- return kdf;
-}
-
-jbyteArray generate_secret(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- Botan::EC_Group curve_group = group_from_params(env, params);
-
- jsize privkey_length = env->GetArrayLength(privkey);
- jbyte *privkey_data = env->GetByteArrayElements(privkey, NULL);
- Botan::BigInt privkey_scalar((unsigned char *) privkey_data, privkey_length);
- env->ReleaseByteArrayElements(privkey, privkey_data, JNI_ABORT);
-
- Botan::ECDH_PrivateKey skey(rng, curve_group, privkey_scalar);
-
- jsize pubkey_length = env->GetArrayLength(pubkey);
- jbyte *pubkey_data = env->GetByteArrayElements(pubkey, NULL);
- Botan::PointGFp public_point = curve_group.OS2ECP((uint8_t*) pubkey_data, pubkey_length);
- env->ReleaseByteArrayElements(pubkey, pubkey_data, JNI_ABORT);
-
- Botan::ECDH_PublicKey pkey(curve_group, public_point);
- //TODO: do check_key here?
-
- jclass botan_ka_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi$Botan");
- jfieldID type_id = env->GetFieldID(botan_ka_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char *type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- size_t key_len = (get_kdf_bits(env, algorithm) + 7) / 8;
- std::string kdf = get_kdf(type_str, &key_len);
-
- Botan::PK_Key_Agreement ka(skey, rng, kdf);
-
- std::vector<uint8_t> derived;
- try {
- native_timing_start();
- derived = Botan::unlock(ka.derive_key(key_len, pkey.public_value()).bits_of());
- native_timing_stop();
- } catch (Botan::Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- return NULL;
- }
- jbyteArray result = env->NewByteArray(derived.size());
- jbyte *result_data = env->GetByteArrayElements(result, NULL);
- std::copy(derived.begin(), derived.end(), result_data);
- env->ReleaseByteArrayElements(result, result_data, 0);
-
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Botan_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params){
- return generate_secret(env, self, pubkey, privkey, params, NULL);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Botan_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- jbyteArray secret = generate_secret(env, self, pubkey, privkey, params, algorithm);
- if (secret == NULL) {
- return NULL;
- }
- jmethodID spec_init = env->GetMethodID(secret_key_spec_class, "<init>", ("([BLjava/lang/String;)V"));
- return env->NewObject(secret_key_spec_class, spec_init, secret, algorithm);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Botan_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params){
- Botan::EC_Group curve_group = group_from_params(env, params);
-
- jclass botan_sig_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Botan");
- jfieldID type_id = env->GetFieldID(botan_sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char *type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- jsize privkey_length = env->GetArrayLength(privkey);
- jbyte *privkey_bytes = env->GetByteArrayElements(privkey, NULL);
- Botan::BigInt privkey_scalar((uint8_t*) privkey_bytes, privkey_length);
- env->ReleaseByteArrayElements(privkey, privkey_bytes, JNI_ABORT);
-
- std::unique_ptr<Botan::EC_PrivateKey> skey;
- if (type_str.find("ECDSA") != std::string::npos) {
- skey = std::make_unique<Botan::ECDSA_PrivateKey>(rng, curve_group, privkey_scalar);
- } else if (type_str.find("ECKCDSA") != std::string::npos) {
- skey = std::make_unique<Botan::ECKCDSA_PrivateKey>(rng, curve_group, privkey_scalar);
- } else if (type_str.find("ECGDSA") != std::string::npos) {
- skey = std::make_unique<Botan::ECGDSA_PrivateKey>(rng, curve_group, privkey_scalar);
- }
-
- std::string emsa;
- if (type_str.find("NONE") != std::string::npos) {
- emsa = "Raw";
- } else if (type_str.find("SHA1") != std::string::npos) {
- emsa = "EMSA1(SHA-1)";
- } else if (type_str.find("SHA224") != std::string::npos) {
- emsa = "EMSA1(SHA-224)";
- } else if (type_str.find("SHA256") != std::string::npos) {
- emsa = "EMSA1(SHA-256)";
- } else if (type_str.find("SHA384") != std::string::npos) {
- emsa = "EMSA1(SHA-384)";
- } else if (type_str.find("SHA512") != std::string::npos) {
- emsa = "EMSA1(SHA-512)";
- }
-
- Botan::PK_Signer signer(*skey, rng, emsa, Botan::DER_SEQUENCE);
-
- jsize data_length = env->GetArrayLength(data);
- jbyte *data_bytes = env->GetByteArrayElements(data, NULL);
- std::vector<uint8_t> sig;
- try {
- native_timing_start();
- sig = signer.sign_message((uint8_t*) data_bytes, data_length, rng);
- native_timing_stop();
- } catch (Botan::Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
- return NULL;
- }
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
-
- jbyteArray result = env->NewByteArray(sig.size());
- jbyte *result_data = env->GetByteArrayElements(result, NULL);
- std::copy(sig.begin(), sig.end(), result_data);
- env->ReleaseByteArrayElements(result, result_data, 0);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Botan_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params){
- Botan::EC_Group curve_group = group_from_params(env, params);
-
- jclass botan_sig_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Botan");
- jfieldID type_id = env->GetFieldID(botan_sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char *type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- jsize pubkey_length = env->GetArrayLength(pubkey);
- jbyte *pubkey_data = env->GetByteArrayElements(pubkey, NULL);
- Botan::PointGFp public_point = curve_group.OS2ECP((uint8_t*) pubkey_data, pubkey_length);
- env->ReleaseByteArrayElements(pubkey, pubkey_data, JNI_ABORT);
-
- std::unique_ptr<Botan::EC_PublicKey> pkey;
- if (type_str.find("ECDSA") != std::string::npos) {
- pkey = std::make_unique<Botan::ECDSA_PublicKey>(curve_group, public_point);
- } else if (type_str.find("ECKCDSA") != std::string::npos) {
- pkey = std::make_unique<Botan::ECKCDSA_PublicKey>(curve_group, public_point);
- } else if (type_str.find("ECGDSA") != std::string::npos) {
- pkey = std::make_unique<Botan::ECGDSA_PublicKey>(curve_group, public_point);
- }
-
- std::string emsa;
- if (type_str.find("NONE") != std::string::npos) {
- emsa = "Raw";
- } else if (type_str.find("SHA1") != std::string::npos) {
- emsa = "EMSA1(SHA-1)";
- } else if (type_str.find("SHA224") != std::string::npos) {
- emsa = "EMSA1(SHA-224)";
- } else if (type_str.find("SHA256") != std::string::npos) {
- emsa = "EMSA1(SHA-256)";
- } else if (type_str.find("SHA384") != std::string::npos) {
- emsa = "EMSA1(SHA-384)";
- } else if (type_str.find("SHA512") != std::string::npos) {
- emsa = "EMSA1(SHA-512)";
- }
-
- Botan::PK_Verifier verifier(*pkey, emsa, Botan::DER_SEQUENCE);
-
- jsize data_length = env->GetArrayLength(data);
- jsize sig_length = env->GetArrayLength(signature);
- jbyte *data_bytes = env->GetByteArrayElements(data, NULL);
- jbyte *sig_bytes = env->GetByteArrayElements(signature, NULL);
-
- bool result;
- try {
- native_timing_start();
- result = verifier.verify_message((uint8_t*)data_bytes, data_length, (uint8_t*)sig_bytes, sig_length);
- native_timing_stop();
- } catch (Botan::Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
- env->ReleaseByteArrayElements(signature, sig_bytes, JNI_ABORT);
- return JNI_FALSE;
- }
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
- env->ReleaseByteArrayElements(signature, sig_bytes, JNI_ABORT);
- if (result) {
- return JNI_TRUE;
- }
- return JNI_FALSE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/c_timing.c b/src/cz/crcs/ectester/standalone/libs/jni/c_timing.c
deleted file mode 100644
index 018ceda..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/c_timing.c
+++ /dev/null
@@ -1,254 +0,0 @@
-#include "c_timing.h"
-
-#if __linux || __posix
-
-#include <unistd.h>
-#include <time.h>
-#include <string.h>
-
-static unsigned long long tsc_start = 0;
-static unsigned long long tsc_end = 0;
-static unsigned long long tsc_partial = 0;
-static const char *rdtsc_unit = "instr";
-
-static inline unsigned long long rdtsc(void) {
- unsigned long long int x;
- __asm__ volatile ("rdtsc" : "=A" (x));
- return x;
-}
-
-static jlong rdtsc_timing_resolution() {
- return 1;
-}
-
-static void rdtsc_timing_start() {
- tsc_partial = 0;
- tsc_start = rdtsc();
-}
-
-static void rdtsc_timing_pause() {
- tsc_end = rdtsc();
- tsc_partial += tsc_end - tsc_start;
-}
-
-static void rdtsc_timing_restart() {
- tsc_start = rdtsc();
-}
-
-static void rdtsc_timing_stop() {
- tsc_end = rdtsc();
-}
-
-static jlong rdtsc_timing_last() {
- jlong res = (jlong) ((tsc_end - tsc_start) + tsc_partial);
- if (res < 0) {
- return 0;
- } else {
- return res;
- }
-}
-
-static struct timespec start = {0};
-static struct timespec end = {0};
-static jlong partial = 0;
-static clockid_t clk_id = CLOCK_MONOTONIC_RAW;
-static const char *clock_unit = "nano";
-
-static jlong clock_timing_resolution() {
- struct timespec timeval;
- clock_getres(clk_id, &timeval);
- return timeval.tv_nsec;
-}
-
-static void clock_timing_start() {
- partial = 0;
- clock_gettime(clk_id, &start);
-}
-
-static void clock_timing_pause() {
- clock_gettime(clk_id, &end);
- partial += (end.tv_sec - start.tv_sec) * 1000000000 + (end.tv_nsec - start.tv_nsec);
-}
-
-static void clock_timing_restart() {
- clock_gettime(clk_id, (struct timespec *)&start);
-}
-
-static void clock_timing_stop() {
- clock_gettime(clk_id, (struct timespec *)&end);
-}
-
-static jlong clock_timing_last() {
- jlong res = (end.tv_sec - start.tv_sec) * 1000000000 + (end.tv_nsec - start.tv_nsec) + partial;
- if (res < 0) {
- return 0;
- } else {
- return res;
- }
-}
-
-static jlong (*func_timing_resolution)() = &clock_timing_resolution;
-static void (*func_timing_start)() = &clock_timing_start;
-static void (*func_timing_pause)() = &clock_timing_pause;
-static void (*func_timing_restart)() = &clock_timing_restart;
-static void (*func_timing_stop)() = &clock_timing_stop;
-static jlong (*func_timing_last)() = &clock_timing_last;
-static const char *unit = "nano";
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingSupport(JNIEnv *env, jobject self) {
- jclass set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID set_ctr = (*env)->GetMethodID(env, set_class, "<init>", "()V");
- jmethodID set_add = (*env)->GetMethodID(env, set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, set_class, set_ctr);
- (*env)->CallBooleanMethod(env, result, set_add, (*env)->NewStringUTF(env, "rdtsc"));
- (*env)->CallBooleanMethod(env, result, set_add, (*env)->NewStringUTF(env, "monotonic"));
- (*env)->CallBooleanMethod(env, result, set_add, (*env)->NewStringUTF(env, "monotonic-raw"));
- (*env)->CallBooleanMethod(env, result, set_add, (*env)->NewStringUTF(env, "cputime-processor"));
- (*env)->CallBooleanMethod(env, result, set_add, (*env)->NewStringUTF(env, "cputime-thread"));
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_setNativeTimingType(JNIEnv *env, jobject self, jstring type) {
- const char *type_data = (*env)->GetStringUTFChars(env, type, NULL);
-
- if (strcmp(type_data, "rdtsc") == 0) {
- func_timing_resolution = &rdtsc_timing_resolution;
- func_timing_start = &rdtsc_timing_start;
- func_timing_pause = &rdtsc_timing_pause;
- func_timing_restart = &rdtsc_timing_restart;
- func_timing_stop = &rdtsc_timing_stop;
- func_timing_last = &rdtsc_timing_last;
- unit = rdtsc_unit;
- return JNI_TRUE;
- } else {
- if (strcmp(type_data, "monotonic") == 0) {
- clk_id = CLOCK_MONOTONIC;
- } else if (strcmp(type_data, "monotonic-raw") == 0) {
- clk_id = CLOCK_MONOTONIC_RAW;
- } else if (strcmp(type_data, "cputime-processor") == 0) {
- clk_id = CLOCK_PROCESS_CPUTIME_ID;
- } else if (strcmp(type_data, "cputime-thread") == 0) {
- clk_id = CLOCK_THREAD_CPUTIME_ID;
- } else {
- return JNI_FALSE;
- }
-
- func_timing_resolution = &clock_timing_resolution;
- func_timing_start = &clock_timing_start;
- func_timing_pause = &clock_timing_pause;
- func_timing_restart = &clock_timing_restart;
- func_timing_stop = &clock_timing_stop;
- func_timing_last = &clock_timing_last;
- unit = clock_unit;
- return JNI_TRUE;
- }
-}
-
-JNIEXPORT jlong JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingResolution(JNIEnv *env, jobject self) {
- return native_timing_resolution();
-}
-
-JNIEXPORT jstring JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingUnit(JNIEnv *env, jobject self) {
- return (*env)->NewStringUTF(env, unit);
-}
-
-JNIEXPORT jlong JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getLastNativeTiming(JNIEnv *env, jobject self) {
- return native_timing_last();
-}
-
-jlong native_timing_resolution() {
- return func_timing_resolution();
-}
-
-void native_timing_start() {
- func_timing_start();
-}
-
-void native_timing_pause() {
- func_timing_pause();
-}
-
-void native_timing_restart() {
- func_timing_restart();
-}
-
-void native_timing_stop() {
- func_timing_stop();
-}
-
-jlong native_timing_last() {
- return func_timing_last();
-}
-
-#elif defined(__WIN32__) || defined(_MSC_VER)
-
-#include <Windows.h>
-#error TODO
-
-static LARGE_INTEGER start = {0};
-static LARGE_INTEGER end = {0};
-static jlong partial = 0;
-
-jboolean native_timing_supported() {
- return JNI_TRUE;
-}
-
-jlong native_timing_resolution() {
- LARGE_INTEGER freq;
- QueryPerformanceFrequency(&freq);
- return 1000000000 / freq.QuadPart;
-}
-
-void native_timing_start() {
- partial = 0;
- QueryPerformanceCounter(&start);
-}
-
-void native_timing_pause() {
- QueryPerformanceCounter(&end);
- partial = (end.QuadPart - start.QuadPart) * native_timing_resolution();
-}
-
-void native_timing_restart() {
- QueryPerformanceCounter(&start);
-}
-
-void native_timing_stop() {
- QueryPerformanceCounter(&end);
-}
-
-jlong native_timing_last() {
- jlong res = (end.QuadPart - start.QuadPart) * native_timing_resolution() + partial;
- if (res < 0) {
- return 0;
- } else {
- return res;
- }
-}
-
-#else
-
-#error TODO
-jboolean native_timing_supported() {
- return JNI_FALSE;
-}
-
-jlong native_timing_resolution() {
- return 0;
-}
-
-void native_timing_start() {}
-
-void native_timing_pause() {}
-
-void native_timing_restart() {}
-
-void native_timing_stop() {}
-
-jlong native_timing_last() {
- return 0;
-}
-
-#endif
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/c_timing.h b/src/cz/crcs/ectester/standalone/libs/jni/c_timing.h
deleted file mode 100644
index e12ccdd..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/c_timing.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#pragma once
-
-#include <jni.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *
- */
-__attribute__((visibility("default"))) jlong native_timing_resolution();
-
-/**
- *
- */
-__attribute__((visibility("default"))) void native_timing_start();
-
-/**
- *
- */
-__attribute__((visibility("default"))) void native_timing_pause();
-
-/**
- *
- */
-__attribute__((visibility("default"))) void native_timing_restart();
-
-/**
- *
- */
-__attribute__((visibility("default"))) void native_timing_stop();
-
-/**
- *
- */
-__attribute__((visibility("default"))) jlong native_timing_last();
-
-
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.c b/src/cz/crcs/ectester/standalone/libs/jni/c_utils.c
deleted file mode 100644
index 46286fd..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.c
+++ /dev/null
@@ -1,252 +0,0 @@
-#include "c_utils.h"
-#define _ISOC99_SOURCE
-#include <string.h>
-#include <stdlib.h>
-
-#if defined(__WIN32__) || defined(_MSC_VER)
-#include <windows.h>
-#endif
-
-jclass ec_parameter_spec_class;
-jclass ecgen_parameter_spec_class;
-jclass secret_key_spec_class;
-jclass pubkey_class;
-jclass privkey_class;
-jclass keypair_class;
-jclass elliptic_curve_class;
-jclass fp_field_class;
-jclass f2m_field_class;
-jclass point_class;
-jclass biginteger_class;
-jclass illegal_state_exception_class;
-
-void init_classes(JNIEnv *env, const char* lib_name) {
- jclass local_ec_parameter_spec_class = (*env)->FindClass(env, "java/security/spec/ECParameterSpec");
- ec_parameter_spec_class = (*env)->NewGlobalRef(env, local_ec_parameter_spec_class);
-
- jclass local_ecgen_parameter_spec_class = (*env)->FindClass(env, "java/security/spec/ECGenParameterSpec");
- ecgen_parameter_spec_class = (*env)->NewGlobalRef(env, local_ecgen_parameter_spec_class);
-
- jclass local_secret_key_spec_class = (*env)->FindClass(env, "javax/crypto/spec/SecretKeySpec");
- secret_key_spec_class = (*env)->NewGlobalRef(env, local_secret_key_spec_class);
-
- const char *pubkey_base = "cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey$";
- char pubkey_class_name[2048] = { 0 }; //strlen(pubkey_base) + strlen(lib_name) + 1
- pubkey_class_name[0] = 0;
- strcat(pubkey_class_name, pubkey_base);
- strcat(pubkey_class_name, lib_name);
-
- jclass local_pubkey_class = (*env)->FindClass(env, pubkey_class_name);
- pubkey_class = (*env)->NewGlobalRef(env, local_pubkey_class);
-
- const char *privkey_base = "cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey$";
- char privkey_class_name[2048] = { 0 }; //strlen(privkey_base) + strlen(lib_name) + 1
- privkey_class_name[0] = 0;
- strcat(privkey_class_name, privkey_base);
- strcat(privkey_class_name, lib_name);
-
- jclass local_privkey_class = (*env)->FindClass(env, privkey_class_name);
- privkey_class = (*env)->NewGlobalRef(env, local_privkey_class);
-
- jclass local_keypair_class = (*env)->FindClass(env, "java/security/KeyPair");
- keypair_class = (*env)->NewGlobalRef(env, local_keypair_class);
-
- jclass local_elliptic_curve_class = (*env)->FindClass(env, "java/security/spec/EllipticCurve");
- elliptic_curve_class = (*env)->NewGlobalRef(env, local_elliptic_curve_class);
-
- jclass local_fp_field_class = (*env)->FindClass(env, "java/security/spec/ECFieldFp");
- fp_field_class = (*env)->NewGlobalRef(env, local_fp_field_class);
-
- jclass local_f2m_field_class = (*env)->FindClass(env, "java/security/spec/ECFieldF2m");
- f2m_field_class = (*env)->NewGlobalRef(env, local_f2m_field_class);
-
- jclass local_biginteger_class = (*env)->FindClass(env, "java/math/BigInteger");
- biginteger_class = (*env)->NewGlobalRef(env, local_biginteger_class);
-
- jclass local_point_class = (*env)->FindClass(env, "java/security/spec/ECPoint");
- point_class = (*env)->NewGlobalRef(env, local_point_class);
-
- jclass local_illegal_state_exception_class = (*env)->FindClass(env, "java/lang/IllegalStateException");
- illegal_state_exception_class = (*env)->NewGlobalRef(env, local_illegal_state_exception_class);
-}
-
-void throw_new(JNIEnv *env, const char *class, const char *message) {
- jclass clazz = (*env)->FindClass(env, class);
- (*env)->ThrowNew(env, clazz, message);
-}
-
-void throw_new_var(JNIEnv *env, const char *class, const char *format, ...) {
- char buffer[2048];
- va_list args;
- va_start(args, format);
- vsnprintf(buffer, 2048, format, args);
- va_end(args);
- throw_new(env, class, buffer);
-}
-
-jint get_kdf_bits(JNIEnv *env, jstring algorithm) {
- if (algorithm == NULL) {
- return 0;
- }
-
- const char *algo_data = (*env)->GetStringUTFChars(env, algorithm, NULL);
-
- jint result = 0;
- if (strcmp(algo_data, "DES") == 0) {
- result = 64;
- } else if (strcmp(algo_data, "BLOWFISH") == 0) {
- result = 128;
- } else if (strcmp(algo_data, "DESEDE") == 0) {
- result = 192;
- } else if (strcmp(algo_data, "AES") == 0 || strcmp(algo_data, "CAMELLIA") == 0) {
- result = 256;
- } else {
- char *end;
- long bits = strtol(algo_data, &end, 10);
- if (*end == 0) {
- result = (jint) bits;
- }
- }
- (*env)->ReleaseStringUTFChars(env, algorithm, algo_data);
- return result;
-}
-
-jbyteArray asn1_der_encode(JNIEnv *env, const jbyte *r, size_t r_len, const jbyte *s, size_t s_len) {
- const jbyte *rtmp = r;
- while (*rtmp++ == 0) {
- r++;
- r_len--;
- }
- const jbyte *stmp = s;
- while (*stmp++ == 0) {
- s++;
- s_len--;
- }
-
- jbyte r_length = (jbyte) r_len + (r[0] & 0x80 ? 1 : 0);
- jbyte s_length = (jbyte) s_len + (s[0] & 0x80 ? 1 : 0);
-
- // R and S are < 128 bytes, so 1 byte tag + 1 byte len + len bytes value
- size_t seq_value_len = 2 + r_length + 2 + s_length;
- size_t whole_len = seq_value_len;
-
- // The SEQUENCE length might be >= 128, so more bytes of length
- size_t seq_len_len = 0;
- if (seq_value_len >= 128) {
- size_t s = seq_value_len;
- do {
- seq_len_len++;
- } while ((s = s >> 8));
- }
- // seq_len_len bytes for length and one for length of length
- whole_len += seq_len_len + 1;
-
- // 1 byte tag for SEQUENCE
- whole_len += 1;
-
- jbyteArray result = (jbyteArray) (*env)->NewByteArray(env, whole_len);
- jbyte *data = (*env)->GetByteArrayElements(env, result, NULL);
- size_t i = 0;
- data[i++] = 0x30; // SEQUENCE
- if (seq_value_len < 128) {
- data[i++] = (jbyte) seq_value_len;
- } else {
- data[i++] = (jbyte) (seq_len_len | (1 << 7));
- for (size_t j = 0; j < seq_len_len; ++j) {
- data[i++] = (jbyte) (seq_value_len & (0xff << (8 * (seq_len_len - j - 1))));
- }
- }
- data[i++] = 0x02; //INTEGER
- data[i++] = r_length;
- if (r[0] & 0x80) {
- data[i++] = 0;
- }
- memcpy(data + i, r, r_len);
- i += r_len;
- data[i++] = 0x02; //INTEGER
- data[i++] = s_length;
- if (s[0] & 0x80) {
- data[i++] = 0;
- }
- memcpy(data + i, s, s_len);
- i += s_len;
- (*env)->ReleaseByteArrayElements(env, result, data, 0);
-
- return result;
-}
-
-bool asn1_der_decode(JNIEnv *env, jbyteArray sig, jbyte **r_data, size_t *r_len, jbyte **s_data, size_t *s_len) {
- size_t sig_len = (*env)->GetArrayLength(env, sig);
- jbyte *data = (*env)->GetByteArrayElements(env, sig, NULL);
- size_t i = 0;
- if (data[i++] != 0x30) {//SEQUENCE
- (*env)->ReleaseByteArrayElements(env, sig, data, JNI_ABORT);
- return false;
- }
- size_t seq_value_len = 0;
- if (!(data[i] & 0x80)) {
- seq_value_len = data[i++];
- } else {
- size_t seq_len_len = data[i++] & 0x7f;
- while (seq_len_len > 0) {
- seq_value_len |= (data[i++] << (seq_len_len - 1));
- seq_len_len--;
- }
- }
-
- if (data[i++] != 0x02) {//INTEGER
- (*env)->ReleaseByteArrayElements(env, sig, data, JNI_ABORT);
- return false;
- }
- size_t r_length = data[i++];
- jbyte *r_out = malloc(r_length);
- memcpy(r_out, data + i, r_length);
- i += r_length;
-
- if (data[i++] != 0x02) {//INTEGER
- free(r_out);
- (*env)->ReleaseByteArrayElements(env, sig, data, JNI_ABORT);
- return false;
- }
- size_t s_length = data[i++];
- jbyte *s_out = malloc(s_length);
- memcpy(s_out, data + i, s_length);
- i += s_length;
-
- (*env)->ReleaseByteArrayElements(env, sig, data, JNI_ABORT);
- if (i != sig_len) {
- free(r_out);
- free(s_out);
- return false;
- }
-
- *r_len = r_length;
- *r_data = r_out;
- *s_len = s_length;
- *s_data = s_out;
- return true;
-}
-
-char *biginteger_to_hex(JNIEnv *env, jobject big, jint bytes) {
- jmethodID to_string = (*env)->GetMethodID(env, biginteger_class, "toString", "(I)Ljava/lang/String;");
- jstring big_string = (*env)->CallObjectMethod(env, big, to_string, (jint) 16);
-
- jsize len = (*env)->GetStringUTFLength(env, big_string);
-#if defined(__WIN32__) || defined(_MSC_VER)
- char *raw_string = _alloca(len);
-#else
- char raw_string[len];
-#endif
- (*env)->GetStringUTFRegion(env, big_string, 0, len, raw_string);
-
- char *result = calloc(bytes, 2);
- if (len >= bytes) {
- return strncpy(result, raw_string, 2*bytes);
- } else {
- jsize diff = bytes - len;
- for (jint i = 0; i < diff*2; ++i) {
- result[i] = '0';
- }
- return strncpy(result + diff*2, raw_string, 2*bytes);
- }
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h b/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
deleted file mode 100644
index f2f3f2f..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#pragma once
-
-#include "native.h"
-#include <stdbool.h>
-
-/**
- * Classes that are accessed alot are cached here, manually.
- */
-extern jclass ec_parameter_spec_class;
-extern jclass ecgen_parameter_spec_class;
-extern jclass secret_key_spec_class;
-extern jclass pubkey_class;
-extern jclass privkey_class;
-extern jclass keypair_class;
-extern jclass elliptic_curve_class;
-extern jclass fp_field_class;
-extern jclass f2m_field_class;
-extern jclass point_class;
-extern jclass biginteger_class;
-extern jclass illegal_state_exception_class;
-
-/**
- * Initialize the classes.
- */
-void init_classes(JNIEnv *env, const char* lib_name);
-
-/**
- * Throw a new exception of class with message.
- */
-void throw_new(JNIEnv *env, const char *class, const char *message);
-
-/**
- * Throw a new exception of class, with formatted message.
- */
-void throw_new_var(JNIEnv *env, const char *class, const char *format, ...);
-
-/**
- * Get the size of the specified key algorithm in bits, for ECDH KDF output size.
- */
-jint get_kdf_bits(JNIEnv *env, jstring algorithm);
-
-/**
- * DER encode the r and s values.
- */
-jbyteArray asn1_der_encode(JNIEnv *env, const jbyte *r, size_t r_len, const jbyte *s, size_t s_len);
-
-/**
- * DER decode a signature into r and s values.
- */
-bool asn1_der_decode(JNIEnv *env, jbyteArray sig, jbyte **r_data, size_t *r_len, jbyte **s_data, size_t *s_len);
-
-/**
- * Convert a BigInteger to an allocated hex string.
- */
-char *biginteger_to_hex(JNIEnv *env, jobject big, jint bytes);
-
-/**
- * Some useful defines to init the provider.
- */
-#define INIT_PROVIDER(env, provider_class) jmethodID provider_put = (*env)->GetMethodID(env, provider_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
-#define ADD_PROPERTY(env, self, base_name, base_class, prop_name, prop_class) do { \
- jstring ec = (*env)->NewStringUTF(env, base_name prop_name); \
- jstring ec_value = (*env)->NewStringUTF(env, base_class prop_class); \
- (*env)->CallObjectMethod(env, self, provider_put, ec, ec_value); \
- } while (0)
-#define ADD_KPG(env, self, kpg_name, kpg_class) ADD_PROPERTY(env, self, "KeyPairGenerator.", "cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$", kpg_name, kpg_class)
-#define ADD_KA(env, self, ka_name, ka_class) ADD_PROPERTY(env, self, "KeyAgreement.", "cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$", ka_name, ka_class)
-#define ADD_SIG(env, self, sig_name, sig_class) ADD_PROPERTY(env, self, "Signature.", "cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$", sig_name, sig_class) \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.cpp b/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.cpp
deleted file mode 100644
index 20d9a3c..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-#include "cpp_utils.hpp"
-
-jclass ec_parameter_spec_class;
-jclass ecgen_parameter_spec_class;
-jclass secret_key_spec_class;
-jclass pubkey_class;
-jclass privkey_class;
-jclass keypair_class;
-jclass elliptic_curve_class;
-jclass fp_field_class;
-jclass f2m_field_class;
-jclass point_class;
-jclass biginteger_class;
-jclass illegal_state_exception_class;
-
-void init_classes(JNIEnv *env, std::string lib_name) {
- jclass local_ec_parameter_spec_class = env->FindClass("java/security/spec/ECParameterSpec");
- ec_parameter_spec_class = (jclass) env->NewGlobalRef(local_ec_parameter_spec_class);
-
- jclass local_ecgen_parameter_spec_class = env->FindClass("java/security/spec/ECGenParameterSpec");
- ecgen_parameter_spec_class = (jclass) env->NewGlobalRef(local_ecgen_parameter_spec_class);
-
- jclass local_secret_key_spec_class = env->FindClass("javax/crypto/spec/SecretKeySpec");
- secret_key_spec_class = (jclass) env->NewGlobalRef(local_secret_key_spec_class);
-
- std::string pubkey_class_name("cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey$");
- pubkey_class_name += lib_name;
-
- jclass local_pubkey_class = env->FindClass(pubkey_class_name.c_str());
- pubkey_class = (jclass) env->NewGlobalRef(local_pubkey_class);
-
- std::string privkey_class_name("cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey$");
- privkey_class_name += lib_name;
-
- jclass local_privkey_class = env->FindClass(privkey_class_name.c_str());
- privkey_class = (jclass) env->NewGlobalRef(local_privkey_class);
-
- jclass local_keypair_class = env->FindClass("java/security/KeyPair");
- keypair_class = (jclass) env->NewGlobalRef(local_keypair_class);
-
- jclass local_elliptic_curve_class = env->FindClass("java/security/spec/EllipticCurve");
- elliptic_curve_class = (jclass) env->NewGlobalRef(local_elliptic_curve_class);
-
- jclass local_fp_field_class = env->FindClass("java/security/spec/ECFieldFp");
- fp_field_class = (jclass) env->NewGlobalRef(local_fp_field_class);
-
- jclass local_f2m_field_class = env->FindClass("java/security/spec/ECFieldF2m");
- f2m_field_class = (jclass) env->NewGlobalRef(local_f2m_field_class);
-
- jclass local_biginteger_class = env->FindClass("java/math/BigInteger");
- biginteger_class = (jclass) env->NewGlobalRef(local_biginteger_class);
-
- jclass local_point_class = env->FindClass("java/security/spec/ECPoint");
- point_class = (jclass) env->NewGlobalRef(local_point_class);
-
- jclass local_illegal_state_exception_class = env->FindClass("java/lang/IllegalStateException");
- illegal_state_exception_class = (jclass) env->NewGlobalRef(local_illegal_state_exception_class);
-}
-
-void throw_new(JNIEnv *env, const std::string& klass, const std::string& message) {
- jclass clazz = env->FindClass(klass.c_str());
- env->ThrowNew(clazz, message.c_str());
-}
-
-jint get_kdf_bits(JNIEnv *env, jstring algorithm) {
- if (algorithm == NULL) {
- return 0;
- }
-
- const char *algo_data = env->GetStringUTFChars(algorithm, NULL);
- std::string algo(algo_data);
-
- jint result = 0;
- if (algo == "DES") {
- result = 64;
- } else if (algo == "BLOWFISH") {
- result = 128;
- } else if (algo == "DESEDE") {
- result = 192;
- } else if (algo == "AES" || algo == "CAMELLIA") {
- result = 256;
- } else {
- char *end;
- long bits = strtol(algo_data, &end, 10);
- if (*end == 0) {
- result = (jint) bits;
- }
- }
- env->ReleaseStringUTFChars(algorithm, algo_data);
- return result;
-}
-
-static void add_provider_property(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method) {
- jstring type_str = env->NewStringUTF(type.c_str());
- jstring class_str = env->NewStringUTF(klass.c_str());
- env->CallObjectMethod(provider, put_method, type_str, class_str);
-}
-
-void add_kpg(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method) {
- const std::string full_type = "KeyPairGenerator." + type;
- const std::string full_class = "cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$" + klass;
- add_provider_property(env, full_type, full_class, provider, put_method);
-}
-
-void add_ka(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method) {
- const std::string full_type = "KeyAgreement." + type;
- const std::string full_class = "cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$" + klass;
- add_provider_property(env, full_type, full_class, provider, put_method);
-}
-
-void add_sig(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method) {
- const std::string full_type = "Signature." + type;
- const std::string full_class = "cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$" + klass;
- add_provider_property(env, full_type, full_class, provider, put_method);
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.hpp b/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.hpp
deleted file mode 100644
index ed26c01..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/cpp_utils.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#pragma once
-
-#include "native.h"
-#include <string>
-
-/**
- * Classes that are accessed alot are cached here, manually.
- */
-extern jclass ec_parameter_spec_class;
-extern jclass ecgen_parameter_spec_class;
-extern jclass secret_key_spec_class;
-extern jclass pubkey_class;
-extern jclass privkey_class;
-extern jclass keypair_class;
-extern jclass elliptic_curve_class;
-extern jclass fp_field_class;
-extern jclass f2m_field_class;
-extern jclass point_class;
-extern jclass biginteger_class;
-extern jclass illegal_state_exception_class;
-
-/**
- * Initialize the classes.
- */
-void init_classes(JNIEnv *env, std::string lib_name);
-
-/**
- * Throw a new exception of class with message.
- */
-void throw_new(JNIEnv *env, const std::string& klass, const std::string& message);
-
-/**
- * Get the size of the specified key algorithm in bits, for ECDH KDF output size.
- */
-jint get_kdf_bits(JNIEnv *env, jstring algorithm);
-
-/**
- * Add a KeyPairGeneratorSpi class to this provider.
- */
-void add_kpg(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method);
-
-/**
- * Add a KeyAgreementSpi class to this provider.
- */
-void add_ka(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method);
-
-/**
- * Add a SignatureSpi class to this provider.
- */
-void add_sig(JNIEnv *env, const std::string &type, const std::string &klass, jobject provider, jmethodID put_method); \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/cryptopp.cpp b/src/cz/crcs/ectester/standalone/libs/jni/cryptopp.cpp
deleted file mode 100644
index eb782b7..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/cryptopp.cpp
+++ /dev/null
@@ -1,767 +0,0 @@
-#include "native.h"
-
-#include <iostream>
-using std::cout;
-using std::cerr;
-using std::endl;
-
-#include <string>
-#include <sstream>
-using std::string;
-
-#include <stdexcept>
-using std::runtime_error;
-
-#include <cstdlib>
-using std::exit;
-
-#include "cryptopp/cryptlib.h"
-using CryptoPP::Exception;
-
-#include "cryptopp/config.h"
-using CryptoPP::byte;
-
-#include "cryptopp/osrng.h"
-using CryptoPP::AutoSeededRandomPool;
-
-#include "cryptopp/sha.h"
-using CryptoPP::SHA1;
-using CryptoPP::SHA224;
-using CryptoPP::SHA256;
-using CryptoPP::SHA384;
-using CryptoPP::SHA512;
-
-#include "cryptopp/aes.h"
-using CryptoPP::AES;
-
-#include "cryptopp/modarith.h"
-using CryptoPP::ModularArithmetic;
-
-#include "cryptopp/gf2n.h"
-using CryptoPP::PolynomialMod2;
-using CryptoPP::GF2NP;
-using CryptoPP::GF2NT;
-using CryptoPP::GF2NPP;
-
-#include "cryptopp/eccrypto.h"
-using CryptoPP::ECP;
-using CryptoPP::EC2N;
-using CryptoPP::ECDH;
-using CryptoPP::DL_GroupParameters_EC;
-using CryptoPP::ECDSA;
-
-#include "cryptopp/secblock.h"
-using CryptoPP::SecByteBlock;
-
-#include "cryptopp/oids.h"
-using CryptoPP::OID;
-
-#include "cryptopp/dsa.h"
-using CryptoPP::DSAConvertSignatureFormat;
-using CryptoPP::DSA_DER;
-using CryptoPP::DSA_P1363;
-
-// ASN1 is a namespace, not an object
-#include "cryptopp/asn.h"
-using namespace CryptoPP::ASN1;
-
-#include "cryptopp/integer.h"
-using CryptoPP::Integer;
-
-
-#include "cpp_utils.hpp"
-#include "c_timing.h"
-
-static jclass provider_class;
-static AutoSeededRandomPool rng;
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_CryptoppLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeProvider$Cryptopp");
- provider_class = (jclass) env->NewGlobalRef(local_provider_class);
-
- jmethodID init = env->GetMethodID(local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- std::string lib_name = "Crypto++";
-
- int lib_version = CRYPTOPP_VERSION;
- std::string info_str = std::to_string(lib_version);
- std::stringstream ss;
- ss << lib_name << " ";
- ss << info_str[0];
- for (size_t i = 1; i < info_str.size(); ++i) {
- ss << "." << info_str[i];
- }
-
- jstring name = env->NewStringUTF(lib_name.c_str());
- double version = lib_version / 100;
- jstring info = env->NewStringUTF(ss.str().c_str());
-
- return env->NewObject(provider_class, init, name, version, info);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Cryptopp_setup(JNIEnv *env, jobject self){
- jmethodID provider_put = env->GetMethodID(provider_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
-
- add_kpg(env, "ECDH", "CryptoppECDH", self, provider_put);
- add_kpg(env, "ECDSA", "CryptoppECDSA", self, provider_put);
-
- add_ka(env, "ECDH", "CryptoppECDH", self, provider_put);
-
- add_sig(env, "SHA1withECDSA", "CryptoppECDSAwithSHA1", self, provider_put);
- add_sig(env, "SHA224withECDSA", "CryptoppECDSAwithSHA224", self, provider_put);
- add_sig(env, "SHA256withECDSA", "CryptoppECDSAwithSHA256", self, provider_put);
- add_sig(env, "SHA384withECDSA", "CryptoppECDSAwithSHA384", self, provider_put);
- add_sig(env, "SHA512withECDSA", "CryptoppECDSAwithSHA512", self, provider_put);
-
- init_classes(env, "Cryptopp");
-}
-
-template <class EC> static std::vector<OID> get_curve_oids() {
- std::vector<OID> oids;
- OID it = OID();
- do {
- it = DL_GroupParameters_EC<EC>::GetNextRecommendedParametersOID(it);
- if (it == OID()) {
- break;
- }
- oids.push_back(it);
- } while (true);
-
- return oids;
-}
-
-static std::vector<OID> get_all_curve_oids() {
- std::vector<OID> ecp_oids = get_curve_oids<ECP>();
- std::vector<OID> ec2n_oids = get_curve_oids<EC2N>();
-
- std::vector<OID> all_oids;
- all_oids.insert(all_oids.end(), ecp_oids.begin(), ecp_oids.end());
- all_oids.insert(all_oids.end(), ec2n_oids.begin(), ec2n_oids.end());
- return all_oids;
-}
-
-static std::string oid_to_str(const OID &oid) {
- const std::vector<CryptoPP::word32>& oid_values = oid.GetValues();
- std::stringstream ss;
- for (size_t i = 0; i < oid_values.size(); ++i) {
- if(i != 0)
- ss << ".";
- ss << std::to_string(oid_values[i]);
- }
- return ss.str();
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_CryptoppLib_getCurves(JNIEnv *env, jobject self){
- jclass set_class = env->FindClass("java/util/TreeSet");
-
- jmethodID set_ctr = env->GetMethodID(set_class, "<init>", "()V");
- jmethodID set_add = env->GetMethodID(set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = env->NewObject(set_class, set_ctr);
-
- std::vector<OID> all_oids = get_all_curve_oids();
-
- for (auto oid = all_oids.begin(); oid != all_oids.end(); ++oid) {
- jstring name_str = env->NewStringUTF(oid_to_str(*oid).c_str());
- env->CallBooleanMethod(result, set_add, name_str);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_keysizeSupported(JNIEnv *env, jobject self, jint keysize){
- std::vector<OID> ecp_oids = get_curve_oids<ECP>();
- for (auto oid = ecp_oids.begin(); oid != ecp_oids.end(); ++oid) {
- DL_GroupParameters_EC<ECP> group(*oid);
- if (((jint) group.GetCurve().GetField().MaxElementBitLength()) == keysize) {
- return JNI_TRUE;
- }
- }
-
- std::vector<OID> e2n_oids = get_curve_oids<EC2N>();
- for (auto oid = e2n_oids.begin(); oid != e2n_oids.end(); ++oid) {
- DL_GroupParameters_EC<EC2N> group(*oid);
- if (((jint) group.GetCurve().FieldSize().ConvertToLong()) == keysize) {
- return JNI_TRUE;
- }
- }
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if (env->IsInstanceOf(params, ec_parameter_spec_class)) {
- // Any custom params should be supported.
- return JNI_TRUE;
- } else if (env->IsInstanceOf(params, ecgen_parameter_spec_class)) {
- // Compare with OIDs I guess?
- jmethodID get_name = env->GetMethodID(ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (jstring) env->CallObjectMethod(params, get_name);
- const char *utf_name = env->GetStringUTFChars(name, NULL);
- std::string str_name(utf_name);
- env->ReleaseStringUTFChars(name, utf_name);
-
- std::vector<OID> all_oids = get_all_curve_oids();
- for (auto oid = all_oids.begin(); oid != all_oids.end(); ++oid) {
- std::string oid_s = oid_to_str(*oid);
- if (str_name == oid_s) {
- return JNI_TRUE;
- }
- }
- }
- return JNI_FALSE;
-}
-
-static Integer integer_from_biginteger(JNIEnv *env, jobject bigint) {
- jmethodID to_byte_array = env->GetMethodID(biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) env->CallObjectMethod(bigint, to_byte_array);
- jsize byte_length = env->GetArrayLength(byte_array);
- jbyte *byte_data = env->GetByteArrayElements(byte_array, NULL);
- Integer result((byte *) byte_data, (size_t) byte_length);
- env->ReleaseByteArrayElements(byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-static jobject biginteger_from_integer(JNIEnv *env, const Integer &integer) {
- jbyteArray byte_array = (jbyteArray) env->NewByteArray(integer.MinEncodedSize());
-
- jbyte *bigint_bytes = env->GetByteArrayElements(byte_array, NULL);
- integer.Encode((byte *) bigint_bytes, integer.MinEncodedSize());
- env->ReleaseByteArrayElements(byte_array, bigint_bytes, 0);
-
- jmethodID biginteger_init = env->GetMethodID(biginteger_class, "<init>", "(I[B)V");
- return env->NewObject(biginteger_class, biginteger_init, (jint) 1, byte_array);
-}
-
-static jobject biginteger_from_polmod2(JNIEnv *env, const PolynomialMod2 &polmod) {
- jmethodID biginteger_init = env->GetMethodID(biginteger_class, "<init>", "(I[B)V");
-
- jbyteArray mod_array = env->NewByteArray(polmod.MinEncodedSize());
- jbyte *mod_data = env->GetByteArrayElements(mod_array, NULL);
- polmod.Encode((byte *) mod_data, polmod.MinEncodedSize());
- env->ReleaseByteArrayElements(mod_array, mod_data, 0);
-
- return env->NewObject(biginteger_class, biginteger_init, (jint) 1, mod_array);
-}
-
-static std::unique_ptr<DL_GroupParameters_EC<ECP>> fp_group_from_params(JNIEnv *env, jobject params) {
- if (env->IsInstanceOf(params, ec_parameter_spec_class)) {
- jmethodID get_curve = env->GetMethodID(ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = env->CallObjectMethod(params, get_curve);
-
- jmethodID get_field = env->GetMethodID(elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = env->CallObjectMethod(elliptic_curve, get_field);
-
- if (!env->IsInstanceOf(field, fp_field_class)) {
- return nullptr;
- }
-
- jmethodID get_a = env->GetMethodID(elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = env->CallObjectMethod(elliptic_curve, get_a);
- Integer ai = integer_from_biginteger(env, a);
-
- jmethodID get_b = env->GetMethodID(elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = env->CallObjectMethod(elliptic_curve, get_b);
- Integer bi = integer_from_biginteger(env, b);
-
- jmethodID get_g = env->GetMethodID(ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = env->CallObjectMethod(params, get_g);
-
- jmethodID get_x = env->GetMethodID(point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = env->CallObjectMethod(g, get_x);
-
- jmethodID get_y = env->GetMethodID(point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = env->CallObjectMethod(g, get_y);
-
- jmethodID get_n = env->GetMethodID(ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = env->CallObjectMethod(params, get_n);
- Integer ni = integer_from_biginteger(env, n);
-
- jmethodID get_h = env->GetMethodID(ec_parameter_spec_class, "getCofactor", "()I");
- jint h = env->CallIntMethod(params, get_h);
- Integer hi(h);
-
- jmethodID get_p = env->GetMethodID(fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = env->CallObjectMethod(field, get_p);
- Integer pi = integer_from_biginteger(env, p);
-
- ECP curve(pi, ai, bi);
-
- Integer gxi = integer_from_biginteger(env, gx);
- Integer gyi = integer_from_biginteger(env, gy);
- ECP::Point g_point(gxi, gyi);
-
- return std::make_unique<DL_GroupParameters_EC<ECP>>(curve, g_point, ni, hi);
- } else if (env->IsInstanceOf(params, ecgen_parameter_spec_class)) {
- jmethodID get_name = env->GetMethodID(ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (jstring) env->CallObjectMethod(params, get_name);
- const char *utf_name = env->GetStringUTFChars(name, NULL);
- std::string str_name(utf_name);
- env->ReleaseStringUTFChars(name, utf_name);
-
- std::vector<OID> ecp_oids = get_curve_oids<ECP>();
- for (auto oid = ecp_oids.begin(); oid != ecp_oids.end(); ++oid) {
- std::string oid_s = oid_to_str(*oid);
- if (str_name == oid_s) {
- return std::make_unique<DL_GroupParameters_EC<ECP>>(*oid);
- }
- }
- }
-
- return nullptr;
-}
-
-static std::unique_ptr<DL_GroupParameters_EC<EC2N>> f2m_group_from_params(JNIEnv *env, jobject params) {
- if (env->IsInstanceOf(params, ec_parameter_spec_class)) {
- jmethodID get_curve = env->GetMethodID(ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = env->CallObjectMethod(params, get_curve);
-
- jmethodID get_field = env->GetMethodID(elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = env->CallObjectMethod(elliptic_curve, get_field);
-
- if (!env->IsInstanceOf(field, f2m_field_class)) {
- return nullptr;
- }
-
- jmethodID get_a = env->GetMethodID(elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = env->CallObjectMethod(elliptic_curve, get_a);
- Integer ai = integer_from_biginteger(env, a);
-
- jmethodID get_b = env->GetMethodID(elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = env->CallObjectMethod(elliptic_curve, get_b);
- Integer bi = integer_from_biginteger(env, b);
-
- jmethodID get_g = env->GetMethodID(ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = env->CallObjectMethod(params, get_g);
-
- jmethodID get_x = env->GetMethodID(point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = env->CallObjectMethod(g, get_x);
-
- jmethodID get_y = env->GetMethodID(point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = env->CallObjectMethod(g, get_y);
-
- jmethodID get_n = env->GetMethodID(ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = env->CallObjectMethod(params, get_n);
- Integer ni = integer_from_biginteger(env, n);
-
- jmethodID get_h = env->GetMethodID(ec_parameter_spec_class, "getCofactor", "()I");
- jint h = env->CallIntMethod(params, get_h);
- Integer hi(h);
-
- jmethodID get_midterms = env->GetMethodID(f2m_field_class, "getMidTermsOfReductionPolynomial", "()[I");
- jintArray midterms = (jintArray) env->CallObjectMethod(field, get_midterms);
- jsize midterm_length = env->GetArrayLength(midterms);
- jint *midterm_data = env->GetIntArrayElements(midterms, NULL);
-
- jmethodID get_m = env->GetMethodID(f2m_field_class, "getM", "()I");
- jint m = env->CallIntMethod(field, get_m);
-
- std::unique_ptr<GF2NP> base_field;
- if (midterm_length == 1) {
- //trinomial, use GF2NT
- base_field = std::make_unique<GF2NT>((unsigned int) m, (unsigned int) midterm_data[0], 0);
- } else {
- //pentanomial, use GF2NPP
- base_field = std::make_unique<GF2NPP>((unsigned int) m, (unsigned int) midterm_data[0], (unsigned int) midterm_data[1], (unsigned int) midterm_data[2], 0);
- }
- env->ReleaseIntArrayElements(midterms, midterm_data, JNI_ABORT);
-
- jmethodID to_byte_array = env->GetMethodID(biginteger_class, "toByteArray", "()[B");
- jbyteArray a_array = (jbyteArray) env->CallObjectMethod(a, to_byte_array);
- jsize a_length = env->GetArrayLength(a_array);
- jbyte *a_data = env->GetByteArrayElements(a_array, NULL);
-
- jbyteArray b_array = (jbyteArray) env->CallObjectMethod(b, to_byte_array);
- jsize b_length = env->GetArrayLength(b_array);
- jbyte *b_data = env->GetByteArrayElements(b_array, NULL);
-
- EC2N curve(*base_field, EC2N::FieldElement((byte *) a_data, (size_t) a_length), EC2N::FieldElement((byte *) b_data, (size_t) b_length));
- env->ReleaseByteArrayElements(a_array, a_data, JNI_ABORT);
- env->ReleaseByteArrayElements(b_array, b_data, JNI_ABORT);
-
- jbyteArray gx_array = (jbyteArray) env->CallObjectMethod(gx, to_byte_array);
- jsize gx_length = env->GetArrayLength(gx_array);
- jbyte *gx_data = env->GetByteArrayElements(gx_array, NULL);
- PolynomialMod2 gxm((byte *) gx_data, (size_t) gx_length);
- env->ReleaseByteArrayElements(gx_array, gx_data, JNI_ABORT);
-
- jbyteArray gy_array = (jbyteArray) env->CallObjectMethod(gy, to_byte_array);
- jsize gy_length = env->GetArrayLength(gy_array);
- jbyte *gy_data = env->GetByteArrayElements(gy_array, NULL);
- PolynomialMod2 gym((byte *) gy_data, (size_t) gy_length);
- env->ReleaseByteArrayElements(gy_array, gy_data, JNI_ABORT);
-
- EC2N::Point g_point(gxm, gym);
-
- return std::make_unique<DL_GroupParameters_EC<EC2N>>(curve, g_point, ni, hi);
- } else if (env->IsInstanceOf(params, ecgen_parameter_spec_class)) {
- jmethodID get_name = env->GetMethodID(ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (jstring) env->CallObjectMethod(params, get_name);
- const char *utf_name = env->GetStringUTFChars(name, NULL);
- std::string str_name(utf_name);
- env->ReleaseStringUTFChars(name, utf_name);
-
- std::vector<OID> e2n_oids = get_curve_oids<EC2N>();
- for (auto oid = e2n_oids.begin(); oid != e2n_oids.end(); ++oid) {
- std::string oid_s = oid_to_str(*oid);
- if (str_name == oid_s) {
- return std::make_unique<DL_GroupParameters_EC<EC2N>>(*oid);
- }
- }
- }
- return nullptr;
-}
-
-
-template <class EC> jobject finish_params(JNIEnv *env, jobject field, jobject a, jobject b, jobject gx, jobject gy, DL_GroupParameters_EC<EC> group) {
- jmethodID point_init = env->GetMethodID(point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = env->NewObject(point_class, point_init, gx, gy);
-
- jmethodID elliptic_curve_init = env->GetMethodID(elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = env->NewObject(elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- // Integer GetSubgroupOrder
- // Integer GetCofactor
- jobject order = biginteger_from_integer(env, group.GetSubgroupOrder());
- jint cofactor = (jint) group.GetCofactor().ConvertToLong();
-
- jmethodID ec_parameter_spec_init = env->GetMethodID(ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return env->NewObject(ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, order, cofactor);
-}
-
-template <class EC> jobject params_from_group(JNIEnv *env, DL_GroupParameters_EC<EC> group) {
- return NULL;
-}
-
-template <> jobject params_from_group<ECP>(JNIEnv *env, DL_GroupParameters_EC<ECP> group) {
- ECP curve = group.GetCurve();
- jmethodID fp_field_init = env->GetMethodID(fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- ModularArithmetic mod = curve.GetField();
- jobject p = biginteger_from_integer(env, mod.GetModulus());
- jobject a = biginteger_from_integer(env, curve.GetA());
- jobject b = biginteger_from_integer(env, curve.GetB());
-
- jobject field = env->NewObject(fp_field_class, fp_field_init, p);
-
- ECP::Point gp = group.GetBasePrecomputation().GetBase(group.GetGroupPrecomputation());
- jobject gx = biginteger_from_integer(env, gp.x);
- jobject gy = biginteger_from_integer(env, gp.y);
- return finish_params(env, field, a, b, gx, gy, group);
-}
-
-template <> jobject params_from_group<EC2N>(JNIEnv *env, DL_GroupParameters_EC<EC2N> group) {
- EC2N curve = group.GetCurve();
- PolynomialMod2 mod = curve.GetField().GetModulus();
- int m = mod.Degree();
- unsigned int coeff_count = mod.CoefficientCount();
- jintArray ks;
- int to_find;
- int found = 0;
- if (coeff_count == 3) {
- //trinomial
- ks = env->NewIntArray(1);
- to_find = 1;
- } else if (coeff_count == 5) {
- //pentanomial
- ks = env->NewIntArray(3);
- to_find = 3;
- } else {
- return NULL;
- }
- jint *ks_data = env->GetIntArrayElements(ks, NULL);
- for (int i = m - 1; i > 0 && found < to_find; --i) {
- if (mod.GetCoefficient(i) == 1) {
- ks_data[found++] = i;
- }
- }
- env->ReleaseIntArrayElements(ks, ks_data, 0);
-
- jmethodID f2m_field_init = env->GetMethodID(f2m_field_class, "<init>", "(I[I)V");
- jobject field = env->NewObject(f2m_field_class, f2m_field_init, (jint) m, ks);
-
- jobject a = biginteger_from_polmod2(env, curve.GetA());
- jobject b = biginteger_from_polmod2(env, curve.GetB());
-
- EC2N::Point gp = group.GetBasePrecomputation().GetBase(group.GetGroupPrecomputation());
- jobject gx = biginteger_from_polmod2(env, gp.x);
- jobject gy = biginteger_from_polmod2(env, gp.y);
- return finish_params(env, field, a, b, gx, gy, group);
-}
-
-template <class EC> jobject generate_from_group(JNIEnv *env, DL_GroupParameters_EC<EC> group, jobject params) {
- typename ECDH<EC>::Domain ec_domain(group);
- SecByteBlock priv(ec_domain.PrivateKeyLength()), pub(ec_domain.PublicKeyLength());
-
- try {
- native_timing_start();
- ec_domain.GenerateKeyPair(rng, priv, pub);
- native_timing_stop();
- } catch (Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- return NULL;
- }
-
- jbyteArray pub_bytearray = env->NewByteArray(pub.SizeInBytes());
- jbyte *pub_bytes = env->GetByteArrayElements(pub_bytearray, NULL);
- std::copy(pub.BytePtr(), pub.BytePtr()+pub.SizeInBytes(), pub_bytes);
- env->ReleaseByteArrayElements(pub_bytearray, pub_bytes, 0);
-
- jobject ec_pub_param_spec = env->NewLocalRef(params);
- jmethodID ec_pub_init = env->GetMethodID(pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = env->NewObject(pubkey_class, ec_pub_init, pub_bytearray, ec_pub_param_spec);
-
- jbyteArray priv_bytearray = env->NewByteArray(priv.SizeInBytes());
- jbyte *priv_bytes = env->GetByteArrayElements(priv_bytearray, NULL);
- std::copy(priv.BytePtr(), priv.BytePtr()+priv.SizeInBytes(), priv_bytes);
- env->ReleaseByteArrayElements(priv_bytearray, priv_bytes, 0);
-
- jobject ec_priv_param_spec = env->NewLocalRef(params);
- jmethodID ec_priv_init = env->GetMethodID(privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = env->NewObject(privkey_class, ec_priv_init, priv_bytearray, ec_priv_param_spec);
-
- jmethodID keypair_init = env->GetMethodID(keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- return env->NewObject(keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random){
- std::vector<OID> ecp_oids = get_curve_oids<ECP>();
- for (auto oid = ecp_oids.begin(); oid != ecp_oids.end(); ++oid) {
- DL_GroupParameters_EC<ECP> group(*oid);
- if (((jint) group.GetCurve().GetField().MaxElementBitLength()) == keysize) {
- jobject params = params_from_group(env, group);
- return generate_from_group<ECP>(env, group, params);
- }
- }
-
- std::vector<OID> e2n_oids = get_curve_oids<EC2N>();
- for (auto oid = e2n_oids.begin(); oid != e2n_oids.end(); ++oid) {
- DL_GroupParameters_EC<EC2N> group(*oid);
- if ((jint) group.GetCurve().FieldSize().ConvertToLong() == keysize) {
- jobject params = params_from_group(env, group);
- return generate_from_group<EC2N>(env, group, params);
- }
- }
- return NULL;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject self, jobject params, jobject random) {
- std::unique_ptr<DL_GroupParameters_EC<ECP>> ecp_group = fp_group_from_params(env, params);
- if (ecp_group == nullptr) {
- std::unique_ptr<DL_GroupParameters_EC<EC2N>> ec2n_group = f2m_group_from_params(env, params);
- return generate_from_group<EC2N>(env, *ec2n_group, params);
- } else {
- return generate_from_group<ECP>(env, *ecp_group, params);
- }
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Cryptopp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- jsize privkey_length = env->GetArrayLength(privkey);
- jbyte *privkey_data = env->GetByteArrayElements(privkey, NULL);
- SecByteBlock private_key((byte *) privkey_data, privkey_length);
- env->ReleaseByteArrayElements(privkey, privkey_data, JNI_ABORT);
-
- jsize pubkey_length = env->GetArrayLength(pubkey);
- jbyte *pubkey_data = env->GetByteArrayElements(pubkey, NULL);
- SecByteBlock public_key((byte *) pubkey_data, pubkey_length);
- env->ReleaseByteArrayElements(pubkey, pubkey_data, JNI_ABORT);
-
- bool success;
- std::unique_ptr<SecByteBlock> secret;
- std::unique_ptr<DL_GroupParameters_EC<ECP>> ecp_group = fp_group_from_params(env, params);
- if (ecp_group == nullptr) {
- std::unique_ptr<DL_GroupParameters_EC<EC2N>> ec2n_group = f2m_group_from_params(env, params);
- ECDH<EC2N>::Domain dh_agreement(*ec2n_group);
-
- try {
- secret = std::make_unique<SecByteBlock>(dh_agreement.AgreedValueLength());
- native_timing_start();
- success = dh_agreement.Agree(*secret, private_key, public_key);
- native_timing_stop();
- } catch (Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- return NULL;
- }
- } else {
- ECDH<ECP>::Domain dh_agreement(*ecp_group);
-
- try {
- secret = std::make_unique<SecByteBlock>(dh_agreement.AgreedValueLength());
- native_timing_start();
- success = dh_agreement.Agree(*secret, private_key, public_key);
- native_timing_stop();
- } catch (Exception & ex) {
- throw_new(env, "java/security/GeneralSecurityException", ex.what());
- return NULL;
- }
- }
- if (!success) {
- throw_new(env, "java/security/GeneralSecurityException", "Agreement was unsuccessful.");
- return NULL;
- }
-
- jbyteArray result = env->NewByteArray(secret->size());
- jbyte *result_data = env->GetByteArrayElements(result, NULL);
- std::copy(secret->begin(), secret->end(), result_data);
- env->ReleaseByteArrayElements(result, result_data, 0);
-
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Cryptopp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm){
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-template <class EC, class H>
-jbyteArray sign_message(JNIEnv *env, DL_GroupParameters_EC<EC> group, jbyteArray data, const Integer & private_key_x) {
-
- typename ECDSA<EC, H>::PrivateKey pkey;
- pkey.Initialize(group, private_key_x);
- typename ECDSA<EC, H>::Signer signer(pkey);
-
- std::string signature(signer.MaxSignatureLength(), 0);
-
- jsize data_length = env->GetArrayLength(data);
- jbyte *data_bytes = env->GetByteArrayElements(data, NULL);
- native_timing_start();
- size_t len = signer.SignMessage(rng, (byte *)data_bytes, data_length, (byte *)signature.c_str());
- native_timing_stop();
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
- signature.resize(len);
-
- byte sig[4096];
- size_t sig_len = DSAConvertSignatureFormat(sig, sizeof(sig), DSA_DER, (byte *)signature.c_str(), len, DSA_P1363);
-
- jbyteArray result = env->NewByteArray(sig_len);
- jbyte *result_bytes = env->GetByteArrayElements(result, NULL);
- std::copy(sig, sig+sig_len, result_bytes);
- env->ReleaseByteArrayElements(result, result_bytes, 0);
-
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Cryptopp_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params) {
- jclass cryptopp_sig_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Cryptopp");
- jfieldID type_id = env->GetFieldID(cryptopp_sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char *type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- jsize privkey_length = env->GetArrayLength(privkey);
- jbyte *privkey_data = env->GetByteArrayElements(privkey, NULL);
- Integer private_key_x((byte *) privkey_data, (size_t) privkey_length);
- env->ReleaseByteArrayElements(privkey, privkey_data, JNI_ABORT);
-
- jbyteArray result = NULL;
-
- std::unique_ptr<DL_GroupParameters_EC<ECP>> ecp_group = fp_group_from_params(env, params);
- if (ecp_group == nullptr) {
- std::unique_ptr<DL_GroupParameters_EC<EC2N>> ec2n_group = f2m_group_from_params(env, params);
- if (type_str.find("SHA1") != std::string::npos) {
- result = sign_message<EC2N, SHA1>(env, *ec2n_group, data, private_key_x);
- } else if (type_str.find("SHA224") != std::string::npos) {
- result = sign_message<EC2N, SHA224>(env, *ec2n_group, data, private_key_x);
- } else if (type_str.find("SHA256") != std::string::npos) {
- result = sign_message<EC2N, SHA256>(env, *ec2n_group, data, private_key_x);
- } else if (type_str.find("SHA384") != std::string::npos) {
- result = sign_message<EC2N, SHA384>(env, *ec2n_group, data, private_key_x);
- } else if (type_str.find("SHA512") != std::string::npos) {
- result = sign_message<EC2N, SHA512>(env, *ec2n_group, data, private_key_x);
- }
- } else {
- if (type_str.find("SHA1") != std::string::npos) {
- result = sign_message<ECP, SHA1>(env, *ecp_group, data, private_key_x);
- } else if (type_str.find("SHA224") != std::string::npos) {
- result = sign_message<ECP, SHA224>(env, *ecp_group, data, private_key_x);
- } else if (type_str.find("SHA256") != std::string::npos) {
- result = sign_message<ECP, SHA256>(env, *ecp_group, data, private_key_x);
- } else if (type_str.find("SHA384") != std::string::npos) {
- result = sign_message<ECP, SHA384>(env, *ecp_group, data, private_key_x);
- } else if (type_str.find("SHA512") != std::string::npos) {
- result = sign_message<ECP, SHA512>(env, *ecp_group, data, private_key_x);
- }
- }
-
- return result;
-}
-
-template <class EC, class H>
-jboolean verify_message(JNIEnv *env, DL_GroupParameters_EC<EC> group, jbyteArray data, jbyteArray signature, jbyteArray pubkey) {
- typename EC::Point pkey_point;
- jsize pubkey_length = env->GetArrayLength(pubkey);
- jbyte *pubkey_data = env->GetByteArrayElements(pubkey, NULL);
- group.GetCurve().DecodePoint(pkey_point, (byte *)pubkey_data, pubkey_length);
- env->ReleaseByteArrayElements(pubkey, pubkey_data, JNI_ABORT);
-
- typename ECDSA<EC, H>::PublicKey pkey;
- pkey.Initialize(group, pkey_point);
- typename ECDSA<EC, H>::Verifier verifier(pkey);
-
- size_t bit_length = group.GetCurve().GetField().MaxElementBitLength();
- size_t bytes = (bit_length + 7)/8;
-
- jsize sig_length = env->GetArrayLength(signature);
- jbyte *sig_bytes = env->GetByteArrayElements(signature, NULL);
-
- byte sig[bytes * 2];
- size_t sig_len = DSAConvertSignatureFormat(sig, bytes * 2, DSA_P1363, (byte *)sig_bytes, sig_length, DSA_DER);
- env->ReleaseByteArrayElements(signature, sig_bytes, JNI_ABORT);
-
- jsize data_length = env->GetArrayLength(data);
- jbyte *data_bytes = env->GetByteArrayElements(data, NULL);
- native_timing_start();
- bool result = verifier.VerifyMessage((byte *)data_bytes, data_length, sig, sig_len);
- native_timing_stop();
- env->ReleaseByteArrayElements(data, data_bytes, JNI_ABORT);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Cryptopp_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- jclass cryptopp_sig_class = env->FindClass("cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Cryptopp");
- jfieldID type_id = env->GetFieldID(cryptopp_sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring) env->GetObjectField(self, type_id);
- const char *type_data = env->GetStringUTFChars(type, NULL);
- std::string type_str(type_data);
- env->ReleaseStringUTFChars(type, type_data);
-
- std::unique_ptr<DL_GroupParameters_EC<ECP>> ecp_group = fp_group_from_params(env, params);
- if (ecp_group == nullptr) {
- std::unique_ptr<DL_GroupParameters_EC<EC2N>> ec2n_group = f2m_group_from_params(env, params);
-
- if (type_str.find("SHA1") != std::string::npos) {
- return verify_message<EC2N, SHA1>(env, *ec2n_group, data, signature, pubkey);
- } else if (type_str.find("SHA224") != std::string::npos) {
- return verify_message<EC2N, SHA224>(env, *ec2n_group, data, signature, pubkey);
- } else if (type_str.find("SHA256") != std::string::npos) {
- return verify_message<EC2N, SHA256>(env, *ec2n_group, data, signature, pubkey);
- } else if (type_str.find("SHA384") != std::string::npos) {
- return verify_message<EC2N, SHA384>(env, *ec2n_group, data, signature, pubkey);
- } else if (type_str.find("SHA512") != std::string::npos) {
- return verify_message<EC2N, SHA512>(env, *ec2n_group, data, signature, pubkey);
- }
- } else {
- if (type_str.find("SHA1") != std::string::npos) {
- return verify_message<ECP, SHA1>(env, *ecp_group, data, signature, pubkey);
- } else if (type_str.find("SHA224") != std::string::npos) {
- return verify_message<ECP, SHA224>(env, *ecp_group, data, signature, pubkey);
- } else if (type_str.find("SHA256") != std::string::npos) {
- return verify_message<ECP, SHA256>(env, *ecp_group, data, signature, pubkey);
- } else if (type_str.find("SHA384") != std::string::npos) {
- return verify_message<ECP, SHA384>(env, *ecp_group, data, signature, pubkey);
- } else if (type_str.find("SHA512") != std::string::npos) {
- return verify_message<ECP, SHA512>(env, *ecp_group, data, signature, pubkey);
- }
- }
- // unreachable
- return JNI_FALSE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/gcrypt.c b/src/cz/crcs/ectester/standalone/libs/jni/gcrypt.c
deleted file mode 100644
index 5d29d2c..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/gcrypt.c
+++ /dev/null
@@ -1,623 +0,0 @@
-#include "native.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <stdbool.h>
-#include <gcrypt.h>
-#include "c_utils.h"
-#include "c_timing.h"
-
-static jclass provider_class;
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_GcryptLib_createProvider(JNIEnv *env, jobject this){
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Gcrypt");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- const char *running_with = gcry_check_version(GCRYPT_VERSION);
- if (!running_with) {
- return NULL;
- }
- char full_name[strlen("libgcrypt ") + strlen(running_with) + 1];
- strcpy(full_name, "libgcrypt ");
- strcat(full_name, running_with);
- jstring name = (*env)->NewStringUTF(env, full_name);
- double version = strtod(running_with, NULL);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Gcrypt_setup(JNIEnv *env, jobject this) {
- gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
- //gcry_control(GCRYCTL_SET_DEBUG_FLAGS, 1);
- gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
-
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, this, "EC", "Gcrypt");
- ADD_KA(env, this, "ECDH", "GcryptECDH");
- ADD_SIG(env, this, "NONEwithECDSA", "GcryptECDSAwithNONE");
- ADD_SIG(env, this, "SHA1withECDSA", "GcryptECDSAwithSHA1");
- ADD_SIG(env, this, "SHA224withECDSA", "GcryptECDSAwithSHA224");
- ADD_SIG(env, this, "SHA256withECDSA", "GcryptECDSAwithSHA256");
- ADD_SIG(env, this, "SHA384withECDSA", "GcryptECDSAwithSHA384");
- ADD_SIG(env, this, "SHA512withECDSA", "GcryptECDSAwithSHA512");
- ADD_SIG(env, this, "SHA1withECDDSA", "GcryptECDDSAwithSHA1");
- ADD_SIG(env, this, "SHA224withECDDSA", "GcryptECDDSAwithSHA224");
- ADD_SIG(env, this, "SHA256withECDDSA", "GcryptECDDSAwithSHA256");
- ADD_SIG(env, this, "SHA384withECDDSA", "GcryptECDDSAwithSHA384");
- ADD_SIG(env, this, "SHA512withECDDSA", "GcryptECDDSAwithSHA512");
-
- init_classes(env, "Gcrypt");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_GcryptLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- const char *name;
- unsigned int nbits;
-
- for (size_t i = 0; (name = gcry_pk_get_curve(NULL, i, &nbits)); i++){
- jstring curve_name = (*env)->NewStringUTF(env, name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_keysizeSupported(JNIEnv *env, jobject this, jint keysize) {
- const char *name;
- unsigned int nbits;
-
- for (size_t i = 0; (name = gcry_pk_get_curve(NULL, i, &nbits)); i++){
- if (nbits == keysize) {
- return JNI_TRUE;
- }
- }
-
- return JNI_FALSE;
-}
-
-/*
-static void print_sexp(gcry_sexp_t sexp) {
- size_t len = gcry_sexp_sprint(sexp, GCRYSEXP_FMT_ADVANCED, NULL, 0);
- char string[len];
- gcry_sexp_sprint(sexp, GCRYSEXP_FMT_ADVANCED, string, len);
- printf("%s\n", string);
- fflush(stdout);
-}
-
-static void print_chrray(unsigned char *arr, size_t len) {
- for (size_t i = 0; i < len; ++i) {
- printf("%02x,", ((unsigned char) arr[i] & 0xff));
- }
- printf("\n");
-}
-*/
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_paramsSupported(JNIEnv *env, jobject this, jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- return JNI_FALSE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- gcry_sexp_t curve_sexp;
- gcry_sexp_build(&curve_sexp, NULL, "(public-key (ecc (curve %s)))", utf_name);
- unsigned int nbits;
- const char *ret_name = gcry_pk_get_curve(curve_sexp, 0, &nbits);
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- gcry_sexp_release(curve_sexp);
- return ret_name ? JNI_TRUE : JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-static gcry_mpi_t bytearray_to_mpi(JNIEnv *env, jbyteArray array) {
- if (!array) {
- return NULL;
- }
-
- gcry_mpi_t result;
-
- size_t length = (*env)->GetArrayLength(env, array);
- jbyte data[length + 1];
- data[0] = 0;
- (*env)->GetByteArrayRegion(env, array, 0, length, data + 1);
- gcry_mpi_scan(&result, GCRYMPI_FMT_STD, data, length + 1, NULL);
- return result;
-}
-
-static jbyteArray mpi_to_bytearray0(JNIEnv *env, gcry_mpi_t mpi, size_t start, size_t len) {
- if (!mpi) {
- return NULL;
- }
-
- size_t mpi_len = 0;
- gcry_mpi_print(GCRYMPI_FMT_USG, NULL, 0, &mpi_len, mpi);
- if (start >= mpi_len) {
- return NULL;
- }
- if (start + len > mpi_len || len == 0) {
- len = mpi_len - start;
- }
- unsigned char buff[mpi_len];
- gcry_mpi_print(GCRYMPI_FMT_USG, buff, mpi_len, NULL, mpi);
- jbyteArray bytes = (*env)->NewByteArray(env, len);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- memcpy(data, buff + start, len);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- return bytes;
-}
-
-static jbyteArray mpi_to_bytearray(JNIEnv *env, gcry_mpi_t mpi) {
- return mpi_to_bytearray0(env, mpi, 0, 0);
-}
-
-static jobject mpi_to_biginteger(JNIEnv *env, gcry_mpi_t mpi) {
- if (!mpi) {
- return NULL;
- }
-
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- jbyteArray bytes = mpi_to_bytearray(env, mpi);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static gcry_mpi_t biginteger_to_mpi(JNIEnv *env, jobject bigint) {
- if (!bigint) {
- return NULL;
- }
-
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, bigint, to_byte_array);
- return bytearray_to_mpi(env, byte_array);
-}
-
-static jint mpi_to_jint(gcry_mpi_t mpi) {
- jint result = 0;
- unsigned long nbits = gcry_mpi_get_nbits(mpi);
- int max_bits = sizeof(jint) * 8;
- for (size_t i = 0; i < nbits && i < max_bits; ++i) {
- if (gcry_mpi_test_bit(mpi, nbits - i - 1)) {
- result = ((result << 1) | 1);
- } else {
- result = (result << 1);
- }
- }
- return result;
-}
-
-static jobject buff_to_ecpoint(JNIEnv *env, gcry_buffer_t buff) {
- jint coord_size = (buff.len - 1) / 2;
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
-
- jbyteArray x_bytes = (*env)->NewByteArray(env, coord_size);
- jbyte *x_data = (*env)->GetByteArrayElements(env, x_bytes, NULL);
- memcpy(x_data, ((char *) buff.data) + 1, coord_size);
- (*env)->ReleaseByteArrayElements(env, x_bytes, x_data, 0);
- jobject xi = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, x_bytes);
-
- jbyteArray y_bytes = (*env)->NewByteArray(env, coord_size);
- jbyte *y_data = (*env)->GetByteArrayElements(env, y_bytes, NULL);
- memcpy(y_data, ((char *) buff.data) + 1 + coord_size, coord_size);
- (*env)->ReleaseByteArrayElements(env, y_bytes, y_data, 0);
- jobject yi = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, y_bytes);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- return (*env)->NewObject(env, point_class, point_init, xi, yi);
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, gcry_sexp_t key) {
- jobject result = NULL;
- gcry_mpi_t p, a, b, n, h;
- gcry_buffer_t g = {0};
- gcry_error_t err = gcry_sexp_extract_param(key, "ecc", "pab&g+nh", &p, &a, &b, &g, &n, &h, NULL);
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error exporting domain parameters. Error: %ui", gcry_err_code(err));
- goto end;
- }
-
- jobject pi = mpi_to_biginteger(env, p);
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, pi);
-
- jobject ai = mpi_to_biginteger(env, a);
- jobject bi = mpi_to_biginteger(env, b);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, ai, bi);
-
- jobject gen = buff_to_ecpoint(env, g);
-
- jobject order = mpi_to_biginteger(env, n);
- jint cofactor = mpi_to_jint(h);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- result = (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, gen, order, cofactor);
-
-end:
- gcry_mpi_release(p);
- gcry_mpi_release(a);
- gcry_mpi_release(b);
- gcry_free(g.data);
- gcry_mpi_release(n);
- gcry_mpi_release(h);
- return result;
-}
-
-static jobject generate_from_sexp(JNIEnv *env, gcry_sexp_t gen_sexp) {
- jobject result = NULL;
- gcry_sexp_t key_sexp;
-
- native_timing_start();
- gcry_error_t err = gcry_pk_genkey(&key_sexp, gen_sexp);
- native_timing_stop();
-
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error generating key. Error: %ui", gcry_err_code(err));
- goto release_sexp;
- }
- gcry_sexp_t pkey = gcry_sexp_find_token(key_sexp, "public-key", 0);
- gcry_sexp_t skey = gcry_sexp_find_token(key_sexp, "private-key", 0);
-
- jobject ec_param_spec = create_ec_param_spec(env, skey);
- if (!ec_param_spec) {
- goto release_keypair;
- }
-
- gcry_buffer_t q = {0};
- gcry_mpi_t d;
- err = gcry_sexp_extract_param(skey, "ecc", "&q+d", &q, &d, NULL);
-
- jbyteArray pub_bytes = (*env)->NewByteArray(env, q.size);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- memcpy(key_pub, q.data, q.size);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- size_t priv_len = 0;
- gcry_mpi_print(GCRYMPI_FMT_USG, NULL, 0, &priv_len, d);
- jbyteArray priv_bytes = (*env)->NewByteArray(env, priv_len);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- gcry_mpi_print(GCRYMPI_FMT_USG, (unsigned char *) key_priv, priv_len, NULL, d);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- result = (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-
- gcry_mpi_release(d);
- gcry_free(q.data);
-
-release_keypair:
- gcry_sexp_release(pkey);
- gcry_sexp_release(skey);
-release_sexp:
- gcry_sexp_release(key_sexp);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject this, jint keysize, jobject random) {
- gcry_sexp_t gen_sexp;
- gcry_sexp_build(&gen_sexp, NULL, "(genkey (ecc (flags no-keytest param) (nbits %d)))", keysize);
-
- jobject result = generate_from_sexp(env, gen_sexp);
- gcry_sexp_release(gen_sexp);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject this, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- return NULL;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- gcry_sexp_t gen_sexp;
- gcry_sexp_build(&gen_sexp, NULL, "(genkey (ecc (flags no-keytest param) (curve %s)))", utf_name);
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- jobject result = generate_from_sexp(env, gen_sexp);
- gcry_sexp_release(gen_sexp);
- return result;
- } else {
- return NULL;
- }
-}
-
-static gcry_sexp_t create_key(JNIEnv *env, jobject ec_param_spec, const char *key_fmt, gcry_mpi_t q, gcry_mpi_t d) {
- gcry_mpi_t p, a, b, g, n, h;
-
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, ec_param_spec, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- jint bytes = (bits + 7) / 8;
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject big_a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
- a = biginteger_to_mpi(env, big_a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject big_b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
- b = biginteger_to_mpi(env, big_b);
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject big_p = (*env)->CallObjectMethod(env, field, get_p);
- p = biginteger_to_mpi(env, big_p);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g_point = (*env)->CallObjectMethod(env, ec_param_spec, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g_point, get_x);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g_point, get_y);
-
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray gx_bytes = (jbyteArray) (*env)->CallObjectMethod(env, gx, to_byte_array);
- size_t gx_len = (*env)->GetArrayLength(env, gx_bytes);
- jbyteArray gy_bytes = (jbyteArray) (*env)->CallObjectMethod(env, gy, to_byte_array);
- size_t gy_len = (*env)->GetArrayLength(env, gy_bytes);
- unsigned char g_data[1 + 2 * bytes];
- g_data[0] = 0x04;
- jbyte *gx_data = (*env)->GetByteArrayElements(env, gx_bytes, NULL);
- memcpy(g_data + 1, gx_data + (gx_len - bytes), bytes);
- (*env)->ReleaseByteArrayElements(env, gx_bytes, gx_data, JNI_ABORT);
- jbyte *gy_data = (*env)->GetByteArrayElements(env, gy_bytes, NULL);
- memcpy(g_data + 1 + bytes, gy_data + (gy_len - bytes), bytes);
- (*env)->ReleaseByteArrayElements(env, gy_bytes, gy_data, JNI_ABORT);
-
- gcry_mpi_scan(&g, GCRYMPI_FMT_USG, g_data, 1 + 2 * bytes, NULL);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject big_n = (*env)->CallObjectMethod(env, ec_param_spec, get_n);
- n = biginteger_to_mpi(env, big_n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint jh = (*env)->CallIntMethod(env, ec_param_spec, get_h);
- h = gcry_mpi_set_ui(NULL, jh);
-
- gcry_sexp_t inner = NULL;
- if (q && d) {
- gcry_sexp_build(&inner, NULL, "(ecc (flags param) (p %m) (a %m) (b %m) (g %m) (n %m) (h %m) (q %M) (d %M))", p, a, b, g, n, h, q, d, NULL);
- } else if (q && !d) {
- gcry_sexp_build(&inner, NULL, "(ecc (flags param) (p %m) (a %m) (b %m) (g %m) (n %m) (h %m) (q %m))", p, a, b, g, n, h, q, NULL);
- } else if (!q && d) {
- gcry_sexp_build(&inner, NULL, "(ecc (flags param) (p %m) (a %m) (b %m) (g %m) (n %m) (h %m) (d %m))", p, a, b, g, n, h, d, NULL);
- }
- gcry_sexp_t result;
- gcry_sexp_build(&result, NULL, key_fmt, inner, NULL);
- gcry_sexp_release(inner);
- return result;
-}
-
-static gcry_sexp_t create_pubkey(JNIEnv *env, jobject ec_param_spec, jbyteArray pubkey) {
- gcry_mpi_t q = bytearray_to_mpi(env, pubkey);
- gcry_sexp_t result = create_key(env, ec_param_spec, "(public-key %S)", q, NULL);
- gcry_mpi_release(q);
- return result;
-}
-
-static gcry_sexp_t create_privkey(JNIEnv *env, jobject ec_param_spec, jbyteArray pubkey, jbyteArray privkey) {
- gcry_mpi_t q = bytearray_to_mpi(env, pubkey);
- gcry_mpi_t d = bytearray_to_mpi(env, privkey);
- gcry_sexp_t result = create_key(env, ec_param_spec, "(private-key %S)", q, d);
- gcry_mpi_release(q);
- gcry_mpi_release(d);
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Gcrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- jbyteArray result = NULL;
- gcry_sexp_t pub = create_pubkey(env, params, pubkey);
- gcry_mpi_t priv = bytearray_to_mpi(env, privkey);
-
- gcry_sexp_t enc_sexp;
- gcry_sexp_build(&enc_sexp, NULL, "(data (flags raw) (value %M))", priv, NULL);
- gcry_sexp_t res_sexp;
- // TODO: figure out why ecc_encrypt_raw takes signed representation.. Nobody uses that., everybody uses unsigned reduced mod p.
-
- native_timing_start();
- gcry_error_t err = gcry_pk_encrypt(&res_sexp, enc_sexp, pub);
- native_timing_stop();
-
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error performing ECDH. Error: %ui", gcry_err_code(err));
- goto end;
- }
-
- gcry_mpi_t derived;
- err = gcry_sexp_extract_param(res_sexp, NULL, "s", &derived, NULL);
-
- size_t derived_bytes;
- gcry_mpi_print(GCRYMPI_FMT_USG, NULL, 0, &derived_bytes, derived);
- size_t coord_bytes = (derived_bytes - 1) / 2;
- result = mpi_to_bytearray0(env, derived, 1, coord_bytes);
-
- gcry_mpi_release(derived);
-end:
- gcry_sexp_release(enc_sexp);
- gcry_sexp_release(res_sexp);
- gcry_sexp_release(pub);
- gcry_mpi_release(priv);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Gcrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-static int starts_with(const char *whole, const char *prefix) {
- return !strncmp(whole, prefix, strlen(prefix));
-}
-
-static int get_hash_algo(const char *sig_type) {
- if (starts_with(sig_type, "SHA1")) {
- return GCRY_MD_SHA1;
- } else if (starts_with(sig_type, "SHA224")) {
- return GCRY_MD_SHA224;
- } else if (starts_with(sig_type, "SHA256")) {
- return GCRY_MD_SHA256;
- } else if (starts_with(sig_type, "SHA384")) {
- return GCRY_MD_SHA384;
- } else if (starts_with(sig_type, "SHA512")) {
- return GCRY_MD_SHA512;
- } else {
- return GCRY_MD_NONE;
- }
-}
-
-static const char *get_sig_algo(const char *sig_type) {
- const char *start = strstr(sig_type, "with") + strlen("with");
- if (starts_with(start, "ECDSA")) {
- return NULL;
- } else if (starts_with(start, "ECDDSA")) {
- return "rfc6979";
- } else {
- return NULL;
- }
-}
-
-static void get_sign_data_sexp(JNIEnv *env, gcry_sexp_t *result, jobject this, jbyteArray data) {
- jclass sig_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Gcrypt");
- jfieldID type_id = (*env)->GetFieldID(env, sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring)(*env)->GetObjectField(env, this, type_id);
- const char* type_data = (*env)->GetStringUTFChars(env, type, NULL);
- int hash_algo = get_hash_algo(type_data);
- const char *sig_algo = get_sig_algo(type_data);
- const char *with = strstr(type_data, "with");
- char hash_name[with - type_data + 1];
- memcpy(hash_name, type_data, with - type_data);
- for (size_t i = 0; i < with - type_data; ++i) {
- hash_name[i] = tolower(hash_name[i]);
- }
- hash_name[with - type_data] = 0;
- (*env)->ReleaseStringUTFChars(env, type, type_data);
-
- if (hash_algo == GCRY_MD_NONE) {
- gcry_mpi_t data_mpi = bytearray_to_mpi(env, data);
- gcry_sexp_build(result, NULL, "(data (flags raw param) (value %M))", data_mpi);
- gcry_mpi_release(data_mpi);
- } else {
- unsigned int hash_len = gcry_md_get_algo_dlen(hash_algo);
- size_t data_len = (*env)->GetArrayLength(env, data);
- jbyte *data_bytes = (*env)->GetByteArrayElements(env, data, NULL);
- unsigned char out_hash[hash_len];
- gcry_md_hash_buffer(hash_algo, out_hash, data_bytes, data_len);
- (*env)->ReleaseByteArrayElements(env, data, data_bytes, JNI_ABORT);
- gcry_mpi_t hash_mpi;
- gcry_mpi_scan(&hash_mpi, GCRYMPI_FMT_USG, out_hash, hash_len, NULL);
- if (!sig_algo) {
- gcry_sexp_build(result, NULL, "(data (flags raw param) (value %M))", hash_mpi);
- } else {
- gcry_sexp_build(result, NULL, "(data (flags %s param) (hash %s %M))", sig_algo, hash_name, hash_mpi);
- }
- gcry_mpi_release(hash_mpi);
- }
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Gcrypt_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- jbyteArray result = NULL;
- gcry_sexp_t priv_sexp = create_privkey(env, params, NULL, privkey);
-
- gcry_sexp_t data_sexp;
- get_sign_data_sexp(env, &data_sexp, this, data);
-
- gcry_sexp_t res_sexp;
- native_timing_start();
- gcry_error_t err = gcry_pk_sign(&res_sexp, data_sexp, priv_sexp);
- native_timing_stop();
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error performing ECDSA. Error: %ui", gcry_err_code(err));
- goto release_init;
- }
-
- gcry_buffer_t r_buf = {0};
- gcry_buffer_t s_buf = {0};
- err = gcry_sexp_extract_param(res_sexp, "ecdsa", "&rs", &r_buf, &s_buf, NULL);
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error extracting ECDSA output. Error: %ui", gcry_err_code(err));
- goto release_res;
- }
- result = asn1_der_encode(env, r_buf.data, r_buf.len, s_buf.data, s_buf.len);
-
- gcry_free(r_buf.data);
- gcry_free(s_buf.data);
-release_res:
- gcry_sexp_release(res_sexp);
-release_init:
- gcry_sexp_release(priv_sexp);
- gcry_sexp_release(data_sexp);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Gcrypt_verify(JNIEnv *env, jobject this, jbyteArray sig, jbyteArray data, jbyteArray pubkey, jobject params) {
- jboolean result = JNI_FALSE;
- gcry_sexp_t pub_sexp = create_pubkey(env, params, pubkey);
-
- gcry_sexp_t data_sexp;
- get_sign_data_sexp(env, &data_sexp, this, data);
-
- size_t r_len, s_len;
- jbyte *r_data, *s_data;
- bool decode = asn1_der_decode(env, sig, &r_data, &r_len, &s_data, &s_len);
- if (!decode) {
- throw_new(env, "java/security/GeneralSecurityException", "Error decoding sig.");
- goto release_init;
- }
-
- gcry_mpi_t r_mpi, s_mpi;
- gcry_mpi_scan(&r_mpi, GCRYMPI_FMT_USG, r_data, r_len, NULL);
- gcry_mpi_scan(&s_mpi, GCRYMPI_FMT_USG, s_data, s_len, NULL);
- free(r_data);
- free(s_data);
-
- gcry_sexp_t sig_sexp;
- gcry_sexp_build(&sig_sexp, NULL, "(sig-val (ecdsa (r %M) (s %M)))", r_mpi, s_mpi);
-
- native_timing_start();
- gcry_error_t err = gcry_pk_verify(sig_sexp, data_sexp, pub_sexp);
- native_timing_stop();
-
- if (gcry_err_code(err) != GPG_ERR_NO_ERROR) {
- if (gcry_err_code(err) != GPG_ERR_BAD_SIGNATURE) {
- throw_new(env, "java/security/GeneralSecurityException", "Error verif sig.");
- goto release_init;
- }
- } else {
- result = JNI_TRUE;
- }
-
-release_init:
- gcry_sexp_release(pub_sexp);
- gcry_sexp_release(data_sexp);
- return result;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/ippcp.c b/src/cz/crcs/ectester/standalone/libs/jni/ippcp.c
deleted file mode 100644
index 98a4c36..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/ippcp.c
+++ /dev/null
@@ -1,698 +0,0 @@
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include "native.h"
-
-#include <ippcp.h>
-
-#include "c_timing.h"
-#include "c_utils.h"
-
-#define _POSIX_C_SOURCE 200809L
-
-#include <stdio.h>
-#include <time.h>
-
-#define USE_SPEEDUP 1
-#define VALIDATE_CURVE 1
-#define VALIDATE_POINT 1
-
-static IppsPRNGState *prng_state;
-static jclass provider_class;
-
-/* This needs to be specified in this way because ippcp does not offer functionality to retrieve
- information about supported curves in any way. */
-typedef struct {
- const char name[128];
- IppECCType id;
- int size;
- IppStatus (*context_size_func)(int *);
- IppStatus (*init_func)(IppsECCPState *);
- IppStatus (*set_func)(IppsECCPState *);
- IppStatus (*precomp_func)(IppsECCPState *);
-} ippcp_curve;
-
-static const ippcp_curve CURVES[] = {
- {"secp112r1", IppECCPStd112r1, 112, NULL, NULL, NULL, NULL},
- {"secp112r2", IppECCPStd112r2, 112, NULL, NULL, NULL, NULL},
- {"secp128r1", IppECCPStd128r1, 128, ippsECCPGetSizeStd128r1, ippsECCPInitStd128r1, ippsECCPSetStd128r1, NULL},
- {"secp128r2", IppECCPStd128r2, 128, ippsECCPGetSizeStd128r2, ippsECCPInitStd128r2, ippsECCPSetStd128r2, NULL},
- {"secp160r1", IppECCPStd160r1, 160, NULL, NULL, NULL, NULL},
- {"secp160r2", IppECCPStd160r2, 160, NULL, NULL, NULL, NULL},
- {"secp192r1", IppECCPStd192r1, 192, ippsECCPGetSizeStd192r1, ippsECCPInitStd192r1, ippsECCPSetStd192r1, ippsECCPBindGxyTblStd192r1},
- {"secp224r1", IppECCPStd224r1, 224, ippsECCPGetSizeStd224r1, ippsECCPInitStd224r1, ippsECCPSetStd224r1, ippsECCPBindGxyTblStd224r1},
- {"secp256r1", IppECCPStd256r1, 256, ippsECCPGetSizeStd256r1, ippsECCPInitStd256r1, ippsECCPSetStd256r1, ippsECCPBindGxyTblStd256r1},
- {"secp384r1", IppECCPStd384r1, 384, ippsECCPGetSizeStd384r1, ippsECCPInitStd384r1, ippsECCPSetStd384r1, ippsECCPBindGxyTblStd384r1},
- {"secp521r1", IppECCPStd521r1, 521, ippsECCPGetSizeStd521r1, ippsECCPInitStd521r1, ippsECCPSetStd521r1, ippsECCPBindGxyTblStd521r1}};
-
-static const int NUM_CURVES = sizeof(CURVES) / sizeof(ippcp_curve);
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_IppcpLib_createProvider(JNIEnv *env, jobject this) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Ippcp");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- const IppLibraryVersion *lib = ippcpGetLibVersion();
- jstring name = (*env)->NewStringUTF(env, lib->Name);
- double version = (double)lib->major + ((double)lib->minor / 10);
- jstring info = (*env)->NewStringUTF(env, lib->Version);
-
- // printf("%s\n%s\n%d.%d.%d.%d\n", lib->Name, lib->Version, lib->major, lib->minor, lib->majorBuild, lib->build);
-
- return (*env)->NewObject(env, provider_class, init, name, version, info);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Ippcp_setup(JNIEnv *env, jobject this) {
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, this, "EC", "Ippcp");
- ADD_KA(env, this, "ECDH", "IppcpECDH");
- ADD_SIG(env, this, "NONEwithECDSA", "IppcpECDSAwithNONE");
-
- /* Init the PRNG. */
- int prng_size;
- ippsPRNGGetSize(&prng_size);
- prng_state = malloc(prng_size);
- ippsPRNGInit(160, prng_state);
- /* We need to manually seed the PRNG, let's hope that everyone using ippcp does this.
- Otherwise: nonce reuse in ECDSA, whoops! */
- int seed_len = 8;
- Ipp32u seed[seed_len];
- IppStatus res = ippsTRNGenRDSEED(seed, sizeof(seed) * 8, NULL);
- if (res != ippStsNoErr) {
- res = ippsPRNGenRDRAND(seed, sizeof(seed) * 8, NULL);
- }
- if (res != ippStsNoErr) {
- FILE *urandom = fopen("/dev/urandom", "rb");
- if (urandom) {
- size_t read = 0;
- while (read < sizeof(seed)) {
- read += fread(((uint8_t *)&seed) + read, 1, sizeof(seed) - read, urandom);
- }
- fclose(urandom);
- res = ippStsNoErr;
- }
- }
- if (res != ippStsNoErr) {
- struct timespec t;
- if (!clock_gettime(CLOCK_REALTIME, &t)) {
- memcpy(seed, &t.tv_nsec, sizeof(t.tv_nsec) > sizeof(seed) ? sizeof(seed) : sizeof(t.tv_nsec));
- } else {
- time_t tim = time(NULL);
- memcpy(seed, &tim, sizeof(time_t) > sizeof(seed) ? sizeof(seed) : sizeof(time_t));
- }
- }
- int bn_size;
- ippsBigNumGetSize(seed_len, &bn_size);
- uint8_t bn_buf[bn_size];
- IppsBigNumState *bn = (IppsBigNumState *)bn_buf;
- ippsBigNumInit(seed_len, bn);
- ippsSet_BN(IppsBigNumPOS, seed_len, seed, bn);
- ippsPRNGSetSeed(bn, prng_state);
-
- init_classes(env, "Ippcp");
-}
-
-static IppStatus prng_wrapper(Ipp32u *pRand, int nBits, void *pCtx) {
- native_timing_pause();
- IppStatus result = ippsPRNGen(pRand, nBits, pCtx);
- native_timing_restart();
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_IppcpLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- for (size_t i = 0; i < NUM_CURVES; ++i) {
- jstring curve_name = (*env)->NewStringUTF(env, CURVES[i].name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_keysizeSupported(JNIEnv *env,
- jobject this,
- jint keysize) {
- for (size_t i = 0; i < NUM_CURVES; ++i) {
- if (CURVES[i].size == keysize) {
- return JNI_TRUE;
- }
- }
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_paramsSupported(JNIEnv *env,
- jobject this,
- jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
- if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return JNI_FALSE;
- }
- return JNI_TRUE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- for (size_t i = 0; i < NUM_CURVES; ++i) {
- if (strcasecmp(utf_name, CURVES[i].name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-
-static IppsECCPPointState *new_point(int size) {
- int point_size;
- ippsECCPPointGetSize(size, &point_size);
- IppsECCPPointState *point = malloc(point_size);
- ippsECCPPointInit(size, point);
- return point;
-}
-
-static IppsBigNumState *new_bn(int bits) {
- int bn_size;
- int len = ((bits + 7) / 8) / sizeof(Ipp32u);
- ippsBigNumGetSize(len, &bn_size);
- IppsBigNumState *bn = malloc(bn_size);
- ippsBigNumInit(len, bn);
- return bn;
-}
-
-static void bn_get(IppsBigNumState *bn, uint8_t *buf, int lsb) {
- int size;
- ippsGetSize_BN(bn, &size);
- size *= sizeof(Ipp32u);
- uint8_t data[size];
- ippsGetOctString_BN(data, size, bn);
- memcpy(buf, data + (size - lsb), lsb);
-}
-
-static jobject bn_to_biginteger(JNIEnv *env, const IppsBigNumState *bn) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- int bn_size;
- ippsGetSize_BN(bn, &bn_size);
- bn_size *= sizeof(Ipp32u);
- jbyteArray bytes = (*env)->NewByteArray(env, bn_size);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- ippsGetOctString_BN((Ipp8u *) data, bn_size, bn);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static IppsBigNumState *biginteger_to_bn(JNIEnv *env, jobject bigint) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, bigint, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- IppsBigNumState *result = new_bn(byte_length * 8);
- ippsSetOctString_BN((Ipp8u *) byte_data, byte_length, result);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-/*
-static void biginteger_print(JNIEnv *env, jobject bigint) {
- jmethodID to_string = (*env)->GetMethodID(env, biginteger_class, "toString", "(I)Ljava/lang/String;");
- jstring big_string = (*env)->CallObjectMethod(env, bigint, to_string, (jint) 16);
-
- jsize len = (*env)->GetStringUTFLength(env, big_string);
- char raw_string[len + 1];
- raw_string[len] = 0;
- (*env)->GetStringUTFRegion(env, big_string, 0, len, raw_string);
- printf("%s\n", raw_string);
- fflush(stdout);
-}
-*/
-
-static IppsECCPState *create_curve(JNIEnv *env, jobject params, int *keysize) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
- IppsBigNumState *p_bn = biginteger_to_bn(env, p);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, curve, get_a);
- IppsBigNumState *a_bn = biginteger_to_bn(env, a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, curve, get_b);
- IppsBigNumState *b_bn = biginteger_to_bn(env, b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
- IppsBigNumState *gx_bn = biginteger_to_bn(env, gx);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
- IppsBigNumState *gy_bn = biginteger_to_bn(env, gy);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- IppsBigNumState *n_bn = biginteger_to_bn(env, n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint h = (*env)->CallIntMethod(env, params, get_h);
-
- if (keysize) {
- *keysize = bits;
- }
-
- int size;
- ippsECCPGetSize(bits, &size);
- IppsECCPState *result = malloc(size);
- ippsECCPInit(bits, result);
- ippsECCPSet(p_bn, a_bn, b_bn, gx_bn, gy_bn, n_bn, h, result);
-
- return result;
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, int keysize, IppsECCPState *curve) {
- IppsBigNumState *p_bn = new_bn(keysize);
- IppsBigNumState *a_bn = new_bn(keysize);
- IppsBigNumState *b_bn = new_bn(keysize);
- int ord_bits;
- ippsECCPGetOrderBitSize(&ord_bits, curve);
- IppsBigNumState *gx_bn = new_bn(ord_bits);
- IppsBigNumState *gy_bn = new_bn(ord_bits);
- IppsBigNumState *order_bn = new_bn(ord_bits);
- int cofactor;
-
- ippsECCPGet(p_bn, a_bn, b_bn, gx_bn, gy_bn, order_bn, &cofactor, curve);
-
- jobject p = bn_to_biginteger(env, p_bn);
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p);
- free(p_bn);
-
- jobject a = bn_to_biginteger(env, a_bn);
- jobject b = bn_to_biginteger(env, b_bn);
- free(a_bn);
- free(b_bn);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- jobject gx = bn_to_biginteger(env, gx_bn);
- jobject gy = bn_to_biginteger(env, gy_bn);
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx, gy);
- free(gx_bn);
- free(gy_bn);
-
- jobject n = bn_to_biginteger(env, order_bn);
- free(order_bn);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, cofactor);
-}
-
-static jobject generate_from_curve(JNIEnv *env, int keysize, IppsECCPState *curve) {
- if (VALIDATE_CURVE) {
- IppECResult validation;
- ippsECCPValidate(50, &validation, curve, ippsPRNGen, prng_state);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- return NULL;
- }
- }
-
- IppsECCPPointState *point = new_point(keysize);
-
- int ord_bits;
- ippsECCPGetOrderBitSize(&ord_bits, curve);
- int ord_bytes = (ord_bits + 7) / 8;
- IppsBigNumState *secret = new_bn(ord_bits);
-
- native_timing_start();
- IppStatus err = ippsECCPGenKeyPair(secret, point, curve, prng_wrapper, prng_state);
- native_timing_stop();
-
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- free(point);
- free(secret);
- return NULL;
- }
-
- int coord_bytes = (keysize + 7) / 8;
- IppsBigNumState *x = new_bn(keysize);
- IppsBigNumState *y = new_bn(keysize);
-
- ippsECCPGetPoint(x, y, point, curve);
-
- jbyteArray pub_bytes = (*env)->NewByteArray(env, 2 * coord_bytes + 1);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- pub_data[0] = 0x04;
- bn_get(x, (uint8_t *) (pub_data + 1), coord_bytes);
- bn_get(y, (uint8_t *) (pub_data + 1 + coord_bytes), coord_bytes);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, pub_data, 0);
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, ord_bytes);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- bn_get(secret, (uint8_t *) priv_data, ord_bytes);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, priv_data, 0);
-
- free(point);
- free(secret);
- free(x);
- free(y);
-
- jobject ec_param_spec = create_ec_param_spec(env, keysize, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-static jobject generate_from_curve_info(JNIEnv *env, const ippcp_curve *curve_info) {
- int context_size;
- if (curve_info->context_size_func) {
- curve_info->context_size_func(&context_size);
- } else {
- ippsECCPGetSize(curve_info->size, &context_size);
- }
- uint8_t curve_buf[context_size];
- IppsECCPState *curve = (IppsECCPState *)curve_buf;
- if (curve_info->init_func) {
- curve_info->init_func(curve);
- } else {
- ippsECCPInit(curve_info->size, curve);
- }
- if (curve_info->set_func) {
- curve_info->set_func(curve);
- } else {
- ippsECCPSetStd(curve_info->id, curve);
- }
- if (USE_SPEEDUP && curve_info->precomp_func) {
- curve_info->precomp_func(curve);
- }
- return generate_from_curve(env, curve_info->size, curve);
-}
-
-JNIEXPORT jobject JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_generate__ILjava_security_SecureRandom_2(JNIEnv *env,
- jobject this,
- jint keysize,
- jobject random) {
- for (size_t i = 0; i < NUM_CURVES; ++i) {
- if (CURVES[i].size == keysize) {
- return generate_from_curve_info(env, &CURVES[i]);
- }
- }
- return NULL;
-}
-
-JNIEXPORT jobject JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(
- JNIEnv *env, jobject this, jobject params, jobject random) {
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- int keysize;
- IppsECCPState *curve = create_curve(env, params, &keysize);
- jobject result = generate_from_curve(env, keysize, curve);
- free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const ippcp_curve *curve_info;
- for (size_t i = 0; i < NUM_CURVES; ++i) {
- if (strcasecmp(utf_name, CURVES[i].name) == 0) {
- curve_info = &CURVES[i];
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return generate_from_curve_info(env, curve_info);
- } else {
- return NULL;
- }
-}
-
-static IppsECCPPointState *bytearray_to_pubkey(JNIEnv *env, jbyteArray pubkey, jint keysize, IppsECCPState *curve) {
- IppsBigNumState *x_bn = new_bn(keysize);
- IppsBigNumState *y_bn = new_bn(keysize);
-
- jint coord_size = (keysize + 7) / 8;
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pubkey, NULL);
- ippsSetOctString_BN((Ipp8u *) (pub_data + 1), coord_size, x_bn);
- ippsSetOctString_BN((Ipp8u *) (pub_data + 1 + coord_size), coord_size, y_bn);
- (*env)->ReleaseByteArrayElements(env, pubkey, pub_data, JNI_ABORT);
-
- IppsECCPPointState *pub = new_point(keysize);
- ippsECCPSetPoint(x_bn, y_bn, pub, curve);
- free(x_bn);
- free(y_bn);
- return pub;
-}
-
-static IppsBigNumState *bytearray_to_privkey(JNIEnv *env, jbyteArray privkey, IppsECCPState *curve) {
- int ord_bits;
- ippsECCPGetOrderBitSize(&ord_bits, curve);
- IppsBigNumState *priv_bn = new_bn(ord_bits);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey, NULL);
- ippsSetOctString_BN((Ipp8u *) priv_data, (*env)->GetArrayLength(env, privkey), priv_bn);
- (*env)->ReleaseByteArrayElements(env, privkey, priv_data, JNI_ABORT);
- return priv_bn;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Ippcp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- jint coord_size = ((*env)->GetArrayLength(env, pubkey) - 1) / 2;
- jint keysize;
- IppsECCPState *curve = create_curve(env, params, &keysize);
-
- if (VALIDATE_CURVE) {
- IppECResult validation;
- ippsECCPValidate(50, &validation, curve, ippsPRNGen, prng_state);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- free(curve);
- return NULL;
- }
- }
- IppsECCPPointState *pub = bytearray_to_pubkey(env, pubkey, keysize, curve);
-
- if (VALIDATE_POINT) {
- IppECResult validation;
- ippsECCPCheckPoint(pub, &validation, curve);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- free(curve);
- free(pub);
- return NULL;
- }
- }
-
- IppsBigNumState *priv_bn = bytearray_to_privkey(env, privkey, curve);
-
- IppsBigNumState *share = new_bn(keysize);
-
- native_timing_start();
- IppStatus err = ippsECCPSharedSecretDH(priv_bn, pub, share, curve);
- native_timing_stop();
-
- free(priv_bn);
- free(pub);
- free(curve);
-
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- return NULL;
- }
-
- jbyteArray result = (*env)->NewByteArray(env, coord_size);
- jbyte *data = (*env)->GetByteArrayElements(env, result, NULL);
- bn_get(share, (uint8_t *) data, coord_size);
- (*env)->ReleaseByteArrayElements(env, result, data, 0);
- free(share);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Ippcp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Ippcp_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- jint keysize;
- IppsECCPState *curve = create_curve(env, params, &keysize);
-
- if (VALIDATE_CURVE) {
- IppECResult validation;
- ippsECCPValidate(50, &validation, curve, ippsPRNGen, prng_state);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- free(curve);
- return NULL;
- }
- }
- IppsBigNumState *priv_bn = bytearray_to_privkey(env, privkey, curve);
-
- IppsECCPPointState *ephemeral_point = new_point(keysize);
- int ord_bits;
- ippsECCPGetOrderBitSize(&ord_bits, curve);
- int ord_bytes = (ord_bits + 7) / 8;
- IppsBigNumState *ephemeral_secret = new_bn(ord_bits);
- IppsBigNumState *r = new_bn(ord_bits);
- IppsBigNumState *s = new_bn(ord_bits);
-
- jint data_size = (*env)->GetArrayLength(env, data);
- IppsBigNumState *data_bn = new_bn(data_size * 8);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- ippsSetOctString_BN((Ipp8u *) data_data, data_size, data_bn);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- jbyteArray result = NULL;
- jbyte r_buf[ord_bytes];
- jbyte s_buf[ord_bytes];
-
- native_timing_start();
- IppStatus err = ippsECCPGenKeyPair(ephemeral_secret, ephemeral_point, curve, prng_wrapper, prng_state);
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- goto error;
- }
- err = ippsECCPSetKeyPair(ephemeral_secret, ephemeral_point, ippFalse, curve);
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- goto error;
- }
- err = ippsECCPSignDSA(data_bn, priv_bn, r, s, curve);
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- goto error;
- }
- native_timing_stop();
-
- bn_get(r, (uint8_t *) r_buf, ord_bytes);
- bn_get(s, (uint8_t *) s_buf, ord_bytes);
-
- result = asn1_der_encode(env, r_buf, ord_bytes, s_buf, ord_bytes);
-
-error:
- free(curve);
- free(priv_bn);
- free(ephemeral_point);
- free(ephemeral_secret);
- free(r);
- free(s);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Ippcp_verify(JNIEnv *env, jobject this, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- jint keysize;
- IppsECCPState *curve = create_curve(env, params, &keysize);
-
- if (VALIDATE_CURVE) {
- IppECResult validation;
- ippsECCPValidate(50, &validation, curve, ippsPRNGen, prng_state);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- free(curve);
- return JNI_FALSE;
- }
- }
- IppsECCPPointState *pub = bytearray_to_pubkey(env, pubkey, keysize, curve);
-
- if (VALIDATE_POINT) {
- IppECResult validation;
- ippsECCPCheckPoint(pub, &validation, curve);
- if (validation != ippECValid) {
- throw_new(env, "java/security/GeneralSecurityException", ippsECCGetResultString(validation));
- free(curve);
- free(pub);
- return JNI_FALSE;
- }
- }
-
- size_t r_len, s_len;
- jbyte *r_data, *s_data;
- bool decode = asn1_der_decode(env, signature, &r_data, &r_len, &s_data, &s_len);
- if (!decode) {
- throw_new(env, "java/security/GeneralSecurityException", "Error decoding sig.");
- free(curve);
- free(pub);
- return JNI_FALSE;
- }
-
- int ord_bits;
- ippsECCPGetOrderBitSize(&ord_bits, curve);
-
- IppsBigNumState *r = new_bn(ord_bits);
- ippsSetOctString_BN((Ipp8u *) r_data, r_len, r);
- free(r_data);
- IppsBigNumState *s = new_bn(ord_bits);
- ippsSetOctString_BN((Ipp8u *) s_data, s_len, s);
- free(s_data);
-
- jint data_size = (*env)->GetArrayLength(env, data);
- IppsBigNumState *data_bn = new_bn(data_size * 8);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- ippsSetOctString_BN((Ipp8u *) data_data, data_size, data_bn);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- IppECResult result;
-
- native_timing_start();
- ippsECCPSetKeyPair(NULL, pub, ippTrue, curve);
- IppStatus err = ippsECCPVerifyDSA(data_bn, r, s, &result, curve);
- native_timing_stop();
-
- free(curve);
- free(pub);
- free(r);
- free(s);
-
- if (err == ippStsNoErr && result == ippECValid) {
- return JNI_TRUE;
- }
- if (err != ippStsNoErr) {
- throw_new(env, "java/security/GeneralSecurityException", ippcpGetStatusString(err));
- return JNI_FALSE;
- }
-
- return JNI_FALSE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/libressl.c b/src/cz/crcs/ectester/standalone/libs/jni/libressl.c
deleted file mode 100644
index 79227f8..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/libressl.c
+++ /dev/null
@@ -1,609 +0,0 @@
-#include "native.h"
-#include <string.h>
-
-#include <openssl/conf.h>
-#include <openssl/opensslv.h>
-#include <openssl/objects.h>
-#include <openssl/obj_mac.h>
-#include <openssl/bn.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <openssl/ec.h>
-#include <openssl/ecdh.h>
-#include <openssl/ecdsa.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-
-static jclass provider_class;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_LibresslLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Libressl");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, LIBRESSL_VERSION_TEXT);
- long ver_hi = (LIBRESSL_VERSION_NUMBER & 0xff000000L) >> 28;
- long ver_mid = (LIBRESSL_VERSION_NUMBER & 0x00ff0000L) >> 20;
- long ver_low = (LIBRESSL_VERSION_NUMBER & 0x0000ff00L) >> 12;
- double version = (double)ver_hi + ((double)ver_mid/10) + ((double)ver_low/100);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Libressl_setup(JNIEnv *env, jobject self) {
- OPENSSL_init_crypto(0, NULL);
-
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, self, "EC", "Libressl");
- ADD_KA(env, self, "ECDH", "LibresslECDH");
- ADD_SIG(env, self, "NONEwithECDSA", "LibresslECDSAwithNONE");
-
- init_classes(env, "Libressl");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_LibresslLib_getCurves(JNIEnv *env, jobject self) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- jstring curve_name = (*env)->NewStringUTF(env, OBJ_nid2sn(curves[i].nid));
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_keysizeSupported(JNIEnv *env, jobject self, jint keysize) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- EC_GROUP *curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- EC_GROUP_free(curve);
- return JNI_TRUE;
- }
- EC_GROUP_free(curve);
- }
- return JNI_FALSE;
-}
-
-static jobject bignum_to_biginteger(JNIEnv *env, const BIGNUM *bn) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- int size = BN_num_bytes(bn);
- jbyteArray bytes = (*env)->NewByteArray(env, size);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- BN_bn2bin(bn, (unsigned char *) data);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static BIGNUM *biginteger_to_bignum(JNIEnv *env, jobject bigint) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, bigint, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- BIGNUM *result = BN_bin2bn((unsigned char *) byte_data, byte_length, NULL);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-static EC_GROUP *create_curve(JNIEnv *env, jobject params) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
- BIGNUM *a_bn = biginteger_to_bignum(env, a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
- BIGNUM *b_bn = biginteger_to_bignum(env, b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
- BIGNUM *gx_bn = biginteger_to_bignum(env, gx);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
- BIGNUM *gy_bn = biginteger_to_bignum(env, gy);
-
- EC_GROUP *result;
- EC_POINT *g_point;
-
- if ((*env)->IsInstanceOf(env, field, fp_field_class)) {
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- BIGNUM *p_bn = biginteger_to_bignum(env, p);
- result = EC_GROUP_new_curve_GFp(p_bn, a_bn, b_bn, NULL);
- BN_free(p_bn);
-
- if (!result) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_new_curve_GFp.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn);
- return NULL;
- }
-
- g_point = EC_POINT_new(result);
- if(!EC_POINT_set_affine_coordinates_GFp(result, g_point, gx_bn, gy_bn, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_POINT_set_affine_coordinates_GFp.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
- } else if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- jmethodID get_reduction_poly = (*env)->GetMethodID(env, f2m_field_class, "getReductionPolynomial", "()Ljava/math/BigInteger;");
- jobject red_poly = (*env)->CallObjectMethod(env, field, get_reduction_poly);
-
- BIGNUM *p_bn = biginteger_to_bignum(env, red_poly);
- result = EC_GROUP_new_curve_GF2m(p_bn, a_bn, b_bn, NULL);
- BN_free(p_bn);
- if (!result) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_new_curve_GF2m.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn);
- return NULL;
- }
-
- g_point = EC_POINT_new(result);
- if(!EC_POINT_set_affine_coordinates_GF2m(result, g_point, gx_bn, gy_bn, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_POINT_set_affine_coordinates_GF2m.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
- } else {
- return NULL;
- }
-
- BN_free(a_bn);
- BN_free(b_bn);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- BIGNUM *n_bn = biginteger_to_bignum(env, n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint h = (*env)->CallIntMethod(env, params, get_h);
- BIGNUM *h_bn = BN_new();
- BN_set_word(h_bn, h);
-
- if (!EC_GROUP_set_generator(result, g_point, n_bn, h_bn)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_set_generator.");
- BN_free(n_bn); BN_free(h_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
-
- EC_POINT_free(g_point);
- BN_free(gx_bn);
- BN_free(gy_bn);
- BN_free(n_bn);
- BN_free(h_bn);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jboolean result = (EC_GROUP_check(curve, NULL) == 1) ? JNI_TRUE : JNI_FALSE;
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, const EC_GROUP *curve) {
- int field_type = EC_METHOD_get_field_type(EC_GROUP_method_of(curve));
- BIGNUM *a;
- BIGNUM *b;
-
- BIGNUM *gx;
- BIGNUM *gy;
- jobject field;
-
- a = BN_new();
- b = BN_new();
-
- if (field_type == NID_X9_62_prime_field) {
- BIGNUM *p = BN_new();
-
- if (!EC_GROUP_get_curve_GFp(curve, p, a, b, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_curve_GFp.");
- BN_free(p); BN_free(a); BN_free(b);
- return NULL;
- }
-
- jobject p_int = bignum_to_biginteger(env, p);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- field = (*env)->NewObject(env, fp_field_class, fp_field_init, p_int);
-
- BN_free(p);
-
- gx = BN_new();
- gy = BN_new();
- if (!EC_POINT_get_affine_coordinates_GFp(curve, EC_GROUP_get0_generator(curve), gx, gy, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_POINT_get_affine_coordinates_GFp.");
- BN_free(a); BN_free(b); BN_free(gx); BN_free(gy);
- return NULL;
- }
- } else if (field_type == NID_X9_62_characteristic_two_field) {
- if (!EC_GROUP_get_curve_GF2m(curve, NULL, a, b, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_curve_GF2m.");
- BN_free(a); BN_free(b);
- return NULL;
- }
-
- int basis_type = EC_GROUP_get_basis_type(curve);
- jintArray ks;
- jint *ks_data;
- if (basis_type == NID_X9_62_tpBasis) {
- ks = (*env)->NewIntArray(env, 1);
- ks_data = (*env)->GetIntArrayElements(env, ks, NULL);
- if (!EC_GROUP_get_trinomial_basis(curve, (unsigned int *) &ks_data[0])) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_trinomial_basis.");
- BN_free(a); BN_free(b);
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, JNI_ABORT);
- return NULL;
- }
- } else if (basis_type == NID_X9_62_ppBasis) {
- ks = (*env)->NewIntArray(env, 3);
- ks_data = (*env)->GetIntArrayElements(env, ks, NULL);
- if (!EC_GROUP_get_pentanomial_basis(curve, (unsigned int *) &ks_data[0], (unsigned int *) &ks_data[1], (unsigned int *) &ks_data[2])) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_pentanomial_basis.");
- BN_free(a); BN_free(b);
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, JNI_ABORT);
- return NULL;
- }
- } else {
- return NULL;
- }
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, 0);
-
- jint m = EC_GROUP_get_degree(curve);
-
- jmethodID f2m_field_init = (*env)->GetMethodID(env, f2m_field_class, "<init>", "(I[I)V");
- field = (*env)->NewObject(env, f2m_field_class, f2m_field_init, m, ks);
-
- gx = BN_new();
- gy = BN_new();
- if (!EC_POINT_get_affine_coordinates_GF2m(curve, EC_GROUP_get0_generator(curve), gx, gy, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_POINT_get_affine_coordinates_GF2m.");
- BN_free(a); BN_free(b); BN_free(gx); BN_free(gy);
- return NULL;
- }
- } else {
- return NULL;
- }
-
- jobject a_int = bignum_to_biginteger(env, a);
- jobject b_int = bignum_to_biginteger(env, b);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a_int, b_int);
-
- BN_free(a);
- BN_free(b);
-
- jobject gx_int = bignum_to_biginteger(env, gx);
- jobject gy_int = bignum_to_biginteger(env, gy);
-
- BN_free(gx);
- BN_free(gy);
-
- BN_CTX *ctx = BN_CTX_new();
- if (!ctx) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException",
- "Could not create bignum context.");
- return NULL;
- }
-
- BN_CTX_start(ctx);
-
- BIGNUM *order = BN_CTX_get(ctx);
- if (!order || !EC_GROUP_get_order(curve, order, ctx)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException",
- "Could not obtain curve order.");
- BN_CTX_end(ctx);
- BN_CTX_free(ctx);
- return NULL;
- }
-
- jobject order_obj = bignum_to_biginteger(env, order);
- BN_CTX_end(ctx);
- BN_CTX_free(ctx);
-
- BIGNUM *h = BN_new();
- EC_GROUP_get_cofactor(curve, h, NULL);
- jint cofactor = BN_get_word(h);
- BN_free(h);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx_int, gy_int);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, order_obj, cofactor);
-}
-
-static jobject generate_from_curve(JNIEnv *env, const EC_GROUP *curve) {
- jint keysize = EC_GROUP_get_degree(curve);
- unsigned long key_bytes = (keysize + 7) / 8;
-
- EC_KEY *key = EC_KEY_new();
- EC_KEY_set_group(key, curve);
-
- native_timing_start();
- int err = EC_KEY_generate_key(key);
- native_timing_stop();
-
- if (!err) {
- throw_new(env, "java/security/GeneralSecurityException", "Error generating key, EC_KEY_generate_key.");
- EC_KEY_free(key);
- return NULL;
- }
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, key_bytes);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- int priv_len = BN_num_bytes(EC_KEY_get0_private_key(key));
- memset(key_priv, 0, key_bytes);
- BN_bn2bin(EC_KEY_get0_private_key(key), (unsigned char *) key_priv + (key_bytes - priv_len));
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- unsigned long key_len = 2*key_bytes + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- EC_POINT_point2oct(curve, EC_KEY_get0_public_key(key), POINT_CONVERSION_UNCOMPRESSED, (unsigned char *) key_pub, key_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- EC_KEY_free(key);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- break;
- }
- EC_GROUP_free(curve);
- }
-
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject self, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-}
-
-EC_KEY *barray_to_pubkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray pub) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize pub_len = (*env)->GetArrayLength(env, pub);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- EC_POINT *pub_point = EC_POINT_new(curve);
- EC_POINT_oct2point(curve, pub_point, (unsigned char *) pub_data, pub_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, JNI_ABORT);
- EC_KEY_set_public_key(result, pub_point);
- EC_POINT_free(pub_point);
- return result;
-}
-
-EC_KEY *barray_to_privkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray priv) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize priv_len = (*env)->GetArrayLength(env, priv);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- BIGNUM *s = BN_bin2bn((unsigned char *) priv_data, priv_len, NULL);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, JNI_ABORT);
- EC_KEY_set_private_key(result, s);
- BN_free(s);
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Libressl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- int field_size = EC_GROUP_get_degree(curve);
- size_t secret_len = (field_size + 7)/8;
-
- //TODO: Do more KeyAgreements here, but will have to do the hash-fun manually,
- // probably using the ECDH_KDF_X9_62 by wrapping it and dynamically choosing the EVP_MD. from the type string.
- jbyteArray result = (*env)->NewByteArray(env, secret_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
-
- native_timing_start();
- int err = ECDH_compute_key(result_data, secret_len, EC_KEY_get0_public_key(pub), priv, NULL);
- native_timing_stop();
-
- if (err <= 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error computing ECDH, ECDH_compute_key.");
- EC_KEY_free(pub); EC_KEY_free(priv); EC_GROUP_free(curve);
- (*env)->ReleaseByteArrayElements(env, result, result_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- EC_KEY_free(pub);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Libressl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Libressl_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- // TODO: Do more Signatures here, maybe use the EVP interface to get to the hashes easier and not hash manually?
-
- native_timing_start();
- ECDSA_SIG *signature = ECDSA_do_sign((unsigned char *) data_data, data_size, priv);
- native_timing_stop();
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- if (!signature) {
- throw_new(env, "java/security/GeneralSecurityException", "Error signing, ECDSA_do_sign.");
- EC_KEY_free(priv); EC_GROUP_free(curve);
- return NULL;
- }
-
- jsize sig_len = i2d_ECDSA_SIG(signature, NULL);
- jbyteArray result = (*env)->NewByteArray(env, sig_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- jbyte *result_data_ptr = result_data;
- i2d_ECDSA_SIG(signature, (unsigned char **)&result_data_ptr);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- ECDSA_SIG_free(signature);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Libressl_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return JNI_FALSE;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
-
- jsize sig_len = (*env)->GetArrayLength(env, signature);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
- jbyte *sig_data_ptr = sig_data;
- ECDSA_SIG *sig_obj = d2i_ECDSA_SIG(NULL, (const unsigned char **)&sig_data_ptr, sig_len);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int result = ECDSA_do_verify((unsigned char *) data_data, data_size, sig_obj, pub);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- if (result < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error verifying, ECDSA_do_verify.");
- EC_KEY_free(pub); EC_GROUP_free(curve); ECDSA_SIG_free(sig_obj);
- return JNI_FALSE;
- }
-
- ECDSA_SIG_free(sig_obj);
- EC_KEY_free(pub);
- EC_GROUP_free(curve);
- return (result == 1) ? JNI_TRUE : JNI_FALSE;
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/matrixssl.c b/src/cz/crcs/ectester/standalone/libs/jni/matrixssl.c
deleted file mode 100644
index 8324dd4..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/matrixssl.c
+++ /dev/null
@@ -1,397 +0,0 @@
-#include "native.h"
-#include <string.h>
-#include <stdio.h>
-
-#include <cryptoApi.h>
-#include <coreApi.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-static jclass provider_class;
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_createProvider(JNIEnv *env, jobject this) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Matrixssl");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, "MatrixSSL");
- double version = 4.1;
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Matrixssl_setup(JNIEnv *env, jobject this) {
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, this, "EC", "Matrixssl");
- ADD_KA(env, this, "ECDH", "MatrixsslECDH");
- ADD_SIG(env, this, "NONEwithECDSA", "MatrixsslECDSAwithNONE");
-
- psCoreOpen(PSCORE_CONFIG);
- psOpenPrng();
-
- init_classes(env, "Matrixssl");
-}
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- jstring curve_name = (*env)->NewStringUTF(env, eccCurves[i].name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- i++;
- }
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_keysizeSupported(JNIEnv *env, jobject this, jint keysize) {
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (eccCurves[i].size * 8 == keysize) {
- return JNI_TRUE;
- }
- i++;
- }
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_paramsSupported(JNIEnv *env, jobject this, jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
- if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return JNI_FALSE;
- }
- return JNI_TRUE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (strcasecmp(utf_name, eccCurves[i].name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- i++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-
-static jobject create_ec_param_spec(JNIEnv *env, const psEccCurve_t *curve) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(Ljava/lang/String;I)V");
-
- jstring p_string = (*env)->NewStringUTF(env, curve->prime);
- jobject p = (*env)->NewObject(env, biginteger_class, biginteger_init, p_string, (jint) 16);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p);
-
- jstring a_string = (*env)->NewStringUTF(env, curve->A);
- jobject a = (*env)->NewObject(env, biginteger_class, biginteger_init, a_string, (jint) 16);
- jstring b_string = (*env)->NewStringUTF(env, curve->B);
- jobject b = (*env)->NewObject(env, biginteger_class, biginteger_init, b_string, (jint) 16);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- jstring gx_string = (*env)->NewStringUTF(env, curve->Gx);
- jstring gy_string = (*env)->NewStringUTF(env, curve->Gy);
- jobject gx = (*env)->NewObject(env, biginteger_class, biginteger_init, gx_string, (jint) 16);
- jobject gy = (*env)->NewObject(env, biginteger_class, biginteger_init, gy_string, (jint) 16);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx, gy);
-
- jstring n_string = (*env)->NewStringUTF(env, curve->order);
- jobject n = (*env)->NewObject(env, biginteger_class, biginteger_init, n_string, (jint) 16);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, (jint) 1);
-}
-
-static psEccCurve_t *create_curve(JNIEnv *env, jobject params) {
- psEccCurve_t *curve = calloc(sizeof(psEccCurve_t), 1);
-
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- jint bytes = (bits + 7) / 8;
- curve->size = bytes;
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
-
- //jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- //jint h = (*env)->CallIntMethod(env, params, get_h);
-
- jmethodID get_bitlength = (*env)->GetMethodID(env, biginteger_class, "bitLength", "()I");
- jint ord_bits = (*env)->CallIntMethod(env, n, get_bitlength);
- jint ord_bytes = (ord_bits + 7) / 8;
-
- curve->prime = biginteger_to_hex(env, p, bytes);
- curve->A = biginteger_to_hex(env, a, bytes);
- curve->B = biginteger_to_hex(env, b, bytes);
- curve->Gx = biginteger_to_hex(env, gx, bytes);
- curve->Gy = biginteger_to_hex(env, gy, bytes);
- curve->order = biginteger_to_hex(env, n, ord_bytes);
- return curve;
-}
-
-static void free_curve(psEccCurve_t *curve) {
- free((char *)curve->prime);
- free((char *)curve->A);
- free((char *)curve->B);
- free((char *)curve->order);
- free((char *)curve->Gx);
- free((char *)curve->Gy);
-}
-
-static jobject generate_from_curve(JNIEnv *env, const psEccCurve_t *curve) {
- psEccKey_t *key;
- int32_t err = psEccNewKey(NULL, &key, curve);
- err = psEccInitKey(NULL, key, curve);
-
- native_timing_start();
- err = psEccGenKey(NULL, key, curve, NULL);
- native_timing_stop();
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't generate key.");
- psEccClearKey(key);
- psEccDeleteKey(&key);
- return NULL;
- }
-
- jbyteArray priv = (*env)->NewByteArray(env, pstm_unsigned_bin_size(&key->k));
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- pstm_to_unsigned_bin(NULL, &key->k, (unsigned char *) priv_data);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, 0);
-
- jint xlen = pstm_unsigned_bin_size(&key->pubkey.x);
- jint ylen = pstm_unsigned_bin_size(&key->pubkey.y);
- jbyteArray pub = (*env)->NewByteArray(env, 1 + xlen + ylen);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- pub_data[0] = 0x04;
- pstm_to_unsigned_bin(NULL, &key->pubkey.x, (unsigned char *) (pub_data + 1));
- pstm_to_unsigned_bin(NULL, &key->pubkey.y, (unsigned char *) (pub_data + 1 + xlen));
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, 0);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- psEccDeleteKey(&key);
-
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject this, jint keysize, jobject random) {
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (eccCurves[i].size * 8 == keysize) {
- return generate_from_curve(env, &eccCurves[i]);
- }
- i++;
- }
- return NULL;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject this, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- psEccCurve_t *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- free_curve(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (strcasecmp(utf_name, eccCurves[i].name) == 0) {
- break;
- }
- i++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return generate_from_curve(env, &eccCurves[i]);
- } else {
- return NULL;
- }
-}
-
-static psEccKey_t *bytearray_to_privkey(JNIEnv *env, jbyteArray privkey, const psEccCurve_t *curve) {
- psEccKey_t *result;
- psEccNewKey(NULL, &result, curve);
- psEccInitKey(NULL, result, curve);
-
- pstm_init_for_read_unsigned_bin(NULL, &result->k, curve->size);
- jint len = (*env)->GetArrayLength(env, privkey);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey, NULL);
- pstm_read_unsigned_bin(&result->k, (unsigned char *) priv_data, len);
- (*env)->ReleaseByteArrayElements(env, privkey, priv_data, JNI_ABORT);
- result->type = PS_PRIVKEY;
-
- return result;
-}
-
-static psEccKey_t *bytearray_to_pubkey(JNIEnv *env, jbyteArray pubkey, const psEccCurve_t *curve) {
- psEccKey_t *result;
- psEccNewKey(NULL, &result, curve);
- psEccInitKey(NULL, result, curve);
-
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.x, curve->size);
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.y, curve->size);
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.z, curve->size);
- jbyte *pubkey_data = (*env)->GetByteArrayElements(env, pubkey, NULL);
- pstm_read_unsigned_bin(&result->pubkey.x, (unsigned char *) (pubkey_data + 1), curve->size);
- pstm_read_unsigned_bin(&result->pubkey.y, (unsigned char *) (pubkey_data + 1 + curve->size), curve->size);
- (*env)->ReleaseByteArrayElements(env, pubkey, pubkey_data, JNI_ABORT);
- pstm_set(&result->pubkey.z, 1);
- result->type = PS_PUBKEY;
-
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
-
- psEccKey_t *priv = bytearray_to_privkey(env, privkey, curve);
- psEccKey_t *pub = bytearray_to_pubkey(env, pubkey, curve);
-
- jbyteArray result = (*env)->NewByteArray(env, curve->size);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- psSize_t outlen = curve->size;
-
- native_timing_start();
- int32_t err = psEccGenSharedSecret(NULL, priv, pub, (unsigned char *) result_data, &outlen, NULL);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- psEccDeleteKey(&priv);
- psEccDeleteKey(&pub);
- free_curve(curve);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't derive secret.");
- return NULL;
- }
-
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
-
- psEccKey_t *priv = bytearray_to_privkey(env, privkey, curve);
-
- psSize_t siglen = 512;
- uint8_t sig[siglen];
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- native_timing_start();
- int32_t err = psEccDsaSign(NULL, priv, (unsigned char *) data_data, data_len, sig, &siglen, 0, NULL);
- native_timing_stop();
-
- psEccDeleteKey(&priv);
- free_curve(curve);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't sign data.");
- return NULL;
- }
-
- jbyteArray result = (*env)->NewByteArray(env, siglen);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- memcpy(result_data, sig, siglen);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_verify(JNIEnv *env, jobject this, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
- psEccKey_t *pub = bytearray_to_pubkey(env, pubkey, curve);
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jint sig_len = (*env)->GetArrayLength(env, signature);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
-
- int32_t result;
- native_timing_start();
- int32_t err = psEccDsaVerify(NULL, pub, (unsigned char *) data_data, data_len, (unsigned char *) sig_data, sig_len, &result, NULL);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- free_curve(curve);
- psEccDeleteKey(&pub);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't verify signature.");
- return JNI_FALSE;
- }
-
- return result < 0 ? JNI_FALSE : JNI_TRUE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/mbedtls.c b/src/cz/crcs/ectester/standalone/libs/jni/mbedtls.c
deleted file mode 100644
index 2cff6ff..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/mbedtls.c
+++ /dev/null
@@ -1,544 +0,0 @@
-#include "native.h"
-#include <string.h>
-
-#include <mbedtls/ecdsa.h>
-#include <mbedtls/ecdh.h>
-#include <mbedtls/ecp.h>
-#include <mbedtls/version.h>
-#include <mbedtls/entropy.h>
-#include <mbedtls/ctr_drbg.h>
-#include <stdio.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-static mbedtls_ctr_drbg_context ctr_drbg;
-static mbedtls_entropy_context entropy;
-static jclass provider_class;
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MbedTLSLib_createProvider(JNIEnv *env, jobject this) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$MbedTLS");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, MBEDTLS_VERSION_STRING_FULL);
- double version = MBEDTLS_VERSION_MAJOR + (MBEDTLS_VERSION_MINOR/10) + (MBEDTLS_VERSION_PATCH/100);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-static int dev_urandom(void *data, unsigned char *output, size_t len, size_t *olen) {
- FILE *file;
- size_t ret, left = len;
- unsigned char *p = output;
- ((void) data);
-
- *olen = 0;
-
- file = fopen( "/dev/urandom", "rb" );
- if (file == NULL) {
- return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
- }
-
- while (left > 0) {
- ret = fread(p, 1, left, file);
- if (ret == 0 && ferror(file)) {
- fclose(file);
- return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
- }
-
- p += ret;
- left -= ret;
- }
- fclose(file);
- *olen = len;
-
- return 0;
-}
-
-static int ctr_drbg_wrapper(void *ctx, unsigned char *buf, size_t len) {
- native_timing_pause();
- int result = mbedtls_ctr_drbg_random(ctx, buf, len);
- native_timing_restart();
- return result;
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024MbedTLS_setup(JNIEnv *env, jobject this) {
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, this, "EC", "MbedTLS");
- ADD_KA(env, this, "ECDH", "MbedTLSECDH");
- ADD_SIG(env, this, "NONEwithECDSA", "MbedTLSECDSAwithNONE");
-
- mbedtls_ctr_drbg_init(&ctr_drbg);
- mbedtls_entropy_init(&entropy);
- mbedtls_entropy_add_source(&entropy, dev_urandom, NULL, 32, MBEDTLS_ENTROPY_SOURCE_STRONG);
- mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);
-
- init_classes(env, "MbedTLS");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MbedTLSLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
- for (const mbedtls_ecp_curve_info *curve_info = mbedtls_ecp_curve_list();
- curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
- curve_info++) {
-
- jstring curve_name = (*env)->NewStringUTF(env, curve_info->name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_keysizeSupported(JNIEnv *env, jobject this, jint keysize) {
- for (const mbedtls_ecp_curve_info *curve_info = mbedtls_ecp_curve_list();
- curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
- curve_info++) {
- if (keysize == curve_info->bit_size) {
- return JNI_TRUE;
- }
- }
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_paramsSupported(JNIEnv *env, jobject this, jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
- if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return JNI_FALSE;
- }
- return JNI_TRUE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- for (const mbedtls_ecp_curve_info *curve_info = mbedtls_ecp_curve_list();
- curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
- curve_info++) {
- if (strcasecmp(utf_name, curve_info->name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-const char *err_to_string(int error) {
- switch (error) {
- case MBEDTLS_ERR_ECP_BAD_INPUT_DATA:
- return "Bad input parameters to function.";
- case MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL:
- return "The buffer is too small to write to.";
- case MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE:
- return "The requested feature is not available, for example, the requested curve is not supported.";
- case MBEDTLS_ERR_ECP_VERIFY_FAILED:
- return "The signature is not valid.";
- case MBEDTLS_ERR_ECP_ALLOC_FAILED:
- return "Memory allocation failed.";
- case MBEDTLS_ERR_ECP_RANDOM_FAILED:
- return "Generation of random value, such as ephemeral key, failed.";
- case MBEDTLS_ERR_ECP_INVALID_KEY:
- return "Invalid private or public key.";
- case MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH:
- return "The buffer contains a valid signature followed by more data.";
- case MBEDTLS_ERR_MPI_FILE_IO_ERROR:
- return "An error occurred while reading from or writing to a file.";
- case MBEDTLS_ERR_MPI_BAD_INPUT_DATA:
- return "Bad input parameters to function.";
- case MBEDTLS_ERR_MPI_INVALID_CHARACTER:
- return "There is an invalid character in the digit string.";
- case MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL:
- return "The buffer is too small to write to.";
- case MBEDTLS_ERR_MPI_NEGATIVE_VALUE:
- return "The input arguments are negative or result in illegal output.";
- case MBEDTLS_ERR_MPI_DIVISION_BY_ZERO:
- return "The input argument for division is zero, which is not allowed.";
- case MBEDTLS_ERR_MPI_NOT_ACCEPTABLE:
- return "The input arguments are not acceptable.";
- case MBEDTLS_ERR_MPI_ALLOC_FAILED:
- return "Memory allocation failed.";
- default:
- return "UNKNOWN.";
- }
-}
-
-static jobject biginteger_from_mpi(JNIEnv *env, const mbedtls_mpi *mpi) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- size_t size = mbedtls_mpi_size(mpi);
- jbyteArray bytes = (*env)->NewByteArray(env, size);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- mbedtls_mpi_write_binary(mpi, (unsigned char *) data, size);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static void mpi_from_biginteger(JNIEnv* env, jobject biginteger, mbedtls_mpi *mpi) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, biginteger, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- mbedtls_mpi_read_binary(mpi, (unsigned char *) byte_data, byte_length);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, const mbedtls_ecp_group *group) {
- jobject p = biginteger_from_mpi(env, &group->P);
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p);
-
- jobject a;
- if (group->A.p == NULL) {
- jmethodID biginteger_subtract = (*env)->GetMethodID(env, biginteger_class, "subtract", "(Ljava/math/BigInteger;)Ljava/math/BigInteger;");
- jmethodID biginteger_valueof = (*env)->GetStaticMethodID(env, biginteger_class, "valueOf", "(J)Ljava/math/BigInteger;");
- jobject three = (*env)->CallStaticObjectMethod(env, biginteger_class, biginteger_valueof, (jlong) 3);
- a = (*env)->CallObjectMethod(env, p, biginteger_subtract, three);
- } else {
- a = biginteger_from_mpi(env, &group->A);
- }
- jobject b = biginteger_from_mpi(env, &group->B);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- jobject gx = biginteger_from_mpi(env, &group->G.X);
- jobject gy = biginteger_from_mpi(env, &group->G.Y);
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx, gy);
-
- jobject n = biginteger_from_mpi(env, &group->N);
- jint h = 1;
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, h);
-}
-
-static void create_curve(JNIEnv *env, jobject params, mbedtls_ecp_group *group) {
- mbedtls_ecp_group_init(group);
- group->id = 0;
-
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
- mpi_from_biginteger(env, p, &group->P);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, curve, get_a);
- mpi_from_biginteger(env, a, &group->A);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, curve, get_b);
- mpi_from_biginteger(env, b, &group->B);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
- mpi_from_biginteger(env, gx, &group->G.X);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
- mpi_from_biginteger(env, gy, &group->G.Y);
-
- mbedtls_mpi_lset(&group->G.Z, 1);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- mpi_from_biginteger(env, n, &group->N);
- group->pbits = group->nbits = mbedtls_mpi_bitlen(&group->P);
- group->h = 0;
-}
-
-static jobject generate_from_curve(JNIEnv *env, mbedtls_ecp_group *group) {
- mbedtls_mpi d;
- mbedtls_mpi_init(&d);
-
- mbedtls_ecp_point Q;
- mbedtls_ecp_point_init(&Q);
-
- if (ctr_drbg.reseed_counter >= ctr_drbg.reseed_interval) {
- // Reseed manually, outside of the timing window, to not disturb the timing data.
- // They are somewhat disturbed anyway, but we cannot really get rid of that easily.
- // We also help it by using a wrapper and pausing for random gen.
- mbedtls_ctr_drbg_reseed(&ctr_drbg, NULL, 0);
- }
-
- native_timing_start();
- int error = mbedtls_ecp_gen_keypair(group, &d, &Q, ctr_drbg_wrapper, &ctr_drbg);
- native_timing_stop();
-
- if (error) {
- throw_new(env, "java/security/GeneralSecurityException", err_to_string(error));
- mbedtls_mpi_free(&d);
- mbedtls_ecp_point_free(&Q);
- return NULL;
- }
-
- jint keysize = (jint) mbedtls_mpi_bitlen(&group->N);
- unsigned long key_bytes = (keysize + 7) / 8;
- jbyteArray priv_bytes = (*env)->NewByteArray(env, key_bytes);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- mbedtls_mpi_write_binary(&d, (unsigned char *) key_priv, key_bytes);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- unsigned long key_len = 2*key_bytes + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- size_t out_key_len = 0;
- mbedtls_ecp_point_write_binary(group, &Q, MBEDTLS_ECP_PF_UNCOMPRESSED, &out_key_len, (unsigned char *) key_pub, key_len);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- jobject ec_param_spec = create_ec_param_spec(env, group);
-
- mbedtls_mpi_free(&d);
- mbedtls_ecp_point_free(&Q);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-static jobject generate_from_curve_info(JNIEnv *env, const mbedtls_ecp_curve_info *curve) {
- mbedtls_ecp_group group;
- mbedtls_ecp_group_init(&group);
- mbedtls_ecp_group_load(&group, curve->grp_id);
- jobject result = generate_from_curve(env, &group);
- mbedtls_ecp_group_free(&group);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject this, jint keysize, jobject random) {
- const mbedtls_ecp_curve_info *curve = NULL;
- for (const mbedtls_ecp_curve_info *curve_info = mbedtls_ecp_curve_list();
- curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
- curve_info++) {
- if (keysize == curve_info->bit_size) {
- curve = curve_info;
- break;
- }
- }
-
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- return generate_from_curve_info(env, curve);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject this, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- mbedtls_ecp_group curve;
- create_curve(env, params, &curve);
- jobject result = generate_from_curve(env, &curve);
- mbedtls_ecp_group_free(&curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const mbedtls_ecp_curve_info *curve = NULL;
- for (const mbedtls_ecp_curve_info *curve_info = mbedtls_ecp_curve_list();
- curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
- curve_info++) {
- if (strcasecmp(utf_name, curve_info->name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- curve = curve_info;
- break;
- }
- }
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return NULL;
- }
- return generate_from_curve_info(env, curve);
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-}
-
-static void create_pubkey(JNIEnv *env, jbyteArray pubkey, mbedtls_ecp_group *curve, mbedtls_ecp_point *pub) {
- mbedtls_ecp_point_init(pub);
- jsize pub_size = (*env)->GetArrayLength(env, pubkey);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pubkey, NULL);
- mbedtls_ecp_point_read_binary(curve, pub, (unsigned char *) key_pub, pub_size);
- (*env)->ReleaseByteArrayElements(env, pubkey, key_pub, JNI_ABORT);
-}
-
-static void create_privkey(JNIEnv *env, jbyteArray privkey, mbedtls_mpi *priv) {
- mbedtls_mpi_init(priv);
- jsize priv_size = (*env)->GetArrayLength(env, privkey);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, privkey, NULL);
- mbedtls_mpi_read_binary(priv, (unsigned char *) key_priv, priv_size);
- (*env)->ReleaseByteArrayElements(env, privkey, key_priv, JNI_ABORT);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024MbedTLS_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- mbedtls_ecp_group curve;
- create_curve(env, params, &curve);
-
- mbedtls_ecp_point pub;
- create_pubkey(env, pubkey, &curve, &pub);
-
- mbedtls_mpi priv;
- create_privkey(env, privkey, &priv);
-
- mbedtls_mpi result;
- mbedtls_mpi_init(&result);
-
- native_timing_start();
- int error = mbedtls_ecdh_compute_shared(&curve, &result, &pub, &priv, ctr_drbg_wrapper, &ctr_drbg);
- native_timing_stop();
-
- if (error) {
- throw_new(env, "java/security/GeneralSecurityException", err_to_string(error));
- mbedtls_mpi_free(&result);
- mbedtls_mpi_free(&priv);
- mbedtls_ecp_point_free(&pub);
- mbedtls_ecp_group_free(&curve);
- return NULL;
- }
-
- jint keysize = (jint) mbedtls_mpi_bitlen(&curve.N);
- unsigned long key_bytes = (keysize + 7) / 8;
- jbyteArray result_bytes = (*env)->NewByteArray(env, key_bytes);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result_bytes, NULL);
- mbedtls_mpi_write_binary(&result, (unsigned char *) result_data, key_bytes);
- (*env)->ReleaseByteArrayElements(env, result_bytes, result_data, 0);
-
- mbedtls_mpi_free(&result);
- mbedtls_mpi_free(&priv);
- mbedtls_ecp_point_free(&pub);
- mbedtls_ecp_group_free(&curve);
-
- return result_bytes;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024MbedTLS_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algo) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024MbedTLS_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- mbedtls_ecp_group curve;
- create_curve(env, params, &curve);
-
- mbedtls_mpi priv;
- create_privkey(env, privkey, &priv);
-
- mbedtls_mpi r;
- mbedtls_mpi_init(&r);
- mbedtls_mpi s;
- mbedtls_mpi_init(&s);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int error = mbedtls_ecdsa_sign(&curve, &r, &s, &priv, (unsigned char *) data_data, data_size, ctr_drbg_wrapper, &ctr_drbg);
- native_timing_stop();
-
- mbedtls_mpi_free(&priv);
- mbedtls_ecp_group_free(&curve);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- if (error) {
- throw_new(env, "java/security/GeneralSecurityException", err_to_string(error));
- mbedtls_mpi_free(&r);
- mbedtls_mpi_free(&s);
- return NULL;
- }
-
- jsize rlen = (mbedtls_mpi_bitlen(&r) + 7) / 8;
- jbyte r_bytes[rlen];
- mbedtls_mpi_write_binary(&r, (unsigned char *) r_bytes, rlen);
- jsize slen = (mbedtls_mpi_bitlen(&s) + 7) / 8;
- jbyte s_bytes[slen];
- mbedtls_mpi_write_binary(&s, (unsigned char *) s_bytes, slen);
-
- mbedtls_mpi_free(&r);
- mbedtls_mpi_free(&s);
- return asn1_der_encode(env, r_bytes, rlen, s_bytes, slen);
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024MbedTLS_verify(JNIEnv *env, jobject this, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- mbedtls_ecp_group curve;
- create_curve(env, params, &curve);
-
- mbedtls_ecp_point pub;
- create_pubkey(env, pubkey, &curve, &pub);
- jbyte *r_bytes;
- size_t rlen;
- jbyte *s_bytes;
- size_t slen;
- bool decode = asn1_der_decode(env, signature, &r_bytes, &rlen, &s_bytes, &slen);
- if (!decode) {
- throw_new(env, "java/security/GeneralSecurityException", "Error decoding sig.");
- mbedtls_ecp_point_free(&pub);
- mbedtls_ecp_group_free(&curve);
- return JNI_FALSE;
- }
-
- mbedtls_mpi r;
- mbedtls_mpi_init(&r);
- mbedtls_mpi_read_binary(&r, (unsigned char *) r_bytes, rlen);
- mbedtls_mpi s;
- mbedtls_mpi_init(&s);
- mbedtls_mpi_read_binary(&s, (unsigned char *) s_bytes, slen);
- free(r_bytes);
- free(s_bytes);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int error = mbedtls_ecdsa_verify(&curve, (unsigned char *) data_data, data_size, &pub, &r, &s);
- native_timing_stop();
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- if (error) {
- if (error != MBEDTLS_ERR_ECP_VERIFY_FAILED) {
- throw_new(env, "java/security/GeneralSecurityException", err_to_string(error));
- }
- mbedtls_ecp_point_free(&pub);
- mbedtls_ecp_group_free(&curve);
- return JNI_FALSE;
- }
-
- return JNI_TRUE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/mscng.c b/src/cz/crcs/ectester/standalone/libs/jni/mscng.c
deleted file mode 100644
index a182b98..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/mscng.c
+++ /dev/null
@@ -1,1273 +0,0 @@
-#include <windows.h>
-#include <bcrypt.h>
-#include "native.h"
-
-#include "c_timing.h"
-#include "c_utils.h"
-
-// BCRYPT and NT things.
-#define NT_SUCCESS(status) (((NTSTATUS)(status)) >= 0)
-#define NT_FAILURE(status) !NT_SUCCESS(status)
-
-#define STATUS_SUCCESS 0x00000000
-#define STATUS_INVALID_SIGNATURE 0xC000A000
-
-typedef struct {
- ULONG dwVersion; // Version of the structure
- ECC_CURVE_TYPE_ENUM dwCurveType; // Supported curve types.
- ECC_CURVE_ALG_ID_ENUM dwCurveGenerationAlgId; // For X.592 verification purposes, if we include Seed we will need to include the algorithm ID.
- ULONG cbFieldLength; // Byte length of the fields P, A, B, X, Y.
- ULONG cbSubgroupOrder; // Byte length of the subgroup.
- ULONG cbCofactor; // Byte length of cofactor of G in E.
- ULONG cbSeed; // Byte length of the seed used to generate the curve.
-} BCRYPT_ECC_PARAMETER_HEADER;
-
-// Provider things
-static jclass provider_class;
-
-#define KEYFLAG_IMPLICIT 0 // Mscng native key, over named curve
-#define KEYFLAG_EXPLICIT 1 // Mscng native key, over explicit ecc parameters
-#define KEYFLAG_NIST 2 // Mscng native key, over NIST parameters, custom ECDH/ECDSA_P* algo
-#define KEYFLAG_OTHER 3 // Other key, explicit ecc parameters
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MscngLib_createProvider(JNIEnv *env, jobject self) {
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Mscng");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, "Microsoft CNG");
- double version = 1.0;
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Mscng_setup(JNIEnv *env, jobject self) {
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, self, "ECDH", "MscngECDH");
- ADD_KPG(env, self, "ECDSA", "MscngECDSA");
-
- ADD_KA(env, self, "ECDHwithSHA1KDF(CNG)", "MscngECDHwithSHA1KDF");
- ADD_KA(env, self, "ECDHwithSHA256KDF(CNG)", "MscngECDHwithSHA256KDF");
- ADD_KA(env, self, "ECDHwithSHA384KDF(CNG)", "MscngECDHwithSHA384KDF");
- ADD_KA(env, self, "ECDHwithSHA512KDF(CNG)", "MscngECDHwithSHA512KDF");
-
- ADD_SIG(env, self, "SHA1withECDSA", "MscngECDSAwithSHA1");
- ADD_SIG(env, self, "SHA256withECDSA", "MscngECDSAwithSHA256");
- ADD_SIG(env, self, "SHA384withECDSA", "MscngECDSAwithSHA384");
- ADD_SIG(env, self, "SHA512withECDSA", "MscngECDSAwithSHA112");
-
- init_classes(env, "Mscng");
-}
-
-typedef struct {
- LPCSTR name;
- ULONG bits;
-} named_curve_t;
-
-static named_curve_t named_curves[] = {
- {"curve25519", 256}, {"brainpoolP160r1", 160}, {"brainpoolP160t1", 160}, {"brainpoolP192r1", 192}, {"brainpoolP192t1", 192},
- {"brainpoolP224r1", 224}, {"brainpoolP224t1", 224}, {"brainpoolP256r1", 256}, {"brainpoolP256t1", 256}, {"brainpoolP320r1", 320},
- {"brainpoolP320t1", 320}, {"brainpoolP384r1", 384}, {"brainpoolP384t1", 384}, {"brainpoolP512r1", 512}, {"brainpoolP512t1", 512},
- {"ec192wapi", 192}, {"nistP192", 192}, {"nistP224", 224}, {"nistP256", 256}, {"nistP384", 384},
- {"nistP521", 521}, {"numsP256t1", 256}, {"numsP384t1", 384}, {"numsP512t1", 512}, {"secP160k1", 160},
- {"secP160r1", 160}, {"secP160r2", 160}, {"secP192k1", 192}, {"secP192r1", 192}, {"secP224k1", 224},
- {"secP224r1", 224}, {"secP256k1", 256}, {"secP256r1", 256}, {"secP384r1", 384}, {"secP521r1", 521},
- {"wtls12", 224}, {"wtls7", 160}, {"wtls9", 160}, {"x962P192v1", 192}, {"x962P192v2", 192},
- {"x962P192v3", 192}, {"x962P239v1", 239}, {"x962P239v2", 239}, {"x962P239v3", 239}, {"x962P256v1", 256}};
-
-static const named_curve_t *lookup_curve(const char *name) {
- for (size_t i = 0; i < sizeof(named_curves) / sizeof(named_curve_t); ++i) {
- if (strcmp(name, named_curves[i].name) == 0) {
- return &named_curves[i];
- }
- }
- return NULL;
-}
-
-static ULONG utf_16to8(NPSTR *out_buf, LPCWSTR in_str) {
- INT result = WideCharToMultiByte(CP_UTF8, 0, in_str, -1, NULL, 0, NULL, NULL);
- *out_buf = calloc(result, 1);
- return WideCharToMultiByte(CP_UTF8, 0, in_str, -1, *out_buf, result, NULL, NULL);
-}
-
-static ULONG utf_8to16(NWPSTR *out_buf, LPCSTR in_str) {
- INT result = MultiByteToWideChar(CP_UTF8, 0, in_str, -1, NULL, 0);
- *out_buf = calloc(result * sizeof(WCHAR), 1);
- return MultiByteToWideChar(CP_UTF8, 0, in_str, -1, *out_buf, result);
-}
-
-/**
- * Convert Java String to UTF-16 NWPSTR null-terminated.
- * Returns: Length of NWPSTR in bytes!
- */
-static ULONG utf_strto16(NWPSTR *out_buf, JNIEnv *env, jobject str) {
- jsize len = (*env)->GetStringLength(env, str);
- *out_buf = calloc(len * sizeof(jchar) + 1, 1);
- const jchar *chars = (*env)->GetStringChars(env, str, NULL);
- memcpy(*out_buf, chars, len * sizeof(jchar));
- (*env)->ReleaseStringChars(env, str, chars);
- return len * sizeof(jchar);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MscngLib_getCurves(JNIEnv *env, jobject self) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- NTSTATUS status;
- BCRYPT_ALG_HANDLE handle;
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(&handle, BCRYPT_ECDH_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- return result;
- }
-
- ULONG bufSize;
- if (NT_FAILURE(status = BCryptGetProperty(handle, BCRYPT_ECC_CURVE_NAME_LIST, NULL, 0, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptGetProperty(length only)\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- return result;
- }
-
- BCRYPT_ECC_CURVE_NAMES *curves = (BCRYPT_ECC_CURVE_NAMES *)calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptGetProperty(handle, BCRYPT_ECC_CURVE_NAME_LIST, (PBYTE)curves, bufSize, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptGetProperty(whole)\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- free(curves);
- return result;
- }
-
- for (size_t i = 0; i < curves->dwEccCurveNames; ++i) {
- NPSTR curve_name;
- ULONG len = utf_16to8(&curve_name, curves->pEccCurveNames[i]);
- jstring c_name = (*env)->NewStringUTF(env, curve_name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, c_name);
- free(curve_name);
- }
-
- free(curves);
-
- BCryptCloseAlgorithmProvider(handle, 0);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_keysizeSupported(JNIEnv *env,
- jobject self,
- jint keysize) {
- switch (keysize) {
- case 256:
- case 384:
- case 521:
- return JNI_TRUE;
- default:
- return JNI_FALSE;
- }
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_paramsSupported(JNIEnv *env,
- jobject self,
- jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const named_curve_t *curve = lookup_curve(utf_name);
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return curve == NULL ? JNI_FALSE : JNI_TRUE;
- } else if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
-
- if ((*env)->IsInstanceOf(env, field, fp_field_class)) {
- return JNI_TRUE;
- } else {
- return JNI_FALSE;
- }
- } else {
- return JNI_FALSE;
- }
-}
-
-static jobject bytes_to_biginteger(JNIEnv *env, PBYTE bytes, int len) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- jbyteArray byte_array = (*env)->NewByteArray(env, len);
- jbyte *data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- memcpy(data, bytes, len);
- (*env)->ReleaseByteArrayElements(env, byte_array, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, byte_array);
- return result;
-}
-
-static void biginteger_to_bytes(JNIEnv *env, jobject bigint, PBYTE bytes, ULONG len) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray)(*env)->CallObjectMethod(env, bigint, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- memcpy(bytes, &byte_data[byte_length - len], len);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, PBYTE eccParams, PULONG paramLength) {
- //
- // BCRYPT_ECCFULLKEY_BLOB header
- // P[cbFieldLength] Prime specifying the base field.
- // A[cbFieldLength] Coefficient A of the equation y^2 = x^3 + A*x + B mod p
- // B[cbFieldLength] Coefficient B of the equation y^2 = x^3 + A*x + B mod p
- // Gx[cbFieldLength] X-coordinate of the base point.
- // Gy[cbFieldLength] Y-coordinate of the base point.
- // n[cbSubgroupOrder] Order of the group generated by G = (x,y)
- // h[cbCofactor] Cofactor of G in E.
- // S[cbSeed] Seed of the curve.
-
- BCRYPT_ECCFULLKEY_BLOB *header = (BCRYPT_ECCFULLKEY_BLOB *)eccParams;
- PBYTE paramsStart = &eccParams[sizeof(BCRYPT_ECCFULLKEY_BLOB)];
-
- // cbFieldLength
- PBYTE P = paramsStart;
- PBYTE A = P + header->cbFieldLength;
- PBYTE B = A + header->cbFieldLength;
- PBYTE GX = B + header->cbFieldLength;
- PBYTE GY = GX + header->cbFieldLength;
-
- // cbSubgroupOrder
- PBYTE N = GY + header->cbFieldLength;
-
- // cbCofactor
- PBYTE H = N + header->cbSubgroupOrder;
-
- // cbSeed
- PBYTE S = H + header->cbCofactor;
-
- *paramLength =
- sizeof(BCRYPT_ECCFULLKEY_BLOB) + 5 * header->cbFieldLength + header->cbSubgroupOrder + header->cbCofactor + header->cbSeed;
-
- jobject p_int = bytes_to_biginteger(env, P, header->cbFieldLength);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p_int);
-
- jobject a_int = bytes_to_biginteger(env, A, header->cbFieldLength);
- jobject b_int = bytes_to_biginteger(env, B, header->cbFieldLength);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>",
- "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a_int, b_int);
-
- jobject gx_int = bytes_to_biginteger(env, GX, header->cbFieldLength);
- jobject gy_int = bytes_to_biginteger(env, GY, header->cbFieldLength);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx_int, gy_int);
-
- jobject n_int = bytes_to_biginteger(env, N, header->cbSubgroupOrder);
-
- jobject h_int = bytes_to_biginteger(env, H, header->cbCofactor);
- jmethodID bigint_to_int = (*env)->GetMethodID(env, biginteger_class, "intValue", "()I");
- jint cof = (*env)->CallIntMethod(env, h_int, bigint_to_int);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(
- env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n_int, cof);
-}
-
-static ULONG create_curve(JNIEnv *env, jobject params, PBYTE *curve) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- jint bytes = (bits + 7) / 8;
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint h = (*env)->CallIntMethod(env, params, get_h);
-
- jmethodID get_bitlength = (*env)->GetMethodID(env, biginteger_class, "bitLength", "()I");
- jint order_bits = (*env)->CallIntMethod(env, n, get_bitlength);
- jint order_bytes = (order_bits + 7) / 8;
-
- // header_size + 5*bytes + order_bytes + cof_size + 0
- ULONG bufSize = sizeof(BCRYPT_ECC_PARAMETER_HEADER) + 5 * bytes + order_bytes + 1 + 0;
- *curve = calloc(bufSize, 1);
- BCRYPT_ECC_PARAMETER_HEADER *header = (BCRYPT_ECC_PARAMETER_HEADER *)*curve;
- header->dwVersion = 1;
- header->dwCurveType = 1; // 1 -> Prime short Weierstrass, 2 -> Prime Twisted Edwards, 3 -> Montgomery
- header->dwCurveGenerationAlgId = 0;
- header->cbFieldLength = bytes;
- header->cbSubgroupOrder = order_bytes;
- header->cbCofactor = 1;
- header->cbSeed = 0;
-
- PBYTE paramsStart = &(*curve)[sizeof(BCRYPT_ECC_PARAMETER_HEADER)];
-
- biginteger_to_bytes(env, p, paramsStart, bytes);
- biginteger_to_bytes(env, a, paramsStart + bytes, bytes);
- biginteger_to_bytes(env, b, paramsStart + 2 * bytes, bytes);
- biginteger_to_bytes(env, gx, paramsStart + 3 * bytes, bytes);
- biginteger_to_bytes(env, gy, paramsStart + 4 * bytes, bytes);
- biginteger_to_bytes(env, n, paramsStart + 5 * bytes, order_bytes);
- PBYTE cof_ptr = (PBYTE)(paramsStart + 5 * bytes + order_bytes);
- *cof_ptr = (BYTE)h;
- return bufSize;
-}
-
-static ULONG init_algo(JNIEnv *env, BCRYPT_ALG_HANDLE *handle, jint *keyflag, NWPSTR *curve_name, LPCWSTR algo, jobject params) {
- NTSTATUS status;
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(handle, algo, MS_PRIMITIVE_PROVIDER, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- return 0;
- }
- ULONG result = 0;
- if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- jint utf_length = (*env)->GetStringUTFLength(env, name);
- PUCHAR chars = calloc(utf_length + 1, 1);
- (*env)->GetStringUTFRegion(env, name, 0, utf_length, chars);
- const named_curve_t *curve = lookup_curve(chars);
- ULONG ret = utf_8to16(curve_name, chars);
- if (NT_FAILURE(status = BCryptSetProperty(*handle, BCRYPT_ECC_CURVE_NAME, (PUCHAR)*curve_name, ret * sizeof(WCHAR), 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptSetProperty\n", status);
- return 0;
- }
- free(chars);
- result = curve->bits;
- *keyflag = KEYFLAG_IMPLICIT;
- } else if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- PBYTE curve;
- ULONG curveLen = create_curve(env, params, &curve);
- if (NT_FAILURE(status = BCryptSetProperty(*handle, BCRYPT_ECC_PARAMETERS, curve, curveLen, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptSetProperty\n", status);
- return 0;
- }
- free(curve);
-
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- result = bits;
- *keyflag = KEYFLAG_EXPLICIT;
- *curve_name = NULL;
- }
- return result;
-}
-
-static jobject key_to_privkey(JNIEnv *env, BCRYPT_KEY_HANDLE key, jint flag, LPCWSTR curve) {
- NTSTATUS status;
- ULONG bufSize = 0;
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCFULLPRIVATE_BLOB, NULL, 0, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(full, length only)\n", status);
- return NULL;
- }
- if (bufSize == 0) {
- printf("buf 0\n");
- return NULL;
- }
-
- PBYTE fullBuf = calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCFULLPRIVATE_BLOB, fullBuf, bufSize, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(full, whole)\n", status);
- free(fullBuf);
- return NULL;
- }
-
- ULONG paramLength;
- jobject ec_priv_param_spec = create_ec_param_spec(env, fullBuf, &paramLength);
-
- // fullBuf looks like:
- // BCRYPT_ECCFULLKEY_BLOB header
- // P[cbFieldLength] Prime specifying the base field.
- // A[cbFieldLength] Coefficient A of the equation y^2 = x^3 + A*x + B mod p
- // B[cbFieldLength] Coefficient B of the equation y^2 = x^3 + A*x + B mod p
- // Gx[cbFieldLength] X-coordinate of the base point.
- // Gy[cbFieldLength] Y-coordinate of the base point.
- // n[cbSubgroupOrder] Order of the group generated by G = (x,y)
- // h[cbCofactor] Cofactor of G in E.
- // S[cbSeed] Seed of the curve.
- // Qx[cbFieldLength] X-coordinate of the public point.
- // Qy[cbFieldLength] Y-coordinate of the public point.
- // d[cbSubgroupOrder] Private key.
- BCRYPT_ECCFULLKEY_BLOB *privHeader = (BCRYPT_ECCFULLKEY_BLOB *)fullBuf;
- PBYTE priv_x = &fullBuf[paramLength];
- PBYTE priv_y = priv_x + privHeader->cbFieldLength;
- PBYTE priv = priv_y + privHeader->cbFieldLength;
-
- jbyteArray meta_bytes = NULL;
- jbyteArray header_bytes = NULL;
- switch (flag) {
- case 0: {
- // meta = curve
- jint meta_len = (wcslen(curve) + 1) * sizeof(WCHAR);
- meta_bytes = (*env)->NewByteArray(env, meta_len);
- jbyte *meta_data = (*env)->GetByteArrayElements(env, meta_bytes, NULL);
- memcpy(meta_data, curve, meta_len);
- (*env)->ReleaseByteArrayElements(env, meta_bytes, meta_data, 0);
- }
- case 1:
- case 2: {
- // meta = null
- // header = full
- header_bytes = (*env)->NewByteArray(env, paramLength);
- jbyte *header_data = (*env)->GetByteArrayElements(env, header_bytes, NULL);
- memcpy(header_data, fullBuf, paramLength);
- (*env)->ReleaseByteArrayElements(env, header_bytes, header_data, 0);
- break;
- }
- default:
- // header = small
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCPRIVATE_BLOB, NULL, 0, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(small, length only)\n", status);
- free(fullBuf);
- return NULL;
- }
- if (bufSize == 0) {
- printf("buf 0\n");
- free(fullBuf);
- return NULL;
- }
- PBYTE smallBuf = calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCPRIVATE_BLOB, smallBuf, bufSize, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(small, whole)\n", status);
- free(fullBuf);
- free(smallBuf);
- return NULL;
- }
- // smallBuf looks like:
- // BCRYPT_ECCKEY_BLOB header
- // Qx[cbFieldLength] X-coordinate of the public point.
- // Qy[cbFieldLength] Y-coordinate of the public point.
- // d[cbSubgroupOrder] Private key.
- header_bytes = (*env)->NewByteArray(env, sizeof(BCRYPT_ECCKEY_BLOB));
- jbyte *header_data = (*env)->GetByteArrayElements(env, header_bytes, NULL);
- memcpy(header_data, smallBuf, sizeof(BCRYPT_ECCKEY_BLOB));
- (*env)->ReleaseByteArrayElements(env, header_bytes, header_data, 0);
- free(smallBuf);
- break;
- }
-
- jbyteArray x_bytes = (*env)->NewByteArray(env, privHeader->cbFieldLength);
- jbyte *x_data = (*env)->GetByteArrayElements(env, x_bytes, NULL);
- memcpy(x_data, priv_x, privHeader->cbFieldLength);
- (*env)->ReleaseByteArrayElements(env, x_bytes, x_data, 0);
-
- jbyteArray y_bytes = (*env)->NewByteArray(env, privHeader->cbFieldLength);
- jbyte *y_data = (*env)->GetByteArrayElements(env, y_bytes, NULL);
- memcpy(y_data, priv_y, privHeader->cbFieldLength);
- (*env)->ReleaseByteArrayElements(env, y_bytes, y_data, 0);
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, privHeader->cbSubgroupOrder);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- memcpy(key_priv, priv, privHeader->cbSubgroupOrder);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- free(fullBuf);
-
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "(I[B[B[B[B[BLjava/security/spec/ECParameterSpec;)V");
- return (*env)->NewObject(env, privkey_class, ec_priv_init, flag, meta_bytes, header_bytes, x_bytes, y_bytes, priv_bytes,
- ec_priv_param_spec);
-}
-
-static jobject key_to_pubkey(JNIEnv *env, BCRYPT_KEY_HANDLE key, jint flag, LPCWSTR curve) {
- NTSTATUS status;
- ULONG bufSize = 0;
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCFULLPUBLIC_BLOB, NULL, 0, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(full, length only)\n", status);
- return NULL;
- }
- if (bufSize == 0) {
- printf("err0\n");
- return NULL;
- }
-
- PBYTE fullBuf = calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCFULLPUBLIC_BLOB, fullBuf, bufSize, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(full, whole)\n", status);
- return NULL;
- }
-
- ULONG paramLength;
- jobject ec_pub_param_spec = create_ec_param_spec(env, fullBuf, &paramLength);
-
- // fullBuf looks like:
- // BCRYPT_ECCFULLKEY_BLOB header
- // P[cbFieldLength] Prime specifying the base field.
- // A[cbFieldLength] Coefficient A of the equation y^2 = x^3 + A*x + B mod p
- // B[cbFieldLength] Coefficient B of the equation y^2 = x^3 + A*x + B mod p
- // Gx[cbFieldLength] X-coordinate of the base point.
- // Gy[cbFieldLength] Y-coordinate of the base point.
- // n[cbSubgroupOrder] Order of the group generated by G = (x,y)
- // h[cbCofactor] Cofactor of G in E.
- // S[cbSeed] Seed of the curve.
- // Qx[cbFieldLength] X-coordinate of the public point.
- // Qy[cbFieldLength] Y-coordinate of the public point.
- BCRYPT_ECCFULLKEY_BLOB *pubHeader = (BCRYPT_ECCFULLKEY_BLOB *)fullBuf;
- PBYTE pub_x = &fullBuf[paramLength];
- PBYTE pub_y = pub_x + pubHeader->cbFieldLength;
-
- jbyteArray meta_bytes = NULL;
- jbyteArray header_bytes = NULL;
- switch (flag) {
- case 0: {
- // meta = curve
- jint meta_len = (wcslen(curve) + 1) * sizeof(WCHAR);
- meta_bytes = (*env)->NewByteArray(env, meta_len);
- jbyte *meta_data = (*env)->GetByteArrayElements(env, meta_bytes, NULL);
- memcpy(meta_data, curve, meta_len);
- (*env)->ReleaseByteArrayElements(env, meta_bytes, meta_data, 0);
- }
- case 1:
- case 2: {
- header_bytes = (*env)->NewByteArray(env, paramLength);
- jbyte *header_data = (*env)->GetByteArrayElements(env, header_bytes, NULL);
- memcpy(header_data, pubHeader, paramLength);
- (*env)->ReleaseByteArrayElements(env, header_bytes, header_data, 0);
- break;
- }
- default:
- // header = small
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, 0, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(small, length only)\n", status);
- free(fullBuf);
- return NULL;
- }
- if (bufSize == 0) {
- printf("buf 0\n");
- free(fullBuf);
- return NULL;
- }
- PBYTE smallBuf = calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptExportKey(key, NULL, BCRYPT_ECCPUBLIC_BLOB, smallBuf, bufSize, &bufSize, 0))) {
- wprintf(L"**** Error 0x%x returned by BCryptExportKey(small, whole)\n", status);
- free(fullBuf);
- free(smallBuf);
- return NULL;
- }
- // smallBuf looks like:
- // BCRYPT_ECCKEY_BLOB header
- // Qx[cbFieldLength] X-coordinate of the public point.
- // Qy[cbFieldLength] Y-coordinate of the public point.
- header_bytes = (*env)->NewByteArray(env, sizeof(BCRYPT_ECCKEY_BLOB));
- jbyte *header_data = (*env)->GetByteArrayElements(env, header_bytes, NULL);
- memcpy(header_data, smallBuf, sizeof(BCRYPT_ECCKEY_BLOB));
- (*env)->ReleaseByteArrayElements(env, header_bytes, header_data, 0);
- free(smallBuf);
- break;
- }
-
- jbyteArray x_bytes = (*env)->NewByteArray(env, pubHeader->cbFieldLength);
- jbyte *x_data = (*env)->GetByteArrayElements(env, x_bytes, NULL);
- memcpy(x_data, pub_x, pubHeader->cbFieldLength);
- (*env)->ReleaseByteArrayElements(env, x_bytes, x_data, 0);
-
- jbyteArray y_bytes = (*env)->NewByteArray(env, pubHeader->cbFieldLength);
- jbyte *y_data = (*env)->GetByteArrayElements(env, y_bytes, NULL);
- memcpy(y_data, pub_y, pubHeader->cbFieldLength);
- (*env)->ReleaseByteArrayElements(env, y_bytes, y_data, 0);
-
- free(fullBuf);
-
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "(I[B[B[B[BLjava/security/spec/ECParameterSpec;)V");
- return (*env)->NewObject(env, pubkey_class, ec_pub_init, flag, meta_bytes, header_bytes, x_bytes, y_bytes, ec_pub_param_spec);
-}
-
-JNIEXPORT jobject JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_generate__ILjava_security_SecureRandom_2(JNIEnv *env,
- jobject self,
- jint keysize,
- jobject random) {
- NTSTATUS status;
- BCRYPT_ALG_HANDLE handle = NULL;
-
- jclass mscng_kpg_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi$Mscng");
- jfieldID type_id = (*env)->GetFieldID(env, mscng_kpg_class, "type", "Ljava/lang/String;");
- jstring type = (jstring)(*env)->GetObjectField(env, self, type_id);
- const char *type_data = (*env)->GetStringUTFChars(env, type, NULL);
- LPCWSTR algo;
- if (strcmp(type_data, "ECDH") == 0) {
- switch (keysize) {
- case 256:
- algo = BCRYPT_ECDH_P256_ALGORITHM;
- break;
- case 384:
- algo = BCRYPT_ECDH_P384_ALGORITHM;
- break;
- case 521:
- algo = BCRYPT_ECDH_P521_ALGORITHM;
- break;
- default:
- // unreachable
- return NULL;
- }
- } else if (strcmp(type_data, "ECDSA") == 0) {
- switch (keysize) {
- case 256:
- algo = BCRYPT_ECDSA_P256_ALGORITHM;
- break;
- case 384:
- algo = BCRYPT_ECDSA_P384_ALGORITHM;
- break;
- case 521:
- algo = BCRYPT_ECDSA_P521_ALGORITHM;
- break;
- default:
- // unreachable
- return NULL;
- }
- } else {
- // unreachable
- return NULL;
- }
- (*env)->ReleaseStringUTFChars(env, type, type_data);
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(&handle, algo, MS_PRIMITIVE_PROVIDER, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptOpenAlgorithmProvider", status);
- return NULL;
- }
-
- BCRYPT_KEY_HANDLE key = NULL;
-
- native_timing_start();
- status = BCryptGenerateKeyPair(handle, &key, keysize, 0);
- native_timing_pause();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptGenerateKeyPair\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- return NULL;
- }
-
- native_timing_restart();
- status = BCryptFinalizeKeyPair(key, 0);
- native_timing_stop();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptFinalizeKeyPair\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- return NULL;
- }
-
- jobject privkey = key_to_privkey(env, key, KEYFLAG_NIST, NULL);
- jobject pubkey = key_to_pubkey(env, key, KEYFLAG_NIST, NULL);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- BCryptDestroyKey(key);
- BCryptCloseAlgorithmProvider(handle, 0);
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(
- JNIEnv *env, jobject self, jobject params, jobject random) {
- NTSTATUS status;
- BCRYPT_ALG_HANDLE handle = NULL;
- BCRYPT_KEY_HANDLE key = NULL;
-
- jclass mscng_kpg_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi$Mscng");
- jfieldID type_id = (*env)->GetFieldID(env, mscng_kpg_class, "type", "Ljava/lang/String;");
- jstring type = (jstring)(*env)->GetObjectField(env, self, type_id);
- const char *type_data = (*env)->GetStringUTFChars(env, type, NULL);
- LPCWSTR algo;
- if (strcmp(type_data, "ECDH") == 0) {
- algo = BCRYPT_ECDH_ALGORITHM;
- } else if (strcmp(type_data, "ECDSA") == 0) {
- algo = BCRYPT_ECDSA_ALGORITHM;
- } else {
- // unreachable
- return NULL;
- }
- (*env)->ReleaseStringUTFChars(env, type, type_data);
-
- jint keyflag;
- NWPSTR curveName;
- ULONG bits = init_algo(env, &handle, &keyflag, &curveName, algo, params);
- if (bits == 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't initialize algo.");
- return NULL;
- }
-
- native_timing_start();
- status = BCryptGenerateKeyPair(handle, &key, bits, 0);
- native_timing_pause();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptGenerateKeyPair\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- return NULL;
- }
-
- native_timing_restart();
- status = BCryptFinalizeKeyPair(key, 0);
- native_timing_stop();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptFinalizeKeyPair\n", status);
- BCryptCloseAlgorithmProvider(handle, 0);
- return NULL;
- }
-
- jobject privkey = key_to_privkey(env, key, keyflag, curveName);
- jobject pubkey = key_to_pubkey(env, key, keyflag, curveName);
-
- if (curveName) {
- free(curveName);
- }
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- BCryptDestroyKey(key);
- BCryptCloseAlgorithmProvider(handle, 0);
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-static NTSTATUS init_use_algo(JNIEnv *env, BCRYPT_ALG_HANDLE *handle, LPCWSTR type, jint keyflag, jbyteArray meta, jobject params) {
- LPCWSTR ecdh_algos[] = {BCRYPT_ECDH_ALGORITHM, BCRYPT_ECDH_P256_ALGORITHM, BCRYPT_ECDH_P384_ALGORITHM, BCRYPT_ECDH_P521_ALGORITHM};
- LPCWSTR ecdsa_algos[] = {BCRYPT_ECDSA_ALGORITHM, BCRYPT_ECDSA_P256_ALGORITHM, BCRYPT_ECDSA_P384_ALGORITHM, BCRYPT_ECDSA_P521_ALGORITHM};
-
- LPCWSTR *algos;
- LPCWSTR algo;
- if (lstrcmpW(type, BCRYPT_ECDH_ALGORITHM) == 0) {
- algos = ecdh_algos;
- } else if (lstrcmpW(type, BCRYPT_ECDSA_ALGORITHM) == 0) {
- algos = ecdsa_algos;
- } else {
- // unreachable
- return STATUS_INVALID_PARAMETER;
- }
-
- switch (keyflag) {
- case KEYFLAG_IMPLICIT:
- case KEYFLAG_EXPLICIT:
- case KEYFLAG_OTHER:
- algo = algos[0];
- break;
- case KEYFLAG_NIST: {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- switch (bits) {
- case 256:
- algo = algos[1];
- break;
- case 384:
- algo = algos[2];
- break;
- case 521:
- algo = algos[3];
- break;
- default:
- return STATUS_INVALID_PARAMETER;
- }
- break;
- }
- }
- NTSTATUS status;
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(handle, algo, MS_PRIMITIVE_PROVIDER, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- return status;
- }
-
- switch (keyflag) {
- case KEYFLAG_IMPLICIT: {
- jint meta_len = (*env)->GetArrayLength(env, meta);
- jbyte *meta_data = (*env)->GetByteArrayElements(env, meta, NULL);
- // if (NT_FAILURE(status = BCryptSetProperty(*handle, BCRYPT_ECC_CURVE_NAME, meta_data, meta_len, 0))) {
- // throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptSetProperty(curve name)\n",
- //status);
- // (*env)->ReleaseByteArrayElements(env, meta, meta_data, JNI_ABORT);
- // return status;
- //}
- (*env)->ReleaseByteArrayElements(env, meta, meta_data, JNI_ABORT);
- break;
- }
- case KEYFLAG_EXPLICIT:
- case KEYFLAG_OTHER: {
- PBYTE curve;
- ULONG curve_len = create_curve(env, params, &curve);
- if (NT_FAILURE(status = BCryptSetProperty(*handle, BCRYPT_ECC_PARAMETERS, curve, curve_len, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptSetProperty(parameters)\n",
- status);
- free(curve);
- return status;
- }
- free(curve);
- break;
- }
- }
- return STATUS_SUCCESS;
-}
-
-static jint get_keyflag(JNIEnv *env, jobject key) {
- if ((*env)->IsInstanceOf(env, key, pubkey_class) || (*env)->IsInstanceOf(env, key, privkey_class)) {
- jclass key_class = (*env)->GetObjectClass(env, key);
- jmethodID get_flag = (*env)->GetMethodID(env, key_class, "getFlag", "()I");
- return (*env)->CallIntMethod(env, key, get_flag);
- } else {
- return KEYFLAG_OTHER;
- }
-}
-
-static jbyteArray get_meta(JNIEnv *env, jobject key) {
- if ((*env)->IsInstanceOf(env, key, pubkey_class) || (*env)->IsInstanceOf(env, key, privkey_class)) {
- jclass key_class = (*env)->GetObjectClass(env, key);
- jmethodID get_meta = (*env)->GetMethodID(env, key_class, "getMeta", "()[B");
- return (jbyteArray)(*env)->CallObjectMethod(env, key, get_meta);
- } else {
- return NULL;
- }
-}
-
-JNIEXPORT jbyteArray JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Mscng_generateSecret__Ljava_security_interfaces_ECPublicKey_2Ljava_security_interfaces_ECPrivateKey_2Ljava_security_spec_AlgorithmParameterSpec_2(
- JNIEnv *env, jobject self, jobject pubkey, jobject privkey, jobject params) {
- NTSTATUS status;
-
- jclass mscng_ka_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi$Mscng");
- jfieldID type_id = (*env)->GetFieldID(env, mscng_ka_class, "type", "Ljava/lang/String;");
- jstring type = (jstring)(*env)->GetObjectField(env, self, type_id);
- const char *type_data = (*env)->GetStringUTFChars(env, type, NULL);
- LPCWSTR kdf_algo;
- if (strcmp(type_data, "ECDHwithSHA1KDF(CNG)") == 0) {
- kdf_algo = BCRYPT_SHA1_ALGORITHM;
- } else if (strcmp(type_data, "ECDHwithSHA256KDF(CNG)") == 0) {
- kdf_algo = BCRYPT_SHA256_ALGORITHM;
- } else if (strcmp(type_data, "ECDHwithSHA384KDF(CNG)") == 0) {
- kdf_algo = BCRYPT_SHA384_ALGORITHM;
- } else if (strcmp(type_data, "ECDHwithSHA512KDF(CNG)") == 0) {
- kdf_algo = BCRYPT_SHA512_ALGORITHM;
- } else {
- // unreachable
- return NULL;
- }
- (*env)->ReleaseStringUTFChars(env, type, type_data);
-
- BCRYPT_ALG_HANDLE kaHandle = NULL;
-
- jint pub_flag = get_keyflag(env, pubkey);
- if (pub_flag == KEYFLAG_OTHER) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Cannot import non-native public key.");
- return NULL;
- }
- jbyteArray meta = get_meta(env, pubkey);
-
- if (NT_FAILURE(status = init_use_algo(env, &kaHandle, BCRYPT_ECDH_ALGORITHM, pub_flag, meta, params))) {
- return NULL;
- }
-
- BCRYPT_KEY_HANDLE pkey = NULL;
- BCRYPT_KEY_HANDLE skey = NULL;
-
- jmethodID get_data_priv = (*env)->GetMethodID(env, pubkey_class, "getData", "()[B");
- jbyteArray pubkey_barray = (jbyteArray)(*env)->CallObjectMethod(env, pubkey, get_data_priv);
-
- jint pub_length = (*env)->GetArrayLength(env, pubkey_barray);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pubkey_barray, NULL);
- if (NT_FAILURE(status = BCryptImportKeyPair(kaHandle, NULL, BCRYPT_ECCFULLPUBLIC_BLOB, &pkey, pub_data, pub_length, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptImportKeyPair(pub)\n", status);
- BCryptCloseAlgorithmProvider(kaHandle, 0);
- (*env)->ReleaseByteArrayElements(env, pubkey_barray, pub_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, pubkey_barray, pub_data, JNI_ABORT);
-
- jint priv_flag = get_keyflag(env, privkey);
- if (priv_flag == KEYFLAG_OTHER) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Cannot import non-native private key.");
- return NULL;
- }
-
- jmethodID get_data_pub = (*env)->GetMethodID(env, privkey_class, "getData", "()[B");
- jbyteArray privkey_barray = (jbyteArray)(*env)->CallObjectMethod(env, privkey, get_data_pub);
-
- jint priv_length = (*env)->GetArrayLength(env, privkey_barray);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey_barray, NULL);
- if (NT_FAILURE(status = BCryptImportKeyPair(kaHandle, NULL, BCRYPT_ECCFULLPRIVATE_BLOB, &skey, priv_data, priv_length, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptImportKeyPair(priv)\n", status);
- BCryptCloseAlgorithmProvider(kaHandle, 0);
- BCryptDestroyKey(pkey);
- (*env)->ReleaseByteArrayElements(env, privkey_barray, priv_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, privkey_barray, priv_data, JNI_ABORT);
-
- BCRYPT_SECRET_HANDLE ka = NULL;
-
- native_timing_start();
- status = BCryptSecretAgreement(skey, pkey, &ka, 0);
- native_timing_stop();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptSecretAgreement\n", status);
- BCryptCloseAlgorithmProvider(kaHandle, 0);
- BCryptDestroyKey(pkey);
- BCryptDestroyKey(skey);
- return NULL;
- }
-
- BCryptBufferDesc paramList = {0};
- BCryptBuffer kdfParams[1] = {0};
- kdfParams[0].BufferType = KDF_HASH_ALGORITHM;
- kdfParams[0].cbBuffer = (DWORD)((wcslen(kdf_algo) + 1) * sizeof(WCHAR));
- kdfParams[0].pvBuffer = (PVOID)kdf_algo;
- paramList.cBuffers = 1;
- paramList.pBuffers = kdfParams;
- paramList.ulVersion = BCRYPTBUFFER_VERSION;
-
- ULONG bufSize = 0;
- if (NT_FAILURE(status = BCryptDeriveKey(ka, BCRYPT_KDF_HASH, &paramList, NULL, 0, &bufSize, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptDeriveKey(length only)\n", status);
- return NULL;
- }
-
- PBYTE derived = calloc(bufSize, 1);
- if (NT_FAILURE(status = BCryptDeriveKey(ka, BCRYPT_KDF_HASH, &paramList, derived, bufSize, &bufSize, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptDeriveKey(whole)\n", status);
- return NULL;
- }
-
- jbyteArray result = (*env)->NewByteArray(env, bufSize);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- memcpy(result_data, derived, bufSize);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- free(derived);
- BCryptDestroyKey(pkey);
- BCryptDestroyKey(skey);
- BCryptDestroySecret(ka);
- BCryptCloseAlgorithmProvider(kaHandle, 0);
- return result;
-}
-
-JNIEXPORT jobject JNICALL
-Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Mscng_generateSecret__Ljava_security_interfaces_ECPublicKey_2Ljava_security_interfaces_ECPrivateKey_2Ljava_security_spec_AlgorithmParameterSpec_2Ljava_lang_String_2(
- JNIEnv *env, jobject self, jobject pubkey, jobject privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-static LPCWSTR get_sighash_algo(JNIEnv *env, jobject self) {
- jclass mscng_sig_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi$Mscng");
- jfieldID type_id = (*env)->GetFieldID(env, mscng_sig_class, "type", "Ljava/lang/String;");
- jstring type = (jstring)(*env)->GetObjectField(env, self, type_id);
- const char *type_data = (*env)->GetStringUTFChars(env, type, NULL);
- LPCWSTR hash_algo;
- if (strcmp(type_data, "SHA1withECDSA") == 0) {
- hash_algo = BCRYPT_SHA1_ALGORITHM;
- } else if (strcmp(type_data, "SHA256withECDSA") == 0) {
- hash_algo = BCRYPT_SHA256_ALGORITHM;
- } else if (strcmp(type_data, "SHA384withECDSA") == 0) {
- hash_algo = BCRYPT_SHA384_ALGORITHM;
- } else if (strcmp(type_data, "SHA512withECDSA") == 0) {
- hash_algo = BCRYPT_SHA512_ALGORITHM;
- } else {
- // unreachable
- return NULL;
- }
- (*env)->ReleaseStringUTFChars(env, type, type_data);
- return hash_algo;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Mscng_sign(JNIEnv *env, jobject self,
- jbyteArray data, jobject privkey,
- jobject params) {
- NTSTATUS status;
- LPCWSTR hash_algo = get_sighash_algo(env, self);
-
- BCRYPT_ALG_HANDLE sigHandle = NULL;
-
- jint keyflag = get_keyflag(env, privkey);
- if (keyflag == KEYFLAG_OTHER) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Cannot import non-native private key.");
- return NULL;
- }
- jbyteArray meta = get_meta(env, privkey);
-
- if (NT_FAILURE(status = init_use_algo(env, &sigHandle, BCRYPT_ECDSA_ALGORITHM, keyflag, meta, params))) {
- return NULL;
- }
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(&sigHandle, BCRYPT_ECDSA_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- return NULL;
- }
-
- BCRYPT_ALG_HANDLE hashHandle = NULL;
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(&hashHandle, hash_algo, NULL, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- return NULL;
- }
-
- DWORD dummy = 0;
- DWORD hash_len = 0;
- if (NT_FAILURE(status = BCryptGetProperty(hashHandle, BCRYPT_HASH_LENGTH, (PBYTE)&hash_len, sizeof(DWORD), &dummy, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptGetProperty(hash len)\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- return NULL;
- }
-
- PBYTE hash = calloc(hash_len, 1);
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jbyte *data_bytes = (*env)->GetByteArrayElements(env, data, NULL);
- native_timing_start();
- status = BCryptHash(hashHandle, NULL, 0, data_bytes, data_len, hash, hash_len);
- native_timing_pause();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptHash\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- (*env)->ReleaseByteArrayElements(env, data, data_bytes, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, data, data_bytes, JNI_ABORT);
-
- BCRYPT_KEY_HANDLE skey = NULL;
-
- jmethodID get_data = (*env)->GetMethodID(env, privkey_class, "getData", "()[B");
- jbyteArray privkey_barray = (jbyteArray)(*env)->CallObjectMethod(env, privkey, get_data);
-
- jint priv_length = (*env)->GetArrayLength(env, privkey_barray);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey_barray, NULL);
- if (NT_FAILURE(status = BCryptImportKeyPair(sigHandle, NULL, BCRYPT_ECCFULLPRIVATE_BLOB, &skey, priv_data, priv_length, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptImportKeyPair\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- (*env)->ReleaseByteArrayElements(env, privkey_barray, priv_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, privkey_barray, priv_data, JNI_ABORT);
-
- DWORD sig_len = 0;
- native_timing_restart();
- status = BCryptSignHash(skey, NULL, hash, hash_len, NULL, 0, &sig_len, 0);
- native_timing_pause();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptSignHash(len only)\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- return NULL;
- }
-
- PBYTE sig_buf = calloc(sig_len, 1);
-
- native_timing_restart();
- status = BCryptSignHash(skey, NULL, hash, hash_len, sig_buf, sig_len, &sig_len, 0);
- native_timing_stop();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptSignHash(do)\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- free(sig_buf);
- return NULL;
- }
-
- DWORD half_len = sig_len / 2;
- jobject sig = asn1_der_encode(env, sig_buf, half_len, sig_buf + half_len, half_len);
-
- free(hash);
- free(sig_buf);
- BCryptDestroyKey(skey);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
-
- return sig;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Mscng_verify(JNIEnv *env, jobject self,
- jbyteArray sig, jbyteArray data,
- jobject pubkey, jobject params) {
- NTSTATUS status;
- LPCWSTR hash_algo = get_sighash_algo(env, self);
-
- BCRYPT_ALG_HANDLE sigHandle = NULL;
-
- jint keyflag = get_keyflag(env, pubkey);
- if (keyflag == KEYFLAG_OTHER) { // TODO: This is not necessary
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Cannot import non-native public key.");
- return JNI_FALSE;
- }
- jbyteArray meta = get_meta(env, pubkey);
-
- if (NT_FAILURE(status = init_use_algo(env, &sigHandle, BCRYPT_ECDSA_ALGORITHM, keyflag, meta, params))) {
- return JNI_FALSE;
- }
-
- BCRYPT_ALG_HANDLE hashHandle = NULL;
-
- if (NT_FAILURE(status = BCryptOpenAlgorithmProvider(&hashHandle, hash_algo, NULL, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- return JNI_FALSE;
- }
-
- DWORD dummy = 0;
- DWORD hash_len = 0;
- if (NT_FAILURE(status = BCryptGetProperty(hashHandle, BCRYPT_HASH_LENGTH, (PBYTE)&hash_len, sizeof(DWORD), &dummy, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptGetProperty(hash len)\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- return JNI_FALSE;
- }
-
- PBYTE hash = calloc(hash_len, 1);
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jbyte *data_bytes = (*env)->GetByteArrayElements(env, data, NULL);
- native_timing_start();
- status = BCryptHash(hashHandle, NULL, 0, data_bytes, data_len, hash, hash_len);
- native_timing_pause();
-
- if (NT_FAILURE(status)) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptHash\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- (*env)->ReleaseByteArrayElements(env, data, data_bytes, JNI_ABORT);
- return JNI_FALSE;
- }
- (*env)->ReleaseByteArrayElements(env, data, data_bytes, JNI_ABORT);
-
- BCRYPT_KEY_HANDLE pkey = NULL;
-
- jmethodID get_data = (*env)->GetMethodID(env, pubkey_class, "getData", "()[B");
- jbyteArray pubkey_barray = (jbyteArray)(*env)->CallObjectMethod(env, pubkey, get_data);
-
- jint pub_length = (*env)->GetArrayLength(env, pubkey_barray);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pubkey_barray, NULL);
- if (NT_FAILURE(status = BCryptImportKeyPair(sigHandle, NULL, BCRYPT_ECCFULLPUBLIC_BLOB, &pkey, pub_data, pub_length, 0))) {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptImportKeyPair\n", status);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- (*env)->ReleaseByteArrayElements(env, pubkey_barray, pub_data, JNI_ABORT);
- return JNI_FALSE;
- }
- (*env)->ReleaseByteArrayElements(env, pubkey_barray, pub_data, JNI_ABORT);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- jmethodID get_bitlength = (*env)->GetMethodID(env, biginteger_class, "bitLength", "()I");
- jint ord_bits = (*env)->CallIntMethod(env, n, get_bitlength);
- jint ord_bytes = (ord_bits + 7) / 8;
-
- jint sig_len = (*env)->GetArrayLength(env, sig);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, sig, NULL);
- jbyte *r;
- size_t rlen;
- jbyte *s;
- size_t slen;
- bool decode = asn1_der_decode(env, sig, &r, &rlen, &s, &slen);
- (*env)->ReleaseByteArrayElements(env, sig, sig_data, JNI_ABORT);
-
- if (!decode) {
- throw_new(env, "java/security/GeneralSecurityException", "Error decoding sig.");
- BCryptDestroyKey(pkey);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- free(hash);
- return JNI_FALSE;
- }
-
- jbyte *r_cpy = r;
- jbyte *s_cpy = s;
- if (rlen > ord_bytes) {
- r_cpy += ord_bytes - rlen;
- }
- if (slen > ord_bytes) {
- s_cpy += ord_bytes - slen;
- }
- if (rlen < ord_bytes) {
- r_cpy = _alloca(ord_bytes);
- memset(r_cpy, 0, ord_bytes);
- memcpy(r_cpy, r + (ord_bytes - rlen), ord_bytes);
- }
- if (slen < ord_bytes) {
- s_cpy = _alloca(ord_bytes);
- memset(s_cpy, 0, ord_bytes);
- memcpy(s_cpy, s + (ord_bytes - slen), ord_bytes);
- }
- rlen = ord_bytes;
- slen = ord_bytes;
-
- UCHAR *sig_full = calloc(rlen + slen, 1);
- memcpy(sig_full, r_cpy, rlen);
- memcpy(sig_full + rlen, s_cpy, slen);
- free(r);
- free(s);
-
- native_timing_restart();
- NTSTATUS result = BCryptVerifySignature(pkey, NULL, hash, hash_len, sig_full, rlen + slen, 0);
- native_timing_stop();
-
- free(hash);
- free(sig_full);
- BCryptDestroyKey(pkey);
- BCryptCloseAlgorithmProvider(hashHandle, 0);
- BCryptCloseAlgorithmProvider(sigHandle, 0);
-
- if (result == STATUS_SUCCESS) {
- return JNI_TRUE;
- } else if (result == STATUS_INVALID_SIGNATURE) {
- return JNI_FALSE;
- } else {
- throw_new_var(env, "java/security/GeneralSecurityException", "Error 0x%x returned by BCryptVerifySignature\n", status);
- return JNI_FALSE;
- }
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/native.h b/src/cz/crcs/ectester/standalone/libs/jni/native.h
deleted file mode 100644
index 8f5b521..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/native.h
+++ /dev/null
@@ -1,2044 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class cz_crcs_ectester_standalone_libs_NativeECLibrary */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_NativeECLibrary
-#define _Included_cz_crcs_ectester_standalone_libs_NativeECLibrary
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_NativeECLibrary
- * Method: getNativeTimingSupport
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingSupport
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_NativeECLibrary
- * Method: setNativeTimingType
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_setNativeTimingType
- (JNIEnv *, jobject, jstring);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_NativeECLibrary
- * Method: getNativeTimingResolution
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingResolution
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_NativeECLibrary
- * Method: getNativeTimingUnit
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getNativeTimingUnit
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_NativeECLibrary
- * Method: getLastNativeTiming
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_cz_crcs_ectester_standalone_libs_NativeECLibrary_getLastNativeTiming
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_TomcryptLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_TomcryptLib
-#define _Included_cz_crcs_ectester_standalone_libs_TomcryptLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_TomcryptLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_TomcryptLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_TomcryptLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_TomcryptLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_TomCrypt
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024TomCrypt_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_TomCrypt
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_TomCrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_TomCrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_TomCrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_TomCrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_TomCrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_TomCrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_TomCrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_TomCrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_TomCrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_TomCrypt
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024TomCrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_TomCrypt
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024TomCrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_TomCryptRaw */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_TomCryptRaw
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_TomCryptRaw
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_TomCryptRaw
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024TomCryptRaw_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_TomCryptRaw
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024TomCryptRaw_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_BotanLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_BotanLib
-#define _Included_cz_crcs_ectester_standalone_libs_BotanLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_BotanLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BotanLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_BotanLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BotanLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Botan
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Botan_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Botan
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Botan_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Botan
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Botan_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Botan
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Botan_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Botan */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Botan
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Botan
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Botan
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Botan_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Botan
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Botan_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_CryptoppLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_CryptoppLib
-#define _Included_cz_crcs_ectester_standalone_libs_CryptoppLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_CryptoppLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_CryptoppLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_CryptoppLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_CryptoppLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Cryptopp
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Cryptopp_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Cryptopp
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Cryptopp_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Cryptopp
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Cryptopp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Cryptopp
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Cryptopp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Cryptopp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Cryptopp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Cryptopp
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Cryptopp
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Cryptopp_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Cryptopp
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Cryptopp_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_OpensslLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_OpensslLib
-#define _Included_cz_crcs_ectester_standalone_libs_OpensslLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_OpensslLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_OpensslLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_OpensslLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_OpensslLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Openssl
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Openssl_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Openssl
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Openssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Openssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Openssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Openssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Openssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Openssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Openssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Openssl
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Openssl_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Openssl
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Openssl_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_MscngLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_MscngLib
-#define _Included_cz_crcs_ectester_standalone_libs_MscngLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_MscngLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MscngLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_MscngLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MscngLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Mscng
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Mscng_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Mscng
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Mscng_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Mscng
- * Method: generateSecret
- * Signature: (Ljava/security/interfaces/ECPublicKey;Ljava/security/interfaces/ECPrivateKey;Ljava/security/spec/AlgorithmParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Mscng_generateSecret__Ljava_security_interfaces_ECPublicKey_2Ljava_security_interfaces_ECPrivateKey_2Ljava_security_spec_AlgorithmParameterSpec_2
- (JNIEnv *, jobject, jobject, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Mscng
- * Method: generateSecret
- * Signature: (Ljava/security/interfaces/ECPublicKey;Ljava/security/interfaces/ECPrivateKey;Ljava/security/spec/AlgorithmParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Mscng_generateSecret__Ljava_security_interfaces_ECPublicKey_2Ljava_security_interfaces_ECPrivateKey_2Ljava_security_spec_AlgorithmParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jobject, jobject, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Mscng */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Mscng
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Mscng
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Mscng
- * Method: sign
- * Signature: ([BLjava/security/interfaces/ECPrivateKey;Ljava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Mscng_sign
- (JNIEnv *, jobject, jbyteArray, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Mscng
- * Method: verify
- * Signature: ([B[BLjava/security/interfaces/ECPublicKey;Ljava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Mscng_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_BoringsslLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_BoringsslLib
-#define _Included_cz_crcs_ectester_standalone_libs_BoringsslLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_BoringsslLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BoringsslLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_BoringsslLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_BoringsslLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Boringssl
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Boringssl_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Boringssl
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Boringssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Boringssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Boringssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Boringssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Boringssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Boringssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Boringssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Boringssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Boringssl
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Boringssl_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Boringssl
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Boringssl_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_GcryptLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_GcryptLib
-#define _Included_cz_crcs_ectester_standalone_libs_GcryptLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_GcryptLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_GcryptLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_GcryptLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_GcryptLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Gcrypt
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Gcrypt_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Gcrypt
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Gcrypt_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Gcrypt
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Gcrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Gcrypt
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Gcrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Gcrypt */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Gcrypt
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Gcrypt
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Gcrypt
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Gcrypt_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Gcrypt
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Gcrypt_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_MbedTLSLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_MbedTLSLib
-#define _Included_cz_crcs_ectester_standalone_libs_MbedTLSLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_MbedTLSLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MbedTLSLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_MbedTLSLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MbedTLSLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_MbedTLS
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024MbedTLS_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_MbedTLS
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024MbedTLS_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_MbedTLS
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024MbedTLS_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_MbedTLS
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024MbedTLS_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_MbedTLS */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_MbedTLS
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_MbedTLS
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_MbedTLS
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024MbedTLS_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_MbedTLS
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024MbedTLS_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_IppcpLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_IppcpLib
-#define _Included_cz_crcs_ectester_standalone_libs_IppcpLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_IppcpLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_IppcpLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_IppcpLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_IppcpLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Ippcp
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Ippcp_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Ippcp
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Ippcp_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Ippcp
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Ippcp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Ippcp
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Ippcp_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Ippcp */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Ippcp
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Ippcp
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Ippcp
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Ippcp_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Ippcp
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Ippcp_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_MatrixsslLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_MatrixsslLib
-#define _Included_cz_crcs_ectester_standalone_libs_MatrixsslLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_MatrixsslLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_MatrixsslLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Matrixssl_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_LibresslLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_LibresslLib
-#define _Included_cz_crcs_ectester_standalone_libs_LibresslLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_LibresslLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_LibresslLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_LibresslLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_LibresslLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Libressl
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Libressl_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Libressl
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Libressl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Libressl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Libressl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Libressl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Libressl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Libressl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Libressl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Libressl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Libressl
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Libressl_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Libressl
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Libressl_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/nettle.c b/src/cz/crcs/ectester/standalone/libs/jni/nettle.c
deleted file mode 100644
index e8d874a..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/nettle.c
+++ /dev/null
@@ -1,511 +0,0 @@
-#include "native.h"
-#include <string.h>
-
-#include <nettle/version.h>
-#include <nettle/ecc.h>
-#include <nettle/ecc-curve.h>
-#include <nettle/ecdsa.h>
-#include <nettle/yarrow.h>
-#include <nettle/dsa.h>
-#include <gmp.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-static struct yarrow256_ctx yarrow;
-
-
-static jclass provider_class;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_NettleLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Nettle");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, "Nettle");
-
- double version = NETTLE_VERSION_MAJOR + (double) NETTLE_VERSION_MINOR / 10;
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Nettle_setup(JNIEnv *env, jobject self) {
-
- INIT_PROVIDER(env, provider_class);
- ADD_KPG(env, self, "EC", "Nettle");
- ADD_KA(env, self, "ECDH", "NettleECDH");
- ADD_SIG(env, self, "NONEwithECDSA", "NettleECDSAwithNONE");
-
- init_classes(env, "Nettle");
-
- yarrow256_init(&yarrow, 0, NULL);
- uint8_t file = open("/dev/random", O_RDONLY);
- yarrow256_seed(&yarrow, YARROW256_SEED_FILE_SIZE, &file);
- close(file);
-
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_NettleLib_getCurves(JNIEnv *env, jobject self) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
- char *curve_names[] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- for (int i = 0; i < 5; i++) {
- jstring curve_name = (*env)->NewStringUTF(env, curve_names[i]);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Nettle_keysizeSupported(JNIEnv *env, jobject self, jint keysize) {
- int supported[] = {192, 224, 256, 384, 521};
- for (int i = 0; i < 5; i++) {
- if (keysize == supported[i]) {
- return JNI_TRUE;
- }
- }
- return JNI_FALSE;
-}
-
-static const struct ecc_curve* create_curve(JNIEnv *env, const char* curve_name) {
- const struct ecc_curve* curve = NULL;
- if (curve_name) {
- if (strcasecmp("secp192r1", curve_name) == 0) {
- curve = nettle_get_secp_192r1();
- }
- if (strcasecmp("secp224r1", curve_name) == 0) {
- curve = nettle_get_secp_224r1();
- }
- if (strcasecmp("secp256r1", curve_name) == 0) {
- curve = nettle_get_secp_256r1();
- }
- if (strcasecmp("secp384r1", curve_name) == 0) {
- curve = nettle_get_secp_384r1();
- }
- if (strcasecmp("secp521r1", curve_name) == 0) {
- curve = nettle_get_secp_521r1();
- }
- return curve;
- }
- return NULL;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Nettle_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- return JNI_FALSE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
-
- char *curve_name[5] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- for (int i = 0; i < sizeof(curve_name); i++) {
- if (strcasecmp(utf_name, curve_name[i]) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
- return JNI_FALSE;
-
-}
-
-static jobject generate_from_curve(JNIEnv *env, const struct ecc_curve* curve, jobject spec, int byte_size) {
-
- struct ecc_point pub;
- struct ecc_scalar priv;
-
- ecc_point_init(&pub, curve);
- ecc_scalar_init(&priv, curve);
- native_timing_start();
- ecdsa_generate_keypair(&pub, &priv, (void *) &yarrow, (nettle_random_func *) yarrow256_random);
- native_timing_stop();
-
- mpz_t private_value;
- mpz_init(private_value);
- ecc_scalar_get(&priv, private_value);
- size_t size = 0;
- size_t xLen = 0;
- size_t yLen = 0;
- mpz_export(NULL, &size, 1, sizeof(unsigned char), 0, 0, private_value);
- jbyteArray priv_bytes = (*env)->NewByteArray(env, byte_size);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
-
- int diff = byte_size - size;
- memset(key_priv, 0x00, diff);
-
- mpz_export((unsigned char*) key_priv + diff, &size, 1, sizeof(unsigned char), 0, 0, private_value);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
-
- unsigned long key_len = 2*byte_size + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- mpz_t pub_value_x;
- mpz_init(pub_value_x);
- mpz_t pub_value_y;
- mpz_init(pub_value_y);
- ecc_point_get(&pub, pub_value_x, pub_value_y);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- key_pub[0] = 0x04;
-
- mpz_export(NULL, &xLen, 1, sizeof(unsigned char), 0, 0, pub_value_x);
- diff = byte_size - xLen;
- memset(key_pub + 1, 0x00, diff);
- mpz_export((unsigned char*) key_pub + 1+diff, &xLen, 1, sizeof(unsigned char), 0, 0, pub_value_x);
-
- mpz_export(NULL, &yLen, 1, sizeof(unsigned char), 0, 0, pub_value_y);
- diff = byte_size - yLen;
- memset(key_pub + 1 + byte_size, 0x00, diff);
- mpz_export((unsigned char*) key_pub + 1 + byte_size + diff, &yLen, 1, sizeof(unsigned char), 0, 0, pub_value_y);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- mpz_clears(private_value, pub_value_x, pub_value_y, NULL);
- ecc_point_clear(&pub);
- ecc_scalar_clear(&priv);
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-
-
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Nettle_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Nettle_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2Ljava_security_spec_AlgorithmParameterSpec_2(JNIEnv *env, jobject self, jobject params, jobject random, jobject spec) {
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- return NULL;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const struct ecc_curve* curve;
- int byte_size;
- char *curve_name[5] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- int byte_sizes[] = {24, 28, 32, 48, 66};
- for (int i = 0; i < sizeof(curve_name); i++) {
- if (strcasecmp(utf_name, curve_name[i]) == 0) {
- curve = create_curve(env, curve_name[i]);
- byte_size = byte_sizes[i];
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
- jobject result = generate_from_curve(env, curve, spec, byte_size);
- return result;
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
- return NULL;
-}
-
-int barray_to_pubkey(JNIEnv *env, struct ecc_point* pubKey , jbyteArray pub) {
- jsize pub_len = (*env)->GetArrayLength(env, pub);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- int pointLength = (pub_len - 1) / 2;
- mpz_t x;
- mpz_t y;
- mpz_init(x);
- mpz_init(y);
- mpz_import(x, pointLength, 1, sizeof(unsigned char), 0, 0, pub_data+1);
- mpz_import(y, pointLength, 1, sizeof(unsigned char), 0, 0, pub_data+1+pointLength);
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, JNI_ABORT);
- ecc_point_set(pubKey, x, y);
- return pointLength;
-}
-
-int barray_to_privkey(JNIEnv *env, struct ecc_scalar* privKey, jbyteArray priv) {
- jsize priv_len = (*env)->GetArrayLength(env, priv);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- mpz_t mp;
- mpz_init(mp);
- mpz_import(mp, priv_len, 1, sizeof(unsigned char), 0, 0, priv_data);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, JNI_ABORT);
- ecc_scalar_set(privKey, mp);
- return priv_len;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Nettle_generateSecret___3B_3BLjava_security_spec_ECGenParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const struct ecc_curve* curve;
- char *curve_name[5] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- int byte_sizes[] = {24, 28, 32, 48, 66};
- int byte_size;
- for (int i = 0; i < sizeof(curve_name); i++) {
- if (strcasecmp(utf_name, curve_name[i]) == 0) {
- curve = create_curve(env, curve_name[i]);
- byte_size = byte_sizes[i];
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- struct ecc_scalar privScalar;
- ecc_scalar_init(&privScalar, curve);
- barray_to_privkey(env, &privScalar, privkey);
-
- struct ecc_point eccPubPoint;
- ecc_point_init(&eccPubPoint, curve);
- barray_to_pubkey(env, &eccPubPoint, pubkey);
-
- struct ecc_point resultPoint;
- ecc_point_init(&resultPoint, curve);
-
- jbyteArray result = (*env)->NewByteArray(env, byte_size);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
-
- native_timing_start();
- ecc_point_mul(&resultPoint, &privScalar, &eccPubPoint);
- native_timing_stop();
-
- mpz_t x;
- mpz_init(x);
- ecc_point_get(&resultPoint, x, NULL);
-
- size_t size;
-
- mpz_export(NULL, &size, 1, sizeof(unsigned char), 0, 0, x);
- int diff = byte_size - size;
- memset(result_data, 0x00, diff);
- mpz_export((unsigned char*) result_data + diff, &size, 1, sizeof(unsigned char), 0, 0, x);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
- ecc_scalar_clear(&privScalar);
- ecc_point_clear(&eccPubPoint);
- ecc_point_clear(&resultPoint);
- mpz_clear(x);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Nettle_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-// credit to https://github.com/crocs-muni/ECTester/blob/master/src/cz/crcs/ectester/standalone/libs/jni/c_utils.c
-size_t signature_to_der(struct dsa_signature* signature, unsigned char *result, int byte_size) {
- size_t r_tmpSize;
- size_t s_tmpSize;
- size_t sequenceSize;
- size_t sequenceSizeSize = 0;
- size_t wholeSize;
-
- mpz_export(NULL, &r_tmpSize, 1, sizeof(unsigned char), 0, 0, signature->r);
- mpz_export(NULL, &s_tmpSize, 1, sizeof(unsigned char), 0, 0, signature->s);
-
- unsigned char r_tmp[r_tmpSize];
- unsigned char s_tmp[s_tmpSize];
- mpz_export(r_tmp, &r_tmpSize, 1, sizeof(unsigned char), 0, 0, signature->r);
- mpz_export(s_tmp, &s_tmpSize, 1, sizeof(unsigned char), 0, 0, signature->s);
-
- size_t rSize = r_tmpSize + (r_tmp[0] & 0x80 ? 1 : 0);
- size_t sSize = s_tmpSize + (s_tmp[0] & 0x80 ? 1 : 0);
-
- sequenceSize = 2 + rSize + 2 + sSize;
-
- if (sequenceSize > 127) {
- size_t s = sequenceSize;
- do {
- sequenceSizeSize++;
- } while ((s = s >> 8));
- }
-
- wholeSize = sequenceSize + sequenceSizeSize + 2;
- if (!result) {
- return wholeSize;
- }
-
- int index = 0;
- result[index++] = 0x30;
- if (sequenceSize < 128) {
- result[index++] = sequenceSize;
- } else {
- result[index++] = sequenceSizeSize | 0x80;
- for (size_t i = 0; i < sequenceSizeSize; i++) {
- result[index++] = sequenceSize & (0xff << (8 * (sequenceSizeSize - i - 1)));
- }
- }
- result[index++] = 0x02;
- result[index++] = rSize;
- if (r_tmp[0] & 0x80) {
- result[index++] = 0x00;
- }
- memcpy(result + index, r_tmp, r_tmpSize);
- index += r_tmpSize;
- result[index++] = 0x02;
- result[index++] = sSize;
- if (s_tmp[0] & 0x80) {
- result[index++] = 0x00;
- }
- memcpy(result + index, s_tmp, s_tmpSize);
- return wholeSize;
-}
-
-// credit to https://github.com/crocs-muni/ECTester/blob/master/src/cz/crcs/ectester/standalone/libs/jni/c_utils.cs
-int der_to_signature(struct dsa_signature* signature, unsigned char* der) {
- int index = 0;
- size_t sequenceSize;
- size_t sequenceSizeSize;
- if (der[index++] != 0x30) {
- return 0;
- }
-
- if (!(der[index] & 0x80)) {
- sequenceSize = der[index++];
- } else {
- sequenceSizeSize = der[index++] & 0x7f;
- while(sequenceSizeSize > 0) {
- sequenceSizeSize--;
- sequenceSize |= der[index++] << (sequenceSizeSize);
- }
- }
-
- if (der[index++] != 0x02) {
- return 0;
- }
-
- size_t rLength = der[index++];
- mpz_import(signature->r, rLength, 1, sizeof(unsigned char), 0, 0, der + index);
- index += rLength;
- if (der[index++] != 0x02) {
- return 0;
- }
- size_t sLength = der[index++];
- mpz_import(signature->s, sLength, 1, sizeof(unsigned char), 0, 0, der + index);
- return 1;
-
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Nettle_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const struct ecc_curve* curve;
- int byte_size;
- char *curve_name[5] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- int byte_sizes[] = {24, 28, 32, 48, 66};
- for (int i = 0; i < sizeof(curve_name); i++) {
- if (strcasecmp(utf_name, curve_name[i]) == 0) {
- curve = create_curve(env, curve_name[i]);
- byte_size = byte_sizes[i] + 1;
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
- struct ecc_scalar privScalar;
- ecc_scalar_init(&privScalar, curve);
- barray_to_privkey(env, &privScalar, privkey);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- struct dsa_signature signature;
- dsa_signature_init(&signature);
-
- native_timing_start();
- ecdsa_sign(&privScalar, (void *) &yarrow, (nettle_random_func *) yarrow256_random, data_size, (unsigned char*)data_data, &signature);
- native_timing_stop();
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
-
- jsize sig_len = signature_to_der(&signature, NULL, byte_size);
- jbyteArray result = (*env)->NewByteArray(env, sig_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- signature_to_der(&signature, (unsigned char *)result_data, byte_size);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- ecc_scalar_clear(&privScalar);
- dsa_signature_clear(&signature);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Nettle_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const struct ecc_curve* curve;
- char *curve_name[5] = {"secp192r1", "secp224r1", "secp256r1", "secp384r1", "secp521r1"};
- for (int i = 0; i < sizeof(curve_name); i++) {
- if (strcasecmp(utf_name, curve_name[i]) == 0) {
- curve = create_curve(env, curve_name[i]);
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return false;
- }
-
- struct ecc_point eccPubPoint;
- ecc_point_init(&eccPubPoint, curve);
- barray_to_pubkey(env, &eccPubPoint, pubkey);
-
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
-
- struct dsa_signature eccSignature;
- dsa_signature_init(&eccSignature);
-
- if (!der_to_signature(&eccSignature, (unsigned char*) sig_data)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Invalid DER encoding of the signature.");
- return false;
- }
-
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int result = ecdsa_verify(&eccPubPoint, data_size, (unsigned char*)data_data, &eccSignature);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- ecc_point_clear(&eccPubPoint);
- dsa_signature_clear(&eccSignature);
- return (result == 1) ? JNI_TRUE : JNI_FALSE;
-}
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/openssl.c b/src/cz/crcs/ectester/standalone/libs/jni/openssl.c
deleted file mode 100644
index 1739420..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/openssl.c
+++ /dev/null
@@ -1,584 +0,0 @@
-#include "native.h"
-#include <string.h>
-
-#include <openssl/conf.h>
-#include <openssl/opensslv.h>
-#include <openssl/objects.h>
-#include <openssl/obj_mac.h>
-#include <openssl/bn.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <openssl/ec.h>
-#include <openssl/ecdsa.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-
-
-static jclass provider_class;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_OpensslLib_createProvider(JNIEnv *env, jobject self) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Openssl");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, OPENSSL_VERSION_TEXT);
- long ver_hi = (OPENSSL_VERSION_NUMBER & 0xff000000L) >> 28;
- long ver_mid = (OPENSSL_VERSION_NUMBER & 0xff0000L) >> 20;
- long ver_low = (OPENSSL_VERSION_NUMBER & 0xff00L) >> 12;
- double version = (double)ver_hi + ((double)ver_mid/10) + ((double)ver_low/100);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Openssl_setup(JNIEnv *env, jobject self) {
- OPENSSL_no_config();
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, self, "EC", "Openssl");
- ADD_KA(env, self, "ECDH", "OpensslECDH");
- ADD_SIG(env, self, "NONEwithECDSA", "OpensslECDSAwithNONE");
-
- init_classes(env, "Openssl");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_OpensslLib_getCurves(JNIEnv *env, jobject self) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
-
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- jstring curve_name = (*env)->NewStringUTF(env, OBJ_nid2sn(curves[i].nid));
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_keysizeSupported(JNIEnv *env, jobject self, jint keysize) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- for (size_t i = 0; i < ncurves; ++i) {
- EC_GROUP *curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- EC_GROUP_clear_free(curve);
- return JNI_TRUE;
- }
- EC_GROUP_free(curve);
- }
- return JNI_FALSE;
-}
-
-static jobject bignum_to_biginteger(JNIEnv *env, const BIGNUM *bn) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(I[B)V");
- int size = BN_num_bytes(bn);
- jbyteArray bytes = (*env)->NewByteArray(env, size);
- jbyte *data = (*env)->GetByteArrayElements(env, bytes, NULL);
- BN_bn2bin(bn, (unsigned char *) data);
- (*env)->ReleaseByteArrayElements(env, bytes, data, 0);
- jobject result = (*env)->NewObject(env, biginteger_class, biginteger_init, 1, bytes);
- return result;
-}
-
-static BIGNUM *biginteger_to_bignum(JNIEnv *env, jobject bigint) {
- jmethodID to_byte_array = (*env)->GetMethodID(env, biginteger_class, "toByteArray", "()[B");
-
- jbyteArray byte_array = (jbyteArray) (*env)->CallObjectMethod(env, bigint, to_byte_array);
- jsize byte_length = (*env)->GetArrayLength(env, byte_array);
- jbyte *byte_data = (*env)->GetByteArrayElements(env, byte_array, NULL);
- BIGNUM *result = BN_bin2bn((unsigned char *) byte_data, byte_length, NULL);
- (*env)->ReleaseByteArrayElements(env, byte_array, byte_data, JNI_ABORT);
- return result;
-}
-
-static EC_GROUP *create_curve(JNIEnv *env, jobject params) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
- BIGNUM *a_bn = biginteger_to_bignum(env, a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
- BIGNUM *b_bn = biginteger_to_bignum(env, b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
- BIGNUM *gx_bn = biginteger_to_bignum(env, gx);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
- BIGNUM *gy_bn = biginteger_to_bignum(env, gy);
-
- EC_GROUP *result;
- EC_POINT *g_point;
-
- if ((*env)->IsInstanceOf(env, field, fp_field_class)) {
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- BIGNUM *p_bn = biginteger_to_bignum(env, p);
- result = EC_GROUP_new_curve_GFp(p_bn, a_bn, b_bn, NULL);
- BN_free(p_bn);
- if (!result) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_new_curve_GFp.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn);
- return NULL;
- }
-
- g_point = EC_POINT_new(result);
- if(!EC_POINT_set_affine_coordinates_GFp(result, g_point, gx_bn, gy_bn, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_POINT_set_affine_coordinates_GFp.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
- } else if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- jmethodID get_reduction_poly = (*env)->GetMethodID(env, f2m_field_class, "getReductionPolynomial", "()Ljava/math/BigInteger;");
- jobject red_poly = (*env)->CallObjectMethod(env, field, get_reduction_poly);
-
- BIGNUM *p_bn = biginteger_to_bignum(env, red_poly);
- result = EC_GROUP_new_curve_GF2m(p_bn, a_bn, b_bn, NULL);
- BN_free(p_bn);
- if (!result) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_new_curve_GF2m.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn);
- return NULL;
- }
-
- g_point = EC_POINT_new(result);
- if(!EC_POINT_set_affine_coordinates_GF2m(result, g_point, gx_bn, gy_bn, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_POINT_set_affine_coordinates_GF2m.");
- BN_free(a_bn); BN_free(b_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
- } else {
- return NULL;
- }
-
- BN_free(a_bn);
- BN_free(b_bn);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- BIGNUM *n_bn = biginteger_to_bignum(env, n);
-
- jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- jint h = (*env)->CallIntMethod(env, params, get_h);
- BIGNUM *h_bn = BN_new();
- BN_set_word(h_bn, h);
-
- if (!EC_GROUP_set_generator(result, g_point, n_bn, h_bn)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating EC_GROUP, EC_GROUP_set_generator.");
- BN_free(n_bn); BN_free(h_bn); BN_free(gx_bn); BN_free(gy_bn); EC_POINT_free(g_point); EC_GROUP_free(result);
- return NULL;
- }
-
- EC_POINT_free(g_point);
- BN_free(gx_bn);
- BN_free(gy_bn);
- BN_free(n_bn);
- BN_free(h_bn);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_paramsSupported(JNIEnv *env, jobject self, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jboolean result = (EC_GROUP_check(curve, NULL) == 1) ? JNI_TRUE : JNI_FALSE;
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, const EC_GROUP *curve) {
- int field_type = EC_METHOD_get_field_type(EC_GROUP_method_of(curve));
- BIGNUM *a;
- BIGNUM *b;
-
- BIGNUM *gx;
- BIGNUM *gy;
- jobject field;
-
- a = BN_new();
- b = BN_new();
-
- if (field_type == NID_X9_62_prime_field) {
- BIGNUM *p = BN_new();
- if (!EC_GROUP_get_curve_GFp(curve, p, a, b, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_curve_GFp.");
- BN_free(p); BN_free(a); BN_free(b);
- return NULL;
- }
-
- jobject p_int = bignum_to_biginteger(env, p);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- field = (*env)->NewObject(env, fp_field_class, fp_field_init, p_int);
-
- BN_free(p);
-
- gx = BN_new();
- gy = BN_new();
- if (!EC_POINT_get_affine_coordinates_GFp(curve, EC_GROUP_get0_generator(curve), gx, gy, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_POINT_get_affine_coordinates_GFp.");
- BN_free(a); BN_free(b); BN_free(gx); BN_free(gy);
- return NULL;
- }
-
- } else if (field_type == NID_X9_62_characteristic_two_field) {
- if (!EC_GROUP_get_curve_GF2m(curve, NULL, a, b, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_curve_GF2m.");
- BN_free(a); BN_free(b);
- return NULL;
- }
-
- int basis_type = EC_GROUP_get_basis_type(curve);
- jintArray ks;
- jint *ks_data;
- if (basis_type == NID_X9_62_tpBasis) {
- ks = (*env)->NewIntArray(env, 1);
- ks_data = (*env)->GetIntArrayElements(env, ks, NULL);
- if (!EC_GROUP_get_trinomial_basis(curve, (unsigned int *) &ks_data[0])) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_trinomial_basis.");
- BN_free(a); BN_free(b);
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, JNI_ABORT);
- return NULL;
- }
- } else if (basis_type == NID_X9_62_ppBasis) {
- ks = (*env)->NewIntArray(env, 3);
- ks_data = (*env)->GetIntArrayElements(env, ks, NULL);
- if (!EC_GROUP_get_pentanomial_basis(curve, (unsigned int *) &ks_data[0], (unsigned int *) &ks_data[1], (unsigned int *) &ks_data[2])) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_GROUP_get_pentanomial_basis.");
- BN_free(a); BN_free(b);
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, JNI_ABORT);
- return NULL;
- }
- } else {
- return NULL;
- }
- (*env)->ReleaseIntArrayElements(env, ks, ks_data, 0);
-
- jint m = EC_GROUP_get_degree(curve);
-
- jmethodID f2m_field_init = (*env)->GetMethodID(env, f2m_field_class, "<init>", "(I[I)V");
- field = (*env)->NewObject(env, f2m_field_class, f2m_field_init, m, ks);
-
- gx = BN_new();
- gy = BN_new();
- if (!EC_POINT_get_affine_coordinates_GF2m(curve, EC_GROUP_get0_generator(curve), gx, gy, NULL)) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Error creating ECParameterSpec, EC_POINT_get_affine_coordinates_GF2m.");
- BN_free(a); BN_free(b); BN_free(gx); BN_free(gy);
- return NULL;
- }
- } else {
- return NULL;
- }
-
- jobject a_int = bignum_to_biginteger(env, a);
- jobject b_int = bignum_to_biginteger(env, b);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a_int, b_int);
-
- BN_free(a);
- BN_free(b);
-
- jobject gx_int = bignum_to_biginteger(env, gx);
- jobject gy_int = bignum_to_biginteger(env, gy);
-
- BN_free(gx);
- BN_free(gy);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx_int, gy_int);
-
- jobject order = bignum_to_biginteger(env, EC_GROUP_get0_order(curve));
- jint cofactor = BN_get_word(EC_GROUP_get0_cofactor(curve));
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, order, cofactor);
-}
-
-static jobject generate_from_curve(JNIEnv *env, const EC_GROUP *curve) {
- jint keysize = EC_GROUP_get_degree(curve);
- unsigned long key_bytes = (keysize + 7) / 8;
-
- EC_KEY *key = EC_KEY_new();
- EC_KEY_set_group(key, curve);
-
- native_timing_start();
- int result = EC_KEY_generate_key(key);
- native_timing_stop();
-
- if (!result) {
- throw_new(env, "java/security/GeneralSecurityException", "Error generating key, EC_KEY_generate_key.");
- EC_KEY_free(key);
- return NULL;
- }
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, key_bytes);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- BN_bn2binpad(EC_KEY_get0_private_key(key), (unsigned char *) key_priv, key_bytes);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- unsigned long key_len = 2*key_bytes + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- EC_POINT_point2oct(curve, EC_KEY_get0_public_key(key), POINT_CONVERSION_UNCOMPRESSED, (unsigned char *) key_pub, key_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- EC_KEY_free(key);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject self, jint keysize, jobject random) {
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
-
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- if (EC_GROUP_get_degree(curve) == keysize) {
- break;
- }
- EC_GROUP_free(curve);
- }
-
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Openssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject self, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- EC_GROUP *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t ncurves = EC_get_builtin_curves(NULL, 0);
- EC_builtin_curve curves[ncurves];
- EC_get_builtin_curves(curves, ncurves);
- EC_GROUP *curve = NULL;
- for (size_t i = 0; i < ncurves; ++i) {
- if (strcasecmp(utf_name, OBJ_nid2sn(curves[i].nid)) == 0) {
- curve = EC_GROUP_new_by_curve_name(curves[i].nid);
- break;
- }
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
- jobject result = generate_from_curve(env, curve);
- EC_GROUP_free(curve);
- return result;
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-}
-
-EC_KEY *barray_to_pubkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray pub) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize pub_len = (*env)->GetArrayLength(env, pub);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- EC_POINT *pub_point = EC_POINT_new(curve);
- EC_POINT_oct2point(curve, pub_point, (unsigned char *) pub_data, pub_len, NULL);
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, JNI_ABORT);
- EC_KEY_set_public_key(result, pub_point);
- EC_POINT_free(pub_point);
- return result;
-}
-
-EC_KEY *barray_to_privkey(JNIEnv *env, const EC_GROUP *curve, jbyteArray priv) {
- EC_KEY *result = EC_KEY_new();
- EC_KEY_set_group(result, curve);
- jsize priv_len = (*env)->GetArrayLength(env, priv);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- BIGNUM *s = BN_bin2bn((unsigned char *) priv_data, priv_len, NULL);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, JNI_ABORT);
- EC_KEY_set_private_key(result, s);
- BN_free(s);
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Openssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- int field_size = EC_GROUP_get_degree(curve);
- size_t secret_len = (field_size + 7)/8;
-
- //TODO: Do more KeyAgreements here, but will have to do the hash-fun manually,
- // probably using the ECDH_KDF_X9_62 by wrapping it and dynamically choosing the EVP_MD. from the type string.
- jbyteArray result = (*env)->NewByteArray(env, secret_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
-
- native_timing_start();
- int err = ECDH_compute_key(result_data, secret_len, EC_KEY_get0_public_key(pub), priv, NULL);
- native_timing_stop();
-
- if (err <= 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error computing ECDH, ECDH_compute_key.");
- EC_KEY_free(pub); EC_KEY_free(priv); EC_GROUP_free(curve);
- (*env)->ReleaseByteArrayElements(env, result, result_data, JNI_ABORT);
- return NULL;
- }
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- EC_KEY_free(pub);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Openssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject self, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Openssl_sign(JNIEnv *env, jobject self, jbyteArray data, jbyteArray privkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-
- EC_KEY *priv = barray_to_privkey(env, curve, privkey);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- // TODO: Do more Signatures here, maybe use the EVP interface to get to the hashes easier and not hash manually?
-
- native_timing_start();
- ECDSA_SIG *signature = ECDSA_do_sign((unsigned char *) data_data, data_size, priv);
- native_timing_stop();
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- if (!signature) {
- throw_new(env, "java/security/GeneralSecurityException", "Error signing, ECDSA_do_sign.");
- EC_KEY_free(priv); EC_GROUP_free(curve);
- return NULL;
- }
-
- jsize sig_len = i2d_ECDSA_SIG(signature, NULL);
- jbyteArray result = (*env)->NewByteArray(env, sig_len);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- jbyte *result_data_ptr = result_data;
- i2d_ECDSA_SIG(signature, (unsigned char **)&result_data_ptr);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- ECDSA_SIG_free(signature);
- EC_KEY_free(priv);
- EC_GROUP_free(curve);
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Openssl_verify(JNIEnv *env, jobject self, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- EC_GROUP *curve = create_curve(env, params);
- if (!curve) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return JNI_FALSE;
- }
-
- EC_KEY *pub = barray_to_pubkey(env, curve, pubkey);
-
- jsize sig_len = (*env)->GetArrayLength(env, signature);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
- jbyte *sig_data_ptr = sig_data;
- ECDSA_SIG *sig_obj = d2i_ECDSA_SIG(NULL, (const unsigned char **)&sig_data_ptr, sig_len);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- native_timing_start();
- int result = ECDSA_do_verify((unsigned char *) data_data, data_size, sig_obj, pub);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- if (result < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Error verifying, ECDSA_do_verify.");
- EC_KEY_free(pub); EC_GROUP_free(curve); ECDSA_SIG_free(sig_obj);
- return JNI_FALSE;
- }
-
- ECDSA_SIG_free(sig_obj);
- EC_KEY_free(pub);
- EC_GROUP_free(curve);
- return (result == 1) ? JNI_TRUE : JNI_FALSE;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/tomcrypt.c b/src/cz/crcs/ectester/standalone/libs/jni/tomcrypt.c
deleted file mode 100644
index 82592f1..0000000
--- a/src/cz/crcs/ectester/standalone/libs/jni/tomcrypt.c
+++ /dev/null
@@ -1,465 +0,0 @@
-#include "native.h"
-#include <stdio.h>
-#include <string.h>
-#include <tomcrypt.h>
-#include "c_utils.h"
-#include "c_timing.h"
-
-static prng_state ltc_prng;
-static jclass provider_class;
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_TomcryptLib_createProvider(JNIEnv *env, jobject this) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$TomCrypt");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, "libtomcrypt " SCRYPT);
- double version = strtod(SCRYPT, NULL);
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024TomCrypt_setup(JNIEnv *env, jobject this) {
- /* Initialize libtommath as the math lib. */
- ltc_mp = ltm_desc;
-
- jmethodID provider_put = (*env)->GetMethodID(env, provider_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
-
- jstring ec = (*env)->NewStringUTF(env, "KeyPairGenerator.EC");
- jstring ec_value = (*env)->NewStringUTF(env, "cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$TomCrypt");
- (*env)->CallObjectMethod(env, this, provider_put, ec, ec_value);
-
- jstring ecdh = (*env)->NewStringUTF(env, "KeyAgreement.ECDH");
- jstring ecdh_value = (*env)->NewStringUTF(env, "cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$TomCrypt");
- (*env)->CallObjectMethod(env, this, provider_put, ecdh, ecdh_value);
-
- jstring ecdsa = (*env)->NewStringUTF(env, "Signature.NONEwithECDSA");
- jstring ecdsa_value = (*env)->NewStringUTF(env, "cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$TomCryptRaw");
- (*env)->CallObjectMethod(env, this, provider_put, ecdsa, ecdsa_value);
-
- int err;
- /* register yarrow */
- if (register_prng(&yarrow_desc) == -1) {
- fprintf(stderr, "Error registering Yarrow\n");
- return;
- }
- /* setup the PRNG */
- if ((err = rng_make_prng(128, find_prng("yarrow"), &ltc_prng, NULL)) != CRYPT_OK) {
- fprintf(stderr, "Error setting up PRNG, %s\n", error_to_string(err));
- }
-
- init_classes(env, "TomCrypt");
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_TomcryptLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
- const ltc_ecc_set_type * curve = ltc_ecc_sets;
- while (curve->size != 0) {
- jstring curve_name = (*env)->NewStringUTF(env, curve->name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- curve++;
- }
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_keysizeSupported(JNIEnv *env, jobject this, jint keysize){
- int key_bytes = (keysize + 7) / 8;
- const ltc_ecc_set_type * curve = ltc_ecc_sets;
- while (curve->size != 0) {
- if (curve->size == key_bytes) {
- return JNI_TRUE;
- }
- curve++;
- }
-
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_paramsSupported(JNIEnv *env, jobject this, jobject params){
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
-
- if ((*env)->IsInstanceOf(env, field, fp_field_class)) {
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, curve, get_a);
-
- jmethodID biginteger_valueof = (*env)->GetStaticMethodID(env, biginteger_class, "valueOf", "(J)Ljava/math/BigInteger;");
- jobject three = (*env)->CallStaticObjectMethod(env, biginteger_class, biginteger_valueof, (jlong)3);
-
- jmethodID biginteger_add = (*env)->GetMethodID(env, biginteger_class, "add", "(Ljava/math/BigInteger;)Ljava/math/BigInteger;");
- jobject a_3 = (*env)->CallObjectMethod(env, a, biginteger_add, three);
-
- jmethodID biginteger_equals = (*env)->GetMethodID(env, biginteger_class, "equals", "(Ljava/lang/Object;)Z");
- jboolean eq = (*env)->CallBooleanMethod(env, p, biginteger_equals, a_3);
- return eq;
- } else if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const ltc_ecc_set_type * curve = ltc_ecc_sets;
- while (curve->size != 0) {
- if (strcasecmp(utf_name, curve->name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- curve++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-static jobject create_ec_param_spec(JNIEnv *env, const ltc_ecc_set_type *curve) {
- jstring p_string = (*env)->NewStringUTF(env, curve->prime);
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(Ljava/lang/String;I)V");
- jobject p = (*env)->NewObject(env, biginteger_class, biginteger_init, p_string, (jint) 16);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p);
-
- jmethodID biginteger_subtract = (*env)->GetMethodID(env, biginteger_class, "subtract", "(Ljava/math/BigInteger;)Ljava/math/BigInteger;");
- jmethodID biginteger_valueof = (*env)->GetStaticMethodID(env, biginteger_class, "valueOf", "(J)Ljava/math/BigInteger;");
- jobject three = (*env)->CallStaticObjectMethod(env, biginteger_class, biginteger_valueof, (jlong) 3);
- jobject a = (*env)->CallObjectMethod(env, p, biginteger_subtract, three);
-
- jstring b_string = (*env)->NewStringUTF(env, curve->B);
- jobject b = (*env)->NewObject(env, biginteger_class, biginteger_init, b_string, (jint) 16);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- jstring gx_string = (*env)->NewStringUTF(env, curve->Gx);
- jstring gy_string = (*env)->NewStringUTF(env, curve->Gy);
- jobject gx = (*env)->NewObject(env, biginteger_class, biginteger_init, gx_string, (jint) 16);
- jobject gy = (*env)->NewObject(env, biginteger_class, biginteger_init, gy_string, (jint) 16);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx, gy);
-
- jstring n_string = (*env)->NewStringUTF(env, curve->order);
- jobject n = (*env)->NewObject(env, biginteger_class, biginteger_init, n_string, (jint) 16);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, (jint) 1);
-}
-
-static ltc_ecc_set_type* create_curve(JNIEnv *env, jobject params) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- jint bytes = (bits + 7) / 8;
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
- jmethodID get_bitlength = (*env)->GetMethodID(env, biginteger_class, "bitLength", "()I");
- jint ord_bits = (*env)->CallIntMethod(env, n, get_bitlength);
- jint ord_bytes = (ord_bits + 7) / 8;
-
- ltc_ecc_set_type *curve = calloc(sizeof(ltc_ecc_set_type), 1);
- curve->size = bytes;
- curve->name = "";
- curve->prime = biginteger_to_hex(env, p, bytes);
- curve->B = biginteger_to_hex(env, b, bytes);
- curve->order = biginteger_to_hex(env, n, ord_bytes);
- curve->Gx = biginteger_to_hex(env, gx, bytes);
- curve->Gy = biginteger_to_hex(env, gy, bytes);
-
- return curve;
-}
-
-static void free_curve(ltc_ecc_set_type *curve) {
- if (curve) {
- free((void*)curve->prime);
- free((void*)curve->B);
- free((void*)curve->order);
- free((void*)curve->Gx);
- free((void*)curve->Gy);
- free(curve);
- }
-}
-
-static jobject generate_from_curve(JNIEnv *env, const ltc_ecc_set_type *curve) {
- ecc_key key;
-
- native_timing_start();
- int err = ecc_make_key_ex(&ltc_prng, find_prng("yarrow"), &key, curve);
- native_timing_stop();
-
- if (err != CRYPT_OK) {
- throw_new(env, "java/security/GeneralSecurityException", error_to_string(err));
- return NULL;
- }
- unsigned long key_len = 2*curve->size + 1;
- jbyteArray pub_bytes = (*env)->NewByteArray(env, key_len);
- jbyte *key_pub = (*env)->GetByteArrayElements(env, pub_bytes, NULL);
- ecc_ansi_x963_export(&key, (unsigned char *) key_pub, &key_len);
- (*env)->ReleaseByteArrayElements(env, pub_bytes, key_pub, 0);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub_bytes, ec_pub_param_spec);
-
- jbyteArray priv_bytes = (*env)->NewByteArray(env, curve->size);
- jbyte *key_priv = (*env)->GetByteArrayElements(env, priv_bytes, NULL);
- ltc_mp.unsigned_write(key.k, (unsigned char *) key_priv);
- (*env)->ReleaseByteArrayElements(env, priv_bytes, key_priv, 0);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv_bytes, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- ecc_free(&key);
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject this, jint keysize, jobject random){
- int key_bytes = (keysize + 7) / 8;
-
- const ltc_ecc_set_type *curve = ltc_ecc_sets;
- while (curve->size != 0) {
- if (curve->size == key_bytes) {
- break;
- }
- curve++;
- }
-
- if (curve->size == 0) {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve for given bitsize not found.");
- return NULL;
- }
-
- return generate_from_curve(env, curve);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024TomCrypt_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject this, jobject params, jobject random){
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- ltc_ecc_set_type *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- free_curve(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- const ltc_ecc_set_type* curve = ltc_ecc_sets;
- while (curve->size != 0) {
- if (strcasecmp(utf_name, curve->name) == 0) {
- break;
- }
- curve++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
-
- return generate_from_curve(env, curve);
- } else {
- throw_new(env, "java/security/InvalidAlgorithmParameterException", "Curve not found.");
- return NULL;
- }
-}
-
-static jboolean privkey_from_bytes(JNIEnv *env, jbyteArray privkey, const ltc_ecc_set_type *curve, ecc_key *out) {
- jsize priv_size = (*env)->GetArrayLength(env, privkey);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey, NULL);
-
- if (curve->size != priv_size) {
- throw_new(env, "java/lang/IllegalStateException", "Curve size does not match the private key size.");
- (*env)->ReleaseByteArrayElements(env, privkey, priv_data, JNI_ABORT);
- return JNI_FALSE;
- }
-
- out->type = PK_PRIVATE;
- out->idx = -1;
- out->dp = curve;
- ltc_mp.init(&out->k);
- ltc_mp.unsigned_read(out->k, (unsigned char *) priv_data, (unsigned long) curve->size);
-
- (*env)->ReleaseByteArrayElements(env, privkey, priv_data, JNI_ABORT);
- return JNI_TRUE;
-}
-
-static jboolean pubkey_from_bytes(JNIEnv *env, jbyteArray pubkey, const ltc_ecc_set_type *curve, ecc_key *out) {
- jsize pub_size = (*env)->GetArrayLength(env, pubkey);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pubkey, NULL);
-
- if (curve->size != (pub_size - 1) / 2) {
- throw_new(env, "java/lang/IllegalStateException", "Curve size does not match the public key size.");
- (*env)->ReleaseByteArrayElements(env, pubkey, pub_data, JNI_ABORT);
- return JNI_FALSE;
- }
-
- out->type = PK_PUBLIC;
- out->idx = -1;
- out->dp = curve;
- ltc_init_multi(&out->pubkey.x, &out->pubkey.y, &out->pubkey.z, NULL);
- ltc_mp.set_int(out->pubkey.z, 1);
- ltc_mp.unsigned_read(out->pubkey.x, (unsigned char *) pub_data + 1, (unsigned long) curve->size);
- ltc_mp.unsigned_read(out->pubkey.y, (unsigned char *) pub_data + 1 + curve->size, (unsigned long) curve->size);
-
- (*env)->ReleaseByteArrayElements(env, pubkey, pub_data, JNI_ABORT);
-
- return JNI_TRUE;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024TomCrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params){
- ltc_ecc_set_type *curve = create_curve(env, params);
-
- ecc_key pub;
- if (!pubkey_from_bytes(env, pubkey, curve, &pub)) {
- free_curve(curve);
- return NULL;
- }
-
- ecc_key priv;
- if (!privkey_from_bytes(env, privkey, curve, &priv)) {
- free_curve(curve);
- return NULL;
- }
-
- unsigned char result[curve->size];
- unsigned long output_len = curve->size;
-
- native_timing_start();
- int err = ecc_shared_secret(&priv, &pub, result, &output_len);
- native_timing_stop();
-
- if (err != CRYPT_OK) {
- throw_new(env, "java/security/GeneralSecurityException", error_to_string(err));
- free_curve(curve);
- return NULL;
- }
-
- jbyteArray output = (*env)->NewByteArray(env, curve->size);
- jbyte *output_data = (*env)->GetByteArrayElements(env, output, NULL);
- memcpy(output_data, result, curve->size);
- (*env)->ReleaseByteArrayElements(env, output, output_data, 0);
-
- ltc_cleanup_multi(&pub.pubkey.x, &pub.pubkey.y, &pub.pubkey.z, &priv.k, NULL);
- free_curve(curve);
- return output;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024TomCrypt_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024TomCryptRaw_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- ltc_ecc_set_type *curve = create_curve(env, params);
-
- ecc_key priv;
- if (!privkey_from_bytes(env, privkey, curve, &priv)) {
- free_curve(curve);
- return NULL;
- }
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- unsigned char result[curve->size*4];
- unsigned long output_len = curve->size*4;
-
- native_timing_start();
- int err = ecc_sign_hash((unsigned char *) data_data, data_size, result, &output_len, &ltc_prng, find_prng("yarrow"), &priv);
- native_timing_stop();
-
- if (err != CRYPT_OK) {
- throw_new(env, "java/security/GeneralSecurityException", error_to_string(err));
- free_curve(curve);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- return NULL;
- }
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
-
- jbyteArray output = (*env)->NewByteArray(env, output_len);
- jbyte *output_data = (*env)->GetByteArrayElements(env, output, NULL);
- memcpy(output_data, result, output_len);
- (*env)->ReleaseByteArrayElements(env, output, output_data, 0);
-
- free_curve(curve);
- return output;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024TomCryptRaw_verify(JNIEnv *env, jobject this, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- ltc_ecc_set_type *curve = create_curve(env, params);
-
- ecc_key pub;
- if (!pubkey_from_bytes(env, pubkey, curve, &pub)) {
- free_curve(curve);
- return JNI_FALSE;
- }
-
- jsize data_size = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
-
- jsize sig_size = (*env)->GetArrayLength(env, signature);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
-
- int result;
- native_timing_start();
- int err = ecc_verify_hash((unsigned char *) sig_data, sig_size, (unsigned char *) data_data, data_size, &result, &pub);
- native_timing_stop();
-
- if (err != CRYPT_OK) {
- throw_new(env, "java/security/GeneralSecurityException", error_to_string(err));
- free_curve(curve);
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
- return JNI_FALSE;
- }
-
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
- free_curve(curve);
- return result;
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/output/TextTestWriter.java b/src/cz/crcs/ectester/standalone/output/TextTestWriter.java
deleted file mode 100644
index d7be4dc..0000000
--- a/src/cz/crcs/ectester/standalone/output/TextTestWriter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package cz.crcs.ectester.standalone.output;
-
-import cz.crcs.ectester.common.cli.Colors;
-import cz.crcs.ectester.common.output.BaseTextTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.test.base.StandaloneTestable;
-import cz.crcs.ectester.standalone.test.suites.StandaloneTestSuite;
-
-import java.io.PrintStream;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class TextTestWriter extends BaseTextTestWriter {
- public TextTestWriter(PrintStream output) {
- super(output);
- }
-
- private String causeString(Object cause) {
- if (cause == null) {
- return "";
- } else if (cause instanceof Exception) {
- Exception ex = ((Exception) cause);
- return " -> " + ex.getClass().getCanonicalName() + " : " + ex.getMessage();
- } else {
- return cause.toString();
- }
- }
-
- @Override
- protected String testableString(Testable t) {
- if (t instanceof StandaloneTestable) {
- StandaloneTestable<?> testable = (StandaloneTestable) t;
- Enum<?> stage = testable.getStage();
- String stageName = stage.name();
- String exception = causeString(testable.getException());
- String errorCause = causeString(testable.errorCause());
- return String.format("[%d/%d] %s %s %s", stage.ordinal() + 1, stage.getClass().getEnumConstants().length, stageName, exception, errorCause);
- }
- return "";
- }
-
- @Override
- protected String deviceString(TestSuite suite) {
- if (suite instanceof StandaloneTestSuite) {
- StandaloneTestSuite standaloneSuite = (StandaloneTestSuite) suite;
- StringBuilder sb = new StringBuilder();
- sb.append("═══ ").append(Colors.underline("ECTester version:")).append(" ").append(ECTesterStandalone.VERSION).append(System.lineSeparator());
- sb.append("═══ ").append(Colors.underline("Library:")).append(" ").append(standaloneSuite.getLibrary().name()).append(System.lineSeparator());
- return sb.toString();
- }
- return "";
- }
-} \ No newline at end of file
diff --git a/src/cz/crcs/ectester/standalone/output/XMLTestWriter.java b/src/cz/crcs/ectester/standalone/output/XMLTestWriter.java
deleted file mode 100644
index 812634f..0000000
--- a/src/cz/crcs/ectester/standalone/output/XMLTestWriter.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package cz.crcs.ectester.standalone.output;
-
-import cz.crcs.ectester.common.output.BaseXMLTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-import cz.crcs.ectester.standalone.test.base.SignatureTestable;
-import cz.crcs.ectester.standalone.test.base.StandaloneTestable;
-import cz.crcs.ectester.standalone.test.suites.StandaloneTestSuite;
-import org.w3c.dom.Element;
-
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.OutputStream;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class XMLTestWriter extends BaseXMLTestWriter {
-
- public XMLTestWriter(OutputStream output) throws ParserConfigurationException {
- super(output);
- }
-
- private Element pkeyElement(PublicKey pkey) {
- Element pubkey = doc.createElement("pubkey");
- if (pkey == null) {
- return pubkey;
- }
- pubkey.setAttribute("algorithm", pkey.getAlgorithm());
- pubkey.setAttribute("format", pkey.getFormat());
- pubkey.setTextContent(ByteUtil.bytesToHex(pkey.getEncoded()));
- return pubkey;
- }
-
- private Element skeyElement(PrivateKey skey) {
- Element privkey = doc.createElement("privkey");
- if (skey == null) {
- return privkey;
- }
- privkey.setAttribute("algorithm", skey.getAlgorithm());
- privkey.setAttribute("format", skey.getFormat());
- privkey.setTextContent(ByteUtil.bytesToHex(skey.getEncoded()));
- return privkey;
- }
-
- private Element kaElement(KeyAgreementTestable kat) {
- Element katElem = doc.createElement("key-agreement");
- katElem.setAttribute("algo", kat.getKa().getAlgorithm());
-
- Element secret = doc.createElement("secret");
- secret.setTextContent(ByteUtil.bytesToHex(kat.getSecret()));
- katElem.appendChild(secret);
-
- PublicKey pkey = kat.getPublicKey();
- Element pubkey = pkeyElement(pkey);
- katElem.appendChild(pubkey);
-
- PrivateKey skey = kat.getPrivateKey();
- Element privkey = skeyElement(skey);
- katElem.appendChild(privkey);
-
- return katElem;
- }
-
- private Element kgtElement(KeyGeneratorTestable kgt) {
- Element kgtElem = doc.createElement("key-pair-generator");
- kgtElem.setAttribute("algo", kgt.getKpg().getAlgorithm());
-
- Element keyPair = doc.createElement("key-pair");
- if (kgt.getKeyPair() != null) {
- PublicKey pkey = kgt.getKeyPair().getPublic();
- Element pubkey = pkeyElement(pkey);
- keyPair.appendChild(pubkey);
-
- PrivateKey skey = kgt.getKeyPair().getPrivate();
- Element privkey = skeyElement(skey);
- keyPair.appendChild(privkey);
- }
-
- kgtElem.appendChild(keyPair);
- return kgtElem;
- }
-
- private Element sigElement(SignatureTestable sig) {
- Element sigElem = doc.createElement("signature");
- sigElem.setAttribute("verified", sig.getVerified() ? "true" : "false");
- sigElem.setAttribute("algo", sig.getSig().getAlgorithm());
-
- Element raw = doc.createElement("raw");
- raw.setTextContent(ByteUtil.bytesToHex(sig.getSignature()));
- sigElem.appendChild(raw);
-
- return sigElem;
- }
-
- private Element stageElement(StandaloneTestable<?> t) {
- Element result = doc.createElement("stage");
- result.setTextContent(t.getStage().name());
- return result;
- }
-
- private String causeObject(Object cause) {
- if (cause == null) {
- return "";
- } else if (cause instanceof Exception) {
- Exception ex = ((Exception) cause);
- return ex.getClass().getCanonicalName() + " : " + ex.getMessage();
- } else {
- return cause.toString();
- }
- }
-
- @Override
- protected Element testableElement(Testable t) {
- Element result = doc.createElement("test");
- if (t instanceof StandaloneTestable) {
- StandaloneTestable<?> testable = (StandaloneTestable) t;
- if (t instanceof KeyGeneratorTestable) {
- result.setAttribute("type", "key-pair-generator");
- result.appendChild(kgtElement((KeyGeneratorTestable) t));
- } else if (t instanceof KeyAgreementTestable) {
- result.setAttribute("type", "key-agreement");
- result.appendChild(kaElement((KeyAgreementTestable) t));
- } else if (t instanceof SignatureTestable) {
- result.setAttribute("type", "signature");
- result.appendChild(sigElement((SignatureTestable) t));
- }
- result.appendChild(stageElement(testable));
- Element exception = doc.createElement("exception");
- exception.setTextContent(causeObject(testable.getException()) + causeObject(testable.errorCause()));
- result.appendChild(exception);
- }
- return result;
- }
-
- @Override
- protected Element deviceElement(TestSuite suite) {
- if (suite instanceof StandaloneTestSuite) {
- StandaloneTestSuite standaloneSuite = (StandaloneTestSuite) suite;
- Element result = doc.createElement("device");
- result.setAttribute("type", "library");
- result.setAttribute("ectester", ECTesterStandalone.VERSION);
-
- Element name = doc.createElement("name");
- name.setTextContent(standaloneSuite.getLibrary().name());
- result.appendChild(name);
- return result;
- }
- return null;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/output/YAMLTestWriter.java b/src/cz/crcs/ectester/standalone/output/YAMLTestWriter.java
deleted file mode 100644
index ee8a199..0000000
--- a/src/cz/crcs/ectester/standalone/output/YAMLTestWriter.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package cz.crcs.ectester.standalone.output;
-
-import cz.crcs.ectester.common.output.BaseYAMLTestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.common.test.Testable;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-import cz.crcs.ectester.standalone.test.base.SignatureTestable;
-import cz.crcs.ectester.standalone.test.base.StandaloneTestable;
-import cz.crcs.ectester.standalone.test.suites.StandaloneTestSuite;
-
-import java.io.PrintStream;
-import java.security.Key;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class YAMLTestWriter extends BaseYAMLTestWriter {
- public YAMLTestWriter(PrintStream output) {
- super(output);
- }
-
- private Map<String, Object> keyObject(Key key) {
- Map<String, Object> kObject = new LinkedHashMap<>();
- if (key == null) {
- return kObject;
- }
- kObject.put("algo", key.getAlgorithm());
- kObject.put("format", key.getFormat());
- kObject.put("raw", ByteUtil.bytesToHex(key.getEncoded()));
- return kObject;
- }
-
- private Map<String, Object> kaObject(KeyAgreementTestable kat) {
- Map<String, Object> katObject = new LinkedHashMap<>();
- katObject.put("algo", kat.getKa().getAlgorithm());
- katObject.put("secret", ByteUtil.bytesToHex(kat.getSecret()));
-
- PublicKey pkey = kat.getPublicKey();
- katObject.put("pubkey", keyObject(pkey));
-
- PrivateKey skey = kat.getPrivateKey();
- katObject.put("privkey", keyObject(skey));
- return katObject;
- }
-
- private Map<String, Object> kgtObject(KeyGeneratorTestable kgt) {
- Map<String, Object> kgtObject = new LinkedHashMap<>();
- kgtObject.put("algo", kgt.getKpg().getAlgorithm());
-
- Map<String, Object> keypair = new LinkedHashMap<>();
- if (kgt.getKeyPair() != null) {
- PublicKey pkey = kgt.getKeyPair().getPublic();
- Map<String, Object> pubObject = keyObject(pkey);
- keypair.put("pubkey", pubObject);
-
- PrivateKey skey = kgt.getKeyPair().getPrivate();
- Map<String, Object> privObject = keyObject(skey);
- keypair.put("privkey", privObject);
- }
-
- kgtObject.put("keypair", keypair);
- return kgtObject;
- }
-
- private Map<String, Object> sigObject(SignatureTestable sig) {
- Map<String, Object> sigObject = new LinkedHashMap<>();
- sigObject.put("algo", sig.getSig().getAlgorithm());
- sigObject.put("verified", sig.getVerified());
- sigObject.put("raw", ByteUtil.bytesToHex(sig.getSignature()));
- return sigObject;
- }
-
- private String causeObject(Object cause) {
- if (cause == null) {
- return "";
- } else if (cause instanceof Exception) {
- Exception ex = ((Exception) cause);
- return ex.getClass().getCanonicalName() + " : " + ex.getMessage();
- } else {
- return cause.toString();
- }
- }
-
- @Override
- protected Map<String, Object> testableObject(Testable t) {
- Map<String, Object> result = new LinkedHashMap<>();
- if (t instanceof StandaloneTestable) {
- StandaloneTestable<?> testable = (StandaloneTestable) t;
- if (t instanceof KeyGeneratorTestable) {
- result.put("type", "key-pair-generator");
- result.put("key-pair-generator", kgtObject((KeyGeneratorTestable) t));
- } else if (t instanceof KeyAgreementTestable) {
- result.put("type", "key-agreement");
- result.put("key-agreement", kaObject((KeyAgreementTestable) t));
- } else if (t instanceof SignatureTestable) {
- result.put("type", "signature");
- result.put("signature", sigObject((SignatureTestable) t));
- }
- result.put("stage", testable.getStage().name());
- result.put("exception", causeObject(testable.getException()) + causeObject(testable.errorCause()));
- }
- return result;
- }
-
- @Override
- protected Map<String, Object> deviceObject(TestSuite suite) {
- if (suite instanceof StandaloneTestSuite) {
- StandaloneTestSuite standaloneSuite = (StandaloneTestSuite) suite;
- Map<String, Object> result = new LinkedHashMap<>();
- result.put("type", "library");
- result.put("ectester", ECTesterStandalone.VERSION);
- result.put("name", standaloneSuite.getLibrary().name());
- return result;
- }
- return null;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTest.java b/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTest.java
deleted file mode 100644
index fd48212..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-
-import java.util.Arrays;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class KeyAgreementTest extends SimpleTest<KeyAgreementTestable> {
- private KeyAgreementTest(KeyAgreementTestable ka, TestCallback<KeyAgreementTestable> callback) {
- super(ka, callback);
- }
-
- public static KeyAgreementTest match(KeyAgreementTestable ka, byte[] expectedSecret) {
- return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
- @Override
- public Result apply(KeyAgreementTestable ka) {
- if (Arrays.equals(ka.getSecret(), expectedSecret)) {
- return new Result(Result.Value.SUCCESS, "The KeyAgreement result matched the expected derived secret.");
- } else {
- return new Result(Result.Value.FAILURE, "The KeyAgreement result did not match the expected derived secret.");
- }
- }
- });
- }
-
- public static KeyAgreementTest expect(KeyAgreementTestable ka, Result.ExpectedValue expected) {
- return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
- @Override
- public Result apply(KeyAgreementTestable keyAgreementTestable) {
- Result.Value value = Result.Value.fromExpected(expected, keyAgreementTestable.ok(), keyAgreementTestable.error());
- return new Result(value, value.description());
- }
- });
- }
-
- public static KeyAgreementTest expectError(KeyAgreementTestable ka, Result.ExpectedValue expected) {
- return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
- @Override
- public Result apply(KeyAgreementTestable keyAgreementTestable) {
- Result.Value value = Result.Value.fromExpected(expected, keyAgreementTestable.ok(), false);
- return new Result(value, value.description());
- }
- });
- }
-
- public static KeyAgreementTest function(KeyAgreementTestable ka, TestCallback<KeyAgreementTestable> callback) {
- return new KeyAgreementTest(ka, callback);
- }
-
- @Override
- public String getDescription() {
- String keyAlgo = testable.getKeyAlgorithm() == null ? "" : " (" + testable.getKeyAlgorithm() + ")";
- return "KeyAgreement " + testable.getKa().getAlgorithm() + keyAlgo;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java b/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
deleted file mode 100644
index 7fd1c5a..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import javax.crypto.KeyAgreement;
-import javax.crypto.SecretKey;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.spec.ECParameterSpec;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class KeyAgreementTestable extends StandaloneTestable<KeyAgreementTestable.KeyAgreementStage> {
- private KeyAgreement ka;
- private ECPrivateKey privateKey;
- private ECPublicKey publicKey;
- private KeyGeneratorTestable kgtPrivate;
- private KeyGeneratorTestable kgtPublic;
- private AlgorithmParameterSpec spec;
- private String keyAlgo;
- private byte[] secret;
- private SecretKey derived;
-
- public KeyAgreementTestable(KeyAgreement ka, ECPrivateKey privateKey, ECPublicKey publicKey) {
- this.ka = ka;
- this.privateKey = privateKey;
- this.publicKey = publicKey;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, ECPrivateKey privateKey, ECPublicKey publicKey, String keyAlgo) {
- this(ka, privateKey, publicKey);
- this.keyAlgo = keyAlgo;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, ECPrivateKey privateKey, ECPublicKey publicKey, ECParameterSpec spec) {
- this(ka, privateKey, publicKey);
- this.spec = spec;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, ECPrivateKey privateKey, ECPublicKey publicKey, ECParameterSpec spec, String keyAlgo) {
- this(ka, privateKey, publicKey, spec);
- this.keyAlgo = keyAlgo;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, KeyGeneratorTestable kgt, ECPrivateKey privateKey, ECParameterSpec spec) {
- this(ka, privateKey, null, spec);
- this.kgtPublic = kgt;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, KeyGeneratorTestable kgt, ECPrivateKey privateKey, ECParameterSpec spec, String keyAlgo) {
- this(ka, kgt, privateKey, spec);
- this.keyAlgo = keyAlgo;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, ECPublicKey publicKey, KeyGeneratorTestable kgt, ECParameterSpec spec) {
- this(ka, null, publicKey, spec);
- this.kgtPrivate = kgt;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, ECPublicKey publicKey, KeyGeneratorTestable kgt, ECParameterSpec spec, String keyAlgo) {
- this(ka, publicKey, kgt, spec);
- this.keyAlgo = keyAlgo;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, KeyGeneratorTestable privKgt, KeyGeneratorTestable pubKgt, ECParameterSpec spec) {
- this(ka, (ECPrivateKey) null, null, spec);
- this.kgtPrivate = privKgt;
- this.kgtPublic = pubKgt;
- }
-
- public KeyAgreementTestable(KeyAgreement ka, KeyGeneratorTestable privKgt, KeyGeneratorTestable pubKgt, ECParameterSpec spec, String keyAlgo) {
- this(ka, privKgt, pubKgt, spec);
- this.keyAlgo = keyAlgo;
- }
-
- public String getKeyAlgorithm() {
- return keyAlgo;
- }
-
- public KeyAgreement getKa() {
- return ka;
- }
-
- public ECPublicKey getPublicKey() {
- return publicKey;
- }
-
- public ECPrivateKey getPrivateKey() {
- return privateKey;
- }
-
- public byte[] getSecret() {
- if (!hasRun) {
- return null;
- }
- return secret;
- }
-
- public SecretKey getDerivedKey() {
- if (!hasRun) {
- return null;
- }
- return derived;
- }
-
- @Override
- public void run() {
- try {
- stage = KeyAgreementStage.GetPrivate;
- if (kgtPrivate != null) {
- privateKey = (ECPrivateKey) kgtPrivate.getKeyPair().getPrivate();
- }
-
- stage = KeyAgreementStage.GetPublic;
- if (kgtPublic != null) {
- publicKey = (ECPublicKey) kgtPublic.getKeyPair().getPublic();
- }
-
- stage = KeyAgreementStage.Init;
- try {
- if (spec != null) {
- ka.init(privateKey, spec);
- } else {
- ka.init(privateKey);
- }
- } catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
- failOnException(e);
- return;
- }
-
- stage = KeyAgreementStage.DoPhase;
- try {
- ka.doPhase(publicKey, true);
- } catch (IllegalStateException | InvalidKeyException e) {
- failOnException(e);
- return;
- }
-
- stage = KeyAgreementStage.GenerateSecret;
- try {
- if (keyAlgo != null) {
- derived = ka.generateSecret(keyAlgo);
- secret = derived.getEncoded();
- } else {
- secret = ka.generateSecret();
- }
- } catch (IllegalStateException | UnsupportedOperationException e) {
- failOnException(e);
- return;
- }
-
- ok = true;
- } catch (Exception ex) {
- ok = false;
- error = true;
- errorCause = ex;
- }
- hasRun = true;
- }
-
- @Override
- public void reset() {
- super.reset();
- try {
- ka = KeyAgreement.getInstance(ka.getAlgorithm(), ka.getProvider());
- } catch (NoSuchAlgorithmException e) { }
- }
-
- public enum KeyAgreementStage {
- GetPrivate,
- GetPublic,
- Init,
- DoPhase,
- GenerateSecret
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTest.java b/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTest.java
deleted file mode 100644
index 32f82cb..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class KeyGeneratorTest extends SimpleTest<KeyGeneratorTestable> {
- private KeyGeneratorTest(KeyGeneratorTestable kg, TestCallback<KeyGeneratorTestable> callback) {
- super(kg, callback);
- }
-
- public static KeyGeneratorTest expect(KeyGeneratorTestable kg, Result.ExpectedValue expected) {
- return new KeyGeneratorTest(kg, new TestCallback<KeyGeneratorTestable>() {
- @Override
- public Result apply(KeyGeneratorTestable keyGenerationTestable) {
- Result.Value value = Result.Value.fromExpected(expected, keyGenerationTestable.ok(), keyGenerationTestable.error());
- return new Result(value, value.description());
- }
- });
- }
-
- public static KeyGeneratorTest expectError(KeyGeneratorTestable kg, Result.ExpectedValue expected) {
- return new KeyGeneratorTest(kg, new TestCallback<KeyGeneratorTestable>() {
- @Override
- public Result apply(KeyGeneratorTestable keyGenerationTestable) {
- Result.Value value = Result.Value.fromExpected(expected, keyGenerationTestable.ok(), false);
- return new Result(value, value.description());
- }
- });
- }
-
- public static KeyGeneratorTest function(KeyGeneratorTestable ka, TestCallback<KeyGeneratorTestable> callback) {
- return new KeyGeneratorTest(ka, callback);
- }
-
- @Override
- public String getDescription() {
- return "KeyPairGenerator " + testable.getKpg().getAlgorithm();
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTestable.java b/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTestable.java
deleted file mode 100644
index c05d6e3..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/KeyGeneratorTestable.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.spec.ECParameterSpec;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class KeyGeneratorTestable extends StandaloneTestable<KeyGeneratorTestable.KeyGeneratorStage> {
- private KeyPair kp;
- private KeyPairGenerator kpg;
- private int keysize = 0;
- private ECParameterSpec spec = null;
-
- public KeyGeneratorTestable(KeyPairGenerator kpg) {
- this.kpg = kpg;
- }
-
- public KeyGeneratorTestable(KeyPairGenerator kpg, int keysize) {
- this.kpg = kpg;
- this.keysize = keysize;
- }
-
- public KeyGeneratorTestable(KeyPairGenerator kpg, ECParameterSpec spec) {
- this.kpg = kpg;
- this.spec = spec;
- }
-
- public KeyPairGenerator getKpg() {
- return kpg;
- }
-
- public KeyPair getKeyPair() {
- return kp;
- }
-
- @Override
- public void run() {
- try {
- stage = KeyGeneratorStage.Init;
- try {
- if (spec != null) {
- kpg.initialize(spec);
- } else if (keysize != 0) {
- kpg.initialize(keysize);
- }
- } catch (InvalidAlgorithmParameterException e) {
- failOnException(e);
- return;
- }
-
- stage = KeyGeneratorStage.GenKeyPair;
- kp = kpg.genKeyPair();
-
- ok = true;
- } catch (Exception ex) {
- ok = false;
- error = true;
- errorCause = ex;
- }
- hasRun = true;
- }
-
- public enum KeyGeneratorStage {
- Init,
- GenKeyPair
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/PerformanceTest.java b/src/cz/crcs/ectester/standalone/test/base/PerformanceTest.java
deleted file mode 100644
index 258ca12..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/PerformanceTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import cz.crcs.ectester.common.test.BaseTestable;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-
-import java.util.Arrays;
-
-/**
- * @author David Hofman
- */
-public class PerformanceTest extends SimpleTest<BaseTestable> {
- private long[] times;
- private long mean;
- private long median;
- private long mode;
- private final int count;
- private final String desc;
-
- private PerformanceTest(BaseTestable testable, int count, String desc) {
- super(testable, new TestCallback<BaseTestable>() {
- @Override
- public Result apply(BaseTestable testable) {
- return new Result(Result.Value.SUCCESS);
- }
- });
- this.count = count;
- this.desc = desc;
- }
-
- public static PerformanceTest repeat(BaseTestable testable, int count) {
- return new PerformanceTest(testable, count, null);
- }
-
- public static PerformanceTest repeat(BaseTestable testable, String desc, int count) {
- return new PerformanceTest(testable, count, desc);
- }
-
- @Override
- public String getDescription() {
- String rest = String.format("Mean = %d ns, Median = %d ns, Mode = %d ns", mean, median, mode);
- return (desc == null ? rest : desc + " (" + rest + ")");
- }
-
- @Override
- protected void runSelf() {
-
- times = new long[count];
- for (int i = 0; i < count; ++i) {
- times[i] = measureTime();
- }
-
- mean = Arrays.stream(times).sum() / count;
-
- long[] sorted = times.clone();
- Arrays.sort(sorted);
- if (count % 2 == 0) {
- median = (sorted[(count / 2) - 1] + sorted[count / 2]) / 2;
- } else {
- median = sorted[count / 2];
- }
-
- long max_occurrences = 0;
- int i = 0;
- while (i < count) {
- long current_value = sorted[i];
- long current_occurrences = 0;
- while (i < count && sorted[i] == current_value) {
- i++;
- current_occurrences++;
- }
- if (current_occurrences > max_occurrences) {
- max_occurrences = current_occurrences;
- mode = current_value;
- }
- }
- result = callback.apply(testable);
- }
-
- public long getCount() {
- return count;
- }
-
- public long[] getTimes() {
- return times;
- }
-
- public long getMean() {
- return mean;
- }
-
- public long getMedian() {
- return median;
- }
-
- public long getMode() {
- return mode;
- }
-
- private long measureTime() {
- if(testable.hasRun()) {
- testable.reset();
- }
- long startTime = System.nanoTime();
- testable.run();
- return System.nanoTime() - startTime;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java b/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java
deleted file mode 100644
index a817691..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.SimpleTest;
-import cz.crcs.ectester.common.test.TestCallback;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class SignatureTest extends SimpleTest<SignatureTestable> {
- private SignatureTest(SignatureTestable sig, TestCallback<SignatureTestable> callback) {
- super(sig, callback);
- }
-
- public static SignatureTest expect(SignatureTestable kg, Result.ExpectedValue expected) {
- return new SignatureTest(kg, new TestCallback<SignatureTestable>() {
- @Override
- public Result apply(SignatureTestable signatureTestable) {
- Result.Value value = Result.Value.fromExpected(expected, signatureTestable.ok(), signatureTestable.error());
- return new Result(value, value.description());
- }
- });
- }
-
- public static SignatureTest expectError(SignatureTestable kg, Result.ExpectedValue expected) {
- return new SignatureTest(kg, new TestCallback<SignatureTestable>() {
- @Override
- public Result apply(SignatureTestable signatureTestable) {
- Result.Value value = Result.Value.fromExpected(expected, signatureTestable.ok(), false);
- return new Result(value, value.description());
- }
- });
- }
-
- public static SignatureTest function(SignatureTestable ka, TestCallback<SignatureTestable> callback) {
- return new SignatureTest(ka, callback);
- }
-
- @Override
- public String getDescription() {
- return "Signature " + testable.getSig().getAlgorithm();
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/SignatureTestable.java b/src/cz/crcs/ectester/standalone/test/base/SignatureTestable.java
deleted file mode 100644
index fe81b10..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/SignatureTestable.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import java.security.InvalidKeyException;
-import java.security.SecureRandom;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class SignatureTestable extends StandaloneTestable<SignatureTestable.SignatureStage> {
- private Signature sig;
- private ECPrivateKey signKey;
- private ECPublicKey verifyKey;
- private KeyGeneratorTestable kgt;
- private byte[] data;
- private byte[] signature;
- private boolean verified;
-
- public SignatureTestable(Signature sig, ECPrivateKey signKey, ECPublicKey verifyKey, byte[] data) {
- this.sig = sig;
- this.signKey = signKey;
- this.verifyKey = verifyKey;
- this.data = data;
- if (data == null) {
- SecureRandom random = new SecureRandom();
- this.data = new byte[64];
- random.nextBytes(this.data);
- }
- }
-
- public SignatureTestable(Signature sig, ECPublicKey verifyKey, byte[] data, byte[] signature) {
- this.sig = sig;
- this.verifyKey = verifyKey;
- this.data = data;
- this.signature = signature;
- }
-
- public SignatureTestable(Signature sig, KeyGeneratorTestable kgt, byte[] data) {
- this(sig, (ECPrivateKey) null, null, data);
- this.kgt = kgt;
- }
-
- public Signature getSig() {
- return sig;
- }
-
- public byte[] getData() {
- return data;
- }
-
- public byte[] getSignature() {
- return signature;
- }
-
- public boolean getVerified() {
- return verified;
- }
-
- @Override
- public void run() {
- try {
- stage = SignatureStage.GetKeys;
- if (kgt != null) {
- signKey = (ECPrivateKey) kgt.getKeyPair().getPrivate();
- verifyKey = (ECPublicKey) kgt.getKeyPair().getPublic();
- }
-
- if(signKey != null) {
- stage = SignatureStage.InitSign;
- try {
- sig.initSign(signKey);
- } catch (InvalidKeyException e) {
- failOnException(e);
- return;
- }
-
- stage = SignatureStage.UpdateSign;
- try {
- sig.update(data);
- } catch (SignatureException e) {
- failOnException(e);
- return;
- }
-
- stage = SignatureStage.Sign;
- try {
- signature = sig.sign();
- } catch (SignatureException e) {
- failOnException(e);
- return;
- }
-
- ok = true;
- }
-
- if (verifyKey != null) {
- stage = SignatureStage.InitVerify;
- try {
- sig.initVerify(verifyKey);
- } catch (InvalidKeyException e) {
- failOnException(e);
- return;
- }
-
- stage = SignatureStage.UpdateVerify;
- try {
- sig.update(data);
- } catch (SignatureException e) {
- failOnException(e);
- return;
- }
-
- stage = SignatureStage.Verify;
- try {
- verified = sig.verify(signature);
- } catch (SignatureException e) {
- failOnException(e);
- return;
- }
-
- ok = verified;
- }
- } catch (Exception ex) {
- ok = false;
- error = true;
- errorCause = ex;
- }
- hasRun = true;
- }
-
- public enum SignatureStage {
- GetKeys,
- InitSign,
- UpdateSign,
- Sign,
- InitVerify,
- UpdateVerify,
- Verify
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/base/StandaloneTestable.java b/src/cz/crcs/ectester/standalone/test/base/StandaloneTestable.java
deleted file mode 100644
index 47bffc1..0000000
--- a/src/cz/crcs/ectester/standalone/test/base/StandaloneTestable.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cz.crcs.ectester.standalone.test.base;
-
-import cz.crcs.ectester.common.test.BaseTestable;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class StandaloneTestable<T extends Enum<T>> extends BaseTestable {
- protected T stage;
- protected Exception exception;
-
- public T getStage() {
- return stage;
- }
-
- public Exception getException() {
- return exception;
- }
-
- protected void failOnException(Exception ex) {
- ok = false;
- hasRun = true;
- exception = ex;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneCofactorSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneCofactorSuite.java
deleted file mode 100644
index 52b0fbf..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneCofactorSuite.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneCofactorSuite extends StandaloneTestSuite {
- public StandaloneCofactorSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "cofactor", "The cofactor test suite tests whether the library correctly rejects points on the curve",
- "but not in the subgroup generated by the generator (so of small order, dividing the cofactor) during ECDH.",
- "Supports options:", "\t - gt/kpg-type", "\t - kt/ka-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- List<String> kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
-
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "cofactor");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
- ECParameterSpec spec = curve.toSpec();
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
-
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ". " + "KeyAgreement tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Cofactor test of " + curve.getId() + ".", generateFail));
- continue;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
-
- List<Test> allKaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- List<Test> specificKaTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- ECPublicKey ecpub = ECUtil.toPublicKey(pub);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test keyAgreement = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- specificKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " cofactor key test.", keyAgreement));
- }
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform " + kaIdent.getName() + " with public points on non-generator subgroup.", specificKaTests.toArray(new Test[0])));
- }
- }
- if(allKaTests.isEmpty()) {
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified key agreement types is supported by the library."));
- }
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", allKaTests.toArray(new Test[0]));
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Cofactor test of " + curve.getId() + ".", generateSuccess, tests));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneCompositeSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneCompositeSuite.java
deleted file mode 100644
index c59d864..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneCompositeSuite.java
+++ /dev/null
@@ -1,210 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.test.base.*;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.Signature;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneCompositeSuite extends StandaloneTestSuite {
- private String kpgAlgo;
- private String kaAlgo;
- private String sigAlgo;
- private List<String> kaTypes;
- private List<String> sigTypes;
-
- public StandaloneCompositeSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "composite", "The composite suite runs ECDH over curves with composite order.",
- "Various types of compositeness is tested: smooth numbers, Carmichael pseudo-prime, prime square, product of two large primes.",
- "Supports options:",
- "\t - gt/kpg-type",
- "\t - kt/ka-type (select multiple types by separating them with commas)",
- "\t - st/sig-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- kpgAlgo = cli.getOptionValue("test.kpg-type");
- kaAlgo = cli.getOptionValue("test.ka-type");
- sigAlgo = cli.getOptionValue("test.sig-type");
- kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
- sigTypes = sigAlgo != null ? Arrays.asList(sigAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
-
- Map<String, EC_Key.Public> keys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "composite");
- Map<EC_Curve, List<EC_Key.Public>> mappedKeys = EC_Store.mapKeyToCurve(keys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> curveKeys : mappedKeys.entrySet()) {
- EC_Curve curve = curveKeys.getKey();
- ECParameterSpec spec = curve.toSpec();
-
- //Generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ". " + "KeyAgreement tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ".", generateFail));
- continue;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
-
- //Perform KeyAgreement tests
- List<Test> allKaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- List<Test> specificKaTests = new LinkedList<>();
- for (EC_Key.Public pub : curveKeys.getValue()) {
- ECPublicKey ecpub = ECUtil.toPublicKey(pub);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv ,ecpub);
- Test keyAgreement = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- specificKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ", with generated private key, " + pub.getDesc(), keyAgreement));
- }
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform " + kaIdent.getName() + " with various public points.", specificKaTests.toArray(new Test[0])));
- }
- }
- if(allKaTests.isEmpty()) {
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified key agreement types is supported by the library."));
- }
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", allKaTests.toArray(new Test[0]));
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ".", generateSuccess, tests));
- }
-
-
- Map<String, EC_Curve> results = EC_Store.getInstance().getObjects(EC_Curve.class, "composite");
- Map<String, List<EC_Curve>> groups = EC_Store.mapToPrefix(results.values());
- /* Test the whole curves with both keypairs generated by the library(no small-order public points provided).
- */
- List<EC_Curve> wholeCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("whole")).findFirst().get().getValue();
- testGroup(wholeCurves, kpg, "Composite generator order", Result.ExpectedValue.FAILURE);
-
- /* Also test having a G of small order, so small R.
- */
- List<EC_Curve> smallRCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("small")).findFirst().get().getValue();
- testGroup(smallRCurves, kpg, "Small generator order", Result.ExpectedValue.FAILURE);
-
- /* Test increasingly larger prime R, to determine where/if the behavior changes.
- */
- List<EC_Curve> varyingCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("varying")).findFirst().get().getValue();
- testGroup(varyingCurves, kpg, null, Result.ExpectedValue.ANY);
-
- /* Also test having a G of large but composite order, R = p * q,
- */
- List<EC_Curve> pqCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("pq")).findFirst().get().getValue();
- testGroup(pqCurves, kpg, null, Result.ExpectedValue.ANY);
-
- /* Also test having G or large order being a Carmichael pseudoprime, R = p * q * r,
- */
- List<EC_Curve> ppCurves = groups.entrySet().stream().filter((e) -> e.getKey().equals("pp")).findFirst().get().getValue();
- testGroup(ppCurves, kpg, "Generator order = Carmichael pseudo-prime", Result.ExpectedValue.ANY);
-
- /* Also test rg0 curves.
- */
- List<EC_Curve> rg0Curves = groups.entrySet().stream().filter((e) -> e.getKey().equals("rg0")).findFirst().get().getValue();
- testGroup(rg0Curves, kpg, null, Result.ExpectedValue.ANY);
- }
-
- private void testGroup(List<EC_Curve> curves, KeyPairGenerator kpg, String testName, Result.ExpectedValue dhValue) throws Exception {
- for (EC_Curve curve : curves) {
- String description;
- if (testName == null) {
- description = curve.getDesc() + " test of " + curve.getId() + ".";
- } else {
- description = testName + " test of " + curve.getId() + ".";
- }
-
- //generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, curve.toSpec());
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() +
- ". " + " Other tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, description, generateFail));
- continue;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
- ECPublicKey ecpub = (ECPublicKey) kp.getPublic();
-
- //perform KeyAgreement tests
- List<Test> kaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- kaTests.add(KeyAgreementTest.expectError(testable, dhValue));
- }
- }
- if(kaTests.isEmpty()) {
- kaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified KeyAgreement types is supported by the library."));
- }
-
- //perform Signature tests
- List<Test> sigTests = new LinkedList<>();
- for (SignatureIdent sigIdent : cfg.selected.getSigs()) {
- if (sigAlgo == null || sigIdent.containsAny(sigTypes)) {
- Signature sig = sigIdent.getInstance(cfg.selected.getProvider());
- SignatureTestable testable = new SignatureTestable(sig, ecpriv, ecpub, null);
- sigTests.add(SignatureTest.expectError(testable, dhValue));
- }
- }
- if(sigTests.isEmpty()) {
- sigTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified Signature types is supported by the library."));
- }
-
- Test performKeyAgreements = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform specified KeyAgreements.", kaTests.toArray(new Test[0]));
- Test performSignatures = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform specified Signatures.", sigTests.toArray(new Test[0]));
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, description, generateSuccess, performKeyAgreements, performSignatures));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneDefaultSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneDefaultSuite.java
deleted file mode 100644
index 1c14ecc..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneDefaultSuite.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.test.base.*;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPairGenerator;
-import java.security.Signature;
-import java.security.spec.ECParameterSpec;
-import java.util.Optional;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class StandaloneDefaultSuite extends StandaloneTestSuite {
-
- public StandaloneDefaultSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "default", "The default test suite run basic support of ECDH and ECDSA.", "Supports options:", "\t - gt/kpg-type", "\t - kt/ka-type", "\t - st/sig-type", "\t - key-type");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- String sigAlgo = cli.getOptionValue("test.sig-type");
- String keyAlgo = cli.getOptionValue("test.key-type", "AES");
-
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
-
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
-
- KeyGeneratorTestable kgtOne;
- KeyGeneratorTestable kgtOther;
- ECParameterSpec spec = null;
- if (cli.hasOption("test.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("test.bits"));
- kgtOne = new KeyGeneratorTestable(kpg, bits);
- kgtOther = new KeyGeneratorTestable(kpg, bits);
- } else if (cli.hasOption("test.named-curve")) {
- String curveName = cli.getOptionValue("test.named-curve");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- if (curve == null) {
- System.err.println("Curve not found: " + curveName);
- return;
- }
- spec = curve.toSpec();
- kgtOne = new KeyGeneratorTestable(kpg, spec);
- kgtOther = new KeyGeneratorTestable(kpg, spec);
- } else {
- kgtOne = new KeyGeneratorTestable(kpg);
- kgtOther = new KeyGeneratorTestable(kpg);
- }
-
- doTest(KeyGeneratorTest.expect(kgtOne, Result.ExpectedValue.SUCCESS));
- doTest(KeyGeneratorTest.expect(kgtOther, Result.ExpectedValue.SUCCESS));
-
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.contains(kaAlgo)) {
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable;
- if (kaIdent.requiresKeyAlgo()) {
- testable = new KeyAgreementTestable(ka, kgtOne, kgtOther, spec, keyAlgo);
- } else {
- testable = new KeyAgreementTestable(ka, kgtOne, kgtOther, spec);
- }
- doTest(KeyAgreementTest.expect(testable, Result.ExpectedValue.SUCCESS));
- }
- }
- for (SignatureIdent sigIdent : cfg.selected.getSigs()) {
- if (sigAlgo == null || sigIdent.contains(sigAlgo)) {
- Signature sig = sigIdent.getInstance(cfg.selected.getProvider());
- doTest(SignatureTest.expect(new SignatureTestable(sig, kgtOne, null), Result.ExpectedValue.SUCCESS));
- }
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneDegenerateSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneDegenerateSuite.java
deleted file mode 100644
index 9ab8a39..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneDegenerateSuite.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneDegenerateSuite extends StandaloneTestSuite {
- public StandaloneDegenerateSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "degenerate", "The degenerate suite tests whether the library rejects points outside of the curve during ECDH.",
- "The tested points lie on a part of the plane for which some Edwards, Hessian and Huff form addition formulas degenerate into exponentiation in the base finite field.",
- "Supports options:", "\t - gt/kpg-type", "\t - kt/ka-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- List<String> kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
-
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "degenerate");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
- ECParameterSpec spec = curve.toSpec();
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
-
- Test generateSuccess;
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp != null) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- } else { //If KeyPair generation fails, try generating it on a default curve instead. Use this key only if it has the same domain parameters as our public key.
- KeyGeneratorTestable kgtOnDefaultCurve = new KeyGeneratorTestable(kpg, curve.getBits());
- Test generateOnDefaultCurve = KeyGeneratorTest.expectError(kgtOnDefaultCurve, Result.ExpectedValue.ANY);
- runTest(generateOnDefaultCurve);
- kp = kgtOnDefaultCurve.getKeyPair();
- if(kp != null && ECUtil.equalKeyPairParameters((ECPrivateKey) kp.getPrivate(), ECUtil.toPublicKey(keys.get(0)))) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generateOnDefaultCurve);
- } else {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ". " + "KeyAgreement tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Degenerate curve test of " + curve.getId() + ".", generateFail));
- continue;
- }
- }
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
-
- List<Test> allKaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- List<Test> specificKaTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- ECPublicKey ecpub = ECUtil.toPublicKey(pub);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test keyAgreement = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- specificKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " degenerate key test.", keyAgreement));
- }
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform " + kaIdent.getName() + " with degenerate public points..", specificKaTests.toArray(new Test[0])));
- }
- }
- if(allKaTests.isEmpty()) {
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified key agreement types is supported by the library."));
- }
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", allKaTests.toArray(new Test[0]));
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Degenerate curve test of " + curve.getId() + ".", generateSuccess, tests));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneEdgeCasesSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneEdgeCasesSuite.java
deleted file mode 100644
index 3624aaa..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneEdgeCasesSuite.java
+++ /dev/null
@@ -1,314 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestCallback;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author David Hofman
- */
-public class StandaloneEdgeCasesSuite extends StandaloneTestSuite {
- KeyAgreementIdent kaIdent;
-
- public StandaloneEdgeCasesSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "edge-cases", "The edge-cases test suite tests various inputs to ECDH which may cause an implementation to achieve a certain edge-case state during it.",
- "Some of the data is from the google/Wycheproof project. Tests include CVE-2017-10176 and CVE-2017-8932.",
- "Also tests values of the private key and public key that would trigger the OpenSSL modular multiplication bug on the P-256 curve.",
- "Various edge private key values are also tested.",
- "Supports options:",
- "\t - gt/kpg-type",
- "\t - kt/ka-type");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kaAlgo = cli.getOptionValue("test.ka-type");
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
-
- if (kaAlgo == null) {
- // try ECDH, if not, fail with: need to specify ka algo.
- Optional<KeyAgreementIdent> kaIdentOpt = cfg.selected.getKAs().stream()
- .filter((ident) -> ident.contains("ECDH"))
- .findFirst();
- if (kaIdentOpt.isPresent()) {
- kaIdent = kaIdentOpt.get();
- } else {
- System.err.println("The default KeyAgreement algorithm type of \"ECDH\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong ka algo/not found.
- Optional<KeyAgreementIdent> kaIdentOpt = cfg.selected.getKAs().stream()
- .filter((ident) -> ident.contains(kaAlgo))
- .findFirst();
- if (kaIdentOpt.isPresent()) {
- kaIdent = kaIdentOpt.get();
- } else {
- System.err.println("The KeyAgreement algorithm type of \"" + kaAlgo + "\" was not found.");
- return;
- }
- }
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
-
- Map<String, EC_KAResult> results = EC_Store.getInstance().getObjects(EC_KAResult.class, "wycheproof");
- Map<String, List<EC_KAResult>> groups = EC_Store.mapToPrefix(results.values());
- for (Map.Entry<String, List<EC_KAResult>> e : groups.entrySet()) {
- String description = null;
- switch (e.getKey()) {
- case "addsub":
- description = "Tests for addition-subtraction chains.";
- break;
- case "cve_2017_10176":
- description = "Tests for CVE-2017-10176.";
- break;
- case "cve_2017_8932":
- description = "Tests for CVE-2017-8932.";
- break;
- }
-
- List<Test> groupTests = new LinkedList<>();
- Map<EC_Curve, List<EC_KAResult>> curveList = EC_Store.mapResultToCurve(e.getValue());
- for (Map.Entry<EC_Curve, List<EC_KAResult>> c : curveList.entrySet()) {
- EC_Curve curve = c.getKey();
-
- List<Test> curveTests = new LinkedList<>();
- List<EC_KAResult> values = c.getValue();
- for (EC_KAResult value : values) {
- String id = value.getId();
- String privkeyId = value.getOneKey();
- String pubkeyId = value.getOtherKey();
- ECPrivateKey ecpriv = ECUtil.toPrivateKey(EC_Store.getInstance().getObject(EC_Key.Private.class, privkeyId));
- ECPublicKey ecpub = ECUtil.toPublicKey(EC_Store.getInstance().getObject(EC_Key.Public.class, pubkeyId));
-
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test ecdh = KeyAgreementTest.match(testable, value.getData(0));
- Test one = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test " + id + ".", ecdh);
- curveTests.add(one);
- }
- groupTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests on " + curve.getId() + ".", curveTests.toArray(new Test[0])));
- }
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, description, groupTests.toArray(new Test[0])));
- }
-
- {
- EC_KAResult openssl_bug = EC_Store.getInstance().getObject(EC_KAResult.class, "misc", "openssl-bug");
- ECPrivateKey ecpriv = ECUtil.toPrivateKey(EC_Store.getInstance().getObject(EC_Key.Private.class, openssl_bug.getOtherKey()));
- ECPublicKey ecpub = ECUtil.toPublicKey(EC_Store.getInstance().getObject(EC_Key.Public.class, openssl_bug.getOneKey()));
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test ecdh = KeyAgreementTest.function(testable, new TestCallback<KeyAgreementTestable>() {
- @Override
- public Result apply(KeyAgreementTestable testable) {
- if (!testable.ok()) {
- return new Result(Result.Value.FAILURE, "ECDH was unsuccessful.");
- }
- if (ByteUtil.compareBytes(testable.getSecret(), 0, openssl_bug.getData(0), 0, testable.getSecret().length)) {
- return new Result(Result.Value.FAILURE, "OpenSSL bug is present, derived secret matches example.");
- }
- return new Result(Result.Value.SUCCESS);
- }
- });
-
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test OpenSSL modular reduction bug.", ecdh));
- }
-
- Map<String, EC_Curve> curveMap = EC_Store.getInstance().getObjects(EC_Curve.class, "secg");
- List<EC_Curve> curves = curveMap.entrySet().stream().filter((e) ->
- e.getKey().endsWith("r1") && e.getValue().getField() == javacard.security.KeyPair.ALG_EC_FP).map(Map.Entry::getValue).collect(Collectors.toList());
- curves.add(EC_Store.getInstance().getObject(EC_Curve.class, "cofactor/cofactor128p2"));
- curves.add(EC_Store.getInstance().getObject(EC_Curve.class, "cofactor/cofactor160p4"));
- Random rand = new Random();
- for (EC_Curve curve : curves) {
- ECParameterSpec spec = curve.toSpec();
-
- //generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if (kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() +
- ". " + " Other tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with edge-case private key values over" + curve.getId() + ".", generateFail));
- continue;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate KeyPair.", generate);
- ECPublicKey ecpub = (ECPublicKey) kp.getPublic();
-
- //perform ECDH tests
- Test zeroS = ecdhTest(ecpub, BigInteger.ZERO, spec, "ECDH with S = 0.", Result.ExpectedValue.FAILURE);
- Test oneS = ecdhTest(ecpub, BigInteger.ONE, spec, "ECDH with S = 1.", Result.ExpectedValue.FAILURE);
-
- byte[] rParam = curve.getParam(EC_Consts.PARAMETER_R)[0];
- BigInteger R = new BigInteger(1, rParam);
- BigInteger smaller = new BigInteger(curve.getBits(), rand).mod(R);
- BigInteger diff = R.divide(BigInteger.valueOf(10));
- BigInteger randDiff = new BigInteger(diff.bitLength(), rand).mod(diff);
- BigInteger larger = R.add(randDiff);
- BigInteger full = BigInteger.valueOf(1).shiftLeft(R.bitLength() - 1).subtract(BigInteger.ONE);
-
- BigInteger alternate = full;
- for (int i = 0; i < R.bitLength(); i += 2) {
- alternate = alternate.clearBit(i);
- }
-
- BigInteger alternateOther = alternate.xor(full);
- BigInteger rm1 = R.subtract(BigInteger.ONE);
- BigInteger rp1 = R.add(BigInteger.ONE);
-
- Test alternateS = ecdhTest(ecpub, alternate, spec, "ECDH with S = 101010101...01010.", Result.ExpectedValue.SUCCESS);
- Test alternateOtherS = ecdhTest(ecpub, alternateOther, spec, "ECDH with S = 010101010...10101.", Result.ExpectedValue.SUCCESS);
- Test fullS = ecdhTest(ecpub, full, spec, "ECDH with S = 111111111...11111 (but < r).", Result.ExpectedValue.SUCCESS);
- Test smallerS = ecdhTest(ecpub, smaller, spec, "ECDH with S < r.", Result.ExpectedValue.SUCCESS);
- Test exactS = ecdhTest(ecpub, R, spec, "ECDH with S = r.", Result.ExpectedValue.FAILURE);
- Test largeS = ecdhTest(ecpub, larger, spec, "ECDH with S > r.", Result.ExpectedValue.ANY);
- Test rm1S = ecdhTest(ecpub, rm1, spec, "ECDH with S = r - 1.", Result.ExpectedValue.SUCCESS);
- Test rp1S = ecdhTest(ecpub, rp1, spec, "ECDH with S = r + 1.", Result.ExpectedValue.ANY);
-
- byte[] k = curve.getParam(EC_Consts.PARAMETER_K)[0];
- BigInteger K = new BigInteger(1, k);
- BigInteger kr = K.multiply(R);
- BigInteger krm1 = kr.subtract(BigInteger.ONE);
- BigInteger krp1 = kr.add(BigInteger.ONE);
-
- Result.ExpectedValue kExpected = K.equals(BigInteger.ONE) ? Result.ExpectedValue.SUCCESS : Result.ExpectedValue.FAILURE;
-
- Test krS /*ONE!*/ = ecdhTest(ecpub, kr, spec, "ECDH with S = k * r.", Result.ExpectedValue.FAILURE);
- Test krm1S = ecdhTest(ecpub, krm1, spec, "ECDH with S = (k * r) - 1.", kExpected);
- Test krp1S = ecdhTest(ecpub, krp1, spec, "ECDH with S = (k * r) + 1.", Result.ExpectedValue.ANY);
-
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with edge-case private key values over " + curve.getId() + ".",
- generateSuccess, zeroS, oneS, alternateS, alternateOtherS, fullS, smallerS, exactS, largeS, rm1S, rp1S, krS, krm1S, krp1S));
- }
-
- EC_Curve secp160r1 = EC_Store.getInstance().getObject(EC_Curve.class, "secg/secp160r1");
- ECParameterSpec spec = secp160r1.toSpec();
- byte[] pData = secp160r1.getParam(EC_Consts.PARAMETER_FP)[0];
- BigInteger p = new BigInteger(1, pData);
- byte[] rData = secp160r1.getParam(EC_Consts.PARAMETER_R)[0];
- BigInteger r = new BigInteger(1, rData);
-
- BigInteger range = r.subtract(p);
- BigInteger deviation = range.divide(BigInteger.valueOf(5));
- BigDecimal dev = new BigDecimal(deviation);
- BigDecimal smallDev = new BigDecimal(10000);
- int n = 10;
- BigInteger[] rs = new BigInteger[n];
- BigInteger[] ps = new BigInteger[n];
- BigInteger[] zeros = new BigInteger[n];
- for (int i = 0; i < n; ++i) {
- double sample;
- do {
- sample = rand.nextGaussian();
- } while (sample >= -1 && sample <= 1);
- BigInteger where = dev.multiply(new BigDecimal(sample)).toBigInteger();
- rs[i] = where.add(r);
- ps[i] = where.add(p);
- zeros[i] = smallDev.multiply(new BigDecimal(sample)).toBigInteger().abs();
- }
- Arrays.sort(rs);
- Arrays.sort(ps);
- Arrays.sort(zeros);
-
- //generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on "
- + secp160r1.getBits() + "b secp160r1." + " Other tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test private key values near zero, near p and near/larger than the order on" + secp160r1.getId() + ".", generateFail));
- return;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate KeyPair.", generate);
- ECPublicKey ecpub = (ECPublicKey) kp.getPublic();
-
- //perform ECDH tests
- Test[] zeroTests = new Test[n];
- int i = 0;
- for (BigInteger nearZero : zeros) {
- zeroTests[i++] = ecdhTest(ecpub, nearZero, spec, nearZero.toString(16), Result.ExpectedValue.SUCCESS);
- }
- Test zeroTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near zero.", zeroTests);
-
- Test[] pTests = new Test[n];
- i = 0;
- for (BigInteger nearP : ps) {
- pTests[i++] = ecdhTest(ecpub, nearP, spec, nearP.toString(16) + (nearP.compareTo(p) > 0 ? " (>p)" : " (<=p)"), Result.ExpectedValue.SUCCESS);
- }
- Test pTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near p.", pTests);
-
- Test[] rTests = new Test[n];
- i = 0;
- for (BigInteger nearR : rs) {
- if (nearR.compareTo(r) >= 0) {
- rTests[i++] = ecdhTest(ecpub, nearR, spec, nearR.toString(16) + " (>=r)", Result.ExpectedValue.FAILURE);
- } else {
- rTests[i++] = ecdhTest(ecpub, nearR, spec, nearR.toString(16) + " (<r)", Result.ExpectedValue.SUCCESS);
- }
- }
- Test rTest = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Near r.", rTests);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test private key values near zero, near p and near/larger than the order.", generateSuccess, zeroTest, pTest, rTest));
- }
-
- private Test ecdhTest(ECPublicKey pub, BigInteger SParam, ECParameterSpec spec, String desc, Result.ExpectedValue expect) throws NoSuchAlgorithmException {
- ECPrivateKey priv = new RawECPrivateKey(SParam, spec);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, priv, pub);
- return CompoundTest.all(Result.ExpectedValue.SUCCESS, desc, KeyAgreementTest.expectError(testable, expect));
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneInvalidSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneInvalidSuite.java
deleted file mode 100644
index ace8945..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneInvalidSuite.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneInvalidSuite extends StandaloneTestSuite {
- public StandaloneInvalidSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "invalid", "The invalid curve suite tests whether the library rejects points outside of the curve during ECDH.",
- "Supports options:", "\t - gt/kpg-type", "\t - kt/ka-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- List<String> kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
-
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "invalid");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
- ECParameterSpec spec = curve.toSpec();
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
-
- Test generateSuccess;
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp != null) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- } else { //If KeyPair generation fails, try generating it on a default curve instead. Use this key only if it has the same domain parameters as our public key.
- KeyGeneratorTestable kgtOnDefaultCurve = new KeyGeneratorTestable(kpg, curve.getBits());
- Test generateOnDefaultCurve = KeyGeneratorTest.expectError(kgtOnDefaultCurve, Result.ExpectedValue.ANY);
- runTest(generateOnDefaultCurve);
- kp = kgtOnDefaultCurve.getKeyPair();
- if(kp != null && ECUtil.equalKeyPairParameters((ECPrivateKey) kp.getPrivate(), ECUtil.toPublicKey(keys.get(0)))) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generateOnDefaultCurve);
- } else {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ". " + "KeyAgreement tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Invalid curve test of " + curve.getId() + ".", generateFail));
- continue;
- }
- }
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
-
- List<Test> allKaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- List<Test> specificKaTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- ECPublicKey ecpub = ECUtil.toPublicKey(pub);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test keyAgreement = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- specificKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " invalid key test.", keyAgreement));
- }
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform " + kaIdent.getName() + " with invalid public points.", specificKaTests.toArray(new Test[0])));
- }
- }
- if(allKaTests.isEmpty()) {
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified key agreement types is supported by the library."));
- }
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", allKaTests.toArray(new Test[0]));
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Invalid curve test of " + curve.getId() + ".", generateSuccess, tests));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneMiscSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneMiscSuite.java
deleted file mode 100644
index f3a10eb..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneMiscSuite.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.test.base.*;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.Signature;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneMiscSuite extends StandaloneTestSuite {
- private String kpgAlgo;
- private String kaAlgo;
- private String sigAlgo;
- private List<String> kaTypes;
- private List<String> sigTypes;
-
- public StandaloneMiscSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "miscellaneous", "Some miscellaneous tests, tries ECDH and ECDSA over supersingular curves, anomalous curves,",
- "Barreto-Naehrig curves with small embedding degree and CM discriminant, MNT curves,",
- "some Montgomery curves transformed to short Weierstrass form and Curve25519 transformed to short Weierstrass form.",
- "Supports options:",
- "\t - gt/kpg-type",
- "\t - kt/ka-type (select multiple types by separating them with commas)",
- "\t - st/sig-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- kpgAlgo = cli.getOptionValue("test.kpg-type");
- kaAlgo = cli.getOptionValue("test.ka-type");
- sigAlgo = cli.getOptionValue("test.sig-type");
-
- kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
- sigTypes = sigAlgo != null ? Arrays.asList(sigAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
-
- Map<String, EC_Curve> anCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "anomalous");
- Map<String, EC_Curve> ssCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "supersingular");
- Map<String, EC_Curve> bnCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "Barreto-Naehrig");
- Map<String, EC_Curve> mntCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "MNT");
- List<EC_Curve> mCurves = new ArrayList<>();
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-221"));
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-383"));
- mCurves.add(EC_Store.getInstance().getObject(EC_Curve.class, "other", "M-511"));
- EC_Curve curve25519 = EC_Store.getInstance().getObject(EC_Curve.class, "other", "Curve25519");
-
- testCurves(anCurves.values(), "anomalous", kpg, Result.ExpectedValue.FAILURE);
- testCurves(ssCurves.values(), "supersingular", kpg, Result.ExpectedValue.FAILURE);
- testCurves(bnCurves.values(), "Barreto-Naehrig", kpg, Result.ExpectedValue.SUCCESS);
- testCurves(mntCurves.values(), "MNT", kpg, Result.ExpectedValue.SUCCESS);
- testCurves(mCurves, "Montgomery", kpg, Result.ExpectedValue.SUCCESS);
- testCurve(curve25519, "Montgomery", kpg, Result.ExpectedValue.SUCCESS);
- }
-
- private void testCurve(EC_Curve curve, String catName, KeyPairGenerator kpg, Result.ExpectedValue expected) throws NoSuchAlgorithmException {
- //generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, curve.toSpec());
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() +
- ". " + " Other tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests over " + curve.getBits() + "b " + catName + " curve: " + curve.getId() + ".", generateFail));
- return;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
- ECPublicKey ecpub = (ECPublicKey) kp.getPublic();
-
- //perform KeyAgreement tests
- List<Test> kaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- kaTests.add(KeyAgreementTest.expectError(testable, expected));
- }
- }
- if(kaTests.isEmpty()) {
- kaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified KeyAgreement types is supported by the library."));
- }
-
- //perform Signature tests
- List<Test> sigTests = new LinkedList<>();
- for (SignatureIdent sigIdent : cfg.selected.getSigs()) {
- if (sigAlgo == null || sigIdent.containsAny(sigTypes)) {
- Signature sig = sigIdent.getInstance(cfg.selected.getProvider());
- SignatureTestable testable = new SignatureTestable(sig, ecpriv, ecpub, null);
- sigTests.add(SignatureTest.expectError(testable, expected));
- }
- }
- if(sigTests.isEmpty()) {
- sigTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified Signature types is supported by the library."));
- }
-
- Test performKeyAgreements = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform specified KeyAgreements.", kaTests.toArray(new Test[0]));
- Test performSignatures = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform specified Signatures.", sigTests.toArray(new Test[0]));
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests over " + curve.getBits() + "b " + catName + " curve: " + curve.getId() + ".", generateSuccess, performKeyAgreements, performSignatures));
- }
-
- private void testCurves(Collection<EC_Curve> curves, String catName, KeyPairGenerator kpg, Result.ExpectedValue expected) throws NoSuchAlgorithmException {
- for (EC_Curve curve : curves) {
- testCurve(curve, catName, kpg, expected);
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandalonePerformanceSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandalonePerformanceSuite.java
deleted file mode 100644
index dd50862..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandalonePerformanceSuite.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.test.base.*;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPairGenerator;
-import java.security.Signature;
-import java.security.interfaces.ECPrivateKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author David Hofman
- */
-public class StandalonePerformanceSuite extends StandaloneTestSuite {
- private final int count = 100;
-
- public StandalonePerformanceSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "performance", "The performance test suite measures performance of KeyPair generation, KeyAgreement and Signature operations.",
- "Supports options:",
- "\t - gt/kpg-type (select multiple types by separating them with commas)",
- "\t - kt/ka-type (select multiple types by separating them with commas)",
- "\t - st/sig-type (select multiple types by separating them with commas)",
- "\t - key-type");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- String sigAlgo = cli.getOptionValue("test.sig-type");
- String keyAlgo = cli.getOptionValue("test.key-type", "AES");
-
- List<String> kpgTypes = kpgAlgo != null ? Arrays.asList(kpgAlgo.split(",")) : new ArrayList<>();
- List<String> kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
- List<String> sigTypes = sigAlgo != null ? Arrays.asList(sigAlgo.split(",")) : new ArrayList<>();
-
- List<KeyPairGeneratorIdent> kpgIdents = new LinkedList<>();
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdents.add(kpgIdentOpt.get());
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- kpgIdents = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.containsAny(kpgTypes)).collect(Collectors.toList());
- if (kpgIdents.isEmpty()) {
- System.err.println("No KeyPairGenerator algorithms of specified types were found.");
- return;
- }
- }
-
- KeyGeneratorTestable kgtOne = null;
- KeyGeneratorTestable kgtOther = null;
- ECParameterSpec spec = null;
- List<Test> kpgTests = new LinkedList<>();
- for(KeyPairGeneratorIdent kpgIdent : kpgIdents) {
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
- if (cli.hasOption("test.bits")) {
- int bits = Integer.parseInt(cli.getOptionValue("test.bits"));
- kgtOne = new KeyGeneratorTestable(kpg, bits);
- kgtOther = new KeyGeneratorTestable(kpg, bits);
- } else if (cli.hasOption("test.named-curve")) {
- String curveName = cli.getOptionValue("test.named-curve");
- EC_Curve curve = EC_Store.getInstance().getObject(EC_Curve.class, curveName);
- if (curve == null) {
- System.err.println("Curve not found: " + curveName);
- return;
- }
- spec = curve.toSpec();
- kgtOne = new KeyGeneratorTestable(kpg, spec);
- kgtOther = new KeyGeneratorTestable(kpg, spec);
- } else {
- kgtOne = new KeyGeneratorTestable(kpg);
- kgtOther = new KeyGeneratorTestable(kpg);
- }
- kpgTests.add(PerformanceTest.repeat(kgtOne, kpgIdent.getName(), count));
- }
- runTest(KeyGeneratorTest.expect(kgtOther, Result.ExpectedValue.SUCCESS));
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyPairGenerator performance tests", kpgTests.toArray(new Test[0])));
-
- List<Test> kaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable;
- if (kaIdent.requiresKeyAlgo()) {
- testable = new KeyAgreementTestable(ka, kgtOne, kgtOther, spec, keyAlgo);
- } else {
- testable = new KeyAgreementTestable(ka, kgtOne, kgtOther, spec);
- }
- kaTests.add(PerformanceTest.repeat(testable, kaIdent.getName(), count));
- }
- }
- if(kaTests.isEmpty()) {
- kaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified KeyAgreement types is supported by the library."));
- }
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "KeyAgreement performance tests", kaTests.toArray(new Test[0])));
-
- List<Test> sigTests = new LinkedList<>();
- List<Test> sigTestsNoVerification = new LinkedList<>();
- for (SignatureIdent sigIdent : cfg.selected.getSigs()) {
- if (sigAlgo == null || sigIdent.containsAny(sigTypes)) {
- Signature sig = sigIdent.getInstance(cfg.selected.getProvider());
- sigTests.add(PerformanceTest.repeat(new SignatureTestable(sig, kgtOne, null), sigIdent.getName(),count));
- if(kgtOne.getKeyPair() != null) {
- ECPrivateKey signKey = (ECPrivateKey) kgtOne.getKeyPair().getPrivate();
- sigTestsNoVerification.add(PerformanceTest.repeat(new SignatureTestable(sig, signKey, null, null), sigIdent.getName(), count));
- }
- }
- }
- if(sigTestsNoVerification.isEmpty() & !sigTests.isEmpty()) {
- sigTestsNoVerification.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Signature tests with no verification require a successfully generated private key."));
- }
- if(sigTests.isEmpty()) {
- sigTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified Signature types is supported by the library."));
- sigTestsNoVerification.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified Signature types is supported by the library."));
- }
- Test signAndVerify = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Sign and verify", sigTests.toArray(new Test[0]));
- Test signOnly = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Sign only, no verification", sigTestsNoVerification.toArray(new Test[0]));
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Signature performance tests", signAndVerify, signOnly));
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneSignatureSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneSignatureSuite.java
deleted file mode 100644
index 94e810e..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneSignatureSuite.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.ec.EC_SigResult;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.SignatureIdent;
-import cz.crcs.ectester.standalone.test.base.SignatureTest;
-import cz.crcs.ectester.standalone.test.base.SignatureTestable;
-
-import java.security.NoSuchAlgorithmException;
-import java.security.Signature;
-import java.security.interfaces.ECPublicKey;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneSignatureSuite extends StandaloneTestSuite {
- public StandaloneSignatureSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "signature", "The signature test suite tests verifying various malformed and well-formed but invalid ECDSA signatures.",
- "Supports options:", "\t - st/sig-type");
- }
-
- @Override
- protected void runTests() throws Exception {
- String sigAlgo = cli.getOptionValue("test.sig-type");
-
- SignatureIdent sigIdent;
- if (sigAlgo == null) {
- // try ECDSA, if not, fail with: need to specify sig algo.
- Optional<SignatureIdent> sigIdentOpt = cfg.selected.getSigs().stream()
- .filter((ident) -> ident.contains("ECDSA"))
- .findFirst();
- if (sigIdentOpt.isPresent()) {
- sigIdent = sigIdentOpt.get();
- } else {
- System.err.println("The default Signature algorithm type of \"ECDSA\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong sig algo/not found.
- Optional<SignatureIdent> sigIdentOpt = cfg.selected.getSigs().stream()
- .filter((ident) -> ident.contains(sigAlgo))
- .findFirst();
- if (sigIdentOpt.isPresent()) {
- sigIdent = sigIdentOpt.get();
- } else {
- System.err.println("The Signature algorithm type of \"" + sigAlgo + "\" was not found.");
- return;
- }
- }
-
- Map<String, EC_SigResult> results = EC_Store.getInstance().getObjects(EC_SigResult.class, "wrong");
- Map<String, List<EC_SigResult>> groups = EC_Store.mapToPrefix(results.values());
-
- List<EC_SigResult> nok = groups.entrySet().stream().filter((e) -> e.getKey().equals("nok")).findFirst().get().getValue();
-
- byte[] data = "Some stuff that is not the actual data".getBytes();
- for (EC_SigResult sig : nok) {
- ecdsaTest(sig, sigIdent, Result.ExpectedValue.FAILURE, data);
- }
-
- List<EC_SigResult> ok = groups.entrySet().stream().filter((e) -> e.getKey().equals("ok")).findFirst().get().getValue();
- for (EC_SigResult sig : ok) {
- ecdsaTest(sig, sigIdent, Result.ExpectedValue.SUCCESS, null);
- }
- }
-
- private void ecdsaTest(EC_SigResult sig, SignatureIdent sigIdent, Result.ExpectedValue expected, byte[] defaultData) throws NoSuchAlgorithmException {
- ECPublicKey ecpub = ECUtil.toPublicKey(EC_Store.getInstance().getObject(EC_Key.Public.class, sig.getVerifyKey()));
-
- byte[] data = sig.getSigData();
- if (data == null) {
- data = defaultData;
- }
-
- Signature signature = sigIdent.getInstance(cfg.selected.getProvider());
- SignatureTestable testable = new SignatureTestable(signature, ecpub, data, sig.getData(0));
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "ECDSA test of " + sig.getId() + ".", SignatureTest.expectError(testable, expected)));
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestSuite.java
deleted file mode 100644
index e4e0013..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestSuite.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.TestSuite;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.libs.ProviderECLibrary;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class StandaloneTestSuite extends TestSuite {
- TreeCommandLine cli;
- ECTesterStandalone.Config cfg;
-
- public StandaloneTestSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli, String name, String... description) {
- super(writer, name, description);
- this.cfg = cfg;
- this.cli = cli;
- }
-
- public ProviderECLibrary getLibrary() {
- return cfg.selected;
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestVectorSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestVectorSuite.java
deleted file mode 100644
index 1e1889c..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTestVectorSuite.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-
-import javax.crypto.KeyAgreement;
-import java.io.IOException;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.util.Map;
-
-/**
- * @author David Hofman
- */
-public class StandaloneTestVectorSuite extends StandaloneTestSuite {
-
- public StandaloneTestVectorSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "test-vectors", "The test-vectors suite contains a collection of test vectors which test basic ECDH correctness.");
- }
-
- @Override
- protected void runTests() throws Exception {
- Map<String, EC_KAResult> results = EC_Store.getInstance().getObjects(EC_KAResult.class, "test");
- for (EC_KAResult result : results.values()) {
- if(!"DH_PLAIN".equals(result.getKA())) {
- continue;
- }
-
- EC_Params onekey = EC_Store.getInstance().getObject(EC_Keypair.class, result.getOneKey());
- if (onekey == null) {
- onekey = EC_Store.getInstance().getObject(EC_Key.Private.class, result.getOneKey());
- }
- EC_Params otherkey = EC_Store.getInstance().getObject(EC_Keypair.class, result.getOtherKey());
- if (otherkey == null) {
- otherkey = EC_Store.getInstance().getObject(EC_Key.Public.class, result.getOtherKey());
- }
- if (onekey == null || otherkey == null) {
- throw new IOException("Test vector keys couldn't be located.");
- }
-
- ECPrivateKey privkey = onekey instanceof EC_Keypair ?
- (ECPrivateKey) ECUtil.toKeyPair((EC_Keypair) onekey).getPrivate() :
- ECUtil.toPrivateKey((EC_Key.Private) onekey);
- ECPublicKey pubkey = otherkey instanceof EC_Keypair ?
- (ECPublicKey) ECUtil.toKeyPair((EC_Keypair) otherkey).getPublic() :
- ECUtil.toPublicKey((EC_Key.Public) otherkey);
-
- KeyAgreementIdent kaIdent = KeyAgreementIdent.get("ECDH");
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, privkey, pubkey);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Test vector " + result.getId(), KeyAgreementTest.match(testable, result.getData(0))));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTwistSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneTwistSuite.java
deleted file mode 100644
index f182952..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneTwistSuite.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.EC_Curve;
-import cz.crcs.ectester.common.ec.EC_Key;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-import java.util.*;
-
-/**
- * @author David Hofman
- */
-public class StandaloneTwistSuite extends StandaloneTestSuite {
- public StandaloneTwistSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "twist", "The twist test suite tests whether the library correctly rejects points on the quadratic twist of the curve during ECDH.",
- "Supports options:", "\t - gt/kpg-type", "\t - kt/ka-type (select multiple types by separating them with commas)");
- }
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- List<String> kaTypes = kaAlgo != null ? Arrays.asList(kaAlgo.split(",")) : new ArrayList<>();
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
-
- Map<String, EC_Key.Public> pubkeys = EC_Store.getInstance().getObjects(EC_Key.Public.class, "twist");
- Map<EC_Curve, List<EC_Key.Public>> curveList = EC_Store.mapKeyToCurve(pubkeys.values());
- for (Map.Entry<EC_Curve, List<EC_Key.Public>> e : curveList.entrySet()) {
- EC_Curve curve = e.getKey();
- List<EC_Key.Public> keys = e.getValue();
-
- KeyPairGenerator kpg = kpgIdent.getInstance(cfg.selected.getProvider());
- ECParameterSpec spec = curve.toSpec();
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
-
- Test generateSuccess;
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp != null) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- } else { //If KeyPair generation fails, try generating it on a default curve instead. Use this key only if it has the same domain parameters as our public key.
- KeyGeneratorTestable kgtOnDefaultCurve = new KeyGeneratorTestable(kpg, curve.getBits());
- Test generateOnDefaultCurve = KeyGeneratorTest.expectError(kgtOnDefaultCurve, Result.ExpectedValue.ANY);
- runTest(generateOnDefaultCurve);
- kp = kgtOnDefaultCurve.getKeyPair();
- if(kp != null && ECUtil.equalKeyPairParameters((ECPrivateKey) kp.getPrivate(), ECUtil.toPublicKey(keys.get(0)))) {
- generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generateOnDefaultCurve);
- } else {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ". " + "KeyAgreement tests will be skipped.", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Twist test of " + curve.getId() + ".", generateFail));
- continue;
- }
- }
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
-
- List<Test> allKaTests = new LinkedList<>();
- for (KeyAgreementIdent kaIdent : cfg.selected.getKAs()) {
- if (kaAlgo == null || kaIdent.containsAny(kaTypes)) {
- List<Test> specificKaTests = new LinkedList<>();
- for (EC_Key.Public pub : keys) {
- ECPublicKey ecpub = ECUtil.toPublicKey(pub);
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test keyAgreement = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- specificKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, pub.getId() + " twist key test.", keyAgreement));
- }
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Perform " + kaIdent.getName() + " with public points on twist.", specificKaTests.toArray(new Test[0])));
- }
- }
- if(allKaTests.isEmpty()) {
- allKaTests.add(CompoundTest.all(Result.ExpectedValue.SUCCESS, "None of the specified key agreement types is supported by the library."));
- }
- Test tests = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Do tests.", allKaTests.toArray(new Test[0]));
- doTest(CompoundTest.greedyAllTry(Result.ExpectedValue.SUCCESS, "Twist test of " + curve.getId() + ".", generateSuccess, tests));
- }
- }
-}
diff --git a/src/cz/crcs/ectester/standalone/test/suites/StandaloneWrongSuite.java b/src/cz/crcs/ectester/standalone/test/suites/StandaloneWrongSuite.java
deleted file mode 100644
index 79b0b7d..0000000
--- a/src/cz/crcs/ectester/standalone/test/suites/StandaloneWrongSuite.java
+++ /dev/null
@@ -1,344 +0,0 @@
-package cz.crcs.ectester.standalone.test.suites;
-
-import cz.crcs.ectester.applet.EC_Consts;
-import cz.crcs.ectester.common.cli.TreeCommandLine;
-import cz.crcs.ectester.common.ec.*;
-import cz.crcs.ectester.common.output.TestWriter;
-import cz.crcs.ectester.common.test.CompoundTest;
-import cz.crcs.ectester.common.test.Result;
-import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.util.ByteUtil;
-import cz.crcs.ectester.common.util.ECUtil;
-import cz.crcs.ectester.data.EC_Store;
-import cz.crcs.ectester.standalone.ECTesterStandalone;
-import cz.crcs.ectester.standalone.consts.KeyAgreementIdent;
-import cz.crcs.ectester.standalone.consts.KeyPairGeneratorIdent;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTest;
-import cz.crcs.ectester.standalone.test.base.KeyAgreementTestable;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTest;
-import cz.crcs.ectester.standalone.test.base.KeyGeneratorTestable;
-
-import javax.crypto.KeyAgreement;
-import java.math.BigInteger;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.ECPrivateKey;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.*;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author David Hofman
- */
-public class StandaloneWrongSuite extends StandaloneTestSuite {
- private KeyAgreementIdent kaIdent;
- private KeyPairGenerator kpg;
-
- public StandaloneWrongSuite(TestWriter writer, ECTesterStandalone.Config cfg, TreeCommandLine cli) {
- super(writer, cfg, cli, "wrong", "The wrong curve suite tests whether the library rejects domain parameters which are not curves.",
- "Supports options:",
- "\t - gt/kpg-type",
- "\t - kt/ka-type",
- "\t - skip (place this option before the library name to skip tests that can potentially cause a freeze)");
- }
-
-
- @Override
- protected void runTests() throws Exception {
- String kpgAlgo = cli.getOptionValue("test.kpg-type");
- String kaAlgo = cli.getOptionValue("test.ka-type");
- boolean skip = cli.getArg(1).equalsIgnoreCase("-skip");
-
- KeyPairGeneratorIdent kpgIdent;
- if (kpgAlgo == null) {
- // try EC, if not, fail with: need to specify kpg algo.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains("EC"))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The default KeyPairGenerator algorithm type of \"EC\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong kpg algo/not found.
- Optional<KeyPairGeneratorIdent> kpgIdentOpt = cfg.selected.getKPGs().stream()
- .filter((ident) -> ident.contains(kpgAlgo))
- .findFirst();
- if (kpgIdentOpt.isPresent()) {
- kpgIdent = kpgIdentOpt.get();
- } else {
- System.err.println("The KeyPairGenerator algorithm type of \"" + kpgAlgo + "\" was not found.");
- return;
- }
- }
- kpg = kpgIdent.getInstance(cfg.selected.getProvider());
-
- if (kaAlgo == null) {
- // try ECDH, if not, fail with: need to specify ka algo.
- Optional<KeyAgreementIdent> kaIdentOpt = cfg.selected.getKAs().stream()
- .filter((ident) -> ident.contains("ECDH"))
- .findFirst();
- if (kaIdentOpt.isPresent()) {
- kaIdent = kaIdentOpt.get();
- } else {
- System.err.println("The default KeyAgreement algorithm type of \"ECDH\" was not found. Need to specify a type.");
- return;
- }
- } else {
- // try the specified, if not, fail with: wrong ka algo/not found.
- Optional<KeyAgreementIdent> kaIdentOpt = cfg.selected.getKAs().stream()
- .filter((ident) -> ident.contains(kaAlgo))
- .findFirst();
- if (kaIdentOpt.isPresent()) {
- kaIdent = kaIdentOpt.get();
- } else {
- System.err.println("The KeyAgreement algorithm type of \"" + kaAlgo + "\" was not found.");
- return;
- }
- }
-
- /* Just do the default run on the wrong curves.
- * These should generally fail, the curves aren't curves.
- */
- if(!skip) {
- Map<String, EC_Curve> wrongCurves = EC_Store.getInstance().getObjects(EC_Curve.class, "wrong");
- for (Map.Entry<String, EC_Curve> e : wrongCurves.entrySet()) {
-
- EC_Curve curve = e.getValue();
- ECParameterSpec spec = curve.toSpec();
- String type = curve.getField() == javacard.security.KeyPair.ALG_EC_FP ? "FP" : "F2M";
-
- //try generating a keypair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.ANY);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if (kp == null) {
- Test generateFail = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generating KeyPair has failed on " + curve.getId() + ".", generate);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Wrong curve test of " + curve.getBits()
- + "b " + type + ". " + curve.getDesc(), generateFail));
- continue;
- }
- Test generateSuccess = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Generate keypair.", generate);
- ECPrivateKey ecpriv = (ECPrivateKey) kp.getPrivate();
- ECPublicKey ecpub = (ECPublicKey) kp.getPublic();
-
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
- Test ecdh = KeyAgreementTest.expectError(testable, Result.ExpectedValue.FAILURE);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Wrong curve test of " + curve.getBits()
- + "b " + type + ". " + curve.getDesc(), generateSuccess, ecdh));
- }
- }
-
- /*
- * Do some interesting tests with corrupting the custom curves.
- * For prime field:
- * - p = 0
- * - p = 1
- * - p is a square of a prime
- * - p is a composite q * s with q, s primes
- * - TODO: p divides discriminant
- */
- Map<String, EC_Curve> curveMap = EC_Store.getInstance().getObjects(EC_Curve.class, "secg");
- List<EC_Curve> curves = curveMap.entrySet().stream().filter((e) -> e.getKey().endsWith("r1") &&
- e.getValue().getField() == javacard.security.KeyPair.ALG_EC_FP).map(Map.Entry::getValue).collect(Collectors.toList());
- Random r = new Random();
- for (EC_Curve curve : curves) {
- short bits = curve.getBits();
- final byte[] originalp = curve.getParam(EC_Consts.PARAMETER_FP)[0];
-
- curve.setParam(EC_Consts.PARAMETER_FP, new byte[][]{ ByteUtil.hexToBytes("0")});
- Test prime0 = ecdhTest(toCustomSpec(curve),"ECDH with p = 0.");
-
- curve.setParam(EC_Consts.PARAMETER_FP, new byte[][]{ ByteUtil.hexToBytes("1")});
- Test prime1 = ecdhTest(toCustomSpec(curve),"ECDH with p = 1.");
-
- short keyHalf = (short) (bits / 2);
- BigInteger prime = new BigInteger(keyHalf, 50, r);
- BigInteger primePow = prime.pow(2);
- byte[] primePowBytes = ECUtil.toByteArray(primePow, bits);
- curve.setParam(EC_Consts.PARAMETER_FP, new byte[][]{primePowBytes});
-
- Test primePower = ecdhTest(toCustomSpec(curve), "ECDH with p = q^2.");
-
- BigInteger q = new BigInteger(keyHalf, r);
- BigInteger s = new BigInteger(keyHalf, r);
- BigInteger compositeValue = q.multiply(s);
- byte[] compositeBytes = ECUtil.toByteArray(compositeValue, bits);
- curve.setParam(EC_Consts.PARAMETER_FP, new byte[][]{compositeBytes});
-
- Test composite = ecdhTest(toCustomSpec(curve), "ECDH with p = q * s.");
-
- Test wrongPrime = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with corrupted prime parameter.", prime0 , prime1, primePower, composite );
-
- curve.setParam(EC_Consts.PARAMETER_FP, new byte[][] {originalp});
- final byte[][] originalG = curve.getParam(EC_Consts.PARAMETER_G);
-
- byte[] Gx = new BigInteger(curve.getBits(), r).toByteArray();
- byte[] Gy = new BigInteger(curve.getBits(), r).toByteArray();
- curve.setParam(EC_Consts.PARAMETER_G, new byte[][] {Gx, Gy});
- Test fullRandomG = ecdhTest(toCustomSpec(curve), "ECDH with G = random data.");
-
- final BigInteger originalBigp = new BigInteger(1, originalp);
- byte[] smallerGx = new BigInteger(curve.getBits(), r).mod(originalBigp).toByteArray();
- byte[] smallerGy = new BigInteger(curve.getBits(), r).mod(originalBigp).toByteArray();
- curve.setParam(EC_Consts.PARAMETER_G, new byte[][] {smallerGx, smallerGy});
- Test randomG = ecdhTest(toCustomSpec(curve), "ECDH with G = random data mod p.");
-
- curve.setParam(EC_Consts.PARAMETER_G, new byte[][] {ByteUtil.hexToBytes("0"), ByteUtil.hexToBytes("0")});
- Test zeroG = ecdhTest(toCustomSpec(curve), "ECDH with G = infinity.");
-
- Test wrongG = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with corrupted G parameter.", fullRandomG, randomG, zeroG);
-
- curve.setParam(EC_Consts.PARAMETER_G, originalG);
- final byte[] originalR = curve.getParam(EC_Consts.PARAMETER_R)[0];
- final BigInteger originalBigR = new BigInteger(1, originalR);
-
- List<Test> allRTests = new LinkedList<>();
- if(!skip) {
- byte[] RZero = new byte[]{(byte) 0};
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][]{RZero});
- allRTests.add(ecdhTest(toCustomSpec(curve), "ECDH with R = 0."));
-
-
- byte[] ROne = new byte[]{(byte) 1};
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][]{ROne});
- allRTests.add(ecdhTest(toCustomSpec(curve), "ECDH with R = 1."));
- }
-
- BigInteger prevPrimeR;
- do {
- prevPrimeR = BigInteger.probablePrime(originalBigR.bitLength() - 1, r);
- } while (prevPrimeR.compareTo(originalBigR) >= 0);
- byte[] prevRBytes = ECUtil.toByteArray(prevPrimeR, bits);
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][] {prevRBytes});
- allRTests.add(ecdhTest(toCustomSpec(curve), "ECDH with R = some prime (but [r]G != infinity) smaller than original R."));
-
- BigInteger nextPrimeR = originalBigR.nextProbablePrime();
- byte[] nextRBytes = ECUtil.toByteArray(nextPrimeR, bits);
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][]{nextRBytes});
- allRTests.add(ecdhTest(toCustomSpec(curve), "ECDH with R = some prime (but [r]G != infinity) larger than original R."));
-
- byte[] nonprimeRBytes = nextRBytes.clone();
- nonprimeRBytes[nonprimeRBytes.length - 1] ^= 1;
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][] {nonprimeRBytes} );
- allRTests.add(ecdhTest(toCustomSpec(curve), "ECDH with R = some composite (but [r]G != infinity)."));
-
- Test wrongR = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with corrupted R parameter.", allRTests.toArray(new Test[0]));
-
- curve.setParam(EC_Consts.PARAMETER_R, new byte[][] {originalR});
-
- byte[] kRaw = new byte[]{(byte) 0xff};
- curve.setParam(EC_Consts.PARAMETER_K, new byte[][] {kRaw});
- Test bigK = ecdhTest(toCustomSpec(curve), "ECDH with big K.");
-
- byte[] kZero = new byte[]{(byte) 0};
- curve.setParam(EC_Consts.PARAMETER_K, new byte[][]{kZero});
- Test zeroK = ecdhTest(toCustomSpec(curve), "ECDH with K = 0.");
-
- Test wrongK = CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with corrupted K parameter.", bigK, zeroK);
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests of " + bits + "b " + "FP", wrongPrime, wrongG, wrongR , wrongK));
- }
-
-
- /*
- * For binary field:
- * - e1 = e2 = e3 = 0
- * - e1, e2 or e3 is larger than m.
- */
- curveMap = EC_Store.getInstance().getObjects(EC_Curve.class, "secg");
- curves = curveMap.entrySet().stream().filter((e) -> e.getKey().endsWith("r1") &&
- e.getValue().getField() == javacard.security.KeyPair.ALG_EC_F2M).map(Map.Entry::getValue).collect(Collectors.toList());
- for (EC_Curve curve : curves) {
- short bits = curve.getBits();
- byte[][] coeffBytes;
-
-
- coeffBytes = new byte[][]{
- ByteUtil.shortToBytes(bits),
- ByteUtil.shortToBytes((short) 0),
- ByteUtil.shortToBytes((short) 0),
- ByteUtil.shortToBytes((short) 0)};
- curve.setParam(EC_Consts.PARAMETER_F2M, coeffBytes);
- Test coeff0 = ecdhTest(toCustomSpec(curve), "ECDH with wrong field polynomial: x^");
-
- short e1 = (short) (2 * bits);
- short e2 = (short) (3 * bits);
- short e3 = (short) (4 * bits);
- coeffBytes = new byte[][]{
- ByteUtil.shortToBytes(bits),
- ByteUtil.shortToBytes(e1),
- ByteUtil.shortToBytes(e2),
- ByteUtil.shortToBytes(e3)};
- curve.setParam(EC_Consts.PARAMETER_F2M, coeffBytes);
- Test coeffLarger = ecdhTest(toCustomSpec(curve), "ECDH with wrong field poly, powers larger than " + bits);
-
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "Tests with corrupted field polynomial parameter over " + curve.getBits() + "b F2M", coeff0, coeffLarger));
- }
- }
-
- private Test ecdhTest(ECParameterSpec spec, String desc) throws NoSuchAlgorithmException {
- //generate KeyPair
- KeyGeneratorTestable kgt = new KeyGeneratorTestable(kpg, spec);
- Test generate = KeyGeneratorTest.expectError(kgt, Result.ExpectedValue.FAILURE);
- runTest(generate);
- KeyPair kp = kgt.getKeyPair();
- if(kp == null) {
- return CompoundTest.all(Result.ExpectedValue.SUCCESS, desc, generate);
- }
- ECPublicKey pub = (ECPublicKey) kp.getPublic();
- ECPrivateKey priv = (ECPrivateKey) kp.getPrivate();
-
- //perform ECDH
- KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
- KeyAgreementTestable testable = new KeyAgreementTestable(ka, priv, pub);
- Test ecdh = KeyAgreementTest.expect(testable, Result.ExpectedValue.FAILURE);
- return CompoundTest.all(Result.ExpectedValue.SUCCESS, desc, generate, ecdh);
- }
-
- //constructs EllipticCurve from EC_Curve even if the parameters of the curve are wrong
- private EllipticCurve toCustomCurve(EC_Curve curve) {
- ECField field;
- if (curve.getField() == javacard.security.KeyPair.ALG_EC_FP) {
- field = new CustomECFieldFp(new BigInteger(1, curve.getData(0)));
- } else {
- byte[][] fieldData = curve.getParam(EC_Consts.PARAMETER_F2M);
- int m = ByteUtil.getShort(fieldData[0], 0);
- int e1 = ByteUtil.getShort(fieldData[1], 0);
- int e2 = ByteUtil.getShort(fieldData[2], 0);
- int e3 = ByteUtil.getShort(fieldData[3], 0);
- int[] powers;
- if (e2 == 0 && e3 == 0) {
- powers = new int[]{e1};
- } else {
- powers = new int[]{e1, e2, e3};
- }
- field = new CustomECFieldF2m(m, powers);
- }
-
- BigInteger a = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_A)[0]);
- BigInteger b = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_B)[0]);
-
- return new CustomEllipticCurve(field, a, b);
- }
-
- //constructs ECParameterSpec from EC_Curve even if the parameters of the curve are wrong
- private ECParameterSpec toCustomSpec(EC_Curve curve) {
- EllipticCurve customCurve = toCustomCurve(curve);
-
- byte[][] G = curve.getParam(EC_Consts.PARAMETER_G);
- BigInteger gx = new BigInteger(1, G[0]);
- BigInteger gy = new BigInteger(1, G[1]);
- ECPoint generator = new ECPoint(gx, gy);
-
- BigInteger n = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_R)[0]);
-
- int h = new BigInteger(1, curve.getParam(EC_Consts.PARAMETER_K)[0]).intValue();
- return new CustomECParameterSpec(customCurve, generator, n, h);
- }
-}