Skip to content
No description, website, or topics provided.
C C++ Other
Branch: master
Clone or download
Latest commit 5ad4cfa Jul 1, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
crypto Initial commit and migration from Wolf9466 Feb 10, 2017
scryptjane
sha3
tests Merge branch 'cn-light' into libuv Jul 1, 2017
.gitignore
README.md Update w/ OhGodAGirl as a contributior Feb 11, 2017
bcrypt.c
bcrypt.h Initial commit and migration from Wolf9466 Feb 10, 2017
binding.gyp
blake.c Initial commit and migration from Wolf9466 Feb 10, 2017
blake.h Initial commit and migration from Wolf9466 Feb 10, 2017
boolberry.cc Initial commit and migration from Wolf9466 Feb 10, 2017
boolberry.h
cryptonight.c Update to isolate two functions so the system will handle cn-light in… Jun 30, 2017
cryptonight.h
cryptonight_light.c
cryptonight_light.h
fresh.c Initial commit and migration from Wolf9466 Feb 10, 2017
fresh.h Initial commit and migration from Wolf9466 Feb 10, 2017
fugue.c Initial commit and migration from Wolf9466 Feb 10, 2017
fugue.h
groestl.c Initial commit and migration from Wolf9466 Feb 10, 2017
groestl.h Initial commit and migration from Wolf9466 Feb 10, 2017
hefty1.c Initial commit and migration from Wolf9466 Feb 10, 2017
hefty1.h Initial commit and migration from Wolf9466 Feb 10, 2017
index.js Initial commit and migration from Wolf9466 Feb 10, 2017
keccak.c
keccak.h Initial commit and migration from Wolf9466 Feb 10, 2017
multihashing.cc
multihashing.h Update to merge in CN-Light and enabling CN-L as an Async option. Jul 1, 2017
nist5.c Initial commit and migration from Wolf9466 Feb 10, 2017
nist5.h Initial commit and migration from Wolf9466 Feb 10, 2017
package.json Update to 0.0.10 and adding rest of test.js Jun 30, 2017
quark.c Initial commit and migration from Wolf9466 Feb 10, 2017
quark.h
qubit.c
qubit.h Initial commit and migration from Wolf9466 Feb 10, 2017
scryptjane.c
scryptjane.h Initial commit and migration from Wolf9466 Feb 10, 2017
scryptn.c Initial commit and migration from Wolf9466 Feb 10, 2017
scryptn.h Initial commit and migration from Wolf9466 Feb 10, 2017
sha1.c Initial commit and migration from Wolf9466 Feb 10, 2017
sha1.h
sha256.h
shavite3.c
shavite3.h
skein.c Initial commit and migration from Wolf9466 Feb 10, 2017
skein.h Initial commit and migration from Wolf9466 Feb 10, 2017
stdint.h Initial commit and migration from Wolf9466 Feb 10, 2017
x11.c
x11.h
x13.c
x13.h Initial commit and migration from Wolf9466 Feb 10, 2017
x15.c Initial commit and migration from Wolf9466 Feb 10, 2017
x15.h

README.md

node-multi-hashing

Build Status

NPM

Cryptocurrency hashing functions for node.js.

Algorithms

  • quark
  • x11
  • x13
  • nist5
  • scrypt
  • scryptn
  • scryptjane
  • keccak
  • bcrypt
  • skein
  • groestl
  • blake
  • fugue
  • qubit
  • hefty1
  • shavite3
  • cryptonight
  • boolberry

Usage

Install

npm install multi-hashing

So far this native Node.js addon can do the following hashing algos

var multiHashing = require('multi-hashing');

var algorithms = ['quark', 'x11', 'scrypt', 'scryptn', 'scryptjane', 'keccak', 'bcrypt', 'skein', 'blake'];

var data = new Buffer("7000000001e980924e4e1109230383e66d62945ff8e749903bea4336755c00000000000051928aff1b4d72416173a8c3948159a09a73ac3bb556aa6bfbcad1a85da7f4c1d13350531e24031b939b9e2b", "hex");

var hashedData = algorithms.map(function(algo){
    if (algo === 'scryptjane'){
        //scryptjane needs block.nTime and nChainStartTime (found in coin source)
        var yaCoinChainStartTime = 1367991200;
        var nTime = Math.round(Date.now() / 1000);
        return multiHashing[algo](data, nTime, yaCoinChainStartTime);
    }
    else{
        return multiHashing[algo](data);
    }
});


console.log(hashedData);
//<SlowBuffer 0b de 16 ef 2d 92 e4 35 65 c6 6c d8 92 d9 66 b4 3d 65 ..... >

Credits

  • NSA and NIST for creation or sponsoring creation of SHA2 and SHA3 algos
  • Keccak - Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche
  • Skein - Bruce Schneier, Stefan Lucks, Niels Ferguson, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas and Jesse Walker.
  • BLAKE - Jean-Philippe Aumasson, Luca Henzen, Willi Meier, and Raphael C.-W. Phan
  • Grøstl - Praveen Gauravaram, Lars Knudsen, Krystian Matusiewicz, Florian Mendel, Christian Rechberger, Martin Schläffer, and Søren S. Thomsen
  • JH - Hongjun Wu
  • Fugue - Shai Halevi, William E. Hall, and Charanjit S. Jutla
  • scrypt - Colin Percival
  • bcrypt - Niels Provos and David Mazières
  • X11, Hefty1, Quark creators (they just mixed together a bunch of the above algos)
  • Wolf0/OhGodAGirl - Rebuilding the Cryptonote functions to use AES-NI for speed purposes
You can’t perform that action at this time.