1. What Cryptographic hash functions are
Our evaluation package for FPGA provides anything required to build a demo on your board.
Cryptographic hash functions are a key building block in embedded security. They take input data of any size and convert it into a fixed-length value, called a hash or message digest. This hash acts as a digital fingerprint of the data and is used to verify data integrity, detect modifications, and, when combined with a secret key, enable authentication in secure systems.
In embedded systems, hash functions are used in several critical areas:
A secure hash function has several core properties:
Two common hash function families are widely used in practice.
SHA-2 (e.g., SHA-256, SHA-512) is the established standard in many systems. It is based on the Merkle–Damgård construction, which processes data in fixed-size blocks using a compression function. From a hardware perspective, SHA-2 has a regular structure, predictable control flow, and supports efficient pipelining, making it easy to integrate and suitable for high-throughput designs.
SHA-3 (Keccak) follows a different design approach using a sponge construction. Data is absorbed into a larger internal state (1600 bits), and the output is generated by extracting data from this state. SHA-3 is naturally resistant to length extension attacks and supports flexible output lengths.
For FPGA implementations, an important practical difference emerges: SHA3-256 processes significantly more data per round than SHA-256. In hardware architectures, this can result in higher throughput at the same clock frequency. FPGAs handle wide datapaths and bitwise operations efficiently, which makes SHA-3 a strong candidate for hardware-based designs.
Hash functions alone only provide integrity. For authentication, HMAC (Hash-Based Message Authentication Code) is used. HMAC combines a hash function with a secret key to generate a message authentication code (MAC). This ensures that only authorized parties can create or verify the message.
For FPGA-based systems:
The choice depends on system constraints such as area, throughput, integration effort, and long-term maintainability.