Keccak

Keccak

Class to construct keccak256 hashes required by the AZTEC zero-knowledge proofs

Constructor

new Keccak()

Source:

Members

data :Array.<string>

array of data being hashed. Each element is a 32-bytes long hex-formatted string

Source:

Methods

appendBN(scalar)

Append a BN.js instance Keccak#data

Parameters:
Name Type Description
scalar scalar

BN.js number

Source:

appendPoint(point)

Append an elliptic.js group element to Keccak#data

Parameters:
Name Type Description
point Point

elliptic.js point

Source:

keccak(reductionContext)

Compute keccak256 hash of Keccak#data, set Keccak#data to resulting hash

Parameters:
Name Type Default Description
reductionContext reductionContext null

BN.js reduction context for Montgomery modular multiplication

Source:

redKeccak()

Interface for the {@method keccak} with the reduction context set to the constant found in @aztec/dev-utils

Source: