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/keccak variants and clarification #11

Closed
subtly opened this issue Jun 15, 2015 · 2 comments
Closed

sha3/keccak variants and clarification #11

subtly opened this issue Jun 15, 2015 · 2 comments

Comments

@subtly
Copy link

subtly commented Jun 15, 2015

Only one sha3 is in the multihash list and it's size cannot be used to infer it's type. sha3-256 can be used and truncated to 128-bits and sha3-512 truncated to 256-bits. Here is a snippet from Mar-2014 NIST document:

The four SHA-3 hash functions are defined from the KECCAK[c] function specified in Sec. 5.2 by appending two bits to the message and by specifying the length of the output, as follows:
SHA3-224(M) = KECCAK[448] (M || 01, 224); 
SHA3-256(M) = KECCAK[512] (M || 01, 256); 
SHA3-384(M) = KECCAK[768] (M || 01, 384); 
SHA3-512(M) = KECCAK[1024] (M || 01, 512).
In each case, the capacity is double the digest length, i.e., c = 2d. The two bits that are appended to the message (i.e., 01) support domain separation; i.e., they distinguish the messages for the SHA-3 hash functions from messages for the SHA-3 XOFs discussed in Sec. 6.2, as well as other domains that may be defined in the future.
@jbenet
Copy link
Member

jbenet commented Jun 15, 2015

@subtly right, i punted on this until i implemented support for it. thanks for the PR.

ivilata added a commit to ivilata/multihash that referenced this issue Jan 19, 2016
…ultiformats#11)

Now ``sha3`` should be used as a deprecated alias to ``sha3-256``.
ivilata added a commit to ivilata/multihash that referenced this issue Jan 19, 2016
…ultiformats#11)

Now ``sha3`` should be used as a deprecated alias to ``sha3-512``.
@jbenet jbenet closed this as completed Aug 14, 2016
@jbenet
Copy link
Member

jbenet commented Aug 14, 2016

this has been addressed

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

No branches or pull requests

2 participants