Summary
In this chapter, we learned what cryptographic hash functions and message digests are. We also learned about the common attacks that are performed on hash functions and how to assess a hash function’s security. Then, we reviewed the cryptographic hash functions supported by OpenSSL and how much security they provide. We finished our review by providing a practical piece of advice on which hash functions to use in which situations.
In the practical section, we learned how to calculate a message digest using the openssl dgst
subcommand. Finally, we learned how to develop a C program that will use the OpenSSL library for message digest calculation. We compared a message digest that was generated by our program with one that was generated by openssl dgst
and confirmed that our digest was generated correctly.
In the next chapter, we will learn about Message Authentication Codes (MACs) and Hash-based Message Authentication Codes (HMACs). HMACs are based on cryptographic...