Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHA3 function is not the NIST SHA3-512 #92

Closed
vith opened this issue May 2, 2017 · 2 comments
Closed

SHA3 function is not the NIST SHA3-512 #92

vith opened this issue May 2, 2017 · 2 comments
Labels

Comments

@vith
Copy link

vith commented May 2, 2017

The expected SHA3-512 hash of empty string via http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA3-512_Msg0.pdf

A6 9F 73 CC A2 3A 9A C5 C8 B5 67 DC 18 5A 75 6E
97 C9 82 16 4F E2 58 59 E0 D1 DC C1 47 5C 80 A6
15 B2 12 3A F1 F5 F9 4C 11 E3 E9 40 2C 3A C5 58 
F5 00 19 9D 95 B6 D3 E3 01 75 85 86 28 1D CD 26

does not match what this library produces:

> require('crypto-js').SHA3('').toString()
'0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e'

Because it's actually keccak-512:

> require('js-sha3').keccak_512('')
'0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e'
> require('js-sha3').sha3_512('')
'a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26'
@sylido
Copy link

sylido commented Apr 16, 2018

Any plans on adding a SHA3-512 function that conforms to the specs of sha3 fips 202 ?

@evanvosberg
Copy link
Member

keep only one issue open related to this #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants