CSCI 3341 Notes on Digital Certificates
CSCI 3341 Notes on Digital Certificates
Overview
Date: 10-23-2025
Topic: Digital Certificates
Key Questions Discussed
What is a digital certificate?
To be discussed later.
Why/When do we use certificates?
Certificates are primarily used as an authentication mechanism.
Example: For web/e-commerce server authentication by clients/customers.
Certificates facilitate the secure distribution of public keys.
Note: If a public key is not securely distributed, it may be replaced by a hacker’s public key, leading to a Man-in-the-Middle (MitM) attack against public key sharing.
Man-in-the-Middle (MitM) Attack
Definition: A MitM attack occurs when a hacker intercepts the communication between two parties, leading to potential data breaches.
DNS Poisoning: A precursor attack before a MitM attack can be launched.
DNS (Domain Name Service): Converts a domain name (e.g., www.google.com) into its corresponding IP address.
A poisoned DNS server may return an incorrect IP address when querying a domain name.
How MitM Attack Works
Scenario:
User A requests public key from user B.
User B responds with their public key.
Prerequisite for MitM attack: DNS services of users A and B have been altered by the hacker.
When A queries for B's IP address, the hacker forges the response to return their own (H's IP address).
Potential Impacts of MitM Attack
Confidentiality Breach:
If A uses B’s public key (which is actually H’s key) to encrypt data, the hacker H decrypts the ciphertext, breaching confidentiality.
H can modify and re-encrypt the data using B’s public key before sending it on to B.
Validation of Digital Signature Failure:
If A received a document and signature from B, but it was sent by H instead, A uses B's public key from memory to validate the document.
Failures lead to lack of data integrity, signer origin integrity, and signer non-repudiability.
Lessons Learned
Best Practice: Avoid sharing a public key directly over the network due to vulnerability to MitM attacks.
Use a secure mechanism, such as Digital Certificates, for sharing public keys.
Digital Certificates Explained
What are Digital Certificates?
Digital certificates act as a medium to securely share public keys and authenticate the owner/subject of said certificate.
Certificate Chain: A series of certificates that illustrate the relationships between different Certification Authorities (CAs) and subjects ( owners).
Example: 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.
Hierarchical Structure:
A (root) → B → C (leaf)
Components of Certificates:
A’s certificate (self-signed): Includes A's public key packet + A's signature packet.
B’s certificate (signed by A): Includes B's public key packet + B's signature packet (signed by A).
C’s certificate (signed by B): Includes C's public key packet + C's signature packet (signed by B).
X.509 Digital Certificates
Definition: The X.509 is a Public Key Infrastructure (PKI) system used to define digital certificates.
Purpose:
Secure mechanism for sharing public keys.
Authentication of the certificate owner/subject.
Example: In HTTPS, the e-commerce server’s certificate is verified by the customer’s browser to authenticate the server.
Relation to SSL/TLS and Dependency Chain
SSL/TLS (Secure Socket Layer/Transport Layer Security) is based on X.509 certificates.
Dependency Chain:
HTTPS → SSL/TLS → X.509 Certificates → Digital Signatures → Hashing & Public Key Cryptography.
Notation: a → b indicates a is dependent on b.
Types of Certification Authorities (CAs)
Root CAs:
Certificates are self-signed by the CA.
Intermediate CAs:
Certificates signed/certified by another CA, could either be a root CA or another intermediate CA.
Certificate Construction Process
Structure: A digital certificate comprises two main packets:
Public Key Packet: Contains information like subject name, public key, issuer, validity period, hashing algorithm, signing algorithm, etc.
Signature Packet: Represents the encryption of the hashing of the public key packet using CA's private key.
Example: CA1’s certificate (self-signed):
CA1’s public key packet + CA1’s signature packet = Encrypt hashing(CA1’s public key packet) using CA1’s private key.
Example for other certificates follows similarly.
Certificate Validation Process
Steps to Validate a Certificate:
Check Expiration: Has the certificate expired? If yes, abort; if no, proceed.
Issuer Identification: Who issued the certificate? Identify as CA1.
Pre-Installed Certificates: Does the validator have the issuer's certificate pre-installed? (If not, further processing needed).
Extract and Use Issuer’s Public Key: Use CA1's public key to validate A's signature packet:
Decrypting A's signature packet with CA1's public key to generate hash1.
Hash A’s public key packet to obtain hash2.
Compare Hashes: If hash1 ≠ hash2, abort. If equal, the following is confirmed:
Source data is valid (all details in A’s public key packet are correct).
Information correctness of certificate creator (A's signature was indeed signed by CA1).
Signer’s non-repudiation (CA1 can’t deny issuing the certificate).
Conclusion on Certificate Trustworthiness
The validation process validates the authenticity of A's certificate but does not guarantee that it was sent directly from A; it could have been sent from a hacker impersonating A.
Important Note: If a message from A is accompanied by a valid certificate, it is generally insufficient for establishing trust in A's identity solely based on the certificate.
HTTPS and Security Protocols
Usage of X.509 in HTTPS
Purpose: HTTPS (HTTP over SSL/TLS) protects the exchange of HTTP traffic between clients (web browsers) and servers (web servers).
TLS/SSL Framework: The suite includes security protocols reliant on X.509 for authentication.
Validation Process: The server's digital certificate gets validated during the HTTPS handshake.
Risks and Implications
Rogue Server Setup by Spammers: How a valid certificate can be abused to appear authentic to victims.
Vendor Trust: Digital certificates combined with software offer a trust mechanism between vendors and users.
Is a valid certificate enough for the customer to trust the vendor? Answer: NO, any entity could impersonate the vendor using a copied valid certificate.
Improving Authenticity: Necessary revisions in protocols for true vendor authentication, enhancing the original message's credibility further than just shared certificates.