Security Plus Unit 10
Security Plus Unit 10
Integrity Assurance that data has not Hashing: Computes a fixed-length string
been altered or tampered (hash) from data, e.g., SHA-3.
with.
Encryption Transforming readable data Algorithm: Uses specific rules and keys to
into an unreadable format to encode data, e.g., AES.
protect confidentiality.
Symmetric Uses the same key for both Block Cipher: Encrypts data in fixed-size
Encryption encryption and decryption. blocks (e.g., AES).
Stream Cipher: Encrypts data bit by bit
(e.g., RC4).
Steganography Hiding data within other files Embedding Data: Conceals information
or media. within a picture file, e.g., using LSB (Least
Significant Bit) technique.
1
Digital Provides authentication, Process: Hashes the message, then
Signatures non-repudiation, and encrypts the hash with the sender's private
integrity for digital messages key. Verification is done using the sender's
or documents. public key.
1. Hashing Basics
Concept Definition Example Detailed Explanation
Hashing The process of Download a file, calculate Ensures data has not
Process generating a hash its hash, compare with been altered during
from data and provided hash. transmission or storage.
comparing it to a The comparison verifies
previously computed integrity by matching
hash. computed hashes.
2. Hashing Algorithms
Algorithm Description Output Example Security Notes
2
SHA-0 An early Not used. Replaced by
version of SHA-1;
SHA, now historically
flawed and important but not
obsolete. secure.
Length Generally longer and Typically shorter, e.g., a Hashes: SHA-256, MD5.
more complex. few bits or bytes. Checksum: RAID-5 parity bit,
credit card check digit.
3
4. Hash-based Message Authentication Code (HMAC)
Concept Description Example Usage
5. Practical Examples
Scenario Process Tools/Commands Outcome
Patch File Calculate and compare Example: sha256sum Verifies the downloaded
Verification hashes for a software patch file matches the
patch. original hash.
File Integrity Manual calculation and Command-line tools Ensures file integrity
Check comparison of file like sha256sum post-download by
hashes. comparing hashes.
Credit Card Use checksum to Built-in credit card Confirms the card
Validation validate the accuracy of validation algorithms number is entered
entered card numbers. correctly before
submission.
6. Hashing Files
Concept Description Example Tools
4
Hashing Methods for Example: SHA-256 hash of a Kali Linux image Tools:
Files manually and file. sha256sum
automatically , digital
calculating and signatures
verifying hashes in email.
of files.
One-Way Hashing creates Example: SHA-1 hash of "I will pass the Hashes do
Function a fixed-size bit Security+ exam" is not reveal
string and does 765591c4611be5e03bea41882ffdaa1593 file type or
not allow 52cf49. size.
reconstruction of
original data.
5
Comparis Compare Original hash: Manual
on the acf455e6f9ab0720df0abed15799223c2445882b44 comparis
calculate dfcc3f2216f9464db7915 on
d hash
with the
original
hash.
Hashing Messages
Ste Action Details/Examples
p
3 Sending Lisa sends both the message and the hash to Bart.
Message and
Hash
4 Message The message is altered in transit to: "The price is .75." (Note: The
Modification hash remains unaltered.)
5 Hash Calculation A program on Bart's computer calculates the MD5 hash of the
(Receiver) received message: 564294439E1617F5628A3E3EB75643FE
7 Integrity Check Bart's program compares the two hashes and detects a mismatch,
indicating the message has lost integrity.
6
8 Conclusion Bart knows the received message isn't the same as the sent
message and shouldn't trust it.
Important Points
Concept Explanation
Integrity Assurance Hashing provides assurances that the message has not been
modified.
Comparison Hashes are created and compared at both sender and receiver
ends to ensure data integrity.
Example of Integrity Message altered from "The price is $75." to "The price is .75."
Loss resulting in different hashes.
Remember This!
Key Points
Using HMAC
3 Sending Lisa sends both the message and the hash to Bart.
Message and
Hash
7
4 Message Hacker Harry modifies the message to: "The price is .75." and
Modification by calculates a new MD5 hash:
Attacker 564294439E1617F5628A3E3EB75643FE
6 Integrity Check The calculated hash on the modified message matches the hash
received from the attacker, erroneously indicating the message has
maintained integrity.
3 Sending Lisa sends both the message and the HMAC-MD5 hash to Bart.
Message and
HMAC Hash
4 Message Hacker Harry modifies the message to: "The price is .75." but
Modification by cannot calculate a valid HMAC hash without the secret key.
Attacker
5 HMAC Hash Bart's computer calculates the HMAC-MD5 hash on the received
Calculation message using the shared secret key.
(Receiver)
8
- HMAC-MD5 hash calculated by Bart (modified message):
1B4FF0F6C04434BF97F1E3DDD4B6C137
7 Integrity Check The hashes are different, indicating the message has lost
integrity. If the message was not modified, the HMAC-MD5
hashes would be the same.
Integrity Hashing provides assurances that the message has not been modified.
Assurance
HMAC Adds a secret key to the hashing process to provide additional security,
ensuring the message integrity cannot be faked by an attacker.
Hashing Passwords
Ste Action Details/Examples
p
9
1 Password User creates a password, e.g., password123.
Creation
2 Hash Calculation The system calculates the hash for the password.
(Password Example with MD5: 482c811da5d5b4bc6d497ffa98491e38
Creation)
3 Storing the Hash The system stores the hash, not the password.
Stored hash: 482c811da5d5b4bc6d497ffa98491e38
5 Hash Calculation The system calculates the hash of the entered password.
(Authentication) Entered password: password123
Calculated hash: 482c811da5d5b4bc6d497ffa98491e38
6 Hash Comparison The system compares the calculated hash with the stored hash.
Stored hash: 482c811da5d5b4bc6d497ffa98491e38
Calculated hash: 482c811da5d5b4bc6d497ffa98491e38
Online Tools Tools like MD5 Online can decrypt MD5 hashes quickly if the password is
weak or common.
Example:
MD5 hash of 12345: 827ccb0eea8a706c4c34a16891f84e7b
MD5 Online can decrypt this hash to 12345 in less than a second.
Dictionary MD5 Online and similar tools use a database of common hashed
Attacks passwords to quickly find matches.
10
Concept Details/Examples
Salting Adding random data (salt) to the password before hashing to prevent
dictionary and rainbow table attacks.
Example:
Password: password123
Salt: randomSalt123
Salted Password: password123randomSalt123
SHA-3-256 hash of salted password: examplehashedvalue (hypothetical)
5 Storing the Hash and Store the hash and the salt.
Salt Stored hash: examplehashedvalue
Stored salt: randomSalt123
11
9 Hash Calculation Calculate the hash of the salted entered password.
(Authentication) SHA-3-256 hash: examplehashedvalue (hypothetical)
10 Hash Comparison Compare the calculated hash with the stored hash.
Stored hash: examplehashedvalue
Calculated hash: examplehashedvalue
Salting Adds random data to the password before hashing to make each hash
unique.
Security Hashing and salting together provide robust security for stored
passwords.
Hash Collision Occurs when different Password “success” and “passed” both
inputs produce the same produce hash 123 using a simple hashing
hash. algorithm.
12
Online Attempts to discover Tools: ncrack
Password passwords by guessing Indicators: System logs showing repeated login
Attack repeatedly. attempts, Event ID 4625, Event ID 4740 (account
lockouts).
Dictionary Attacks
Dictionary Uses a list of words and common Use complex passwords that are
Attack passwords to guess passwords. not in the dictionary.
Brute Force Attempts all possible Use complex, long passwords and store them
Attack character combinations. in encrypted/hashed format.
Pass the Uses captured password Indicators: Event ID 4624 with NTLMSSP as Logon
Hash hashes to log in without Process, NTLM as Authentication Package,
Attack cracking. correlated with Event ID 4672 for privilege use.
Birthday Attacks
13
Concept Description Prevention
Rainbow Table Uses precomputed hashes to find a Use salting and strong hashing
Attack matching password. algorithms like SHA-3.
Bcrypt
PBKDF2
14
Techniqu Description Usage
e
PBKDF2 Uses salts of at least 64 bits and Used in WPA2, Apple's iOS, Cisco IOS.
applies HMAC repeatedly. Can apply the process up to 1,000,000 times.
Argon2
Argon2 Uses a password and salt, passed through an algorithm Variants: Argon2d,
multiple times, continuously improved. Argon2i
Summary Points
Concept Explanation
Key Stretching Makes the hash calculation more complex to prevent brute force and
rainbow table attacks.
Attack Online and offline attack indicators include repeated failed logon attempts
Indicators and unusual log entries.
15
Type Description Example
Data at Data stored on media (e.g., hard Encrypting customer credit card fields in a
Rest drives, SSDs). Encrypt individual database.
fields, files, folders, or disks.
Data in Data sent over a network. Common Using HTTPS for secure transactions that
Transit to encrypt sensitive data during include credit card data.
transmission.
Data in Data being used by a computer, Applications decrypt data for processing
Use decrypted while in use, and and then re-encrypt it before storing it.
re-encrypted before being saved. Memory is purged of sensitive data.
Encryption Methods
Symmetric Encryption
Key Same key used for both encryption and A single shared secret key for both
Usage decryption. encrypting and decrypting
messages.
Speed Faster than asymmetric encryption due to Often used for bulk data encryption.
simpler algorithms.
Security Key distribution is challenging as the same Secret key must be exchanged
key must be securely shared between securely.
parties.
Asymmetric Encryption
Key Uses a pair of keys: a public key for Public key shared with anyone;
Usage encryption and a private key for private key kept secure.
decryption.
Speed Slower than symmetric encryption due to Used for smaller amounts of data or
more complex algorithms. for encrypting symmetric keys.
Security More secure for key distribution as the Private key never transmitted.
private key does not need to be shared.
Elements of Encryption
16
Element Description Example
Key A number that provides variability in 256-bit key used in AES for strong
encryption, either kept private or changed encryption.
frequently.
Data at Rest
Scenario Description
Full Disk Encrypting the entire disk to protect all data stored on it.
Encryption
Data in Transit
Scenario Description
VPNs (Virtual Private Encrypting data sent over public networks to secure
Networks) communication between remote users and a corporate network.
Data in Use
Scenario Description
Application Decrypting data for processing and re-encrypting before storing, with
Processing memory purging to remove sensitive data.
Summary Points
Concept Explanation
17
Encryption Provides confidentiality, ensuring data is viewable only by
authorized users.
Data at Rest Encrypts stored data to protect against unauthorized access if the
Encryption storage medium is compromised.
Data in Use Temporarily decrypts data for processing and re-encrypts it after
Encryption use, with memory being purged.
Symmetric Uses the same key for both encryption and decryption, offering
Encryption faster performance.
Asymmetric Uses a key pair (public and private), offering better security for key
Encryption distribution.
Symmetric encryption uses the same key to encrypt and decrypt data. This method is also
known as secret-key encryption or session-key encryption. Here’s a breakdown with
examples:
Basic Concepts
Term Description
18
Step Process Result
Ciphertext SDVV
Plaintext PASS
ROT13 Example
The ROT13 cipher rotates each letter by 13 places. Encryption and decryption use the same
process.
Scenario Description
19
House Key Marge receives a key to her new home. This key locks and unlocks
her home.
Sharing Key Marge shares a copy of her key with Homer. Now both can lock
and unlock the house.
Symmetric Key Use Symmetric encryption uses a single key to both encrypt and
decrypt data.
Vulnerability Using the same key repeatedly increases the risk of cracking and
compromise.
AES is a popular symmetric encryption algorithm using keys of 128, 192, or 256 bits.
Feature Description
Key Size AES uses keys of 128, 192, or 256 bits to enhance security.
Data Encrypts data before transmission and decrypts it upon receipt using
Transmission the same key.
Data Storage Encrypts data in databases or files using a symmetric key, which must
be securely stored.
Step Process
20
Decryption Server B uses the same AES algorithm with key '123' to decrypt
data.
Scenario Description
Day 2 Change to key '456' for new encryption and decryption operations.
Enhanced Frequent key changes prevent reuse and reduce the risk of
Security compromising multiple data sets.
Summary Points
Concept Explanation
Advanced Algorithms like AES use complex keys and are widely used for secure
Encryption data transmission and storage.
Key Management Frequent key changes enhance security and reduce vulnerabilities.
Real-World Comparing symmetric keys to house keys helps illustrate the concept
Analogies of shared access through a single key.
Block Encrypts data in specific-sized blocks More efficient when data size is known,
Cipher (e.g., 64-bit, 128-bit). Encrypts each e.g., files, specific-sized database
block separately. fields.
Stream Encrypts data as a continuous stream More efficient for data of unknown size
Cipher of bits or bytes. Does not divide data or continuous streams, e.g., streaming
into blocks. audio/video.
21
Key Principle: Encryption keys for stream ciphers should never be reused to avoid making
encryption easier to crack.
Feature Description
Block 128-bit
Size
Strength - Fast: Uses efficient mathematical formulas requiring only one pass to encrypt
s and decrypt data.
- Efficient: Less resource-intensive than 3DES, suitable for small devices.
- Strong: Provides a high level of confidentiality.
Feature Description
Descriptio Encrypts data using the DES algorithm in three separate passes with multiple
n keys.
Use Case Suitable for environments where hardware doesn't support AES.
22
Key Sizes 32 bits to 448 bits 128 bits, 192 bits, 256 bits
Descriptio Faster than AES in some cases, especially Related to Blowfish, was a
n AES-256. Designed as a general-purpose finalist in NIST evaluation for
algorithm to replace DES. AES.
Use Case Widely used in various applications for Suitable for applications
general-purpose encryption. requiring strong encryption with
larger block size.
Summary Points
Concept Explanation
Block Ciphers Encrypt data in fixed-size blocks, suitable for known data sizes like files.
Stream Ciphers Encrypt data as a continuous stream, suitable for unknown data sizes
like live streaming.
23
AES Strong symmetric block cipher with 128-bit, 192-bit, and 256-bit keys.
Fast, efficient, and highly secure.
3DES Symmetric block cipher using DES in three passes, suitable for legacy
systems where AES is not supported.
Blowfish Symmetric block cipher with 64-bit blocks, key sizes from 32 to 448 bits.
Faster than AES in some instances.
Twofish Symmetric block cipher with 128-bit blocks, key sizes of 128, 192, and
256 bits.
Use Cases Specific scenarios where each algorithm is best applied for optimal
security and performance.
Encryption with Only the matching private key can decrypt the information
Public Key encrypted with the public key.
Encryption with Only the matching public key can decrypt the information
Private Key encrypted with the private key.
Key Exchange
Concept Description
24
Usage Asymmetric encryption is often used for key exchange to share a symmetric
key, which is then used for efficient encryption.
Certificates
Element Description
Digital Certificate Digital document containing the public key and information about the
owner.
Serial Number Unique identifier for the certificate issued by a CA. Used to validate
the certificate and check for revocation.
Public Key Used in combination with the matching private key for asymmetric
encryption.
Certificate Includes details like Common Name (CN), Organization (O), Locality
Attributes (L), State (S), and Country (C).
25
Encrypting a Message for Confidentiality
Authenticating a Message
1. Scenario: Alice wants to send a message to Bob with assurance that she sent it.
2. Process:
○ Alice encrypts the message with her private key.
○ Bob decrypts the message with Alice’s public key.
1. Scenario: Alice sends an email to Bob and wants to ensure Bob knows it’s from her.
2. Process:
○ Alice’s email application hashes the email content and encrypts the hash with her
private key, creating a digital signature.
○ Alice’s email application attaches the digital signature to the email and sends it to
Bob.
○ Bob’s email application uses Alice’s public key to decrypt the digital signature
and retrieves the hash.
○ Bob’s email application hashes the received email content and compares it with
the decrypted hash. If they match, Bob knows the email is from Alice and hasn’t
been tampered with.
Summary
● Asymmetric Encryption: Uses public and private keys for encryption and decryption.
● Key Exchange: Utilizes asymmetric encryption to share symmetric keys securely.
● Rayburn Box: Metaphor for understanding the usage of public and private keys.
26
● Digital Certificates: Crucial for sharing public keys and validating identities.
● Real-World Applications: HTTPS (TLS) for secure web communication and digital
signatures for email authentication
Ephemeral Keys
Concept Description
Ephemeral Key A short-lived key used for a single session and then discarded.
Static Key A semi-permanent key used over a long period, often embedded in
certificates.
Perfect Forward A property ensuring that session keys are not reused and that a
Secrecy compromise of one key does not affect past keys.
ECC Uses mathematical equations to create smaller keys that provide strong security
with less processing power.
ECDSA A variant of the Digital Signature Algorithm using ECC, providing equivalent
security with smaller keys.
Use Often used in low-power devices and wireless devices due to its efficiency.
Case
Example A 256-bit ECC key provides the same security as a 3072-bit RSA key.
Key Length
27
Concept Description
Key Sizes RSA supports 1024, 2048, and 4096 bits. Current recommendation is 2048
bits minimum.
Obfuscation Techniques
Technique Description
Steganograph Hides data within other data, such as images, audio, or video files.
y
Masking Partially or fully conceals sensitive data with characters, symbols, or other
data.
Steganography
Type Description Example
Video Embeds data within video files, often Modifying bits in video
Steganography modifying the image portion to avoid audio frames.
noise.
Tokenization
Concept Description
28
Storage Actual sensitive data stored in a secure token vault.
Masking
Concept Description
Remember This!
Protecting Email
Digital Signatures
29
5. Recipient hashes the received message.
6. Recipient compares the decrypted hash with the hash of the received message.
Email Encryption
30
4. Sender sends both the encrypted email and the encrypted symmetric key to the
recipient.
5. Recipient decrypts the symmetric key with their private key.
6. Recipient decrypts the email with the decrypted symmetric key.
S/MIME
Function Description
Summary Table
Protocol Symmetric Key Asymmetric Key Usage Examples/Ports
Usage
31
Digital Not used Sender's private key Email signing
Signatures encrypts, public key
decrypts
Remember This!
● Digital Signature: Sender’s private key encrypts the hash; the recipient’s public key
decrypts it.
● Email Encryption: Recipient’s public key encrypts the message; the recipient’s private
key decrypts it.
● Combination of Encryption: Asymmetric encryption is used for key exchange,
symmetric encryption is used for data.
Encrypting Email
32
Steps to Encrypt Email with Asymmetric Encryption:
1. Lisa retrieves a copy of Bart’s certificate that contains his public key.
2. Lisa encrypts the email with Bart’s public key.
3. Lisa sends the encrypted email to Bart.
4. Bart decrypts the email with his private key.
Process Explanation:
● Lisa's Action: Lisa encrypts the email using Bart's public key.
● Bart's Action: Bart decrypts the email using his private key.
Key Points:
1 Lisa retrieves Bart’s public key Bart’s public key Lisa has Bart’s public key
4 Bart decrypts the email Bart’s private key Email is decrypted by Bart
Remember This!
33
Process Explanation:
● Lisa's Action: Lisa uses a symmetric key to encrypt the email and then uses Bart’s
public key to encrypt the symmetric key.
● Bart's Action: Bart first decrypts the symmetric key with his private key, then uses the
decrypted symmetric key to decrypt the email.
Key Points:
2 Lisa encrypts the email with Symmetric key (53) Email is encrypted with
symmetric key symmetric key
3 Lisa retrieves Bart’s public key Bart’s public key Lisa has Bart’s public key
4 Lisa encrypts the symmetric key Bart’s public key Symmetric key is encrypted
5 Lisa sends encrypted email and - Encrypted email and key are
key to Bart sent to Bart
6 Bart decrypts the symmetric key Bart’s private key Symmetric key is decrypted
by Bart
7 Bart decrypts the email with Symmetric key (53) Email is decrypted by Bart
symmetric key
Remember This!
34
4. Lisa encrypts the symmetric key (53) with Bart’s public key.
5. Lisa sends the encrypted email and the encrypted symmetric key to Bart.
Only Asymmetric Recipient’s public key Recipient’s private key Simple but slow,
Encryption used for smaller
data
Combined Symmetric key for Symmetric key for Efficient for larger
Asymmetric and email, recipient’s email, recipient’s data, uses both
Symmetric public key for private key for encryption methods
Encryption symmetric key symmetric key
35
S/MIME (Secure/Multipurpose Internet Mail Extensions)
Overview: S/MIME is a widely used standard for securing email communications through
encryption and digital signatures. It supports both asymmetric and symmetric encryption to
provide robust security for email messages.
Key Features:
Encryption Methods:
Encryption Scenarios:
● Port 995: Used for Post Office Protocol 3 (POP3) over Transport Layer Security (TLS) -
POP3-over-TLS.
36
● Port 587: Used for Simple Mail Transfer Protocol (SMTP) over Transport Layer Security
(TLS) - SMTP-over-TLS.
● Port 993: Used for Internet Message Access Protocol (IMAP) over Transport Layer
Security (TLS) - IMAP-over-TLS.
Digital Signatures
Summary of S/MIME
Feature Description
37
Digital Uses the sender’s private key to encrypt the hash of the message for
Signatures authentication, integrity, and non-repudiation.
Email Uses the recipient’s public key to encrypt the symmetric key and the
Encryption symmetric key to encrypt the email content for confidentiality.
Standards Uses CMS, supports various hashing and encryption algorithms, and
requires PKI for certificate management.
Remember This!
● S/MIME is essential for securing email communications through encryption and digital
signatures.
● Digital Signatures provide authentication, integrity, and non-repudiation using the
sender’s private key.
● Encryption ensures the confidentiality of emails, using the recipient’s public key to
encrypt the symmetric key, which then encrypts the email content.
● Ports: Ensure secure email transmission using POP3-over-TLS (Port 995),
SMTP-over-TLS (Port 587), and IMAP-over-TLS (Port 993).
Transport encryption methods encrypt data in transit to ensure transmitted data remains
confidential. This includes data transmitted over the Internet and on internal networks. HTTPS
commonly uses TLS to encrypt the traffic, ensuring confidentiality of data transmitted over the
Internet.
● Transport Layer Security (TLS) and Secure Sockets Layer (SSL) are encryption
protocols used to encrypt data sent over the Internet.
● SSL has significant vulnerabilities and should not be used anymore.
● Many people refer to TLS as SSL/TLS.
● TLS provides certificate-based authentication and uses both symmetric and asymmetric
encryption during a session.
● TLS requires certificates issued by Certificate Authorities (CAs), which can be internal or
external third-party CAs.
38
Remember This: TLS is the replacement for SSL. TLS encrypts HTTPS traffic and can also
encrypt other types of traffic. It requires certificates issued by CAs.
HTTPS uses TLS to encrypt web traffic, combining both asymmetric and symmetric encryption.
1. Client Request: The client requests an HTTPS session by entering an HTTPS URL or
clicking on an HTTPS link.
2. Server Certificate: The server sends its certificate, which includes the server’s public
key.
3. Client Creates Symmetric Key: The client creates a symmetric key and encrypts it with
the server’s public key.
4. Client Sends Encrypted Symmetric Key: The client sends the encrypted symmetric
key to the server.
5. Server Decrypts Symmetric Key: The server decrypts the symmetric key with its
private key.
6. Session Data Encryption: All session data is encrypted with the symmetric session key.
Remember This:
2 Server responds by sending its certificate, which includes the server’s public key.
3 Client creates a symmetric key and encrypts it with the server’s public key.
39
6 All session data is encrypted with the symmetric session key using symmetric
encryption.
Protecting Email
Cryptography provides two primary security methods for email: digital signatures and
encryption.
Remember This: A digital signature is an encrypted hash of a message. The sender’s private
key encrypts the hash to create the digital signature. The recipient decrypts the digital signature
with the sender’s public key.
Encrypting Email
40
○ Recipient’s Public Key Encrypts: The sender encrypts the email with the
recipient’s public key.
○ Recipient’s Private Key Decrypts: The recipient decrypts the email with their
private key.
Remember This: The recipient’s public key encrypts the email, and the recipient’s private key
decrypts it.
Symmetric Fast, used for encrypting session data after key exchange via
Encryption asymmetric encryption.
Asymmetric Secure key exchange; inefficient for large data, used for encrypting
Encryption symmetric keys.
S/MIME Standard for secure email; uses both asymmetric and symmetric
encryption, requires PKI.
41
Downgrade Attacks on Weak Implementations
A downgrade attack is a type of attack that forces a system to downgrade its security to a less
secure state. The attacker then exploits the lesser security control. This is particularly relevant in
the context of cryptographic protocols due to weak implementations of cipher suites.
● Scenario: A server supports both TLS (a secure protocol) and SSL (an outdated and
insecure protocol).
● Downgrade: If a client cannot use TLS, the server downgrades to SSL to accommodate
the client.
● Exploitation: Attackers configure their systems to be incapable of using TLS, forcing the
server to use SSL.
● Attack: Once downgraded to SSL, attackers can exploit vulnerabilities such as the
Padding Oracle On Downgraded Legacy Encryption (POODLE) attack.
42
1. Disable SSL: Ensure that SSL is disabled on the server to prevent it from downgrading
to SSL.
2. Disable Weak Cipher Suites: Disable any cipher suites with known vulnerabilities to
reduce the risk of exploitation.
3. Regular Updates: Keep systems and protocols updated to avoid vulnerabilities
associated with outdated protocols and cipher suites.
Remember This!
Administrators should disable weak cipher suites and weak protocols on servers. When a server
supports both strong and weak cipher suites, attackers can bypass the strong cipher suites by
forcing a downgrade and exploiting the weak ones.
Exploitation Attackers configure their systems to force the server to use SSL.
Attack Attackers exploit vulnerabilities in SSL, such as POODLE, often via on-path
attacks.
Prevention Disable SSL and weak cipher suites; keep systems and protocols updated.
1. Identify and Disable Weak Protocols: Regularly audit and disable SSL and other
deprecated protocols.
2. Update Server Configurations: Ensure the server is configured to use only strong,
secure cipher suites.
3. Monitor and Maintain: Continuously monitor and maintain the security configurations of
the server to respond to new vulnerabilities.
43
Action Description
Regular Updates Ensures the system uses the latest, most secure protocols.
Blockchain
Components of a Block
1. Transaction Information:
○ Includes details such as the date, time, and amount of transactions.
2. Parties Involved:
○ Uses digital signatures instead of actual names to record the parties involved in
the transaction.
3. Unique Hash:
○ Each block has a unique identifier called a hash, which distinguishes it from other
blocks.
1. Transaction Occurrence:
○ A transaction happens.
2. Verification:
○ The transaction is verified by a network of computers.
3. Recording:
○ The transaction is accurately recorded in a block.
4. Hash Assignment:
○ The block is assigned a unique hash and includes the hash of the previous block,
creating a chain.
Structure of Blockchain
● Chain Formation:
○ Every block contains a unique hash and the hash of the preceding block, linking
them together and forming a chain.
44
Example: Bitcoin
Bitcoin is a cryptocurrency that utilizes blockchain technology. The verification and recording of
transactions are conducted by a network of computers known as miners. Here’s a detailed look
at the mining process:
1. Miners:
○ Network of computers that verify and record transactions.
2. Rewards:
○ Miners earn money (bitcoins) through transaction fees and rewards for adding
blocks.
○ The initial block reward was 50 bitcoins per block.
○ This reward halves approximately every four years after 210,000 blocks are
mined.
○ In May 2020, the reward dropped to 6.25 bitcoins per block.
○ Eventually, block rewards will cease, and miners will earn solely through
transaction fees.
Summary Table
Component Description
Chain Each block includes the hash of the previous block, forming a chain.
Formation
Mining Initial 50 bitcoins per block, halving every 210,000 blocks; currently 6.25
Rewards bitcoins per block.
45
Step Description
Hash Assignment Block is assigned a unique hash and includes the previous block's
hash.
Rewards Bitcoins earned by miners; started at 50 bitcoins per block, halving every
210,000 blocks, currently 6.25 bitcoins per block.
When evaluating different cryptographic algorithms, it's crucial to understand their possible
limitations to choose the best algorithm for specific requirements. Here are some common
limitations to consider:
Organizations often need to balance resource availability with security constraints. Encryption,
for example, consumes additional resources. Encrypting all data increases storage
requirements and processing power for encrypting and decrypting data. Executives must
balance the costs and benefits to find an optimal solution.
Constraint Description
46
Speed and Time
The speed of an algorithm is important in determining how quickly it can encrypt and decrypt
data. While fast algorithms are desirable for data encryption, slower algorithms can be beneficial
for operations like hashing passwords to deter brute force attacks.
Aspect Description
Encryption Fast algorithms are preferable for encrypting and decrypting large
Speed amounts of data.
Hashing Speed Slower algorithms are desirable for hashing passwords to increase
resistance to brute force attacks.
Size relates to the memory space needed to execute an algorithm and the size of the encrypted
output compared to the input. Lightweight cryptographic methods are essential for devices with
limited resources.
Aspect Description
Output Size Encrypted data is typically larger than unencrypted data, requiring more
storage space.
Entropy
Entropy refers to the randomness in cryptographic algorithms. Higher entropy leads to stronger
security. Lack of entropy can make algorithms more vulnerable to attacks.
Aspect Description
Predictability
Predictability concerns the ability to foresee outcomes based on repeated events, particularly
with random number generators. True random number generators offer better security
compared to pseudo-random number generators.
47
Aspect Description
True Random Uses environmental factors to ensure high entropy and unpredictability.
Weak Keys
Weak keys are short or small keys that make it easier for attackers to decrypt data. Stronger,
longer keys provide better security.
Aspect Description
Weak Keys Short keys are more susceptible to attacks and should be
avoided.
Longevity
Aspect Description
Long-lastin Algorithms that support larger keys can remain secure for longer periods.
g
Short-lasti Algorithms with fixed small key sizes (like DES) have a shorter lifespan due
ng to evolving threats.
Reuse
Reusing symmetric keys, especially with stream ciphers, can lead to vulnerabilities. Keys should
not be reused to maintain security.
Aspect Description
Non-reus Ensures each session or data stream uses a unique key, enhancing
e security.
48
Plaintext Attack
Plaintext attacks occur when attackers have access to some plaintext and its corresponding
ciphertext, allowing them to discover the encryption method. Known plaintext and chosen
plaintext attacks are particularly effective against weak encryption algorithms.
Aspect Description
Ciphertext-onl Attacker tries to deduce plaintext from ciphertext alone, generally only
y successful on weak algorithms.
Summary Tables
Resource Constraints
Constraint Impact
49
Entropy and Predictability
Key Management
Strong Keys Use large keys (e.g., 2048-bit RSA) for security.
Algorithm Longevity
Key Reuse
Plaintext Attacks
Known Plaintext Attacker has plaintext and ciphertext, can discover methods.
50
Summary of PKI Components
Component Description Example
Digital Used to verify identities and HTTPS sessions protect credit card
Certificates secure communications over the transactions on websites like
Internet. Amazon.com using certificates issued
by trusted CAs.
Asymmetric Depends on digital certificates TLS encrypts data transmitted over the
Encryption for secure communications and Internet, such as secure browsing on
transactions. e-commerce sites.
Trust in Public Public CAs must be trusted for their Comodo and DigiCert are trusted
CAs certificates to be trusted. Trust is entities, similar to how businesses
based on a root of trust. trust a DMV-issued driver's license.
Root of Trust The CA is a trusted entity that Department of Motor Vehicles (DMV)
provides a solid foundation for for driver's licenses.
secure systems and processes.
Certificate Computers trust CAs based on the A computer trusts a CA's root
Trust Path certificate trust path, similar to how certificate placed in its trusted root
businesses trust DMV-issued IDs. certificate store.
51
Remember This!
● Certificate Authorities (CAs) are essential for issuing, managing, validating, and
revoking digital certificates.
● Public CAs like Comodo and DigiCert are trusted entities that sell certificates. Trust in
these CAs is based on a root of trust.
● Root of Trust: Similar to how a DMV-issued driver's license is trusted, a CA's root
certificate must be trusted for the certificates it issues to be trusted.
● Certificate Trust Path: Computers trust certificates based on the CA's root certificate
stored in the operating system's trusted root certificate store.
● Hierarchical Trust Model: Common trust model where a root CA issues certificates to
intermediate CAs, which then issue certificates to end-entities.
This is similar to how a driver’s license is trusted. The Department of Motor Vehicles
(DMV) issues driver’s licenses after validating a person’s identity. If you want to cash a
check, you might present your driver’s license to prove your identity. Businesses trust
the DMV, so they trust the driver’s license. On the other hand, if you purchased an ID
from Gibson’s Instant IDs, businesses might not trust it. Although we might trust the
DMV, why would a computer trust a CA? The answer is based on the certificate trust
path.
Trust in Public Public CAs must be trusted for their Comodo and DigiCert are trusted
CAs certificates to be trusted. Trust is entities, similar to how businesses
based on a root of trust. trust a DMV-issued driver's license.
Root of Trust The CA is a trusted entity that Department of Motor Vehicles (DMV)
provides a solid foundation for for driver's licenses.
secure systems and processes.
Certificate Computers trust CAs based on the A computer trusts a CA's root
Trust Path certificate trust path, similar to how certificate placed in its trusted root
businesses trust DMV-issued IDs. certificate store.
52
Root The first certificate created by the COMODO RSA Certification Authority
Certificate CA that identifies it. Stored in the certificate in Windows Trusted Root
trusted root certificate store. Certification Authorities store.
Hierarchical The most common trust model. The A root CA issues certificates to
Trust Model root CA issues certificates to intermediate CAs; intermediate CAs
intermediate CAs, which issue leaf issue certificates for code signing,
certificates to end-entities. digital signatures, HTTPS, S/MIME.
Self-Signed A root CA that signs its own Public CA, private CA, or government
Root CA certificate. agency root CA.
Remember This!
● Certificate Authorities (CAs): Essential for issuing, managing, validating, and revoking
digital certificates.
● Public CAs: Examples include Comodo and DigiCert. Trust in these CAs is based on a
root of trust.
● Root of Trust: The foundation for trusted certificates, similar to a DMV-issued driver's
license.
● Certificate Trust Path: Computers trust certificates based on the CA's root certificate
stored in the operating system's trusted root certificate store.
● Hierarchical Trust Model: The most common model, where a root CA issues
certificates to intermediate CAs, which then issue certificates to end-entities for various
purposes, such as code signing, digital signatures, HTTPS, and S/MIME.
53
Certificate Chaining Summary
Concept Details Examples
Certificate Combines all certificates from the root Wildcard certificate issued to
Chaining CA down to the certificate issued to google.com, includes root,
end-entities. intermediate, and leaf
certificates.
Security Keeping the root certificate online In a small organization, the root
Considerations poses cybersecurity risks; it’s better to CA might issue certificates
issue certificates through intermediate directly to devices and end
CAs. users.
54
● Intermediate CA Certificate: Issued by the root CA, trusted because it’s linked to the
root.
● Leaf Certificate: Issued by an intermediate CA, used by end-entities like websites.
1. Certificate Chaining: Ensures a trusted path from the root CA to the end-entity
certificate.
2. Root CA: The top-level CA that issues certificates to intermediate CAs.
3. Intermediate CAs: Link between the root CA and leaf certificates, enhancing security by
distributing trust.
4. Leaf Certificates: The final certificates used by end-entities, verified through the chain
to the root CA.
5. Security: Keeping the root CA offline reduces the risk of cybersecurity attacks; use
intermediate CAs for issuing certificates.
55
ummary of Registration Authority and Certificate Signing Requests (CSRs)
Concept Details Example
Public and Private Generated using tools like Using OpenSSL to create key pairs
Key Pair OpenSSL; the private key for a digital certificate request.
remains with the requester and
the public key is included in the
CSR.
Certificate The CA validates the identity of CA may use credit card verification or
Validation the requester and creates a extensive checking to validate the
digital certificate with the public requester’s identity.
key.
56
○ The CA validates the identity of the requester.
○ Example: CA uses credit card information to verify the requester.
5. Receive Digital Certificate:
○ The CA issues a digital certificate embedding the public key.
○ Example: Digital certificate for GetCertifiedGetAhead.com received from the CA.
6. Register Certificate:
○ Register the digital certificate with the website and the private key.
○ Example: Configure the server to use the digital certificate for HTTPS sessions.
1. Role of RA: Assists in the registration process but does not issue certificates.
2. CSR: Used to request digital certificates; includes the public key but not the private key.
3. Public and Private Key Pair: Generated by the requester; private key is never sent to
the CA.
4. PKCS #10: Standard format for CSRs.
5. Certificate Validation: Performed by the CA; involves verifying the requester’s identity.
Root CA Typically kept offline to reduce risk A large organization keeps its root CA
of compromise; issues certificates offline to protect its integrity and issues
to intermediate CAs. certificates to intermediates.
1. Online CA: Accessible over the network; supports automated CSR submission.
○ Example: Using an online CA to quickly process and issue digital certificates
through an automated system.
2. Offline CA: Kept offline for security; requires manual CSR submission.
57
○ Example: A root CA in a large organization is kept offline to protect against cyber
attacks and only accepts CSRs manually.
3. Root CA: The top-level CA, usually kept offline; issues certificates to intermediate CAs
to mitigate risks.
○ Example: The root CA of a corporate PKI infrastructure is kept offline, and its
compromise affects the entire certification path.
4. Intermediate CA: Online and issues certificates to end-entities; can be replaced if
compromised to maintain security.
○ Example: Intermediate CAs manage day-to-day certificate issuance for web
servers, email encryption, etc., and are replaced if compromised.
Usage Intermediate CAs for day-to-day Root CAs for high security and
certificate issuance reduced risk
1. Updating Certificates: Certificates have a validity period and must be updated before
expiration.
58
○ Example: Let's Encrypt certificates, which are updated every 90 days using
automated processes.
2. Revoking Certificates: Certificates can be revoked before expiration due to various
security or operational reasons.
○ Example: A certificate is revoked because its private key is leaked to the public,
compromising its security.
3. Reasons for Revocation:
○ Private Key Compromise: The private key is leaked or exposed.
○ CA Compromise: The issuing CA is compromised, affecting the trustworthiness
of issued certificates.
○ Change of Affiliation: The certificate holder's organizational affiliation changes.
○ Superseded by Another Certificate: A new certificate replaces the old one.
○ Cease of Operation: The entity holding the certificate ceases operations.
○ Certificate Hold: Temporarily suspending the certificate's validity.
○ Certificate Holder’s Request: The certificate holder requests revocation for any
reason.
59
Alternative to Online Certificate Status Protocol OCSP responses include
CRLs (OCSP) provides real-time statuses like "good," "revoked,"
certificate status checking. or "unknown."
1. Certificate Revocation List (CRL): A CRL is a list issued by a CA containing the serial
numbers of revoked certificates.
○ Purpose: To inform users which certificates are no longer trustworthy due to
various reasons such as compromise.
○ Example: A certificate is revoked and listed in the CRL when its private key is
leaked.
2. Reasons for Revocation:
○ Private Key Compromise: The certificate's private key is exposed.
○ CA Compromise: The CA issuing the certificate is compromised.
○ Change of Affiliation: The entity holding the certificate changes its
organizational affiliation.
○ Superseded by Another Certificate: A newer certificate replaces the old one.
○ Cease of Operation: The entity holding the certificate stops its operations.
○ Certificate Hold: The certificate is temporarily suspended.
○ Certificate Holder’s Request: The holder requests the revocation.
3. Alternative to CRLs - OCSP:
○ Online Certificate Status Protocol (OCSP): Provides real-time status of
certificates.
○ Responses: OCSP can indicate if a certificate is "good," "revoked," or
"unknown."
○ Advantage: More efficient than downloading a full CRL, especially for frequent
status checks.
CRL A list of revoked certificates, updated A CRL contains serial numbers of all
periodically and distributed by the certificates revoked due to key
CA. compromise.
Real-time OCSP allows real-time certificate When accessing a secure website, the
Checking status checking, improving efficiency. browser uses OCSP to verify the
server's certificate.
60
Summary Table: Validating a Certificate
Validation Details Example
Check
Expired Ensure the certificate's "Valid From" and A user receives an error
Certificate "Valid To" dates are current. If the certificate message when visiting a
is expired, an error is shown indicating the website with an expired SSL
certificate is not valid. certificate.
61
Certificate Validate the certificate through the CA to A system checks the CRL or
Revoked ensure it hasn’t been revoked. uses OCSP to see if a
certificate has been revoked.
CRL Clients request a copy of the Certificate A browser requests and checks
Revocation List (CRL) from the CA. The CRL the CRL to see if a certificate is
contains serial numbers of revoked listed as revoked.
certificates. Clients check the serial number
of the certificate against the CRL.
OCSP The client queries the CA with the A client sends a query to the CA
certificate's serial number. The CA responds and receives a real-time status
with "good," "revoked," or "unknown." indicating the certificate is valid
Provides real-time status of certificates. (good), revoked, or unknown.
1. Validation Checks:
○ Expired Certificate: Verify the validity period of the certificate.
○ Certificate Not Trusted: Ensure the certificate is issued by a trusted CA.
○ Certificate Revoked: Check for revocation status using CRL or OCSP.
2. Certificate Revocation List (CRL):
○ Purpose: Provides a list of revoked certificates.
○ Usage: Clients download and check the CRL to verify if a certificate is revoked.
3. Online Certificate Status Protocol (OCSP):
○ Purpose: Provides real-time status of certificates.
○ Responses: "Good," "revoked," or "unknown."
○ Advantage: Low latency and immediate awareness of certificate status.
4. OCSP Stapling:
○ Purpose: Reduces real-time traffic to the CA by appending a timestamped
OCSP response during the TLS handshake.
○ Advantage: Efficient certificate validation without frequent client queries to the
CA.
62
Certificate Validation Process
Ste Description
p
1. Client Initiates Session: The client starts a session requiring a certificate (e.g.,
HTTPS).
2. Server Responds: The server sends its certificate, which includes the public key.
3. Client Queries CA: The client queries the CA for a copy of the CRL or sends an
OCSP request.
5. Client Checks Status: The client checks the certificate's serial number against the
CRL or processes the OCSP response for status.
Certificate Pinning
63
Purpose: The primary purpose of certificate pinning is to protect against man-in-the-middle
(MITM) attacks and ensure that clients are connecting to the intended website and not an
impostor.
How It Works:
1. Extra Header:
○ When a server is configured with certificate pinning, it responds to client HTTPS
requests with an extra header. This header includes a list of hashes derived from
valid public keys used by the website.
○ The header also includes a max-age field specifying how long the client should
store and use the pinned data.
2. Hash Comparison:
○ When clients connect to the same website again, they recalculate the hashes of
the certificates and compare these hashes with the stored hashes.
○ If the hashes match, it verifies that the client is connected to the same legitimate
website.
3. Backup Keys:
○ Website administrators create hashes of one or more certificates used by the
website, including the public key used by the website’s certificate.
○ It can also include any public keys from certificates in the certificate chain, such
as the root CA certificate and intermediate CA certificates.
○ It must include a backup key to be used if the current key becomes invalid.
● Banking Websites:
○ A banking website can implement certificate pinning to ensure that clients only
accept the bank's legitimate certificates. This prevents attackers from using
fraudulent certificates to impersonate the bank and steal sensitive information.
Benefits:
1. Enhanced Security:
○ Protects against MITM attacks by ensuring that only specific certificates are
accepted.
2. Trust Assurance:
○ Increases trust that the connection to the website is legitimate and secure.
3. Attack Prevention:
○ Makes it more difficult for attackers to use fake certificates to impersonate a
website.
Considerations:
1. Implementation Complexity:
64
○Requires careful planning and implementation to ensure the correct certificates
are pinned and updated.
2. Backup Keys:
○ It is crucial to include backup keys to handle certificate changes or invalidation
without breaking the pinning.
3. Client Compatibility:
○ Not all clients may support certificate pinning, so it’s important to ensure
compatibility with target users.
Purpose Protects against MITM attacks and Ensuring only legitimate certificates
ensures clients connect to the are accepted by clients.
intended website.
Extra Header Server responds with an extra Server sends an extra header with
header including hashes of valid valid public key hashes and
public keys and a max-age field. max-age for storing pinning
information.
Hash Clients recalculate and compare Clients compare stored hashes with
Comparison hashes on subsequent connections recalculated hashes to verify the
to verify the website. connection.
Backup Keys Includes backup keys in case the Including hashes of root CA and
current key becomes invalid. intermediate CA certificates as
backup keys.
Key Escrow
65
Definition: Key escrow is a security measure that involves storing a copy of a cryptographic
key, especially a private key, in a secure, trusted environment. This is done to ensure that
encrypted data can be recovered if the original key is lost, stolen, or otherwise unavailable.
Purpose: The primary purpose of key escrow is to provide a mechanism for data recovery. It
ensures that organizations can access encrypted data even if the encryption keys are lost or
unavailable due to unforeseen circumstances.
Key Components:
1. Storage:
○ The escrowed key is stored in a highly secure environment to prevent
unauthorized access. This can be done using hardware security modules (HSMs)
or trusted third-party services.
2. Management:
○ Designated personnel or systems manage the key escrow process. These
individuals are responsible for maintaining the security and integrity of the
escrowed keys.
3. Access Control:
○ Strict access control measures are in place to ensure that only authorized
individuals can retrieve the escrowed keys.
Implementation Scenarios:
Key Recovery Agent (KRA): A key recovery agent is an individual or system authorized to
recover or restore escrowed keys. The KRA ensures that the recovery process is secure and
complies with organizational policies.
● Microsoft BitLocker:
○ When using BitLocker to encrypt an entire drive, organizations can designate a
data recovery agent (DRA). BitLocker uses two keys: one for the user and one
for the DRA. If the user's key is lost, the DRA key can be used to decrypt and
access the drive.
Benefits:
1. Data Recovery:
66
○ Ensures that encrypted data can be recovered if the original keys are lost or
become inaccessible.
2. Business Continuity:
○ Supports business continuity by preventing data loss in critical situations.
3. Regulatory Compliance:
○ Helps organizations comply with regulatory requirements that mandate data
recovery capabilities.
Considerations:
1. Security:
○ The security of the escrowed keys is paramount. They must be stored in a secure
environment with strict access controls.
2. Trust:
○ The entity responsible for key escrow must be trustworthy, whether it's an internal
team or a third-party service.
3. Policy and Procedures:
○ Clear policies and procedures must be established for key escrow and recovery
processes to ensure they are followed correctly.
67
Benefits Ensures data recovery, supports Recovering access to
business continuity, and aids in encrypted data after the
regulatory compliance. original key is lost.
Key management within a PKI (Public Key Infrastructure) involves several critical steps to
ensure the security and integrity of cryptographic keys. This process includes generating,
distributing, storing, rotating, revoking, and retiring keys. Proper key management is essential
for maintaining the authenticity, confidentiality, and integrity of encrypted data and
communications.
68
Key Rotation Regularly generating new Automating key rotation
keys, replacing old ones, every 90 days to
and updating systems to maintain security and
use the new keys to reduce prevent long-term key
the risk of unauthorized exposure.
access or key compromise.
A Key Management System (KMS) is a centralized service responsible for the secure
management of cryptographic keys used in various security applications. The primary goal of a
KMS is to provide a secure framework for managing the lifecycle of cryptographic keys.
69
Key Distribution Securely distributes public keys in Using a KMS to distribute
certificates and manages the public keys through
transmission of symmetric keys CA-signed certificates for
between parties. secure email communication.
1. Key Generation:
○ Ensure keys are generated using strong, industry-standard algorithms and high
entropy sources.
○ Example: Generating RSA or AES keys using a KMS.
2. Key Storage:
○ Securely store keys in HSMs or tamper-resistant devices to prevent unauthorized
access.
○ Example: Storing private keys in an HSM.
3. Key Distribution:
○ Distribute public keys in certificates signed by a trusted CA, keeping private keys
confidential.
○ Example: Distributing public keys through CA certificates for secure
communication.
4. Key Rotation:
○ Regularly rotate keys to reduce the risk of compromise and ensure security over
time.
○ Example: Automating key rotation every 90 days.
5. Key Revocation and Retirement:
○ Revoke and securely destroy keys that are no longer needed or have been
compromised.
○ Example: Updating the CRL to inform clients of revoked certificates.
6. KMS Functions:
○ Centralized key management, strong key generation, secure key storage,
automated key rotation, and secure key distribution.
○ Example: Using a KMS to manage keys for multiple applications within an
organization.
70
Machine/Computer Issued to devices or A certificate issued to a server to
computers for identification authenticate within an Active
within a domain. Directory domain.
Subject Alternative Used for multiple domains A SAN certificate for *.google.com,
Name (SAN) with different names but *.android.com, *.cloud.google.com.
owned by the same
organization.
Domain Validation Indicates the requestor has A certificate issued after the CA
(DV) control over a DNS domain, verifies control of example.com by
providing basic trust. contacting the domain owner.
71
1. Machine/Computer Certificates:
○ Used to identify devices within a domain.
○ Example: Certificates issued to servers for authentication within Active Directory.
2. User Certificates:
○ Used for user authentication, encryption, and smart cards.
○ Example: User certificates enabling data encryption via Microsoft EFS.
3. Email Certificates:
○ Used for email encryption and digital signatures to ensure secure
communication.
○ Example: Encrypting and digitally signing emails for authenticity and integrity.
4. Code Signing Certificates:
○ Used by developers to sign executables and scripts to validate authenticity.
○ Example: Signing PowerShell scripts to ensure they haven't been altered.
5. Self-signed Certificates:
○ Created and used internally, not issued by a trusted CA.
○ Example: An organization's private CA generating certificates for internal use.
6. Root Certificates:
○ The top-level certificate in a CA hierarchy, establishing trust.
○ Example: The root certificate of a trusted CA like DigiCert.
7. Wildcard Certificates:
○ Used for multiple subdomains of a single root domain.
○ Example: *.example.com for mail.example.com, ftp.example.com, etc.
8. SAN Certificates:
○ Used for multiple domains owned by the same organization.
○ Example: A SAN certificate for google.com, google.net, and google.org.
9. Domain Validation Certificates:
○ Indicates control over a specific DNS domain with basic verification.
○ Example: A DV certificate verifying control of example.com.
10. Extended Validation Certificates:
○ Provides higher trust with more rigorous validation processes.
○ Example: An EV certificate for a financial institution showing the company name
in the browser.
CER ASCII .cer, .crt Public key, General use, A .cer file used to
Certificate public key distribute a public
sharing key.
72
DER Binary .der, .cer Public key, General use, A .der file containing
Certificate public key a public key for
sharing installation on a
server.
PEM ASCII .pem, .crt, Public key, Versatile, used A .pem file holding
.cer, .key Private key, for public/private both public and
Certificate, keys, CSRs, private keys for
CSR, CRL CRLs server configuration.
P7B Base64 .p7b, .p7c Public key, Sharing public A .p7b file used by a
ASCII Certificate keys, Certificate web server to share
chain, CRL chains its public key and
certificate chain.
P12 Binary .p12 Private key, Holding private A .p12 file installed
Certificate keys, full on a server for
chain certificate chains, HTTPS, containing
often encrypted private key and full
certificate chain.
PFX Binary .pfx Private key, Similar to P12, A .pfx file used to
Certificate used on Windows export a certificate
chain systems for and private key from
import/export one server to
another.
73
○
Example: A .pem file holding both public and private keys for server
configuration.
4. P7B (PKCS #7):
○ Base64 ASCII encoding.
○ Extensions: .p7b, .p7c.
○ Contains public key, certificate chain, or CRL.
○ Example: A .p7b file used by a web server to share its public key and certificate
chain.
5. P12 (PKCS #12):
○ Binary format.
○ Extension: .p12.
○ Contains private key and certificate chain, often encrypted.
○ Example: A .p12 file installed on a server for HTTPS, containing private key and
full certificate chain.
6. PFX (Personal Information Exchange):
○ Binary format.
○ Extension: .pfx.
○ Contains private key and certificate chain.
○ Example: A .pfx file used to export a certificate and private key from one server to
another.
Integrity Assures data has not been modified. Hashing a file to verify it hasn’t
Hashing ensures integrity. changed.
74
Confidentiality Ensures data is only viewable by Encrypting a message so only
authorized users. the recipient can read it.
Symmetric Uses the same key to encrypt and AES encryption of a file.
Encryption decrypt data.
Asymmetric Uses a pair of keys (public and RSA encryption for secure
Encryption private) to encrypt and decrypt. email.
Hash Collision Occurs when different inputs produce Two different passwords
the same hash. generating the same MD5 hash.
75
Offline Attempts to discover passwords from Cracking password hashes from a
Password a captured database. leaked database.
Attack
Brute Force Attempts all possible character Trying every possible password
Attack combinations. combination.
Dictionary Uses all words and character Using a list of common passwords
Attack combinations stored in a file. to gain access.
Pass the Hash Uses the hash of a password to log Using a captured NTLM hash to
Attack on as a user. authenticate.
Birthday Attack Attempts to create a password that Finding two different messages
produces the same hash. with the same MD5 hash.
Key Stretching Techniques like bcrypt, PBKDF2, and Using bcrypt to hash passwords
Argon2 protect against attacks. for storage.
Symmetric Encryption Uses the same key to encrypt Encrypting files with AES.
and decrypt data.
Stream Ciphers Encrypt data bit by bit or byte by RC4 encryption for streaming
byte. data.
Asymmetric Encryption Uses public and private keys as RSA encryption for secure
matched pairs. communications.
Ephemeral Keys Last only a short time, providing Diffie-Hellman key exchange
perfect forward secrecy. in HTTPS.
76
Elliptic Curve Efficient encryption technology Encrypting data on mobile
Cryptography (ECC) for low power devices. devices using ECC.
Email Digital Sender’s private key Provides authentication, Signing an email with
Signatures encrypts (signs), public non-repudiation, integrity a digital signature.
key decrypts
Email Recipient’s public key Uses symmetric key for Encrypting an email
Encryption encrypts, private key content encryption with the recipient’s
decrypts public key.
Website Public key encrypts Symmetric key encrypts Securing web traffic
Traffic (TLS) symmetric key, private session data with HTTPS.
key decrypts
Certificate Trust Hierarchical trust with root and Using a trusted root CA in
Models intermediate CAs. a browser.
77
Certificate Formats Formats like CER (ASCII) and DER Using PEM format for SSL
(binary), PEM, P7B, P12, PFX. certificates.
Certificate Formats
Certificate Description Examples/Usage
Format
78
DER Binary format PEM-based certificates
PEM Most commonly used certificate Can be used for various certificate
format types
79