Chapter 2 Computer Security1
Chapter 2 Computer Security1
Chapter 2 Computer Security1
Cryptography algorithms
This chapter will discuss cryptography, concepts, algorithms, attacks, and management.
The sensitivity of assets is determined by confidentiality and integrity requirements and the impact
of compromise on the corporation.
It is no exaggeration to say that encryption is the mainstay of information and data security today.
Data that does not have encryption is never considered secure.
1. Plain-Text: At this step, it means a text that has no encryption and is in its original state and
can be easily read. (example: CISSP)
2. Encryption: A process that uses cryptographic algorithms and techniques to converts a Plain-
text into a cipher-text so that text cannot be understood by humans or machines.
Page 1 of 10
3. Cipher-text: information that is not in a human or machine-readable format. The cipher text
is the encrypted version of the plain text. (example SDE15E7Ja)
4. Decryption: Converting process a cipher text to a plain-text at the destination.
Cryptographic Key
A cryptographic key is used on the operation for encryption and decryption of a text.
Each encryption algorithm has a key space that uses that space to generate the key. This space
actually contains a large number of random values. Now, the larger the key space, algorithm
can generates the more keys. For example, if an algorithm allows a key length of 2 bits, the
key space for that algorithm would be 4, which indicates the total number of different keys that
would be possible. The more random the keys are, the difficult it is for intruders to figure them
out.
Today, using key sizes are 128, 256, 512, 1,024 bits and larger. So a key size of 512 bits would
provide 2^512 possible combinations of the key space.
Cryptographic Methods
There are three primary types of modern encryption:
Symmetric: It uses a single and same key to encrypt and decrypt. This type of encryption is
also called Secret Key Cryptography (SKC).
Asymmetric: This method uses two different keys, one to encrypt and the other to decrypt.
Hashing: This method uses one-way cryptographic conversion using an algorithm, but no key.
Block Cipher: Block ciphers operate on a single fixed block of plaintext to produce the
corresponding cipher text. Using a given key in a block cipher, the same plaintext block always
produces the same cipher text block.
Data Encryption Standard (DES): It is operates on 64-bit blocks, and uses 56-bit Key
size that is too small to protect data consisting. This algorithm is consisting of 16 rounds
processing the data with the 16 intermediary round keys of 48-bit generated from 56-bit
cipher key by a Round Key Generator.
RC2: A block-mode cipher that encrypts 64-bit blocks of data by using a variable-length key.
RC4: A stream cipher that uses a variable length key (often 128 bit).
RC5: Similar to RC2, but includes a variable-length key (0 to 2,048 bits), variable block size
(32, 64, or 128 bits), and a variable number of processing rounds (0 to 255).
RC6: Derived from RC5 and a finalist in the AES selection process. It uses a 128-bit block
size and variable-length keys of 128, 192, or 256 bits.
Triple DES (3DES): This standard extended the life of the DES algorithm. In Triple DES
implementations, a message is encrypted by using one key, encrypted by using the second
key and then again encrypted by using either the first key or a third key.
International Data Encryption Algorithm (IDEA): This algorithm is a block cipher that
operates on 64- bit plaintext blocks by using a 128-bit key. IDEA performs eight rounds on
16-bit sub-blocks and can operate in four distinct modes similar to DES. Of course, the IDEA
isn’t not widely used today.
Rivest Cipher: The Rivest Ciphers are a series of symmetric algorithms that include RC2,
RC4, RC5, and RC6.
Advanced Encryption Standard (AES): Advanced Encryption Standard (AES) is a 128-bit
block cipher that employs 128, 192, or 256-bit keys. AES is official successor to DES.
BLOWFISH: This algorithm operates on 64-bit blocks, employs 16 rounds, and uses
variable key lengths of up to 448 bits. To date, there are no known successful cryptanalytic
attacks against this algorithm.
TWOFISH: This algorithm is a symmetric block cipher that operates on 128-bit blocks
employing 16 rounds with variable key lengths up to 256 bits. To date, there are no known
successful cryptanalytic attacks against this algorithm.
Page 3 of 10
All modes of the DES algorithm
Electronic code book (ECB): This mode is the native mode for DES operation. ECB mode
operates on 64-bit blocks of plaintext independently and produces 64-bit blocks of cipher text.
This mode isn’t very reliable, because, the same plaintext, encrypted with the same key, always
produces the same cipher text.
CIPHER BLOCK CHAINING (CBC): This mode is the most common mode of DES
operation. CBC mode operates on 64-bit blocks of plaintext to produce 64-bit blocks of cipher
text. However, CBC mode, produce a more random cipher text result. One disadvantage of
CBC mode is that errors propagate. However, this problem is limited to the block in which the
error occurs and the block that immediately follows, after which, the decryption
resynchronizes.
CIPHER FEEDBACK: In this mode, previously generated cipher text is used as feedback for
key generation in the next keystream. The resulting cipher text is chained together, which
causes errors to be multiplied throughout the encryption process.
OUTPUT FEEDBACK (OFB): It is often used to encrypt satellite communications. In this
mode, previous plaintext is used as feedback for key generation in the next keystream. Because
the resulting cipher text is not chained together, errors don’t spread throughout the encryption
process.
Page 4 of 10
Cryptography- Part 2
Asymmetric Cryptography / Public Key Cryptography
In this CHAPTER2 PART2, two keys are used:
Only the private key can decrypt the message; thus, an attacker possessing only the public key
can’t decrypt the message. A secure message guarantees the confidentiality of the message.
Everyone knows public key while one key is kept secret and is used to encrypt the data by the
sender. Each sender uses its secret key (known as a private key) for encrypting its data before
sending.
The receiver uses the respective public key of the sender to decrypt the data.
When two parties want to exchange an encrypted message by using asymmetric key cryptography,
they follow these steps:
1. The sender encrypts the plaintext message with the intended recipient’s public key.
2. This produces a cipher text message that can then be transmitted to the intended recipient.
3. The recipient then decrypts the message with his private key, known only to him.
Page 5 of 10
Elliptic Curve Cryptography (ECC): This is an algorithm that generates keys from
elliptical curves. A 160-bit EC key is equivalent to a 1,024-bit RSA key. EC is significantly
faster and more efficient than other asymmetric algorithms and many symmetric
algorithms.
Digital Signature Algorithm (DSA): This algorithm is primarily used for authentication
purposes in digital signatures.
Key Management
The following are the major functions associated with managing encryption keys:
Key generation: Keys must be generated randomly on a secure system. The keys should
not be displayed in the clear text.
Key distribution: securely distributed is a major vulnerability in symmetric key
systems. The solution is to use an asymmetric system.
Page 6 of 10
Key installation: This process should ensure that the key isn’t compromised during
installation, or incorrectly entered.
Key storage: Keys must be stored on protected or encrypted storage media.
Key change: Keys should regularly be changed, relative to the value of the information
being protected and the frequency of use.
Key control: Different keys have different functions and may only be approved for certain
levels of classification. You need to control how they are used.
Key disposal: There will come a time when we no longer need a specific key. So, this key
must be destroyed accurately and completely so that it can never be recovered and ensure
that its contents are never disclosed.
Digital Signatures
The sender encrypts a message with his or her own private key. In destination, the sender’s public
key, properly decrypts the message and authenticating the originator of the message.
Integrity
Cryptography can be used to ensure the integrity of information using a hashing algorithm and
message digest algorithm.
Cryptography- Part 4
Hashing: Hash functions are primarily used to provide integrity. Hashing and cryptography have a
very close relationship.
A one-way function ensures that the same key can’t encrypt and decrypt a message in an
asymmetric key system. A one-way function’s purpose is to ensure confidentiality. A one-way
hashing algorithm produces a hashing value (or message digest) that can’t be reversed; that is, it
can’t be decrypted.
Hashing provides encryption by using an algorithm without use any key. It is called one-way hash
functions because there is no way to reverse the encryption. A variable-length plaintext is hashed
into a fixed-length hash value, which is usually called a message digest or a hash.
Collisions: This means that one or more documents use the common hash.
Page 7 of 10
Hashing Algorithms Family
Message Digest (MD): It is a family of one-way hashing algorithms that includes MD
(obsolete), MD2, MD3 (not widely used), MD4, MD5, and MD6.
Secure Hash Algorithm (SHA): This family is more secure, and widely used hashing
algorithm. There are several versions of this algorithm.
Page 8 of 10
Cryptanalytic Attacks
These attacks mean compromising keys by means of decipherment to find out the keys. The goal
of cryptanalysis is to decipher the private or secret key. Here are some examples of these attacks:
Cipher text-only attacks: This refers to the availability of the cipher text to the
cryptanalyst. In this Attack, the cryptanalyst obtains the cipher text of several messages, all
encrypted by using the same encryption algorithm. The cryptanalyst then attempts to decrypt
the data by searching for repeating patterns and using statistical analysis. This type of attack
requires a large sample of cipher text.
Chosen-cypher text attack: This type of attack is used to obtain the plaintext by choosing
a sample of cipher text.
Chosen-plaintext attack: This refers to the availability of the corresponding cipher text to
the block of plaintext chosen by the analyst.
Known-plaintext attack: In this attack, the cryptanalyst has obtained the cipher text and
corresponding plaintext of several past messages, which he or she uses to decipher new
messages.
Adaptive-chosen-plain text attack: In this attack, cryptanalyst can choose the samples
of plaintext based on the results of previous encryptions in a dynamic passion.
Adaptive-chosen-cypher text attack: This is similar to the chosen cipher text, but the
samples of cipher text are dynamically selected by the cryptanalyst.
Man-in-the-Middle Attack: It involves an attacker intercepting messages between two
parties on a network and potentially modifying the original message.
Page 9 of 10
Provide portable document protection such that the protection
Restrict printing of a document to a defined set of people
Page 10 of 10