6.2 Explain cryptography algorithms and their basic characteristics 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

Symmetric Algorithms - AES

A

Advanced Encryption Standard (AES) has replaced 3DES as the new standard for symmetric encryption algorithms. AES is a block cipher that supports 128-bit, 192-bit, and 256-bit encryption.

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

Symmetric Algorithms - DES

A

Data Encryption Standard (DES) is a block cipher that was selected as an American government standard in the 1970s. It is a 56- bit encryption algorithm. It is not considered secure by today’s standards.

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

Symmetric Algorithms - 3DES

A

Triple DES (3DES). This is an improvement on DES that runs the information through three mathematical operations using three different 56-bit keys to create 168-bit encryption. Like DES, 3DES is a block cipher.

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

Symmetric Algorithms - RC4 (Bonus RC5)

A
Rivest Cipher (RC4/RC5)
RC5 is a block cipher that was created by Ronald Rivest. There are different versions of the RC algorithm, such as RC4, which is a stream cipher used in SSL and WEP (for wireless security).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Symmetric Algorithms - Blowfish/Twofish

A

Blowfish
This is a block cipher algorithm created by Bruce Schneier to replace the DES algorithm. It offers variable rates of encryption, from 1- to 448-bit encryption.

Twofish
Also written by Bruce Schneier, Twofish was created after Blowfish and offers 128-bit encryption.

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

Cipher Modes

A

Block ciphers can use a variety of different modes of operation. It’s important to have a basic understanding of these modes when choosing cipher suites.

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

Cipher Modes - CBC

A

Cipher Block Chaining (CBC) mode is used by some symmetric block ciphers. It uses an IV for randomization when encrypting the first block. It then combines each subsequent block with the previous block using an XOR operation. Because encryption of each block is dependent on the encryption of all previous blocks, CBC sometimes suffers from pipeline delays, making it less efficient than some other modes.

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

Cipher Modes - GCM

A

Galois/Counter Mode (GCM) is a mode of operation used by many block ciphers. It combines the Counter mode of operation with the Galois mode of authentication. Note that it doesn’t authenticate users or systems, but instead provides data authenticity (integrity) and confidentiality.

In addition to encrypting the data for confidentiality, it includes hashing techniques for integrity. It is widely used due to its efficiency and performance, allowing systems to quickly encrypt and decrypt data.

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

Cipher Modes - ECB

A

The Electronic Codebook (ECB) mode of operation is the simplest cipher mode mentioned in this section. Algorithms that use ECB divide the plaintext into blocks and then encrypt each block using the same key. This represents a significant weakness. If any of the plaintext blocks are the same, the resulting ciphertext is the same, making it much easier to crack. ECB is not recommended for use in any cryptographic protocols today.

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

Cipher Modes - CTR (or CTM)

A

Counter (CTM) mode effectively converts a block cipher into a stream cipher. It combines an IV with a counter and uses the result to encrypt each plaintext block.

Each block uses the same IV, but CTM combines it with the counter value, resulting in a different encryption key for each block. Multiprocessor systems can encrypt or decrypt multiple blocks at the same time, allowing the algorithm to be quicker on multiprocessor or multicore systems. CTM is widely used and respected as a secure mode of operation.

It’s worthwhile noting that the CompTIA objectives list CTM and include CTM in the acronym list as Counter-Mode. However, it’s much more common to see it listed as CTR or CM.

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

Cipher Modes - 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
13
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
14
Q

Asymmetric Algorithms - RSA

A

RSA (Rivest–Shamir–Adleman) is one of the first public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and it is different from the decryption key which is kept secret (private).

In RSA, this asymmetry is based on the practical difficulty of the factorization of the product of two large prime numbers, the “factoring problem”. The acronym RSA is made of the initial letters of the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman, who first publicly described the algorithm in 1977.

More on this:
https://en.wikipedia.org/wiki/RSA_(cryptosystem)

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

Asymmetric Algorithms - DSA

A

The Digital Signature Algorithm (DSA) is a Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem. DSA is a variant of the Schnorr and ElGamal signature schemes.

The National Institute of Standards and Technology (NIST) proposed DSA for use in their Digital Signature Standard (DSS) in 1991 and adopted it as FIPS 186 in 1994. Four revisions to the initial specification have been released. DSA is patented but NIST has made this patent available worldwide royalty-free.

More on this:
https://en.wikipedia.org/wiki/Digital_Signature_Algorithm

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

Asymmetric Algorithms - Diffie-Hellman

A

This algorithm is named after its creators as well. Diffie-Hellman is a key-exchange protocol that deals with exchanging keys in a secure fashion.

17
Q

Asymmetric Algorithms - Diffie-Hellman - Groups

A

It should be noted that Diffie-Hellman (DH) uses groups, known as DH Groups, to define the key strength for key exchange communication. The higher group numbers are more secure, but are more resource intensive. The following identifies a few of the DH Groups:
DH Group 1 768-bit
DH Group 2 1024-bit
DH Group 14 2048-bit

Many different network devices, such as WatchGuard Firewalls and Cisco devices, allow you to specify the DH Group that should be used.

18
Q

Asymmetric Algorithms - Diffie-Hellman - DHE

A

Diffie-Hellman Ephemeral (DHE) is a modification of the Diffie-Hellman key-exchange that used static keys.
A cryptographic key is called ephemeral if it is generated for each execution of a Key-Exchange process.

In some cases, ephemeral keys are used more than once, within a single session (e.g., in broadcast applications) where the sender generates only one ephemeral key pair per message and the private key is combined separately with each recipient’s Public Key.

Diffie-Hellman Ephemeral is a modification of the Diffie-Hellman key-exchange that used static keys.

Diffie-Hellman Ephemeral is defined within RFC 5246.

19
Q

Asymmetric Algorithms - Diffie-Hellman - ECDHE

A

Elliptic-curve Diffie–Hellman (ECDH) is an anonymous key agreement protocol that allows two parties, each having an elliptic-curve public–private key pair, to establish a shared secret over an insecure channel. This shared secret may be directly used as a key, or to derive another key. The key, or the derived key, can then be used to encrypt subsequent communications using a symmetric-key cipher. It is a variant of the Diffie–Hellman protocol using elliptic-curve cryptography.

ECDHE suites use elliptic curve diffie-hellman key exchange, where DHE suites use normal diffie-hellman. This exchange is signed with RSA, in the same way in both cases.

The main advantage of ECDHE is that it is significantly faster than DHE. This blog article talks a bit about the performance of ECDHE vs. DHE in the context of SSL.

More on this:
https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman

Blog article:
http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html

20
Q

Asymmetric Algorithms - 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.

Detail:
Elliptic-curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. ECC requires smaller keys compared to non-EC cryptography (based on plain Galois fields) to provide equivalent security.[1]

Elliptic curves are applicable for key agreement, digital signatures, pseudo-random generators and other tasks. Indirectly, they can be used for encryption by combining the key agreement with a symmetric encryption scheme. They are also used in several integer factorization algorithms based on elliptic curves that have applications in cryptography, such as Lenstra elliptic-curve factorization.

More on this:
https://en.wikipedia.org/wiki/Elliptic-curve_cryptography

21
Q

Asymmetric Algorithms - PGP/GPG

A

A common application used for many years to encrypt information using asymmetric communication is Pretty Good Privacy (PGP). PGP allows you to generate keys and share your public key with others using e-mail in a secure fashion.

PGP allows you to encrypt e-mail messages and files, as well as to digitally sign a message so that the recipient will be sure the message came from you.

Note that while PGP has been used on the Windows platform, GNU systems have a replacement known as GNU Privacy Guard (GnuPG), or GPG for short.

More detail:
https://en.wikipedia.org/wiki/Pretty_Good_Privacy

22
Q

Hashing Algorithms

A
  1. Message Digest (MD)
  2. Secure Hash Algorithm (SHA)
  3. SHA-256 and SHA-512
  4. LANMAN
  5. NT LAN Manager (NTLM)
  6. RACE Integrity Primitive Evaluation Message Digest
    (RIPEMD)
  7. Hash-based Message Authentication Code (HMAC)
23
Q

Hashing Algorithms - MD5

A

The MD algorithm was created by Ron Rivest
and has different versions, such as MD2, MD4, and MD5. The MD5 algorithm is one of the most common hashing algorithms today. It generates a 128-bit hash value.

24
Q

Hashing Algorithms - SHA

A

Created by the National Security Agency, the SHA algorithm has different versions, such as SHA-0, SHA-1, and SHA-2. The most common hashing protocol of the three in use today, SHA-1, creates a 160-bit hash value.

These are two newer versions of the SHA algorithm that generate 256-bit and 512-bit hash values. They are considered to not be susceptible to collision attacks.

25
Q

Hashing Algorithms - HMAC

A

HMAC involves using a secret key combined with the hashing algorithm to calculate the message authentication code (MAC). The MAC is the resulting hash value.

26
Q

Hashing Algorithms - RIPEMD

A

RIPEMD has many different versions of hashing levels, such as 128-bit, 160-bit, 256-bit, and 320-bit. The version is indicated in the name of the hashing algorithm, such as RIPEMD-160.

27
Q

Key Stretching Algorithms

A

In cryptography, key stretching techniques are used to make a possibly weak key, typically a password or passphrase, more secure against a brute-force attack by increasing the resources (time and possibly space) it takes to test each possible key. Passwords or passphrases created by humans are often short or predictable enough to allow password cracking, and key stretching is intended to make such attacks more difficult by complicating a basic step of trying a single password candidate.

More on this:
https://en.wikipedia.org/wiki/Key_stretching

28
Q

Key Stretching Algorithms - BCrypt

A

bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher, and presented at USENIX in 1999. Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with increasing computation power.

The bcrypt function is the default password hash algorithm for OpenBSD and other systems including some Linux distributions such as SUSE Linux.

There are implementations of bcrypt for C, C++, C#, Go, Java, JavaScript, Elixir, Perl, PHP, Python, Ruby, and other languages

More on this:
https://en.wikipedia.org/wiki/Bcrypt

29
Q

Key Stretching Algorithms - PBKDF2

A

In cryptography, PBKDF1 and PBKDF2 (Password-Based Key Derivation Function 2) are key derivation functions with a sliding computational cost, used to reduce vulnerabilities to brute force attacks.

More on this:
https://en.wikipedia.org/wiki/PBKDF2

30
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.

31
Q

Obfuscation - XOR

A

XOR is a logical operation used in some encryption schemes. XOR operations compare two inputs. If the two inputs are the same, it outputs True (or a binary 1). If the two inputs are different, it outputs False (or a binary 0).

32
Q

Obfuscation - ROT13

A

The ROT13 cipher increments the character by 13

33
Q

Obfuscation - Substitution Ciphers

A

A substitution cipher involves substituting one character for another. For example, you might substitute every letter in the message with a letter that is five characters later in the alphabet. This would mean that every letter e would be converted to the letter j, each a would be converted to an f, and so on.