Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.warchant:ed25519-sha3-java:2.0.1'
}
dependencies {
implementation("com.github.warchant:ed25519-sha3-java:2.0.1")
}
<dependency>
<groupId>com.github.warchant</groupId>
<artifactId>ed25519-sha3-java</artifactId>
<version>2.0.1</version>
</dependency>
libraryDependencies += "com.github.warchant" % "ed25519-sha3-java" % "2.0.1"
:dependencies [[com.github.warchant/ed25519-sha3-java "2.0.1"]]
This is an implementation of EdDSA (SHA3) in Java. Structurally, it is based on the ref10 implementation in SUPERCOP (see https://ed25519.cr.yp.to/software.html).
There are two internal implementations:
Gradle users:
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.warchant:ed25519-sha3-java:1.0'
The code requires Java 6 (for e.g. the Arrays.copyOfRange()
calls in EdDSAEngine.engineVerify()
).
The JUnit4 tests require the Hamcrest library hamcrest-all.jar
.
This code is released to the public domain and can be used for any purpose. See LICENSE.txt
for details.
Security.addProvider(new EdDSASecurityProvider());
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EdDSA/SHA3", "EdDSA");
KeyFactory keyFac = KeyFactory.getInstance("EdDSA/SHA3", "EdDSA");
Signature sgr = Signature.getInstance("EdDSA/SHA3", "EdDSA");
There are no guarantees that this is secure for all cases, and users should review the code themselves before depending on it. PRs that fix bugs or improve reviewability are very welcome. Additionally: