Many sources refer to the use of the "SHA3" cryptographic hash function within Ethereum, but the Ethereum project began before the SHA3 standard was finalised, and there was some confusion/controversy around the final parameters selected for the standard. Which function specifically did Ethereum actually end up with? Is it the same as the actual SHA3 standard, or one of the variants within the standard? Or is it a parameterisation of Keccak that doesn't match any of the variants?
According to this, NIST changed the padding to
SHA3-256(M) = KECCAK  (M || 01, 256);
which was different than the original padding proposed by the Keccak team. It seems that now people are calling the "original" SHA3 Keccak hashing "Keccak" and the new NIST SHA3 standard as "SHA-3".
Ethereum SHA3 function in Solidity =
SHA3-256 (NIST Standard) =
To make it clearer that Ethereum uses KECCAK-256 instead of the NIST standardized SHA-3 hash function, Solidity 0.4.3 has introduced
keccak256. (It is an alias to
sha3, meaning that
keccak256 produces identical results to
sha3, but with the intent to avoid confusion, especially for developers new to Ethereum.) It's recommended that new code use
keccak256 instead of