aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/data
diff options
context:
space:
mode:
authorJ08nY2017-03-06 22:56:34 +0100
committerJ08nY2017-03-06 22:56:34 +0100
commit117b35545288df5b01173d36bde451b414d31d66 (patch)
treeadd0ecbc48e95a398662bef9e41670df1c61243e /src/cz/crcs/ectester/data
parent66bd8469e56cbe7c6bed823b376229a02ecdd37d (diff)
downloadECTester-117b35545288df5b01173d36bde451b414d31d66.tar.gz
ECTester-117b35545288df5b01173d36bde451b414d31d66.tar.zst
ECTester-117b35545288df5b01173d36bde451b414d31d66.zip
Added support for named curves (in jar).
- Doesn't work well while simulating, some weird memory bug. Will investigate. - Has categories of curves, more will be added.
Diffstat (limited to 'src/cz/crcs/ectester/data')
-rw-r--r--src/cz/crcs/ectester/data/EC_Category.java70
-rw-r--r--src/cz/crcs/ectester/data/EC_Data.java230
-rw-r--r--src/cz/crcs/ectester/data/anomalous/curves.xml7
-rw-r--r--src/cz/crcs/ectester/data/brainpool/curves.xml5
-rw-r--r--src/cz/crcs/ectester/data/categories.xml13
-rw-r--r--src/cz/crcs/ectester/data/nist/curves.xml5
-rw-r--r--src/cz/crcs/ectester/data/schema.xsd18
-rw-r--r--src/cz/crcs/ectester/data/secg/curves.xml7
-rw-r--r--src/cz/crcs/ectester/data/secg/sect233k1.csv2
-rw-r--r--src/cz/crcs/ectester/data/secg/sect233r1.csv2
-rw-r--r--src/cz/crcs/ectester/data/secg/sect239k1.csv2
-rw-r--r--src/cz/crcs/ectester/data/secg/sect283k1.csv11
-rw-r--r--src/cz/crcs/ectester/data/secg/sect409k1.csv2
-rw-r--r--src/cz/crcs/ectester/data/secg/sect409r1.csv2
-rw-r--r--src/cz/crcs/ectester/data/smallpub/curves.xml5
-rw-r--r--src/cz/crcs/ectester/data/smallpub/keys.xml19
-rw-r--r--src/cz/crcs/ectester/data/wrong/curves.xml5
17 files changed, 356 insertions, 49 deletions
diff --git a/src/cz/crcs/ectester/data/EC_Category.java b/src/cz/crcs/ectester/data/EC_Category.java
new file mode 100644
index 0000000..aed7e7d
--- /dev/null
+++ b/src/cz/crcs/ectester/data/EC_Category.java
@@ -0,0 +1,70 @@
+package cz.crcs.ectester.data;
+
+import cz.crcs.ectester.reader.ec.EC_Params;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Jan Jancar johny@neuromancer.sk
+ */
+public class EC_Category {
+
+ private String name;
+ private String directory;
+ private String desc;
+
+ private Map<String, EC_Params> 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_Params> 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_Params> getObjects() {
+ return Collections.unmodifiableMap(objects);
+ }
+
+ public <T extends EC_Params> Map<String, T> getObjects(Class<T> cls) {
+ Map<String, T> objs = new HashMap<>();
+ for (Map.Entry<String, EC_Params> entry : objects.entrySet()) {
+ if (cls.isInstance(entry.getValue())) {
+ objs.put(entry.getKey(), cls.cast(entry.getValue()));
+ }
+ }
+ return Collections.unmodifiableMap(objs);
+ }
+
+ public <T extends EC_Params> T getObject(Class<T> cls, String id) {
+ EC_Params obj = objects.get(id);
+ if (cls.isInstance(obj)) {
+ return cls.cast(obj);
+ } else {
+ return null;
+ }
+ }
+}
diff --git a/src/cz/crcs/ectester/data/EC_Data.java b/src/cz/crcs/ectester/data/EC_Data.java
new file mode 100644
index 0000000..a867fcf
--- /dev/null
+++ b/src/cz/crcs/ectester/data/EC_Data.java
@@ -0,0 +1,230 @@
+package cz.crcs.ectester.data;
+
+import cz.crcs.ectester.reader.ec.EC_Curve;
+import cz.crcs.ectester.reader.ec.EC_Key;
+import cz.crcs.ectester.reader.ec.EC_Keypair;
+import cz.crcs.ectester.reader.ec.EC_Params;
+import javacard.security.KeyPair;
+import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+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.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Jan Jancar johny@neuromancer.sk
+ */
+public class EC_Data {
+
+ private DocumentBuilderFactory dbf;
+
+ private Map<String, EC_Category> categories;
+
+ public EC_Data() {
+ 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.setIgnoringElementContentWhitespace(true);
+
+ parse();
+ } catch (ParserConfigurationException | IOException | SAXException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void parse() throws SAXException, ParserConfigurationException, IOException {
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+ Document categoriesDoc = db.parse(this.getClass().getResourceAsStream("/cz/crcs/ectester/data/categories.xml"));
+ categoriesDoc.normalize();
+
+ NodeList catList = categoriesDoc.getElementsByTagName("category");
+
+ this.categories = new HashMap<>(catList.getLength());
+ 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 {
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+ Map<String, EC_Params> objMap = new HashMap<>();
+
+ InputStream curvesStream = this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/curves.xml");
+ if (curvesStream != null) {
+ Document curvesDoc = db.parse(curvesStream);
+ 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);
+ Node file = curveElem.getElementsByTagName("file").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(bitsize, alg, descs);
+ if (!curve.readCSV(this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/" + file.getTextContent()))) {
+ throw new IOException("Invalid csv data.");
+ }
+
+ objMap.put(id.getTextContent(), curve);
+ } else {
+ throw new SAXException("?");
+ }
+ }
+ }
+
+ InputStream keysStream = this.getClass().getResourceAsStream("/cz/crcs/ectester/data" + dir + "/keys.xml");
+ if (keysStream != null) {
+ Document keysDoc = db.parse(keysStream);
+ 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;
+ String tag = elem.getTagName();
+
+ NodeList childs = elem.getChildNodes();
+ String id = null;
+ for (int j = 0; j < childs.getLength(); ++j) {
+ Node child = childs.item(j);
+ if (child instanceof Element) {
+ Element childElem = (Element) child;
+ if (childElem.getTagName().equals("id")) {
+ id = childElem.getTextContent();
+ break;
+ }
+ }
+ }
+ if (id == null) {
+ throw new SAXException("key no id?");
+ }
+
+ EC_Params result = parseKeylike(dir, elem);
+
+ objMap.put(id, result);
+ } else {
+ throw new SAXException("?");
+ }
+ }
+ }
+
+ return new EC_Category(name, dir, desc, objMap);
+ }
+
+ private EC_Params parseKeylike(String dir, Element elem) throws SAXException {
+ Node file = elem.getElementsByTagName("file").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(curve.getTextContent(), descs);
+ } else if (elem.getTagName().equals("privkey")) {
+ result = new EC_Key.Private(curve.getTextContent(), descs);
+ } else if (elem.getTagName().equals("keypair")) {
+ result = new EC_Keypair(curve.getTextContent(), descs);
+ } else {
+ throw new SAXException("?");
+ }
+ result.readCSV(this.getClass().getResourceAsStream("/cz/crcs/ectester/data/" + dir + "/" + file.getTextContent()));
+ return result;
+ }
+
+ public Map<String, EC_Category> getCategories() {
+ return Collections.unmodifiableMap(categories);
+ }
+
+ public EC_Category getCategory(String category) {
+ return categories.get(category);
+ }
+
+ public Map<String, EC_Params> getObjects(String category) {
+ EC_Category cat = categories.get(category);
+ if (cat != null) {
+ return cat.getObjects();
+ }
+ return null;
+ }
+
+ public <T extends EC_Params> 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_Params> 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_Params> T getObject(Class<T> objClass, String query) {
+ String[] parts = query.split("/");
+ if (parts.length != 2) {
+ return null;
+ }
+ return getObject(objClass, parts[0], parts[1]);
+ }
+
+
+}
diff --git a/src/cz/crcs/ectester/data/anomalous/curves.xml b/src/cz/crcs/ectester/data/anomalous/curves.xml
index 8ac0238..c478657 100644
--- a/src/cz/crcs/ectester/data/anomalous/curves.xml
+++ b/src/cz/crcs/ectester/data/anomalous/curves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
+ <!--
<curve>
<id>anomalousp128</id>
<bits>128</bits>
@@ -44,4 +44,5 @@
<field>prime</field>
<file>anomalousp521.csv</file>
</curve>
+ -->
</curves> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/brainpool/curves.xml b/src/cz/crcs/ectester/data/brainpool/curves.xml
index 0395ba1..2cb7fc5 100644
--- a/src/cz/crcs/ectester/data/brainpool/curves.xml
+++ b/src/cz/crcs/ectester/data/brainpool/curves.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
<curve>
<id>brainpoolP160r1</id>
<bits>160</bits>
diff --git a/src/cz/crcs/ectester/data/categories.xml b/src/cz/crcs/ectester/data/categories.xml
index 5537c98..5913d42 100644
--- a/src/cz/crcs/ectester/data/categories.xml
+++ b/src/cz/crcs/ectester/data/categories.xml
@@ -1,26 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<categories xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves schema.xsd">
+<categories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="schema.xsd">
<category>
<name>anomalous</name>
<directory>anomalous</directory>
- <desc>These prime field curves have the same order as the field order, and are susceptible to attacks reducing ECDLP over a multiplicative group of the curve, to DLP over an additive group of the underlying field, which is easy.</desc>
+ <desc>These prime field curves have the same order as the field order, and are susceptible to attacks reducing ECDLP over a multiplicative group of the curve, to DLP over an additive group of the underlying field, which is easy (linear time).</desc>
</category>
<category>
<name>brainpool</name>
<directory>brainpool</directory>
- <desc>ECC Brainpool Standard Curves and Curve Generation v. 1.0 19.10.2005"</desc>
+ <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>
+ <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>
+ <desc>SEC 2: Recommended Elliptic Curve Domain Parameters version 2.0 January 27, 2010</desc>
</category>
<category>
<name>smallpub</name>
diff --git a/src/cz/crcs/ectester/data/nist/curves.xml b/src/cz/crcs/ectester/data/nist/curves.xml
index d9c1717..00b109c 100644
--- a/src/cz/crcs/ectester/data/nist/curves.xml
+++ b/src/cz/crcs/ectester/data/nist/curves.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
<curve>
<id>P-192</id>
<bits>192</bits>
diff --git a/src/cz/crcs/ectester/data/schema.xsd b/src/cz/crcs/ectester/data/schema.xsd
index d2bc85c..66566c9 100644
--- a/src/cz/crcs/ectester/data/schema.xsd
+++ b/src/cz/crcs/ectester/data/schema.xsd
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://crcs.cz/ectester/curves"
- xmlns="http://crcs.cz/ectester/curves"
elementFormDefault="qualified">
+ <!-- /<category>/curves.xml -->
+
<xs:element name="id" type="xs:string"/>
<xs:element name="desc" type="xs:string"/>
<xs:element name="bits" type="xs:positiveInteger"/>
@@ -32,14 +32,17 @@
<xs:element name="curves">
<xs:complexType>
<xs:sequence>
- <xs:element ref="curve" maxOccurs="unbounded"/>
+ <xs:element ref="curve" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
+ <!-- /<category>/keys.xml -->
+
<xs:element name="privkey">
<xs:complexType>
<xs:sequence>
+ <xs:element ref="id" />
<xs:element ref="file"/>
<xs:element name="curve" type="xs:string"/>
<xs:element ref="desc" minOccurs="0"/>
@@ -50,6 +53,7 @@
<xs:element name="pubkey">
<xs:complexType>
<xs:sequence>
+ <xs:element ref="id" />
<xs:element ref="file"/>
<xs:element name="curve" type="xs:string"/>
<xs:element ref="desc" minOccurs="0"/>
@@ -60,8 +64,10 @@
<xs:element name="keypair">
<xs:complexType>
<xs:sequence>
- <xs:element ref="pubkey"/>
- <xs:element ref="privkey"/>
+ <xs:element ref="id" />
+ <xs:element ref="file"/>
+ <xs:element name="curve" type="xs:string"/>
+ <xs:element ref="desc" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -78,6 +84,8 @@
</xs:complexType>
</xs:element>
+ <!-- /categories.xml -->
+
<xs:element name="category">
<xs:complexType>
<xs:sequence>
diff --git a/src/cz/crcs/ectester/data/secg/curves.xml b/src/cz/crcs/ectester/data/secg/curves.xml
index d3295cb..1807ec3 100644
--- a/src/cz/crcs/ectester/data/secg/curves.xml
+++ b/src/cz/crcs/ectester/data/secg/curves.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
<curve>
<id>secp192k1</id>
<bits>192</bits>
@@ -42,7 +41,7 @@
<id>secp521r1</id>
<bits>521</bits>
<field>prime</field>
- <file>secp521r.csv</file>
+ <file>secp521r1.csv</file>
</curve>
<curve>
diff --git a/src/cz/crcs/ectester/data/secg/sect233k1.csv b/src/cz/crcs/ectester/data/secg/sect233k1.csv
index 4aeebd2..6a306ff 100644
--- a/src/cz/crcs/ectester/data/secg/sect233k1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect233k1.csv
@@ -1 +1 @@
-004A,000000000000000000000000000000000000000000000000000000000000,000000000000000000000000000000000000000000000000000000000001,017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126,01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3,8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF,4 \ No newline at end of file
+00E9,004A,0000,0000,000000000000000000000000000000000000000000000000000000000000,000000000000000000000000000000000000000000000000000000000001,017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126,01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3,8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF,4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/sect233r1.csv b/src/cz/crcs/ectester/data/secg/sect233r1.csv
index 57ef35d..9a7b82a 100644
--- a/src/cz/crcs/ectester/data/secg/sect233r1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect233r1.csv
@@ -1 +1 @@
-004A,000000000000000000000000000000000000000000000000000000000001,0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD,00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B,01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052,01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7,2 \ No newline at end of file
+00E9,004A,0000,0000,000000000000000000000000000000000000000000000000000000000001,0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD,00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B,01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052,01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7,2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/sect239k1.csv b/src/cz/crcs/ectester/data/secg/sect239k1.csv
index fdb64a9..496891d 100644
--- a/src/cz/crcs/ectester/data/secg/sect239k1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect239k1.csv
@@ -1 +1 @@
-009E,000000000000000000000000000000000000000000000000000000000000,000000000000000000000000000000000000000000000000000000000001,29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC,76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA,2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5,4 \ No newline at end of file
+00EF,009E,0000,0000,000000000000000000000000000000000000000000000000000000000000,000000000000000000000000000000000000000000000000000000000001,29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC,76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA,2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5,4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/sect283k1.csv b/src/cz/crcs/ectester/data/secg/sect283k1.csv
index 07e7db2..908cdf7 100644
--- a/src/cz/crcs/ectester/data/secg/sect283k1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect283k1.csv
@@ -1,10 +1 @@
-011B,
-000C,
-0007,
-0005,
-000000000000000000000000000000000000000000000000000000000000000000000000,
-000000000000000000000000000000000000000000000000000000000000000000000001,
-0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836,
-01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259,
-01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61,
-4
+011B,000C,0007,0005,000000000000000000000000000000000000000000000000000000000000000000000000,000000000000000000000000000000000000000000000000000000000000000000000001,0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836,01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259,01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61,4
diff --git a/src/cz/crcs/ectester/data/secg/sect409k1.csv b/src/cz/crcs/ectester/data/secg/sect409k1.csv
index 887d921..9190a26 100644
--- a/src/cz/crcs/ectester/data/secg/sect409k1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect409k1.csv
@@ -1 +1 @@
-0057,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746,01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B,7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF,4 \ No newline at end of file
+0199,0057,0000,0000,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746,01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B,7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF,4 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/secg/sect409r1.csv b/src/cz/crcs/ectester/data/secg/sect409r1.csv
index a646e97..a277a07 100644
--- a/src/cz/crcs/ectester/data/secg/sect409r1.csv
+++ b/src/cz/crcs/ectester/data/secg/sect409r1.csv
@@ -1 +1 @@
-0057,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F,015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7,0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706,010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173,2 \ No newline at end of file
+0199,0057,0000,0000,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F,015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7,0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706,010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173,2 \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/smallpub/curves.xml b/src/cz/crcs/ectester/data/smallpub/curves.xml
index 1f1f146..50c1d0c 100644
--- a/src/cz/crcs/ectester/data/smallpub/curves.xml
+++ b/src/cz/crcs/ectester/data/smallpub/curves.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
<curve>
<id>ecsp128</id>
<bits>128</bits>
diff --git a/src/cz/crcs/ectester/data/smallpub/keys.xml b/src/cz/crcs/ectester/data/smallpub/keys.xml
index e3a7237..83e98b0 100644
--- a/src/cz/crcs/ectester/data/smallpub/keys.xml
+++ b/src/cz/crcs/ectester/data/smallpub/keys.xml
@@ -1,35 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
-<keys xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd"
+<keys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd"
category="smallpub"
desc="Points on the Non-prime smallpub curves, very small point orders(3-5).">
<pubkey>
+ <id>ecsp128-pub</id>
<file>ecsp128_pub.csv</file>
<curve>ecsp128</curve>
+ <desc>order = 5</desc>
</pubkey>
<pubkey>
+ <id>ecsp160-pub</id>
<file>ecsp160_pub.csv</file>
<curve>ecsp160</curve>
+ <desc>order = 3</desc>
</pubkey>
<pubkey>
+ <id>ecsp192-pub</id>
<file>ecsp192_pub.csv</file>
<curve>ecsp192</curve>
+ <desc>order = 3</desc>
</pubkey>
<pubkey>
+ <id>ecsp224-pub</id>
<file>ecsp224_pub.csv</file>
<curve>ecsp224</curve>
+ <desc>order = 5</desc>
</pubkey>
<pubkey>
+ <id>ecsp256-pub</id>
<file>ecsp256_pub.csv</file>
<curve>ecsp256</curve>
+ <desc>order = 3</desc>
</pubkey>
<pubkey>
+ <id>ecsp384-pub</id>
<file>ecsp384_pub.csv</file>
<curve>ecsp384</curve>
+ <desc>order = 3</desc>
</pubkey>
<pubkey>
+ <id>ecsp521-pub</id>
<file>ecsp521_pub.csv</file>
<curve>ecsp521</curve>
+ <desc>order = 5</desc>
</pubkey>
</keys> \ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/wrong/curves.xml b/src/cz/crcs/ectester/data/wrong/curves.xml
index 5f7ef9f..396dc4e 100644
--- a/src/cz/crcs/ectester/data/wrong/curves.xml
+++ b/src/cz/crcs/ectester/data/wrong/curves.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<curves xmlns="http://crcs.cz/ectester/curves"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://crcs.cz/ectester/curves ../schema.xsd">
+<curves xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../schema.xsd">
<curve>
<id>wrongp128</id>
<bits>128</bits>