That is precisely the right question to ask, and it delves deep into the field of cryptanalysis.
The answer is: Yes, the security of Keccak degrades gradually as you reduce the number of rounds, and there is no single "magic number" of rounds that is suddenly secure. Security is a spectrum, not a binary switch.
The official Keccak permutation (Keccak-f[1600]
) used in SHA-3 and Ethereum has 24 rounds. This number was not chosen arbitrarily. It was selected to provide a very large security margin against all known cryptanalytic attacks.
Let's break down what "security" means here and how it degrades.