Keccak

From WEB3 Vulnerapedia
Jump to navigation Jump to search

Keccak is a cryptographic hash function that belongs to the family of sponge functions. It takes an input message and processes it through a series of transformations to produce a fixed-length hash value. Keccak is designed to provide properties such as collision resistance, preimage resistance, and avalanche effect. It gained attention as the winner of the NIST hash function competition, leading to its adoption in various applications, including blockchain networks and digital signatures. Keccak's flexible design allows for different output lengths, making it adaptable to diverse security requirements. It is notable for its resistance to certain types of attacks and its ability to offer high levels of security for various cryptographic purposes.

Background Information

Keccak belongs to a group of cryptographic functions that competed and was selected by NIST to be the SHA-3 (Secure Hash Algorithm-3) standard. As mentioned, Keccak encompasses a set of four sponge constructions/functions: Keccak-224, Keccak-256, Keccak-384, and Keccak-512.

A classical hash function, takes as input an arbitrary input length and has a predetermined output size(depending on the cryptographic specification). On the other side, a sponge construction is able produce hash values of varying lengths.

What's the deal with Keccak in web3?

The Keccak that is widely used in web3 e.g.: in solidity is not the SHA3 standard but the Keccak-256 version which can be tested online e.g.: here.

Sources

https://www.mdpi.com/2078-2489/14/9/475

https://docs.soliditylang.org/en/latest/cheatsheet.html#mathematical-and-cryptographic-functions