wireapp/libsodium-neon

Name: libsodium-neon

Owner: Wire Swiss GmbH

Description: Node.js bindings to rust_sodium.

Created: 2017-02-17 09:45:22.0

Updated: 2018-05-24 05:57:16.0

Pushed: 2018-05-23 12:07:03.0

Homepage: https://www.npmjs.com/package/libsodium-neon

Size: 3932

Language: Rust

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Wire

Greenkeeper badge

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Usage
t libsodium = require('libsodium-neon');
t keyPair = libsodium.crypto_sign_keypair();
eyPair = {publicKey: Uint8Array [118, 200, 242, 168, 123, 173, 221, 232, ...]}
Building
Requirements
Installation

Just install the needed packages for this project by running:

install

Afterwards you can build the project:

run build

To test the native module, run:

test
Speed comparison

System specs: macOS 10.12 @ 2.6 GHz Intel Core i7, 16 GB RAM

|Function | ops/sec | ops/sec | times faster | |:—————————————|—————:|—————–:|—————–:| | | libsodium.js | libsodium-neon | | | crypto_auth_hmacsha256 |   51,156 | 55,562 |   1.09 | | crypto_scalarmult |   86 | 6,129 | 70.80 | | crypto_sign_detached | 251 | 6,277 |   25.01 | | crypto_sign_ed25519_pk_to_curve25519 | 596 | 21,030 |   35.29 | | crypto_sign_ed25519_sk_to_curve25519 | 13,390 | 90,650 |   6.77 | | crypto_sign_keypair |   276 | 6,602 |   23.92 | | | | | | | Average | 10,959 | 31,042 | 2.83 |


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.