Hashing, Hashing Algorithms, and Collisions - Cryptography - Practical TLS

Hashing, Hashing Algorithms, and Collisions - Cryptography - Practical TLS

Hashing Algorithms Explained

In this section, the concept of hashing algorithms is introduced, explaining how they generate a unique fingerprint or message digest for input messages.

Introduction to Hashing Algorithms

  • A hashing algorithm processes input messages to produce a unique fingerprint or message digest.
  • The output of a hashing algorithm is known as a message digest and can be referred to by various names like checksum, hash, or CRC.
  • Message digests allow comparison between original messages to determine if they are the same or different.

Requirements for Hashing Algorithms

  • Real-world hashing algorithms must make it infeasible to produce a given digest easily.
  • It should be impossible to extract the original message from the digest (one-way encryption).
  • Small changes in the original message should result in significant differences in the resulting digest.
  • The resulting digest length should always be fixed regardless of the input size.

Demonstrating Hashing with MD5 Algorithm

  • Using the MD5 algorithm as an example of a real-world hashing algorithm that meets all requirements.
  • Demonstrating how to calculate the MD5 hash of a message using Linux utilities like echo and md5sum.

Hashing Algorithms and Collisions

In this section, the instructor explains hashing algorithms, their properties, and the concept of collisions in detail.

Understanding Hashing Algorithms

  • Hashing involves creating a hash from a given string using an algorithm.
  • The resulting digest remains the same regardless of whether the input is a single letter or a sentence.
  • Hashing algorithms iterate over the message multiple times to produce a fixed-width digest, showcasing the avalanche effect.

Collisions in Hashing

  • A collision occurs when two different messages result in the same digest, which defeats the purpose of hashing for comparison.
  • Collisions are inevitable due to limited possible digests in hashing algorithms.

Types of Hashing Algorithms

This part introduces various hashing algorithms commonly used and discusses their characteristics.

Commonly Used Hashing Algorithms

  • MD5 and SHA-1 are popular hashing algorithms producing 128-bit or 160-bit digests.
  • The SHA-2 family offers different digest lengths based on security needs.
Video description

Hashing, or a Hashing Algorithm takes "something" (a message, a file, a certificate, computer code, anything) and turns into a smaller, representational sample of the original something. The result of a hashing algorithm is known as a Digest (among other names). To check if two files are perfectly identical, you can simply run them both through a hashing algorithm and compare the digests. If the digests are the same, then you know both files are also identical. In the rare cases that multiple files result in the same digest... you have what's known as a Collision. And while rare, collisions are unavoidable. This lesson is a free sample lesson from the the most effective TLS and SSL training course ever created. No instructor rambling on about pointless stories. No slides with massive walls of text. No time wasting. Only simple, effective, and precise explanations. Complimented with practical illustrations and visuals. 🔐 More details about the course: https://classes.pracnet.net/courses/practical-tls 🏢 Do you configure or troubleshoot TLS/SSL for work? If so, I'm willing to bet your employer would happily pay for this SSL training. Reach out if you'd like to coordinate an introduction for a bulk license purchase with your company. I'm happy to provide a generous referral bonus =) 00:00 - Hashing Algorithms - Definition & Simple Explanation 01:42 - Real World Hashing requirements 04:20 - Hashing Demonstration with Linux - md5sum 07:48 - Hash Collisions - Unfortunately, they can't be avoided 10:18 - Hashing Algorithms: md5 sha sha1 sha2 sha224 sha256 sha384 sha512 💬 Join Practical Networking Discord https://discord.com/invite/yrexngJ 🖧 Want to learn how how data moves through a network? https://www.youtube.com/playlist?list=PLIFyRwBY_4bRLmKfP1KnZA6rZbRHtxmXi Since you've made it to the bottom of the Description, here's a $100 off coupon code you can use on the full course =) YT100