From cb1aa4adc1e44956180cd2d81e9fae7241d86499 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Tue, 12 Nov 2019 20:31:16 -0200 Subject: [PATCH 1/9] update-build-gradle --- build.gradle | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index ee30d3d..60845a0 100644 --- a/build.gradle +++ b/build.gradle @@ -18,9 +18,8 @@ buildscript { plugins { id 'java' id 'maven' - id 'net.saliman.cobertura' version '2.5.4' + id 'net.saliman.cobertura' version '3.0.0' id 'com.github.kt3k.coveralls' version '2.8.2' - id 'osgi' } sourceCompatibility = 1.6 @@ -57,11 +56,6 @@ jar { attributes("Implementation-Title": POM_NAME, "Implementation-Version": VERSION_NAME, "Implementation-Vendor": VENDOR_NAME) - - version = VERSION_NAME - symbolicName = POM_ARTIFACT_ID - - instruction 'Export-Package', '*' } } //Uncomment after setting up maven central account @@ -78,4 +72,4 @@ cobertura { coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report coverageIgnoreTrivial = true // ignore getters/setters in coverage report coverageIgnoreMethodAnnotations = ["java.lang.Deprecated"] -} \ No newline at end of file +} From fe3438c4975a998e1879912912ce930644622b0e Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Wed, 13 Nov 2019 14:22:00 -0300 Subject: [PATCH 2/9] update-gradle-compatibility --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 60845a0..1422c0f 100644 --- a/build.gradle +++ b/build.gradle @@ -22,8 +22,8 @@ plugins { id 'com.github.kt3k.coveralls' version '2.8.2' } -sourceCompatibility = 1.6 -targetCompatibility = 1.6 +sourceCompatibility = 1.7 +targetCompatibility = 1.7 group = GROUP version = VERSION_NAME From f83021a2fdd455d7b2564ca67c7d703644221b99 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Wed, 13 Nov 2019 14:26:04 -0300 Subject: [PATCH 3/9] readme-JDK1.8+compatibility --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a5e55a4..7d5f86d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a Java fork of [ecdsa-python] [ecdsa-python]: https://github.com/starkbank/ecdsa-python -It is compatible with OpenSSL and is fast. +It is compatible with JDK 1.8+ and OpenSSL. It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. ### Curves From f602f740f9eadb58e0a85fbfb69e2f95e92cc65d Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Thu, 21 Nov 2019 18:44:24 -0300 Subject: [PATCH 4/9] README benchmark info --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d5f86d..aaeb732 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,6 @@ This is a Java fork of [ecdsa-python] - -[ecdsa-python]: https://github.com/starkbank/ecdsa-python - It is compatible with JDK 1.8+ and OpenSSL. It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. @@ -14,6 +11,15 @@ It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. We currently support `secp256k1`, but it's super easy to add more curves to the project. Just add them on `Curve.java` +### Speed + +We ran a test on JDK 13.0.1 on a MAC Pro i5 2019. The libraries ran 100 times and showed the average times displayed bellow: + +| Library | sign | verify | +| ------------------ |:-------------:| -------:| +| [java.security] | 0.9ms | 2.4ms | +| starkbank-ecdsa | 4.3ms | 9.9ms | + ### Sample Code How to use it: @@ -139,3 +145,6 @@ public class GenerateSignature { ```shell gradle test ``` + +[ecdsa-python]: https://github.com/starkbank/ecdsa-python +[java.security]: https://docs.oracle.com/javase/7/docs/api/index.html \ No newline at end of file From da304db7a5c19e964fb9be021c6f73c7c652e2e5 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Tue, 26 Nov 2019 12:06:53 -0300 Subject: [PATCH 5/9] README installation hoist --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index aaeb732..8b20b97 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,17 @@ This is a Java fork of [ecdsa-python] It is compatible with JDK 1.8+ and OpenSSL. It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. +### Installation + +#### Maven Central +```xml + + com.github.starkbank + ecdsa-java + 0.0.1-SNAPSHOT + +``` + ### Curves We currently support `secp256k1`, but it's super easy to add more curves to the project. Just add them on `Curve.java` @@ -130,21 +141,10 @@ public class GenerateSignature { [Stark Bank]: https://starkbank.com -### How to install - -#### Maven Central -```xml - - com.github.starkbank - ecdsa-java - 0.0.1-SNAPSHOT - -``` - ### Run all unit tests ```shell gradle test ``` [ecdsa-python]: https://github.com/starkbank/ecdsa-python -[java.security]: https://docs.oracle.com/javase/7/docs/api/index.html \ No newline at end of file +[java.security]: https://docs.oracle.com/javase/7/docs/api/index.html From 1577ab7fa02655abe8e6c9ecacef7d3d4571cc8d Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Thu, 28 Nov 2019 12:11:50 -0300 Subject: [PATCH 6/9] package name ecdsa-java -> starkbank-ecdsa --- README.md | 2 +- gradle.properties | 4 ++-- settings.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b20b97..44bcbe2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. ```xml com.github.starkbank - ecdsa-java + starkbank-ecdsa 0.0.1-SNAPSHOT ``` diff --git a/gradle.properties b/gradle.properties index 38fbc2c..3544a6b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ POM_DEVELOPER_NAME= POM_DEVELOPER_EMAIL= POM_DESCRIPTION= -POM_NAME=ecdsa-java -POM_ARTIFACT_ID=ecdsa-java +POM_NAME=starkbank-ecdsa +POM_ARTIFACT_ID=starkbank-ecdsa POM_PACKAGING=jar POM_ORGANIZATION_URL= diff --git a/settings.gradle b/settings.gradle index dd3d032..80607d4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,4 +7,4 @@ * in the user guide at https://docs.gradle.org/5.1.1/userguide/multi_project_builds.html */ -rootProject.name = 'ecdsa-java' +rootProject.name = 'starkbank-ecdsa' From bb5e01e6ff3818a452fce9dca9f7c37b338a9931 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Mon, 2 Dec 2019 21:05:09 -0300 Subject: [PATCH 7/9] added pom.xml --- README.md | 7 +++++++ pom.xml | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pom.xml diff --git a/README.md b/README.md index 44bcbe2..0e5c81c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. ### Installation #### Maven Central +In pom.xml: + ```xml com.github.starkbank @@ -18,6 +20,11 @@ It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. ``` +Then run: +```sh +mvn clean install +``` + ### Curves We currently support `secp256k1`, but it's super easy to add more curves to the project. Just add them on `Curve.java` diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..05772e8 --- /dev/null +++ b/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + com.github.starkbank + ecdsa-java + 0.0.1-SNAPSHOT + + 1.7 + 1.7 + + + + junit + junit + 4.12 + test + + + \ No newline at end of file From 6391049fb46dee7eec4fa36cf63ec2b487235ff6 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Mon, 2 Dec 2019 21:07:43 -0300 Subject: [PATCH 8/9] README java version amend --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5c81c..a922136 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a Java fork of [ecdsa-python] -It is compatible with JDK 1.8+ and OpenSSL. +It is compatible with Java 8+ and OpenSSL. It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. ### Installation From cfa7770093e8cd9b2d80516864d1e14bc07894e0 Mon Sep 17 00:00:00 2001 From: Caio Dottori Date: Tue, 7 Jan 2020 18:01:43 -0300 Subject: [PATCH 9/9] amend README --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a922136..c1c38d4 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,7 @@ ### Overview -This is a Java fork of [ecdsa-python] - -It is compatible with Java 8+ and OpenSSL. -It uses some elegant math as Jacobian Coordinates to speed up the ECDSA. +This is a pure Java implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA). It is compatible with Java 8+ and OpenSSL. It uses some elegant math such as Jacobian Coordinates to speed up the ECDSA. ### Installation @@ -126,7 +123,7 @@ NOTE: If you want to create a Digital Signature to use in the [Stark Bank], you openssl base64 -in signatureBinary.txt -out signatureBase64.txt ``` -With this library, you can do it: +You can also verify it with this library: ```java import com.starkbank.ellipticcurve.utils.ByteString;