Skip to content
sha512 / 1.0.4

sha512 1.0.4

Install from the command line:
Learn more about npm packages
$ npm install @electron-labs/sha512@1.0.4
Install via package.json:
"@electron-labs/sha512": "1.0.4"

About this version

SHA512

A circuit to compute SHA512 hash written in Circom.

Installation

npm install

Tests

npm test

Usage

include "sha512/sha512/sha512.circom";
include "circomlib/binsum.circom"; // make sure to include your copy of binsum.circom from circomblib

var INPUT_BITS = 1024; // number of bits of the input message
component sha512 = Sha512(INPUT_BITS);
for (var i = 0; i < INPUT_BITS; i++) {
    sha512.in[i] <== nullifierBits[i];
}
for (var i = 0; i < 512; i++) {
    out[i] <== sha512.out[i];
}

Constraint guarantees

The circuit only uses <== and doesn't use <-- thus ensuring that the circuit correctly generates all the constraints.

Details


Assets

  • sha512-1.0.4-npm.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all