• In plaintext authentication, routers pass the password directly inside Hello packets.
    Anyone opening Wireshark on that link sees the cleartext password immediately.

    How MD5 Protects the Password

    MD5 fixes this vulnerability by keeping the secret key strictly on the router.
    Instead of sending the password over the wire, routers process it through MD5 and transmit a cryptographic hash instead.

    OSPF plaintext authentication showing the key PMN_KEY in the Hello packets compared to MD5 authentication showing only a hash

    Figure 1 - Plaintext shows the key, MD5 shows a hash

    Compare the two captures: plaintext gives away the exact string you typed, while MD5 shows a 32-character hexadecimal hash and nothing else.

    How MD5 Authentication Works

    1. R1 combines its secret key (PMN_KEY) with the OSPF Hello packet payload.

    2. It hashes the combination using the MD5 algorithm.

    3. R1 attaches the resulting hash inside the OSPF packet header.

    The OSPF key PMN_KEY going through an MD5 hash function and coming out as an unreadable 32-character hash

    Figure 2 - The key goes in, the hash comes out

    When R2 receives the packet, it runs the exact same calculation using its locally stored key:

    • Match? The packet is accepted.

    • Mismatch? The packet is dropped immediately.

    Even if an attacker captures the frame, an MD5 hash is a one-way function and cannot be reversed to reveal the original key.

    Answer the question below

    What travels in an MD5-authenticated packet instead of the key?