Hash functions are critical components in cryptography, playing a key role in ensuring data integrity and security.
Explain what a hash function is and discuss its main properties.
Compare popular hash functions like MD5, SHA-1, and SHA-256 in terms of their security and usage. How do message authentication codes (MACs) extend the concept of hash functions for verifying message authenticity?
Describe how digital signatures use hash functions to ensure data integrity and non-repudiation.
Explore real-world applications of cryptographic hash functions, particularly in areas such as password storage and data integrity verification. What makes hash functions so important in these contexts, and why is it essential to choose a secure hash algorithm?