Digital Certificates

CSCI 3341 Notes 10-21-2025

Topic: Digital Certificates

Q1: What is a Digital Certificate?
  • A digital certificate is an electronic document used to prove the ownership of a public key.

  • It includes information about the key, the identity of its owner (the subject), and the digital signature of the entity that has verified the certificate's contents (the Certificate Authority, CA).


Q2: Why/When Do We Use Certificates?
  • Authentication Mechanism:

    • Digital certificates are primarily used as an authentication mechanism. For example, they allow a web/e-commerce server to be authenticated by clients/customers.

  • Secure Distribution of Public Keys:

    • Certificates facilitate the secure distribution of public keys.

    • If a public key is not securely distributed, there is a risk that a hacker could replace the legitimate public key with their own, leading to a Man-in-the-Middle (MitM) attack.

Note:
  • If a public key is compromised, the integrity of the public key sharing process is at risk.

Concept: Man-in-the-Middle (MitM) Attack
  • DNS Poisoning:

    • Definition: DNS (Domain Name Service) is responsible for translating a domain name (e.g., www.google.com) into its corresponding IP address.

    • DNS Poisoning:

    • This occurs when a hacker disrupts the normal DNS operation, resulting in malicious redirection. A poisoned DNS server returns an incorrect IP address for a given domain name.

How a MitM Attack Against Public Key Sharing Works:
  • Scenario:

    • User A wants to obtain user B’s public key and sends a request to B.

    • B responds with their public key.

  • Pre-requisite for MitM Attack:

    • The DNS service of the victimized users (A and B) is altered or poisoned by the hacker.

    • Example: When A searches for B’s IP address using the DNS service, the poisoned DNS returns the hacker’s (H’s) IP instead of B’s IP.

Attack Process:
  • When B sends their public key back to A, the hacker is able to intercept this communication. This substitution allows A to think they are communicating securely with B when, in fact, they may be dealing with H.

Implications of the Attack:
  • Every time A requests B’s public key, H’s public key is returned instead.

  • Case One - Breach of Confidentiality:

    • If A uses what they believe is “B’s public key” to encrypt data and sends the ciphertext to B, hacker H can decrypt it, leading to a breach of confidentiality provided by public key encryption.

    • Reason: The encryption is compromised due to the interception of the encrypted data by H.

  • Further Consequences:

    • After decrypting the ciphertext, H can modify the data and re-encrypt it using B’s public key before sending it back to B. This allows H not only to view but also to manipulate the data being exchanged.

Validation of Digital Signatures:
  • Case Two:

    • If A receives a document and signature from B, but the message was actually sent by H, A retrieves “B’s public key” from memory and uses it to validate the document and signature.

    • Consequences:

    • The expected benefits of digital signatures—data integrity, signer origin integrity, and signer non-repudiation—are not upheld in this scenario due to the interception by H.

Lessons Learned:
  1. Do Not Share Public Keys Directly:

    • Sharing a public key directly over the network exposes it to risks like MitM attacks.

  2. Use Secure Mechanisms:

    • Utilize secure methods for sharing public keys, such as Digital Certificates, to prevent compromise.

Q3: How Would Digital Certificates Prevent MitM Attacks Against Public Key Sharing?
Construction of a Digital Certificate:
  • A digital certificate is constructed with a certificate chain showing the relationships between the Certificate Authorities (CAs) and subjects.

    • Example of a Certificate Chain:

    • If A signs B's certificate and B signs C's certificate, C's certificate will include references to both B's and A's certificates.


Conclusion

  • Digital certificates are critical in establishing secure communications over the internet by verifying identities and ensuring the authenticity of public keys, thus preventing attacks such as Man-in-the-Middle attacks.