CNSimp
CNSimp
Threat: A threat refers to any potential danger or harm that can exploit a
vulnerability in a system or organization's security controls, thereby causing
damage or loss.
Threats can encompass various forms such as malicious software (malware),
hackers, natural disasters, human error, and more.
2). Explain the various types of cryptanalytic attack, based on the amount of
information known to the cryptanalyst.
Ciphertext-only attack: In this type of attack, the cryptanalyst only has access
to the encrypted messages. They don't have any other information to work with.
It's like trying to solve a puzzle without any clues. These attacks are the most
difficult because the attacker has to rely solely on the encrypted data to find
patterns or weaknesses.
Known-plaintext attack: Here, the cryptanalyst has some pairs of plaintext (the
original message) and corresponding ciphertext (the encrypted message). With
this information, they can try to analyze the patterns in the encryption process.
It's like having a few puzzle pieces already in place, which makes it easier to
figure out the rest.
Chosen-plaintext attack: In this scenario, the cryptanalyst can choose some
plaintext messages and obtain their corresponding ciphertexts. This gives them
more control and can help them understand how the encryption algorithm works.
It's like being able to ask for specific puzzle pieces and seeing how they fit
together.
3). Explain the conventional security model used for information security.
Conventional encryption is a cryptographic system that uses the same key used
by the sender to encrypt the message and by the receiver to decrypt the message.
It was the only type of encryption in use prior to the development of public-key
encryption.
It is still much preferred of the two types of encryption systems due to its
simplicity. It is a relatively fast process since it uses a single key for both
encryption and decryption In this encryption model, the sender encrypts plaintext
using the receiver’s secret key, which can be later used by the receiver to decrypt
the ciphertext. Below is a figure that illustrates this concept.
Conventional encryption has mainly 5 ingredients :
Plain text – It is the original data that is given to the algorithm as an input.
Secret key – The secret key is also an input to the algorithm. The encryption
algorithm will produce different outputs based on the keys used at that time.
Origin and authenticity of the message cannot be guaranteed, since both sender
and receiver use the same key, messages cannot be verified to have come from a
particular user.
It isn’t much secured when compared to public-key encryption.
If the receiver lost the key, he/she cant decrypt the message and thus making the
whole process useless.
This scheme does not scale well to a large number of users because both the
sender and the receiver have to agree on a secret key before transmission.
The objective of attacking an encryption system is to recover the key in use rather
than simply to recover the plaintext of a single ciphertext. There are two general
approaches to attacking a conventional encryption scheme:
Brute-force attack: The attacker tries every possible key on a piece of ciphertext
until an intelligible translation into plaintext is obtained. On average, half of all
possible keys must be tried to achieve success.
8) Encrypt the message “Good morning” using the Hill Cipher with the
Key = 5 7
94
Q.9. Explain the one time pad scheme and Vegenere Cipher.
One-Time Pad:
- In this scheme, a random key that is as long as the message is used.
- The key is used to encrypt and decrypt a single message, and then is discarded.
Each new message requires a new key of the same length as the new message.
- It produces random output that bears no statistical relationship to the plaintext.
- Because the ciphertext contains no information whatsoever about the plaintext,
there is simply no way to break the code.
- For any plaintext of equal length to the ciphertext, there is a key that produces
that plaintext.
- Therefore, if you did an exhaustive search of all possible keys, you would end
up with many legible plaintexts, with no way of knowing which the intended
plaintext was.
- The security of the one-time pad is entirely due to the randomness of the key.
Example
Message: 'IF'
ASCII code for 'I': 1001001
ASCII code for 'F': 1000110
Key: 1010110 0110001
Encryption:
Plaintext (ASCII for 'I' + ASCII for 'F'): 10010011000110
Key: 10101100110001
XOR operation:
markdown
Copy code
10010011000110 (Plaintext)
10101100110001 (Key)
-----------------------
00111111110110 (Ciphertext)
VIgener cypher
This type of cipher is known as a polyalphabetic substitution cipher, where
multiple substitutions are used depending on the key. In this cipher, the key
determines which particular substitution is applied.
To encrypt a message, a key is needed that is as long as the message. Typically,
the key is a repeating keyword.
For example, if the keyword is "deceptive," and the message is
"wearediscovered," the encryption proceeds as follows:
Plaintext: wearediscovered
Key: deceptive
Encryption can be done by consulting the Vigenère Table, where the ciphertext
is found at the intersection of the letter key’s row and the plaintext’s column, or
by using the following formula:
Ci = (Pi + Ki) mod 26
The decryption formula is:
Pi = (Ci - Ki) mod 26
In these formulas:
Ci represents the ciphertext letter,
Pi represents the plaintext letter, and
Ki represents the key letter.
The "mod 26" operation ensures that the result remains within the range of the
alphabet (0 to 25).
Q.15. What is the purpose of S-box in DES? Explain the avalanche effect in
DES.
In cryptography, an S-box (substitution-box) is a basic component of symmetric
key algorithms that takes input bits and transforms them into output bits. In
DES, the S-box is the only non-linear element and is the strength of the
algorithm. S-boxes are the main contributors to diffusion and the avalanche
effect in DES, because changing one input bit from an S-box can change up to
four output bits.
Q.16. Explain Sub key generation Process in Simplified DES algorithm
with Example.
Before using 3TDES, user first generate and distribute a 3TDES key K, which
consists of three different DES keys K1, K2 and K3. This means that the actual
3TDES key has length 3×56 = 168 bits. The encryption scheme is illustrated as
follows –
The encryption-decryption process is as follows −
Encrypt the plaintext blocks using single DES with key K1.
Now decrypt the output of step 1 using single DES with key K2.
Finally, encrypt the output of step 2 using single DES with key K3.
The output of step 3 is the ciphertext.
Decryption of a ciphertext is a reverse process. User first decrypt using K3, then encrypt
with K2, and finally decrypt with K1.
Second variant of Triple DES (2TDES) is identical to 3TDES except that K3is replaced by
K1. In other words, user encrypt plaintext blocks with key K1, then decrypt with key K2, and
finally encrypt with K1 again. Therefore, 2TDES has a key length of 112 bits.
Triple DES systems are significantly more secure than single DES, but these are clearly a
much slower process than encryption using single DES.
MITM attacks are commonly used against encryption algorithms that use symmetric keys.
The attack works by dividing the key space into two parts:
Encrypts the plaintext using all possible keys from one-half of the key space
Decrypts the resulting ciphertext using all possible keys from the other half
MITM attacks can have a significant impact. For example, a MITM attack is the primary
reason why Double DES is not used. An attacker with 2⁵⁶ space and 2¹¹² operations can brute-
force a Triple DES key using a MITM attack.
MITM attacks are typically used against users of financial applications, SaaS businesses, e-
commerce sites, and other websites where logging in is required. Information obtained during
an attack could be used for many purposes, including identity theft, unapproved fund
transfers, or an illicit password change.
Q.21. Define Block Cipher Modes of Operation.
Block cipher modes of operation are techniques used to enhance the security
and versatility of block ciphers, which encrypt fixed-size blocks of data at a
time. These modes dictate how a block cipher encrypts or decrypts plaintext or
ciphertext data of arbitrary length. They enable the encryption and decryption of
data larger than the fixed block size of the block cipher.
Cipher Block Chaining (CBC):In CBC mode, each plaintext block is XORed
with the previous ciphertext block before encryption, adding an element of
randomness and removing the identical ciphertext blocks issue of ECB. It
requires an initialization vector (IV) to start the encryption process.
Cipher Feedback (CFB):CFB mode turns a block cipher into a stream cipher.
It operates on units smaller than the block size, typically 1 byte, and feeds back
the ciphertext to the encryption algorithm. This mode allows for arbitrary-length
plaintext encryption.
XOR and XTS modes:XOR and XTS modes are primarily used in disk
encryption applications. XTS (XEX-based tweaked-codebook mode with
ciphertext stealing) is designed specifically for encrypting data on storage
devices and provides both confidentiality and protection against certain types of
attacks.
Q.24. (i) In a public key system using RSA, the ciphertext intercepted is
C=10 which is sent to the user
whose public key is e=5, n=35. What is the plaintext M?
(ii) Perform encryption and decryption using the RSA algorithm for p=3,
q=11