crypto, pow: add pure Go implementation of ethash

This commit is contained in:
Péter Szilágyi
2017-03-05 17:38:34 +02:00
committed by Felix Lange
parent 288700c4d8
commit 3b00a77de5
6 changed files with 1929 additions and 2 deletions

View File

@ -15,6 +15,9 @@ import (
// NewKeccak256 creates a new Keccak-256 hash.
func NewKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} }
// NewKeccak512 creates a new Keccak-512 hash.
func NewKeccak512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x01} }
// New224 creates a new SHA3-224 hash.
// Its generic security strength is 224 bits against preimage attacks,
// and 112 bits against collision attacks.