ECC-25519

A library for Java and Android to use Ed25519 and Curve25518.

License

License

Categories

Categories

Java Languages Net
GroupId

GroupId

net.vrallev.ecc
ArtifactId

ArtifactId

ecc-25519-java
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

ECC-25519
A library for Java and Android to use Ed25519 and Curve25518.
Project URL

Project URL

https://github.com/vRallev/ECC-25519
Source Code Management

Source Code Management

https://github.com/vRallev/ECC-25519

Download ecc-25519-java

How to add to project

<!-- https://jarcasting.com/artifacts/net.vrallev.ecc/ecc-25519-java/ -->
<dependency>
    <groupId>net.vrallev.ecc</groupId>
    <artifactId>ecc-25519-java</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/net.vrallev.ecc/ecc-25519-java/
implementation 'net.vrallev.ecc:ecc-25519-java:1.0.3'
// https://jarcasting.com/artifacts/net.vrallev.ecc/ecc-25519-java/
implementation ("net.vrallev.ecc:ecc-25519-java:1.0.3")
'net.vrallev.ecc:ecc-25519-java:jar:1.0.3'
<dependency org="net.vrallev.ecc" name="ecc-25519-java" rev="1.0.3">
  <artifact name="ecc-25519-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.vrallev.ecc', module='ecc-25519-java', version='1.0.3')
)
libraryDependencies += "net.vrallev.ecc" % "ecc-25519-java" % "1.0.3"
[net.vrallev.ecc/ecc-25519-java "1.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
net.i2p.crypto : eddsa jar 0.1.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Deprecated

This project is not maintained anymore.

ECC-25519

This project helps to use elliptic curve cryptography (ECC) with Curve25519 by Daniel J Bernstein. It combines multiple libraries.

All credit goes to following libraries. Please respect their licenses!

Android:

Java:

Download

Download the latest version or grab via Gradle:

dependencies {
    compile 'net.vrallev.ecc:ecc-25519-android:1.0.3' 	// Android
    compile 'net.vrallev.ecc:ecc-25519-java:1.0.3' 		// JVM
}

Usage

byte[] seed = "My random seed".getBytes();
byte[] privateKey = KeyHolder.createPrivateKey(seed); // creates a valid private key (seed hashed with SHA-256) 

KeyHolder keyHolder = new KeyHolder(privateKey); // computes valid public keys
Ecc25519Helper helper = new Ecc25519Helper(keyHolder); // generate our helper class 

byte[] sharedSecret = helper.diffieHellman(); // you can also pass a private and public key

byte[] message = "My message".getBytes();
byte[] signature = helper.sign(message); // computes the signature with the private key
boolean validSignature = helper.isValidSignature(message, signature); // checks the message with the public key from keyHolder instance

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
1.0.3
1.0.2
1.0.1
1.0.0