[BREAKGLASS] Append-only mirror of github.com/signalapp/Curve25519Kit
Go to file
Michael Kirk 03a19c80aa bump version
// FREEBIE
2017-04-01 23:05:14 -04:00
BuildTests Adding support for signing data larger than 256 bytes. 2015-05-01 19:52:06 +02:00
Classes Infer fixes. 2015-06-14 12:26:12 +02:00
Sources Infer fixes. 2015-06-14 12:26:12 +02:00
.gitignore 1.2 release 2014-07-23 18:35:58 -10:00
.travis.yml Travis updating xctool 2014-10-21 13:15:03 +02:00
Curve25519Kit.podspec bump version 2017-04-01 23:05:14 -04:00
LICENSE Initial commit 2014-07-22 16:24:54 -10:00
README.md Syntax fixes, return non-mutable bytes 2014-10-21 12:58:00 +02:00

25519 Build Status

Curve25519 is a fast and secure curve used for key agreement. Unfortunately, it does not support signing out of the box. This pod translates the point curves to do ed25519 signing with curve25519 keys.

Usage

Generating a curve25519 key:

ECKeyPair *curve25519Key = [Curve25519 generateKeyPair];

ECKeyPair conforms to NSCoding to make storage of it more convenient.


Generating a curve25519 shared secret:

NSData *sharedSecret = [Curve25519 generateSharedSecretFromPublicKey:aPublicKey andKeyPair:anECKeyPair];

ed25519-sign message with curve25519 key pair:

NSData *signature = [Ed25519 sign:message withKeyPair:ecKeyPair]

ed25519-verify message with curve25519 key pair:

BOOL validSignature = [Ed25519 verifySignature:signature publicKey:ecPublicKey msg:message;

Documentation

API reference is available on CocoaDocs.

Installation

Add this line to your Podfile

pod '25519', '~> version number'

Cryptographic Implementations

The Curve25519 key pair and ECDH is done with Adam Langleys curve25519-donna. The point conversion algorithm was written by the inimitable Trevor Perrin.

License

Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html