Chapter 10 - Understanding Cryptography and PKI Flashcards

1
Q

Integrity

A

Provides assurances that data hasn’t been modified.

Hashing helps ensure integrity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hash

A

A hash is a number derived from performing a calculation on data, such as a message, patch or file, that helps ensure data integrity.

-Hashing creates a fixed-length string of bits or hexadecimal characters which cannot be reversed or re-create the original idea

-Common hashing algorithm is SHA-3 (Secure Hash Algorithm)

No matter how many times you execute the hashing algorithm against the data, the hash will always be the same if the data is the same.
–> You can download a patch, download the developer’s hash of the patch, then hash the downloaded patch yourself to confirm they match

Hashing algorithms do not encrypt data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Confidentiality

A

Ensures data is only viewable by authorized users.

Encryption protects the confidentiality of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Encryption

A

Encryption scrambles data to make it unreadable if intercepted.

Encryption normally includes an algorithm and a key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Symmetric encryption

A

Uses the same key to encrypt and decrypt data.

Most symmetric algorithms use either a block cipher or stream cipher.

STREAM CIPHER: encrypt data 1 bit at a time

BLOCK CIPHER: encrypt data in blocks, such as 64 or 128 bit blocks.

Stream ciphers are more efficient than block ciphers when encrypting data in a continuous stream.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Asymmetric encryption

A

Uses two keys (public and private) created as a matched pair.

-Asymmetric encryption require a PKI (public key infrastructure) to issue certificates
-Anything encrypted with the public key can only being decrypted with the matching private key
-Anything encrypted with the private key can only be decrypted with the matching public key

While strong, asymmetric encryption is very resource intensive, taking significant processing power to encrypt and decrypt data, especially when compared with symmetric encryption. Most cryptographic protocols that use asymmetric encryption only use it for key exchange.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Steganography

A

provides a level of confidentiality by hiding data within other files, such as embedding data within the white space of a picture file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Digital signature

A

Provides authentication, non-repudiation, and integrity.

Authentication: validates an identity

Non-repudiation: prevents a party from denying an action

-Users sign emails with a digital signature, which is a has of an email message encrypted with the sender’s private key

-Only the sender’s public key can decrypt the hash, providing verification it was encrypted with the sender’s private ket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Checksum

A

Hashes and checksums are similar, but a checksum is typically a small piece of data, sometimes just 1 or 2 bits, and is used to quickly verify the integrity of data.

Used in credit cards, which checks the checksum twice, one without the last bit, one with the last bit.

Not cryptographically secure, designed to just give a quick indication when data integrity is lost.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

MD5

A

Message Digest 5, a common hashing algorithm that produces a 128 bit hash, displayed as 32 hexadecimal characters instead of 128 bits.

Hexadecimal numbers are composed of 4 bits and use the numbers 0-9 and letters A-F (16 total options).

MD5 has since been deemed vulnerable, not recommended for cryptographic hashes, but still is used as a quick checksum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SHA

A

Secure Hashing Algorithm, a group of hashing algorithms with variations in grouped four familiars: SHA-0, SHA-1, SHA-2, SHA-3

-SHA-0 is not used
-SHA-1 is an updated version that creates 160 bit hashes, is similar to MD5 and considered weak
-SHA-2 improved SHA-1 and contains 256-bit and 512 bit options plus truncated 224 and 384 bit options
-SHA-3 (pka Keccak) is an alternative to SHA-2, was created outside of the NSA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

HMAC

A

Hash-Based Authentication Message, is another method used to provide integrity.

Is a fixed-length string of bits similar to other hashing algorithms such as MD5 and SHA-256). However HMAC also uses a shared secret key to add some randomness to the results and only the sender and receiver know the secret key.

Verifies both the integrity and authenticity of a message with the use of a shared secret. Prevents an attacker from modifying the message in transit.

Passwords are often stored as hashes, and applications often salt passwords with extra characters before hashing them.

You can calculate a hash using sha256sum.exe and then use it as a command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Collision

A

A hash collision occurs when the hashing algorithm creates the same hash from different inputs, which is not desirable.

An attacker then doesn’t need to guess the correct password, only a password that creates the same hash. MD5 is highly susceptible to collision attacks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Online vs offline

A

Online PW attack attempts to discover a password from an online system, such as a brute force attack where they repeatedly guess the username and password. ncrack is a free tool that can be used to run online brute force attacks. An indication is found in system logs that record successful and unsuccessful logons, usually Event ID 4625 and/or several accounts being locked out as Event ID 4740.

Offline PW attacks attempt to discover passwords from a captured database or captured packet scan. If an attacker downloads an entire database from a network, they can then perform offline attacks to discover the passwords contained with these downloaded databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Dictionary attack

A

One of the original password attacks, uses a dictionary of words and attempts every word in the dictionary to see if it works - the dictionary is simply a list of words and character combinations. Thwarted by using complex passwords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Brute force attack

A

Attempts to guess all possible character combinations.

You can thwart offline brute force attacks by using complex passwords and storing the passwords in an encrypted or hashed format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Spraying attacks

A

A password spraying attack is a special type of brute force or dictionary attack designed to avoid being locked out. An automated program starts with a large list of targeted user accounts, picks a password tries it against every account in the list, then picks another password and loops through the list again, taking a while before hitting the same account twice, exceeding the limit of account lockout settings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Pass the hash attacks

A

In this attack the attacker discovers the hash of the user’s password and then uses it to log onto the system as the user.

Any authentication protocol that passes the hash over the network in an unencrypted format is susceptible to this attack.

Traditionally used against Microsoft LAN Manager and NT LAN Manager (NTLM).

*An indicator of this attack is the usage of NTML as the Authentication Package and/or logon profess of NtLmSSP shown in Event ID 4624 in the Windows Security log.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Birthday attack

A

Named after the birthday paradox in mathematical probability that says for any random group of 23 people there is a 50% chance that 2 of them have the same birthday.

In this attack an attacker attempts to create a password that produces the same hash as the user’s actual password, ie a hash collision. The attacker doesn’t need to guess every possible password before discovering a collision - if the PW is only one of 366 possibilities the attacker has a 50% chance of guessing it after only 23 attempts.

Birthday attacks on hashes are thwarted by increasing the number of bits used in the hash to increase the number of possible hashes, ie SHA-3 can use as many as 512 bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Rainbow table attacks

A

Use a huge table of pre-calculated hashes of possible passwords. If an attacker has the has of a password they can:
1. Use application to guess a password
2. The algorithm hashes the guessed password
3. The algorithm compares the original password hash with the guessed PW hash, and if they’re the same the app now knows the password
4. If they aren’t the same the app repeats steps 1-3.

Often performed offline on stolen or compromised databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Salting

A

Adds random data such as 2 additional characters/bits to a password before hashing the PW, adding complexity to the PW and the resulting hash that makes it different from the hash on the original PW. Helps prevent rainbow table and brute force attacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Key stretching

A

An advanced technique to increase the strength of stored passwords by applying a cryptographic stretching algorithm to a salted password, which consumes more time and computing resources for hackers trying to guess passwords.

Common stretching techniques: bcrpy, PBKDF2 (Password Based Key Derivation Function), and Argon2.

Bcrypt salts PWs then encrypts it with Blowfish, and can go through this process multiple times and create a 60 bit string. It will encrypt your PW with bcrypt and a salt and result in 60 characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Data at rest, Data in Transit, Data in processing

A

Data at rest refers to any data stored on media and it’s common to encrypt sensitive data such as individual fields in a database such as those holding PII or credit card information, or individual files, folders or discs.

Data in transit/in motion refers to any data sent over a network and it’s common to encrypt data in transit, like using HTTPS on e-commerce websites to scramble/protect credit card data. If intercepted the attacker can only see ciphertext.

Data in processing (in use) refers to data being used by a computer. Because the computer needs to process the data, it is not encrypted when in use. If data is encrypted, an application will decrypt it and store it in memory when in use. If the application changes the data, it will encrypt it again before saving it, usually taking extra steps to purge memory of sensitive data after processing it.

Encryption provides confidentiality and ensures only authorized users can view data. The process involves an algorithm and a key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

AES

A

Advanced Encryption Standard, is a strong symmetric block cipher that encrypts data in 128-bit blocks, can also use key sizes of 192 or 256 bits. More bits = harder to discover the key and decrypt the data. Very widely used, including to encrypt USB drives.

Benefits:
-Fast - only requires 1 pass to encrypt/decrypt data
-Efficient. Less resource intensive.
-Strong

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

3DES

A

“Triple DES), is a symmetric block cipher designed as an improvement over legacy DES (data encryption standard). It encrypts data using the DES algorithm and 3 separate passes and uses multiple keys, and 64 bit blocks.

Strong but not as efficient as AES, used as alternative, uses 56/112/168 bit key sizes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Key exchange

A

Key exchange is a cryptographic method used to share cryptographic keys between 2 entities, where asymmetric encryption uses key exchange to share a symmetric key. The cryptographic protocol then uses the symmetric encryption to encrypt and decrypt data because symmetric encryption is much more efficient.

They key is the 2 entities need to be able to identify a symmetric key that they both know and can use, however the exchange needs to be encrypted so no one else knows the symmetric key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Certificates

A

A certificate is a digital document that typically includes the public key and information on the owner of the certificate. CAs (Certificate Authorities) issue and manage certificates, which are used for a variety of purposes, including asymmetric encryption, authentication and digital signatures.

Users and applications share the certificate file to share the public key; they do not share the private key.

Certificates contain details on the owner of the certificate and on the CA that issued the certificate.

Common elements on a certificate:

-Serial number. Uniquely identifies a certificate. CA uses the serial number to validate a certificate. If certificate is revoked, it publishes this serial number in a CRL (certificate revocation list).

-Issuer. Identifies the CA that issued the cert.

-Validity Dates. There are expiration dates

  • Subject. Identifies the owner

-Public key

-Usage. Some certs are only for encryption or authentication, others support multiple uses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Ephemeral Keys vs. Static Keys

A

“Ephemeral” means something that lasts a short time, and ephemeral keys have a short lifespan and are re-created for each session.

In contrast, static keys are semipermanent and stay the same over a long period of time.

-An ephemeral key pair includes a private ephemeral key and a public ephemeral key. Systems use these key pairs for a single session then discard them, some versions of Diffie-Hellman use ephemeral keys.

-Certificates are based on static key.. A cert includes an embedded public key matched to a private key and this key pair is valid for the lifetime of a certificate, such as a year, or its expiration date. A benefit of static keys is that a CA can validate them.

29
Q

Perfect forward secrecy

A

Perfect forward secrecy is an important characteristic that ephemeral keys comply with in asymmetric encryption.

pfs indicates that a cryptographic system generates random public keys for each session and doesn’t use a deterministic algorithm to do so, meaning given the same input the algorithm will create a different public key.

30
Q

Elliptical curve cryptography

A

ECC doesn’t take as much processing power as other cryptographic methods and uses mathematical equations to formulate an elliptical curve. It then graphs points on the curve to create keys - key benefit being ECC keys can be much smaller compared with non-ECC keys.

Can be used for digital signatures. Common with low power devices like small wireless devices due to their lack of processing power.

31
Q

Quantum cryptography / Post-quantum cryptography

A

Uses quantum mechanical properties to perform cryptographic tasks.

QKC (quantum key distribution) establishes a quantum connection and shares a symmetric key.

Post-quantum cryptography (also known as quantum-proof/quantum-resistant) refers to cryptographic algorithms that are likely to be resistant to attacks using a quantum computer.

32
Q

Lightweight cryptography

A

Refers to cryptographic methods that can be deployed on smaller devices like wireless devices and IoT devices. Example is block size of 64 bits and key size of 128/192/256 bits.

33
Q

Homomorphic encryption

A

Allows data to remain encrypted while it is being processed.

Most work best when data is stored and manipulated as integers. EX: healthcare orgs want to share data such as how many patients have a given disease, their specific age groups etc, so they can keep a centralized database where data is submitted to it in an encrypted format.

34
Q

Encryption Modes of Operation

A

-Authenticated encryption: provides both confidentiality and authenticity. Authenticity allows you to verify that data came from a trusted entity and the data hasn’t lost integrity. Often used with symmetric block ciphers and MAC (message authentication code). One key used to encrypt a message, second key used to hash the ciphertext to create a MAC

-Counter (CTR) mode: a form of authenticated encrypt and CTR modes allow block ciphers to function as stream ciphers. Combined an Initialization Vector (IV) with a counter and uses the results to encrypt each plaintext block.

-Unauthenticated mode provides confidentiality but not authenticity.

*2048 bit keys should be good until 2030, then 4096 bits should be the standard.

35
Q

Knowing which keys encrypts and decrypts

A

Which key encrypts and which key decrypts depends on what you’re trying to accomplish:

*Just knowing a private key is encrypting, you know that it is being used for a digital signature.

EMAIL SIGNATURE
-Email sender’s private key encrypts (or signs)
-The sender’s public key decrypts.

EMAIL ENCRYPTION
-Recipient’s public key encrypts
-Recipient’s private key decrypts

WEBSITE ENCRYPTION
-Website’s public key encrypts
-Website’s private key decrypts
-The symmetric key encrypts data in the website session.

Email and website encryption commonly use a combination of both asymmetric and symmetric encryption - asymmetric for key exchange and then privately sharing a symmetric key. Symmetric encryption encrypts the data.

36
Q

Digital signature

A

A digital signature is an encrypted hash of a message.

The sender’s private key encrypts the hash of the message to create the digital signature. The recipient then decrypts the hash with the sender’s public key.

If successful, it provides authentication, non-repudiation, and integrity.

Authentication identifies the sender.

Integrity verifies the message has not been modified.

Non-repudiation prevents the senders from later denying they sent the email.

Note: the message in the email is not encrypted - it is not considered a secret. If it was, the sender would encrypt that too, which is a separate process.

Process:
1. Email application hashes the message
2. The application retrieves the sender’s private key and encrypts the hash using this private key.
3. The app sends both the encrypted hash (which is the digital signature) and the unencrypted message to recipient.
4. When the recipient’s system receives the message, if verifies the digital signaturing using the following steps:

i) Recipient’s system retrieves sender’s public key, which is in the sender’s public certificate. In some situations the sender could have sent the recipient a copy of her certificate with her public key. In domain environments, the recipient’s system can automatically retrieve the sender’s certificate from a network location.

ii) The email app on the recipient’s system decrypts the encrypted hash with the sender’s public key

iii) the application calculates the hash on the received message

iv) the app compares the encrypted hash with the calculated hash.

*If the hash of the received message is the same as the encrypted hash of the digital signature, it validates several important checks:
-Authentication - sender sent the message
-Non-repudiation - sender cannot deny sending the message since only she has her private key and if her public key decrypted the has, the hash must have been encrypted using her private key
-Integrity - because the hash of the sent message matches the hash of the received message has maintained integrity, it has not been modified

37
Q

Encrypting Email

A

With only asymmetric:
1. Sender receives a copy of recipient’s certificate that contains his public key.
2. Sender encrypts the email with recipient’s public key
3. Sender sends encrypted email to recipient
4. Recipient decrypts email with his private key.

Remember, recipient’s public key is used to encrypt the message, and the recipient’s private key decrypts it. The sender’s key are not involved in the process.

With asymmetric + symmetric:
1. Lisa’s system identifies a symmetric key to encrypt her email. Let’s assume it’s a simple key of 53, though a symmetric algorithm like AES would use a 128-bit key or longer.
2. Lisa encrypts the email contents with the symmetric key of 53.
3. Lisa retrieves a copy of Bart’s certificate that contains his public key.
4. Lisa uses Bart’s public key to encrypt the symmetric key of 53.
5. Lisa sends the encrypted email and the encrypted symmetric key to Bart.
6. Bart decrypts the symmetric key with his private key.
7. He then decrypts the email with the decrypted symmetric email.

Asymmetric is slow and inefficient, but symmetric is very quick. Most email clients use the combination of both to privately share a session key.

38
Q

S/MIME

A

Secure/Multipurpose Internet Mail Extensions is one of the most popular standards to digitally sign and encrypt email. Most email applications that support encryption and digital signatures us S/MIME standards.

-Uses both asymmetric and symmetric encryption.
-Can encrypt email at rest (stored on a drive), in transit (data sent over the network).
-Current version uses CMS (Cryptographic Message Syntax) which allows it to use a wife variety of different hashing and encryption algorithms.

When implementing S/MIME you typically use the following ports:
-Port 995 for POP3 over TLS
-Port 587 for SMTP over TLS
-Port 993 for IMAP over TLS

*NOTE: TLS is the replacement for SSL, and requires certificates issued by a CA. TLS encrypts HTTPS traffic, but it can also encrypt other traffic.

39
Q

Downgrade attack

A

A type of attack that forces a system to downgrade its security, and the attacker then exploits the lesser security control.

EXAMPLE: If a server has both TLS and SSL installed, if a client is not able to use TLS, the server would downgrade its security and use SSL to accommodate the client.
-Attacks exploit this vulnerability by configuring their systems so they could not use TLS, and when they communicate with the server the session is downgraded to a SSL session.
-They can then launch SSL-based attacks such as POODLE (Padding Oracle on Downgraded Legacy Encryption) attack, where they launch a MITM attack once the server downgrades to SSL.

*Admins should disable SSL and any other weak cipher suites and weak protocols on servers since attackers can launch downgrade attacks bypassing the strong cipher suite and exploiting the weak cipher suite if both are active.

40
Q

Blockchain

A

Commonly defined as a distributed, decentralized public ledger, ie a public record-keeping technology.

The word BLOCK refers to pieces of digital information (the ledger) and CHAIN refers to a public database.

Each block has 3 parts:
1. Info about a transaction such as the date, time, amount
2. Info on the parties involved, but not names, just a digital signature.
3. Unique hash that distinguishes the block from other blocks.

Every block is added to the blockchain once 4 things happen:
1. A transaction occurred.
2. The transaction has been verified by a network of computers
3. The transaction is accurately recorded in a block
4. The block is assigned a unique hash.

The block also includes the hash of the most recent block added just before it.

41
Q

Crypto Diversity

A

Cryptographic diversity refers to using different methods to protect security keys so if a vulnerability appears in one method, the diversified methods still protect the key.

Using multiple HSMs (Hardware Security Modules) to protect keys is ideal, where each one holds part of a key. If a vulnerability occurs in one of the HSMs it still wouldn’t reveal the entire key.

42
Q

Identifying limitations

A

-Resources vs security constraints
-Speed and time
-Size and computational overhead

43
Q

Entropy

A

Entropy refers to the randomness of a cryptographic algorithm - a higher level of randomness results in a higher level of security when using an algorithm.

44
Q

Predictability, longevity, reuse

A

Refers to knowing what will likely happen based on repeating the same events, associated with random number generators used to create encryption keys.

Random number generators are either pseudo-random number generators or true random number generators. Pseudo random number generator uses a deterministic algorithm where given the same algorithm it will produce the same output - so if attackers know the input to create an encryption key, it increases the likelihood they can predict the key.

True random number generators often use environmental factors like atmospheric noise or cosmic background radiation as input, which provide true entropy.

Weak key = short or small key

LONGEVITY = how long you can expect to use an algorithm, typically based on expected improvements in processing power - by doubling the key size it increases the longevity of the algorithm. However not all algorithms support larger key size, which is why AES superseded DES.

REUSE - do not reuse keys in symmetric encryption especially with stream ciphers. This is the problem with the legacy WEP algorithm in early wireless networks.

45
Q

Plaintext attack

A

This attack is possible if an attacker has some known plaintext data and the ciphertext created from this plaintext.
EX: if an attacker captures an encrypted message (the ciphertext) and knowns the unencrypted plaintext of the message, he can use both sets of data to discover the encryption and decryption method. If successful, he can use the same decryption method on other ciphertext.

Ciphertext only attacks are typically only successful on weak encryption algorithms.

46
Q

Common use cases for cryptographic conecpts

A

-INTEGRITY. Hashing protocols are used to support integrity where you can verify that data has not been changed by an unauthorized entity.

-CONFIDENTIALTY. Encryption protects confidentiality by ensuring unauthorized persons cannot read/access data.

-NON-REPUDIATION. Digital signatures support this where a person cannot later deny sending a message.

-HIGH RESILIENCY. With cryptography high resiliency refers to the security of an encryption key even if an attacker discovers parts of the key. If there is leakage, a strong algorithm implements high-resiliency techniques that ensures leakage does not compromise the encryption key.

-OBFUSCATION. Steganography allows people to hide data in plain sight and obscure the fact that a file is holding a message - can be hidden in audio, image and video files.

47
Q

PKI

A

Public Key Infrastructure, refers to a group of technologies used to request, create, manage, store, distribute and revoke digital signatures.

Asymmetric encryption depends on the use of certificates for a variety of purposes like protecting email and protecting internet traffic with TLS.

Allows two people to communicate securely without knowing each other previously.

48
Q

CA

A

Certificate Authorities issue, manage, validate and revoke certificates.

CAs can be large like Comodo, DigiCert Symantec (all public CAs) or small single service running on a server within a private network.

Public CAs make money by selling certificates, thus must be trusted. They also negotiate with web browsers developers to have their certs included with the web browser so any certs they sell to businesses are automatically trusted.

CERTIFICATE TRUST MODELS
-CAs are trusted by placing a copy of their root certificate into a Trusted Root CA store. The roof cert is the first cert created by the CA that identifies it, and the store is a collection of these root certificates. If the CA’s root cert is placed in this store, all certs issued by this CA are trusted.

The most common trust model is the hierarchical trust model, also known as a centralized trust model, where the public CA creates the first CA as the root CA.

Users and systems request certs from a CA using a registration process, and in some cases the user enters the info manually into a website form, in other cases sending a specifically formatted file to the CA. Within a domain the system handles much of the process automatically.

49
Q

Intermediate CA

A

If an organization is large it can create an intermediate CA and child CAs.

-Root CA issues certificates to intermediate CAs
-Intermediate CA issues certificates to child CAs.
-Child CAs issue certificates to devices or end users.

50
Q

Certificate chaining

A

Certificate chaining combines all the certificates from the root CA down to the certificate issued to the end user.

In a small organization the root CA can simply issue certificates to the devices and the end users, it’s not necessary to have intermediate and child CAs.

51
Q

OpenS

A

a software library accessible via the command line in many Linux distributions that creates key pairs in one command and allows you to export the public key to a file in a second command.

Technically OpenSSL and similar apps create the private key, however they appear to create both at the same time.

52
Q

CSR

A

Certificate Signing Request - you typically request certificates using a CSR.

The first step is create the RSA-based private key, which is used to create the public key.

You then include the public key in the CSR and the CA will embed the public key in the certificate. The private key is not sent to the CA.

Offline CAs can only accept CSRs manually, and large organizations typically keep the root CA offline to reduce risk of compromise. They can issue new certs to intermediate and child certs if they are compromised, but if root CA is compromised the entire cert path is compromised.

53
Q

RA

A

In large organization a Registration Authority (RA) can assist the CA by collecting registration information. The RA doesn’t issue certs, just assists in the registration process.

54
Q

Updating and Revocation Lists

A

Certificates normally expire based on the Valid From and Valid To dates and can be updated by replacing them with newer certificates. If a cert is compromised a CA can revoke it. Reasons for revocation:

-Key compromise
-CA compromise
-Change of affiliation
-Superseded
-Cease of operation
-Certificate hold

55
Q

CRL

A

Certificate Revocation List (CRL)

CAs use CRLs to revoke a certificate, by their serial numbers.

A CRL includes a list of revoked certificates and is publicly available.

56
Q

Validating a Certificate

A

Before clients use a certificate they first verify it is valid with some checks and a browser will display an error if they cannot validate it.

Checks include:
-Expired
-Certificate not trusted. Check to see that it was issued by a trusted CA. Systems will look in the Trusted Root Certification Authority store etc, if the system doesn’t have a copy of the CA’s cert, it will indicate the certificate is not trusted.
-Certificate revoked. Clients also validate certs through the CA to ensure they haven’t been revoked.

A common method of validating a certificate is by requesting a copy of the CRL using the following steps:
1. Client initiates a session requiring a cert such as HTTPS
2. The server responds with a copy of the cert that includes the public key
3, The client queries the CA for a copy of the CRL.
4. The CA responds with a copy of the CRL.

57
Q

OCSP

A

Online Certificate Status Protocol (OCSP) is another method of validating a certificate, and allows the client to query the CA with the serial number of the cert.

The CA then responds with a response of “good”, “revoked”, or “unknown”. A response of unknown could indicate the certificate is a forgery.

58
Q

Certificate stapling

A

Certificate stapling is an alternative to OCSP where the certificate presented (such as a web server) appends the cert with a timestamped digitally signed OCSP response from the CA. The reduces OCSP traffic to and from the CA.

The cert presenter then appends (or metaphorically staples) a timestamped OCSP response to the cert during the TLS handshake process, eliminating the need for clients to query the CA.

59
Q

Public key pinning

A

Pinning is a security mechanism to prevent attackers from impersonating a website using fraudulent certificates.

When configured on a web server, the server responds to client HTTPS requests with an extra header that includes a list of hashes derived from valid public keys used by the website. It also includes a max age field specifying how long the client should store and use the data.

When clients connect to the same website again, they recalculate the hashes and then compare the recalculated hashes with the stored hashes, and if they match, it verifies that the client is connected to the same website.

Website admins create hashes of one or more certs used by the website, such as the public keys used by the website’s certificate, or any public keys from certs in the cert chain such as the public key from the root CA cert, and/or the public key from intermediate CA certs. Last, it must include a backup key that can be used if the current key becomes invalid.

TLDR: The web server sends a list of public key hashes that clients can use to validate certificates sent to clients in subsequent sessions.

60
Q

Key escrow

A

The process of placing a copy of a private in a safe environment.

Use for recovery purposes if the original key is lost so the org can retrieve a copy of the key to access the data. Not required but if an org determines data is unacceptable they can implement a key escrow process.

61
Q

Comparing Certificate Types

A

-Machine/Computer
-User
-Email
-Code signing
-Self-signed
-Root
-Wildcard
-Subject alternative name (SAN)
-Domain validation
-Extended validation

62
Q

Comparing Certificate Formats

A

X.509 v3 is most common certificate format
X.509 v2 used to distribute CRLs

63
Q

CER and DER

A

Base format of certificates is CER (Canonical Encoding Rules) and DER (Distinguished Encoding Rules).

CER and DER standards are defined by the ITU-T in the X.690 standards.

Some certs use headers and footers to identify contents, starting with five dashes, BEGIN, a label and 5 more dashes.

Cert files can have many extensions such as .crt, .cer, .pem, .key, .p7b, .p7c, .pfx, .p12 but .cer doesn’t necessarily indicate CER format

64
Q

PEM

A

Privacy-Enhanced Mail, a certificate type that is actually not only used for email, but for anything, and can be formatted as CER (ASCII files) or DER (binary files).

65
Q

P7B

A

Certificate commonly used to share public keys with proof of identity of the certificate holder; uses CER

66
Q

P12

A

Certificates commonly use to hold certificates with the private key; uses DER.

67
Q

PFX

A

Predecessor to P12 cert, has the same usage. Commonly used by admins in Windows to important and export certs.

68
Q
A