Keccak256
Keccak256 is a cryptographic hash function that generates a unique, fixed-size string of bytes for each unique input it receives. This feature makes it useful for ensuring data integrity, as any change in the input data leads to a different hash output. It’s virtually impossible to derive the original input from the hash output, making it a one-way function. In Ethereum:- Keccak256 is used to generate Ethereum addresses from public keys.
- It’s used to verify the integrity of transactions.
- It’s used for efficient and secure data storage and retrieval in Merkle Trees.
- It’s used to identify functions in Ethereum’s contract ABI.
Account
An account in the context of Ethereum refers to an entity with an ether (ETH) balance that can send transactions on the Ethereum network. There are two types of accounts: externally owned accounts (EOAs), which are controlled by private keys, and contract accounts, which are deployed smart contracts.Address
In the context of blockchain, an address refers to the hashed form of a public key that belongs to a specific user or contract. It is used to identify participants on the blockchain network. In Ethereum, addresses are typically represented as hexadecimal strings and are used to send and receive transactions.Address checksumming
A checksummed address is a standard Ethereum address with certain characters capitalized to include a checksum validation. Checksumming is a way of including error-detection codes in an Ethereum address. The goal of checksumming is to prevent errors when an address is typed manually. An Ethereum address is a 40 character hexadecimal string derived from the last 20 bytes of the Keccak256 hash of the public key. To create a checksummed address, the address (excluding the ‘0x’ prefix) is hashed using Keccak256, which outputs a 64 character hexadecimal string. This string is used to determine the capitalization of each alphanumeric character in the original address: if the Nth digit of the Keccak hash is 8 or more, the Nth character in the original address is capitalized, if it is a letter. Here’s a simplified explanation of how it works:-
You have an original Ethereum address:
0xae2fc483527b8ef99eb5d9b44875f005ba1fae13
(all lowercase). - You hash the lowercase hexadecimal address using Keccak256, which produces a new hash.
-
You go through each character of the original address:
- If the corresponding digit in the hash is 8 or greater, you capitalize that character.
- If the corresponding digit in the hash is less than 8, the character remains lowercase.
- The resulting Ethereum address with this specific capitalization is the checksummed address.