6.1 Compare and contrast basic concepts of cryptography. Flashcards

1
Q

Symmetric Algorithms

A

Symmetric encryption is a common encryption method that involves using the same key to encrypt and decrypt the message

Pros:
The advantage of symmetric encryption is that it is much faster than asymmetric encryption. If you are going to encrypt a large amount of information, you get a performance benefit by using symmetric encryption rather than asymmetric encryption.

Cons:
There are two major disadvantages to using symmetric encryption.

First, how do you communicate the key to the party who needs to decrypt the message? You must ensure that whatever way you communicate the key, it is sent in a
secure manner.

The second disadvantage to symmetric encryption is the number of keys required to ensure confidentiality among all persons. This means that in order to have three people encrypt messages for one another, you need to have three different symmetric keys for each person for secure communications. The number of keys dramatically rises as you increase the number of people who need to communicate. The following formula is used to calculate the number of symmetric keys that are required:

Keys = people × (people – 1) / 2

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

Modes of Operation

A
\+ Electronic Codebook (ECB)
\+ Cipher Block Chaining (CBC)
\+ Cipher FeedBack (CFB)
\+ Output FeedBack (OFB)
\+ Counter Mode (CTM)
\+ Galois/Counter Mode (GCM)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Asymmetric Algorithms

A

Asymmetric encryption involves using two mathematically related keys to perform the encryption and decryption process. There are two main points to remember about asymmetric encryption:

Whatever one key in the pair does, the other key undoes that operation.

The two keys are related, but you cannot derive one key from the other.

Remember that when using asymmetric encryption, the message (or data) is encrypted with the recipient’s public key. And also remember that to ensure nonrepudiation, the message is signed using the sender’s private key.

Pros:
1) The advantage of asymmetric encryption is the fact that you can securely communicate the public keys to other parties, unlike with symmetric encryption. In the asymmetric system, you are free to give out the public key while the private key stays with the user.

2) Key management is also a benefit to using asymmetric encryption. You saw that with symmetric encryption, as the number of users increases, the number of keys rises dramatically. With asymmetric encryption, you need only a key pair per user for each user to be able to encrypt messages for all other users.

Cons:
The disadvantage of asymmetric encryption is that it is slower than symmetric encryption. If performance is a key factor, symmetric encryption may be the better alternative.

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

Hashing

A

Hashing is an important cryptography service because it is designed to ensure the integrity of data or a message. The integrity deals with ensuring that the information has not been tampered with since it was created or sent to a recipient.

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

Salt, IV, nonce

A

Salt
A salt is a random value that is generated and combined with the data before the data is hashed. This is a technique to ensure that the same data input (typically a password) would generate different hash values when the password hashes are generated.

IV
Initialization vector, or IV, is a random value generated that is used with the encryption key to encrypt data. The purpose of joining the IV with the key is to ensure that if a hacker were to access to the encrypted data, they could not compare different parts of the encrypted data to try to determine the key value. The IV is giving randomness to each segment of data that is encrypted with the same key.

Nonce
A nonce is a random number that is generated, only used once, and typically applied to authentication traffic. The typical scenario for a nonce is at the beginning of the authentication process.

The client sends a request to the server for a nonce value. The server sends a random number to the client, which then uses that to hash the password (with a hashing algorithm) and send the hashed authentication information across the network to the server.

A nonce can also be used with encryption as a way to ensure that the keystream is unique with each message sent. In this case, the encryption key + nonce value would be used to encrypt data sent (the message). Since each message will use a unique nonce, each message is technically encrypted with a different key.

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

Elliptic Curve

A

This is a newer asymmetric algorithm that is based on Diffie-Hellman for key exchange and the Digital Signature Algorithm (DSA) for signing messages.

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

Weak/Deprecated Algorithms

A

While we are on the topic of algorithms, I want to stress a point about working with different encryption algorithms. Always ensure that you are selecting the most secure algorithm to get the job done. Do some research and be aware of which algorithms are weaker than others and have been deprecated (no longer recommended for use). For example, 3DES was a popular symmetric encryption algorithm for many years but has been replaced by AES.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
Key Exchange
(Bonus: In-Band vs. Out-of-Band Key Exchange)
A

Key exchange is an important topic in relation to symmetric cryptography. There are two primary approaches to key exchange: inband key exchange and out-of-band key exchange. In-band key exchange essentially means that the key is exchanged within the same communications channel that is going to be encrypted. IPSec, which will be discussed later in this chapter, uses in-band key exchange. Out-of-band key exchange means that some other channel, other than the one that is going to be secured, is used to exchange the key.

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

Digital Signatures

A

A digital signature is created on a message in order to prove the integrity of the sender of the message. Because the signature is created using a person’s private key and only that person has access to their private key, it proves the sender is who they say they are.

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

Diffusion

A

Diffusion is ensuring that the repeating of characters in the plain text will not help someone decipher the ciphertext (data after it is encrypted). Transposition is a feature that provides diffusion.

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

Confusion

A

Confusion is the principle of ensuring that the relationship between the encryption key and the data after it is encrypted is as complex as possible so it is difficult to figure out. Substitution is an example of a cryptography feature that implements confusion.

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

Collision

A

Hashing protocols are known to create collisions, which is when two different pieces of data create the same hash value

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

Steganography

A

Steganography is a cryptography concept that involves a person hiding text information inside graphic files. A number of steganography applications can be used to modify a graphic file and hide text documents in the graphic file.

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

Obfuscation

A

Obfuscation is the concept of making something complicated on purpose to make it difficult to understand. For example, in order to hide the details of the cryptographic implementation of a product, you could make sure that the documentation for that product is hard to understand.

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

Stream vs. Block

A

Stream cipher algorithms encrypt data one bit at a time. Plain text bits are converted into encrypted ciphertext. This method is usually not as secure as block cipher techniques, discussed next, but it generally executes faster. In addition, the ciphertext is always the same size as the original plain text and is less prone to errors. If an error occurs during the encryption process, usually this affects only a single bit instead of the whole string. In contrast, when block ciphers contain errors, the entire block becomes unintelligible. The plain text bits are typically encrypted with the bits of a key by using an exclusive OR (XOR) function (described shortly).

Instead of encrypting a bit at a time, block cipher algorithms encrypt data in blocks. Block ciphers have more overhead than stream ciphers. This overhead is provided separately, depending on the implementation and the block size that can be modified (the most common size is 64 bits). Because a block cipher handles encryption at a higher level, it is generally more secure. The downside is that the execution takes longer.

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

Key Strength

A

Key strength, also known as key space, refers to how many bits are in the encryption key. The larger the key space, the better the encryption. This is because a larger keyspace has more possible values that need to be calculated if someone is trying to crack the key. For example, a 2-bit keyspace allows for only four values: 00, 01, 10, and 11. It would take no time at all to calculate all possible keys a 2-bit key could have. If you increase the keyspace and go to 3 bits, then there are eight possible values: 000, 001, 010, 011, 100, 101, 110, and 111.

Common keyspaces today are 64-bit, 128-bit, 256-bit, and sometimes 512-bit.

17
Q

Session Keys

A

This name comes from the fact that many implementations of symmetric encryption use a random key, known as a session key, to do the encryption/decryption.

18
Q

Ephemeral Key

A

A temporary key that is typically used to encrypt a single message within the communication instead of using the same key to encrypt all messages in the communication.

19
Q

Secret Algorithm

A

This is the symmetric algorithm that is performing the encryption. The term secret is often interchanged with symmetric, as it comes from the fact that the key should be kept secret from those who should not decrypt the message. Keep in mind that the algorithms are not secret; they are publically proven algorithms.

20
Q

Data-in-transit

A

Encrypt data as it travels across the network from the source to its destination so that if someone taps into the communication, they will not be able to read the data.

21
Q

Data-at-rest

A

When storing information on disk or in a database, encrypt the data so that if someone gets access to the drive or database, they cannot view the sensitive data.

22
Q

Data-in-use

A

Encrypt data when it is stored in RAM, the CPU cache, or even the CPU registers. The purpose is to ensure someone cannot get access to sensitive data by writing code that would retrieve data from these areas.

23
Q

Random/Pseudo-random Number Generation

A

.

24
Q

Key Stretching

A

Also known as key strengthening, this is a technique used to ensure that a weak key, such as a password, is not a victim to a brute-force attack. With key stretching, a special algorithm is used to convert the weak password into a stronger key. Two common algorithms used to strengthen a key are PBKDF2 and Bcrypt.

25
Q

Implementation vs. Algorithm Selection

A

.

26
Q

Implementation vs. Algorithm Selection - Crypto Service Provider

A

When implementing cryptography solutions, the crypto service provider (CSP) is the library of code that provides the functions to encrypt and decrypt data. The crypto service provider provides different encryption and hashing algorithms that can be used within the software.

When looking at implementing cryptographic solutions be sure to select the encryption and hashing algorithms that are of the highest strength and that have been proven over time.

27
Q

Implementation vs. Algorithm Selection - Crypto Modules

A

Software applications can implement different cryptography features by loading crypto modules, which are software, hardware, or firmware components added to a system to provide cryptography functions such as encryption, decryption, hashing, and authentication.

When looking at implementing cryptographic solutions be sure to select the encryption and hashing algorithms that are of the highest strength and that have been proven over time.

28
Q

Perfect Forward Secrecy

A

In cryptography, forward secrecy (FS), also known as Perfect forward secrecy (PFS), is a feature of specific key agreement protocols that gives assurances that session keys will not be compromised even if the private key of the server is compromised. Forward secrecy protects past sessions against future compromises of secret keys. By generating a unique session key for every session a user initiates, the compromise of a single session key will not affect any data other than that exchanged in the specific session protected by that particular key.

More info:
https://en.wikipedia.org/wiki/Forward_secrecy

29
Q

Security through Obscurity

A

Security through obscurity is the security principle of making the design or implementation of technology so complex that it remains secret.

For example, you could make the documentation of the system so obscure that it would not be fully understood. Or you could make the commands of the application or system so obscure that it would take someone a long time to hack the system because they would first have to learn the system. I should stress that security through obscurity should not be relied upon as the only method of security!

30
Q

Common Use Cases

A

There are a number of situations where different cryptographic concepts and technologies are used on a daily basis. The following outlines some common scenarios where you see these concepts in practice

31
Q

Common Use Cases - Low Power Devices

A

Using low-power devices is a method we use today to restrict how far a communication signal can go.

For example, you should be lowering the power on your wireless signal so that someone outside the building cannot get a connection to your wireless network.

32
Q

Common Use Cases - Low Latency

A

Latency is a measure of network performance on a daily basis. Low latency means the wait time for a response is minimal.

For example, you would want the latency low between your client system and the authentication server.

33
Q

Common Use Cases - High Resiliency

A

Resiliency refers to how resilient a solution is to failure.

Examples of technology used to provide high resiliency are high-availability solutions such as clustering and RAID or load-balancing solutions.

34
Q

Common Use Cases - Supporting Confidentiality

A

There are a large number of technologies used to maintain confidentiality—any encryption technology such as WPA2 for wireless, or disk encryption such as BitLocker.

35
Q

Common Use Cases - Supporting Integrity

A

An example of when integrity solutions are used is when you create MD5 or SHA1 hashes of a file so that when the file is downloaded by someone they can verify that they have an unmodified version of the file.

36
Q

Common Use Cases - Supporting Obfuscation

A

Encryption algorithms and the different block modes are an example of obfuscation.

37
Q

Common Use Cases - Supporting Authentication

A

Client-side certificates and two-factor authentication with web sites are examples of concepts that support authentication.

38
Q

Common Use Cases - Supporting Non-repudiation

A

When you digitally sign an e-mail message, you are supporting nonrepudiation.

39
Q

Common Use Cases - Resource vs. Security Constraints

A

There are many use cases for when a resource may conflict with a security constraint. For example, wireless is built into many devices today, and some companies have a policy of not allowing wireless. In this case, the wireless functionality is disabled on the device because the company security constraint has superseded the resource.