Curve25519-keyshare

Elliptic Curve Diffie-Hellman

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

com.github.netricecake
Идентификатор

Идентификатор

x25519
Последняя версия

Последняя версия

2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Curve25519-keyshare
Elliptic Curve Diffie-Hellman
Ссылка на сайт

Ссылка на сайт

https://github.com/NetRiceCake/Curve25519-keyshare
Система контроля версий

Система контроля версий

https://github.com/NetRiceCake/Curve25519-keyshare

Скачать x25519

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.netricecake/x25519/ -->
<dependency>
    <groupId>com.github.netricecake</groupId>
    <artifactId>x25519</artifactId>
    <version>2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.netricecake/x25519/
implementation 'com.github.netricecake:x25519:2.0'
// https://jarcasting.com/artifacts/com.github.netricecake/x25519/
implementation ("com.github.netricecake:x25519:2.0")
'com.github.netricecake:x25519:jar:2.0'
<dependency org="com.github.netricecake" name="x25519" rev="2.0">
  <artifact name="x25519" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.netricecake', module='x25519', version='2.0')
)
libraryDependencies += "com.github.netricecake" % "x25519" % "2.0"
[com.github.netricecake/x25519 "2.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Curve25519 Keyshare

Curve25519 is an elliptic curve offering 128 bits of security and designed for use with the elliptic curve Diffie–Hellman (ECDH) key agreement scheme. It is one of the fastest ECC curves

Version Version

Using in Gradle :

repositories {
  mavenCentral()
}

dependencies {
  implementation 'com.github.netricecake:x25519:2.0'
}

Using in Maven :

<dependencies>
  <dependency>
    <groupId>com.github.netricecake</groupId>
    <artifactId>x25519</artifactId>
    <version>2.0</version>
  </dependency>
</dependencies>

How to use :

Make private key :

Curve25519.generateRandomKey() //Return 32 byte random bytes

Make public key from private key :

Curve25519.publicKey(byte[] privateKey)

Get shared secret :

Curve25519.sharedSecrete(byte[] privateKey, byte[] publicKey) //Private key and Public key must be 32 byte array

Example :

byte[] aPrivate = Curve25519.generateRandomKey();
byte[] aPublic = Curve25519.publicKey(aPrivate);

byte[] bPrivate = Curve25519.generateRandomKey();
byte[] bPublic = Curve25519.publicKey(bPrivate);

byte[] aSharedSecret = Curve25519.sharedSecret(aPrivate, bPublic);
byte[] bSharedSecret = Curve25519.sharedSecret(bPrivate, aPublic);

Additional

Version 1.0 has one big problem. Please use version 2.0.

Версии библиотеки

Версия
2.0
1.0