CCS IAT-2 Answer Key
CCS IAT-2 Answer Key
NO. :
5113
Purpose in DES: S-boxes provide confusion by introducing nonlinearity, ensuring that even
small changes in the input produce significant changes in the output. This helps obscure the
relationship between the plaintext, ciphertext, and key, enhancing the security of the encryption.
6. List the parameters (block size, key size, and no of rounds) for the three AES versions?
The three versions of AES differ in block size, key size, and number of rounds:
1. AES-128:
Block size: 128 bits
Key size: 128 bits
Number of rounds: 10
2. AES-192:
Block size: 128 bits
Key size: 192 bits
Number of rounds: 12
3. AES-256:
Block size: 128 bits
Key size: 256 bits
Number of rounds: 14
Part-B
7. (i) Discuss the properties that are satisfied by Groups, Rings and Fields. (8)(K2)(CO2)
Here is a summary of the properties satisfied by Groups, Rings, and Fields in abstract
algebra:
1. Group
A group is a set equipped with a single binary operation (denoted as multiplication or
addition), and it satisfies the following properties:
Closure: For any two elements , the result of the operation .
Associativity: For any , .
Identity Element: There exists an element such that for all .
Inverse Element: For each , there exists an element such that .
Commutativity (optional): If for all , the group is called Abelian or commutative.
2. Ring
A ring is a set equipped with two binary operations (typic ally addition and
multiplication) and satisfies the following properties:
Additive Group: The set under addition forms an Abelian group.
Closure, associativity, identity, inverse, and commutativity for addition.
Multiplicative Closure: For any , the product .
Multiplicative Associativity: For any , .
Distributivity: Multiplication distributes over addition for all :
Multiplicative Identity (optional): Some rings have an element such that for all .
Multiplicative Commutativity (optional): If multiplication is commutative, the ring is
called a commutative ring.
3. Field
A field is a set where two operations (addition and multiplication) are defined,
satisfying the properties of both a commutative ring and the following additional
conditions:
Additive Group: forms an Abelian group under addition (same as for a ring).
Multiplicative Group: The set (excluding the additive identity 0) forms an Abelian
group under multiplication.
Closure, associativity, identity, inverse, and commutativity for multiplication.
Distributivity: Multiplication distributes over addition, as in a ring.
REG.
NO. :
5113
In summary:
A group has one operation and requires closure, associativity, identity, and inverse.
A ring has two operations, forms an Abelian group under addition, and satisfies
distributivity.
A field is a commutative ring where the nonzero elements form a multiplicative group.
(ii) Explain the bitwise XOR operation which involved in RC4. (8)(K2)(CO2)
In the RC4 stream cipher, the bitwise XOR operation is a key component of the encryption
and decryption processes. Here’s how it works and why it is important:
XOR Operation in RC4
XOR (Exclusive OR) is a binary operation that takes two bits as inputs and outputs:
1 if the bits are different (i.e., one is 1 and the other is 0).
0 if the bits are the same (both 1s or both 0s).
Role of XOR in RC4
1. Key Stream Generation: RC4 generates a pseudorandom key stream based on a
given key. This key stream is a sequence of bytes produced through an internal
algorithm using the key.
2. Encryption:
To encrypt, RC4 takes the plaintext and the generated key stream, then applies a
bitwise XOR between the corresponding bits of the plaintext and the key stream.
If is the plaintext byte and is the corresponding key stream byte, the ciphertext byte
is calculated as:
C = P \oplus K
3. Decryption:
Since XOR is its own inverse, to decrypt, the same XOR operation is applied between
the ciphertext and the same key stream:
P = C \oplus K
Why XOR is Used in RC4
Simplicity: XOR is a simple and fast operation, making RC4 efficient for software
and hardware implementations.
Reversibility: The property that XOR is its own inverse allows the same operation to
be used for both encryption and decryption.
Security: XOR with a pseudorandom key stream ensures that the ciphertext appears
random, provided the key stream is not reused (key-stream reuse can lead to
vulnerabilities).
Thus, the XOR operation in RC4 is fundamental for mixing the key stream with the plaintext
to achieve secure encryption and easy decryption.
8. Solve the following using RC4 stream cipher algorithm. Assume the state vector is 8 bits.
Key: [1 0 0 2] Plaintext: [6 1 5 4] (16)(K3)(CO2)
To solve this using the RC4 stream cipher algorithm with an 8-bit state vector, we need to
follow these main steps:
1. Key-Scheduling Algorithm (KSA): Initialize the state array S and permute it based
on the provided key.
2. Pseudo-Random Generation Algorithm (PRGA): Use the permuted state to generate
the keystream.
3. XOR the keystream with the plaintext: Encrypt the plaintext by XORing it with the
generated keystream.
REG.
NO. :
5113
Example
Let's find the GCD of and and express it as a linear combination of these two numbers.
Step 1: Euclidean Algorithm
1. First Division:
30 = 2 \times 12 + 6
2. Second Division:
12 = 2 \times 6 + 0
Since the last non-zero remainder is , we have:
\text{gcd}(30, 12) = 6
Step 2: Extended Backtracking
Now we will backtrack to express as a linear combination of and .
From the first division:
6 = 30 - 2 \times 12 \quad (1)
Since we reached a remainder of 0, we stop here. The equation from (1) gives us the
coefficients directly;
Conclusion
Thus, we have:
6 = 30 \times 1 + 12 \times (-2)
So, the GCD of and is , and it can be expressed as:
6 = 30 \times 1 + 12 \times (-2)
Part-C (Compulsory)
Answer the questions [1 x 16 = 16 Marks]
10. Neatly explain how encryption is done using Advanced Encryption Standards with
necessary block diagrams. (16)(K2)(CO2)
Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES) is a specification for the encryption of electronic data
established by the U.S. National Institute of Standards and Technology (NIST) in 2001. AES
is widely used today as it is much stronger than DES and triple DES despite being harder to
implement. In this article, we will cover the AES, the Working of Cipher and Encryption-
Decryption methods used in it, and its applications.
What is Advanced Encryption Standard (AES)?
Advanced Encryption Standard (AES) is a highly trusted encryption algorithm used to secure
data by converting it into an unreadable format without the proper key. Developed by the
National Institute of Standards and Technology (NIST), AES encryption uses various key
lengths (128, 192, or 256 bits) to provide strong protection against unauthorized access. This
data security measure is efficient and widely implemented in securing internet
communication, protecting sensitive data, and encrypting files. AES, a cornerstone of modern
cryptography, is recognized globally for its ability to keep information safe from cyber
threats.
AES is a Block Cipher.
The key size can be 128/192/256 bits.
Encrypts data in blocks of 128 bits each.
That means it takes 128 bits as input and outputs 128 bits of encrypted cipher text. AES relies
REG.
NO. :
5113
Database Encryption: AES can be applied to encrypt sensitive data stored in databases. This
helps protect personal information, financial records, and other confidential data from
unauthorized access in case of a data breach.
Secure communications: AES is widely used in protocols such as internet communications,
email, instant messaging, and voice/video calls. It ensures that the data remains confidential.
Data storage: AES is used to encrypt sensitive data stored on hard drives, USB drives, and
other storage media, protecting it from unauthorized access in case of loss or theft.
Virtual Private Networks (VPNs): AES is commonly used in VPN protocols to secure the
communication between a user’s device and a remote server. It ensures that data sent and
received through the VPN remains private and cannot be deciphered by eavesdroppers.
Secure Storage of Passwords: AES encryption is commonly employed to store passwords
securely. Instead of storing plaintext passwords, the encrypted version is stored. This adds an
extra layer of security and protects user credentials in case of unauthorized access to the
storage.
File and Disk Encryption:
AES is used to encrypt files and folders on computers, external storage devices, and cloud
storage. It protects sensitive data stored on devices or during data transfer to prevent
unauthorized access.
Conclusion
AES instruction set is now integrated into the CPU (offers throughput of several GB/s)to
improve the speed and security of applications that use AES for encryption and decryption.
Even though it has been 20 years since its introduction we have failed to break the AES
algorithm as it is infeasible even with the current technology. To date, the only vulnerability
remains in the implementation of the algorithm.