With a basic understanding of hashing, symmetric encryption, and asymmetric encryption, it’s easier to grasp how cryptography is used. If you’re planning to take the SY0-501 or SY0-401 Security+ exam, you should have a basic understanding of cryptographic algorithms and their basic characteristics. The 501 exam is digging into some details a little deeper.
As an example, see if you can answer this question?
Q. An application developer is working on the cryptographic elements of an application. Which of the following cipher modes should NOT be used in this application?
A. CBC
B. CTM
C. ECB
D. GCM
More, do you know why the correct answer is correct and the incorrect answers are incorrect? The answer and explanation is available at the end of this post.
Cipher Suites
Cipher suites are a combination of cryptographic algorithms that provide several layers of security for TLS and SSL, though most organizations have deprecated the use of SSL. When two systems connect, they identify a cipher suite that is acceptable to both systems and then use the protocols within that suite.
Some cipher suites are very old and include encryption algorithms such as DES. Clearly, they shouldn’t be used and are disabled by default in most systems today. When necessary, administrators configure systems and applications to disable older specific cipher suites.
When two systems connect, they negotiate to identify which cipher suite they use. Each system passes a prioritized list of cipher suites it is willing to use. They then choose the cipher suite that is highest on their lists and common to both lists.
Implementation Versus Algorithm Selection
As you read about different algorithms and different modes of operation, you might have been wondering how this is relevant. It really depends on your job. Two terms are relevant here:
- Crypto module. A crypto module is a set of hardware, software, and/or firmware that implements cryptographic functions. This includes algorithms for encryption and hashing, key generation, and authentication techniques such as a digital signature.
- Crypto service providers. A crypto service provider is a software library of cryptographic standards and algorithms. These libraries are typically distributed within crypto modules.
As an example, software developers access software libraries when implementing cryptographic functions in their programs. If they need to encrypt data, they don’t start from nothing. Instead, they access a crypto service provider, or cryptographic service provider, which is a library of different implementations of cryptographic standards and algorithms.
Crypto service providers are typically distributed within crypto modules. As an example, Python is a popular application used by web developers to create dynamic web sites. Python includes a rich assortment of crypto modules developers can use. The Python Cryptography Toolkit includes a library of both hashing functions and encryption algorithms. Developers simply follow the syntax defined within the library to implement these hashing functions and encryption algorithms.
Developers should know about the different cryptographic algorithms, along with the different modes of operation. As an example, although it’s possible to select DES for encryption, this would be a mistake because DES has been deprecated. Similarly, it’s possible for a developer to implement an algorithm using the ECB mode of operation. However, ECB has known weaknesses, so this would also be a mistake.
Administrators implement algorithms via cipher suites on servers. Their responsibility is to ensure that deprecated and weak cipher suites are disabled on servers. If administrators leave weak or deprecated algorithms functioning on servers, it makes the servers susceptible to attacks such as downgrade attacks.
Q. An application developer is working on the cryptographic elements of an application. Which of the following cipher modes should NOT be used in this application?
A. CBC
B. CTM
C. ECB
D. GCM
Answer is C. The Electronic Codebook (ECB) mode of operation encrypts blocks with the same key, making it easier for attackers to crack. The other cipher modes are secure and can be used.
Cipher Block Chaining (CBC) mode is used by some symmetric block ciphers, though it isn’t as efficient.
Counter (CTM) mode combines an initialization vector (IV) with a counter and effectively converts a block cipher into a stream cipher.
Galois/Counter Mode (GCM) combines the Counter mode with hashing techniques for data authenticity and confidentiality.
See Chapter 10 of the CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide
or
See Chapter 10 of the CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide
for more information on cryptographic protocols.