www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / CompTIA / Security+ / Chapter 6: Cryptography / Appropriate Cryptographic Tools and Products

Appropriate Cryptographic Tools and Products

When applying cryptography and cryptographic principles to data, it is vital to understand the tools and products being used. This section will cover everything from wireless to data to connection encryption standards, including the following topics:

  • WEP versus WPA/WPA2 and pre-shared key (PSK)
  • MD5
  • SHA
  • RIPEMD
  • AES
  • DES
  • 3DES
  • HMAC
  • RSA
  • One-time pads
  • RC4
  • CHAP
  • PAP
  • NTLM
  • NTLMv2
  • Blowfish
  • PGP/GPG
  • Whole disk encryption
  • TwoFish
  • Comparative strengths of algorithms
  • Use of algorithms with transport encryption

WEP versus WPA/WPA2 and Pre-shared Key (PSK)

When it comes to wireless communications, the interception of the communication is even more trivial than with wired communications. Anyone in range of the transmitters can see the traffic, so encryption is the default.

As wireless technology has matured, so have the encryption standards wireless technology uses. One of the common early wireless encryption technologies is WEP (Wired Equivalent Privacy). WEP uses either a 64- or 128-bit key and an RC4 stream cipher to encrypt communications. Unfortunately, WEP encryption has some important weaknesses, such as reuse of initialization vectors, which can allow an attacker to recover the WEP key or decrypt WEP-encrypted data.

WEP is now considered insecure, and WPA (Wi-Fi Protected Access) is a newer option, which addresses the shortcomings of WEP. WPA implements TKIP (Temporal Key Initialization Protocol), a different method of exchanging initialization vectors, and one that mixes the secret key with the initialization vector, where WEP just appends them. WPA still uses RC4 but no longer sends the initialization vector in the clear, preventing the most common avenue of attack against WEP.

WPA is fundamentally the same technology as WEP, but it is implemented in a slightly more secure manner. WPA2 is the standard for the current generation of wireless encryption. Rather than relying on the RC4 stream cipher, it makes use of the more secure AES (Advanced Encryption Standard) block cipher. In addition, WPA requires the use of CCMP (Counter Cipher Mode with Block Chaining Message Authentication Code Protocol) to ensure the integrity and confidentiality of the data.

Variants of WPA2, such as WPA2 Enterprise and WPA2 with RADIUS, do not require the exchange of a secret key, but instead use RADIUS to authenticate users, while still providing secure point-to-point communication.

MD5

MD5 (Message Digest 5) is not an encryption protocol, but a one-way cryptographic hash function. As with any hash function, MD5 hashes are commonly used to ensure data integrity, since the hash of any given data will vary based on small changes to the data. MD5, however, has been shown to be vulnerable to collision attacks and prefix attacks, meaning an attacker can create data to take the place of the hashed data, and then compute a special prefix that will result in the new data having the same hash. Thus, for applications that rely on hashed data being collision-free, MD5 is no longer sufficient. Because MD5 is vulnerable to collision attacks, it is no longer considered secure, and it has largely been replaced by newer hashing functions, such as SHA and its variants.

SHA

SHA (Secure Hash Algorithm) is another hashing algorithm. There are a few implementations of SHA, each given a different identifier – SHA-0, SHA-1, SHA-2, and the proposed SHA-3.   The first implementations of SHA to gain widespread acceptance was SHA-1, which created a 160-bit hash for a given block of data. SHA-0 was proposed but not implemented due to perceived security flaws. Since the widespread implementation of SHA-1, security flaws have also been discovered for it, and collision attacks have been published. SHA-1 is a former FIPS (Federal Information Processing Standard), recommended for use in U.S. government systems.   Though SHA-1 is still in wide use, SHA-1 should ideally no longer be used for applications that require collision resistance.

SHA-2 comes in four variants, with digest sizes of 224, 256, 384, or 512 bits. The larger output, as well as a slightly more complex method of generating the digest, has kept SHA-2 considered secure. SHA-2 is the preferred current SHA standard. SHA-1 has been superseded by SHA-2 as the current FIPS standard for use in U.S. government systems.

The National Institute of Standards and Technology is reviewing proposed SHA-3 standards.   Though they have not yet announced a new algorithm, they are expected to select from a list of finalists before the end of 2012.

RIPEMD

RIPEMD, RACE (Research and Development in Advanced Communication Technologies in Europe) Integrity Primitives Evaluation Message Digest, is another hashing function, which outputs a 128-bit digest. The variants of RIPEMD include 160-, 256-, and 320-bit versions.   Though many well-known hashing algorithms were developed by the NSA and released to the public for examination after development, RIPEMD was designed as a European Union project.   RIPEMD collisions have been found for the original 128-bit algorithm, but not for 160, 256, or 320 RIPEMD.

AES

AES (Advanced Encryption Standard) is a block cipher for use in symmetric, or shared secret, encryption. AES is part of the FIPS for symmetric encryption. AES is a 128-bit block symmetric cipher that supports 128-, 192-, or 256-bit keys. It is considered to be strong encryption and is commonly used in such applications as WPA-2 to secure wireless communications.

DES

DES (Data Encryption Standard) is a 64-bit block cipher symmetric encryption algorithm that uses a 56-bit key.  This keysize is insufficient to protect against brute force attacks from modern computing systems. To work around this small keysize, 3DES is now commonly used in applications where DES may have been used previously.

3DES

3DES (Triple DES) is simply the application of DES encryption three times to the data to be encrypted. The data can be encrypted with different keys on each pass or multiple times with the same key. Though encrypting with the same key is supported, it is not recommended.   Using the same key each time is cryptographically equivalent to using DES. Data that is 3DES encrypted is much more strongly protected than DES-protected data.

HMAC

HMAC (Hashed Message Authentication Code) is an algorithm that can be used, like a hash, to verify the integrity of the data. It also uses a shared secret key combined with the hash to authenticate the sender of the data. HMAC can be used with any hash or symmetric encryption algorithm, and the strength of the integrity and authentication is based on the strength of the protocols. It is common to implement HMAC with MD5 or SHA, but any hash function can be used.

RSA

RSA is an algorithm with a name that directly references its creators – Ron Rivest, Avi Shamir, and Leonard Adleman – who first publicly described the RSA algorithm. It is based on the difficulty in factoring the products of large prime numbers. The RSA algorithm uses two large prime numbers to create a private key, and the product of those two prime numbers to create a public key. In theory, the difficulty of computing the factors of the public key will keep RSA-encrypted messages secure.

 6-2

Users of this algorithm utilize a special RSA token that gives passwords for one-time use.   These passwords change after a set amount of time, usually around 60 seconds. As the size of the key directly affects the difficulty of factoring the key, larger key sizes are more secure.

One-time Pads

A one-time pad is a very special type of shared secret cryptographic system. Instead of applying complex mathematical algorithms and a short shared secret to create strings of ciphertext, a one-time pad applies a very simple mathematical algorithm and a shared secret to plaintext to encode it. The encryption process is often a simple bit-shift by the value of the position of the random shared secret key. What makes a one-time pad special is the key length necessary to encode or decode the information. The minimum length for the shared secret is the length of the data to be transmitted. Furthermore, each one-time pad, as the name implies, can be used only once.

One-time pads are, given random generation procedures, completely cryptographically secure.   The data that is transmitted after being encrypted by a one-time pad does not contain any information about the plaintext, other than the maximum length of the transmission. The primary drawback of one-time pads is the necessity of distributing keys equal to the length of any encrypted transmission prior to the transmission.

RC4

RC4 was invented by the same Ron named in the RSA algorithm, Ron Rivest. It is a stream cipher that is commonly used to protect SSL and WEP traffic. It is commonly misidentified as a cryptographic hashing function. Though RC4 is not necessarily inherently flawed, the first few bits of a keystream are strongly non-random and can be vulnerable when keys are reused or when related keys are used, as in the WEP implementation. RC4 supports a key size between 40 and 2048 bits.

CHAP

CHAP (Challenge Handshake Authentication Protocol) is an authentication scheme commonly used to establish remote connections and maintain them, while protecting against session hijacking. CHAP uses a 3-way handshake to verify a user’s identity. A shared secret exists between the two parties but is never transmitted. The authentication (or challenging) server sends a challenge message to the requesting client. The client appends the shared secret to the challenge message, hashes it (such as with MD5), and sends a response. The server also calculates the hash of the challenge message and shared secret. If the server’s hash matches, the server sends an acknowledgement to the client, successfully completing their 3-way handshake.

 6-3

 

PAP

PAP (Password Authentication Protocol) is an inherently insecure method of network authentication. Unlike secure authentication protocols, PAP requires that the password traverse a network in clear text. PAP is the most basic type of network authentication. It contains no inherent security or encryption.

NTLM

Microsoft developed a user-based network authentication protocol to be compatible with LANMAN, while providing a higher level of security. Microsoft labeled this new backwards compatible technology NTLM (New Technology LAN Manager).

LANMAN is a legacy authentication protocol that limited passwords to 14 uppercase characters, and encoded passwords over seven characters as two separate data blocks, encrypted with DES. This effectively meant that breaking a password only requires choosing from a very limited set of possible passwords.

What NTLM did to improve the situation was allow passwords to take up to 127 characters, instead of seven characters for a password block, and to hash the password with MD4, instead of the weaker DES.

 

NTLMv2

NTLMv2 further improved on the NTLM model by implementing stronger technologies and a 3-way handshake to transmit authentication data. Using HMAC-MD5 to issue challenges that include changing data, such as a timestamp, domain name, and random data, along with the same MD4 hashing to store passwords in NTLM, makes the authentication process much more resistant to eavesdropping.

Blowfish

Blowfish is a strong symmetric key encryption algorithm designed by Bruce Schneier. It uses a 64-bit block cipher and accepts variable key lengths, from 32 to 448 bits. Blowfish uses 16 rounds of encryption and operates at a speed comparable to DES, with much stronger security and no known attacks that can overcome all 16 rounds of encryption. One interesting fact about the Blowfish cipher is that it has been released into the public domain and is free for anyone to use.

 

PGP/GPG

PGP (Pretty Good Privacy, the commercial implementation) and GPG (GNU Privacy Guard, the open source implementation of PGP) are some of the most commonly used encryption application suites. PGP and GPG are often referred to collectively as PGP/GPG. They interoperate with one another by combining symmetric and asymmetric encryption.

PGP certificates are not generated by a certificate authority, but, rather, are self-generated. A user will commonly generate his or her own key and have other users verify their identity and sign their key, creating a web of trust. The strength of the level of trust the certificates can be given is directly related to the level of trust one gives to the key signers.

PGP can be configured to use any number of different encryption algorithms, but is most commonly used with asymmetric encryption algorithms such as RSA. Because of the web of trust and support for a variety of independent encryption protocols, PGP/GPG can provide authentication, integrity, and encryption for communication between a wide variety of endpoints. PGP can be used to encrypt e-mails, directories, partitions, and many other types of information and communication. Its typical use is for e-mail encryption.

Whole Disk Encryption

Whole disk encryption is the process of encrypting the entire contents of a drive, including any operating system or temporary files created during the use of the system. Full-disk encryption methods, such as Microsoft’s Bit-locker or the open-source TrueCrypt, can be used to implement full-disk encryption.

 6-4

Access to the encrypted drive can be controlled at a hardware level, such as with a TPM (Trusted Platform Module), or through the use of a passphrase, PIN, or external security FOB. If the authentication method is lost, damaged, or unavailable, the contents of the drive will remain unavailable. As with other encryption methods, it is important to maintain a backup of the authentication mechanism, such as in a key escrow service.

TwoFish

 

Like Blowfish, Twofish is a symmetric block cipher encryption protocol that supports a key size of 128, 192, or 256 bits. Bruce Schneier, the author of Blowfish, worked with a team to develop Twofish as a strong encryption algorithm and candidate for the AES (Advanced Encryption Standard). Twofish encrypts data at a similar computational overhead to AES and is considered strong, though it is not as widely used as Blowfish.

Like Blowfish, Twofish implements 16 rounds of encryption. Theoretical attacks have been found that may make attacks against six of the 16 rounds of encryption computationally feasible. These attacks, however, are not generalizable to the full 16 rounds of encryption.   Twofish is still considered cryptographically secure.

Comparative Strengths of Algorithms

When selecting an encryption algorithm, it may be necessary to weigh the computational cost of encrypting and decrypting the data with access to the secret key against the computational cost of breaking the encryption and gaining unauthorized access to the data. Though computation cost may dictate using a smaller key for encryption, it should never dictate using an inherently insecure algorithm.

Despite their generally lower computational cost, insecure technologies should not be used where security is required. For instance, DES is now considered insecure, but 3DES is still in common use. Both are considered weaker than Blowfish (which functions at a speed similar to DES) and much weaker than AES and Twofish.

Similarly, older hash functions such as MD4 and MD5 should not be used because of their known weaknesses. SHA-2 should be implemented, with a hash size suitable for the application. When it comes to wireless encryption, WEP is now trivially simple to defeat. WPA, and especially WPA-2, is a stronger option, especially for modern hardware.

Use of Algorithms with Transport Encryption

Encryption can be used on a per-session basis to protect communication between two end-nodes, even when the intervening networks are untrusted. When encryption is established on such a per-session basis, we refer to it as transport encryption.

 

SSL

Secure Socket Layer (SSL) is the predecessor to the more current TLS. SSL uses asymmetric encryption for key exchange, and then protects the contents of the session with symmetric encryption.

 

TLS

TLS is the successor to SSL. It is the application suite commonly used to secure e-mail, FTP (FTP–Secure), and web traffic (HTTP-Secure).

 

IPSec

IPSec (Internet Protocol Security) is an application-agnostic method of securing network communications. When IPSec is in use, all packets passed between the secured hosts are encrypted and encapsulated in a new packet to be decrypted by the other host. This technology creates a VPN (Virtual Private Network), which secures communication between any two points. When one of the points of the IPSec connection is not the final destination of the packet, such as a connection to a VPN concentrator, any hosts beyond the decryption point will be able to see the communication as if they were on the same network.

IPSec supports hashing and digital signatures for authentication and data integrity, as well as a collection of encryption algorithms such as DES, 3DES, and AES for confidentiality.

SSH

SSH (Secure Shell) is a protocol for protecting private data, and ensuring data integrity and confidentiality. SSH is primarily used for creating encrypted terminal sessions. It can also be used with the associated SSH File Transfer Protocol (SFTP) and the SCP (Secure Copy) Protocol. Unlike SSL and TLS, SSH does not add authentication to an existing protocol, but, rather, it represents a new protocol to perform similar tasks in a secure manner.

SSH has undergone numerous revisions. A number of early SSH versions are now considered to provide inadequate security. The current revision of SSH is SSH-2.

HTTPS

HTTPS (Hypertext Transfer Protocol Secure) is a standard HTTP session protected with TLS.   HTTPS communications use this protocol suite to authenticate the identity of the remote host, as well as the integrity and confidentiality of the data.

Though legacy applications will refer to SSL-protected HTTP sessions as HTTPS, current implementations of HTTPS should support only TLS.

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.