Skip to content

sha3/keccak variants and clarification #11

@subtly

Description

@subtly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions