pebble8888/ed25519swift


ed25199 implementation by pure swift

License: Zlib

Language: Swift

Keywords: crypto, swift


Ed25519

Ed25519 by pure swift

ed25519

License

Ed25519 can be used, distributed and modified user the zlib license.

Requirements

Ed25519 requires Swift 4.

macOS, iOS

Install

CocoaPods

pod 'ed25519swift'

Dependency

CryptoSwift for sha512

BigInt for reference implementation that is not included main Ed25519 library.

How to use

Key pair creation

import Ed25519macOS // direct
or
import ed25519swift // pods

static func crypto_sign_keypair() -> (pk:[UInt8], sk:[UInt8])

Signing

static func crypto_sign(_ sm:inout [UInt8], _ m:[UInt8], _ skpk:[UInt8])

Validation

static func crypto_sign_open(_ sm:[UInt8], _ pk:[UInt8]) -> Bool

Implemantation

It is ported from SUPERCOP

You can check the algorithm in these papers and RFC.
Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, and Bo-Yin Yang, High-speed high-security signatures. 2012
Huseyin Hisl, Kenneth Koon-Ho Wong, Gary Carter, Ed Dawson, Twisted Edwards curves revisited. 2008
RFC8032 Edward-Curve Digital Signature Algorithm (EdDSA)

Performance

macOS

On MacBook Pro 2017 2.3Ghz Intel Core i5

message validation : 10.7 msec per message
keypair creation : 4.8 msec per message

iOS

no measurement

Project Statistics

Sourcerank 5
Repository Size 1.03 MB
Stars 14
Forks 4
Watchers 2
Open issues 1
Dependencies 4
Contributors 1
Tags 11
Created
Last updated
Last pushed

Top Contributors See all

pebble8888

Packages Referencing this Repo

ed25519swift
ed25199 implementation by pure swift except sha512
Latest release 1.1.3 - Updated - 14 stars

Recent Tags See all

1.1.5 October 01, 2018
1.1.4 September 30, 2018
1.1.3 December 04, 2017
1.1.2 December 04, 2017
1.1.1 December 03, 2017
1.1.0 December 03, 2017
1.1.0pre December 03, 2017
1.0.3 December 03, 2017
1.0.2 December 03, 2017
1.0.1 December 03, 2017
1.0.0 December 03, 2017

Something wrong with this page? Make a suggestion

Last synced: 2018-10-23 08:50:35 UTC

Login to resync this repository