0% found this document useful (0 votes)
5 views5 pages

Beka's Computer Sequrity Assignment

The document discusses the S-Box in cryptography, explaining its role in symmetric encryption algorithms like AES, including its operation through substitution, non-linearity, and confusion to enhance security. It also outlines the steps involved in the RSA and DES algorithms for encryption and decryption processes. Additionally, it provides examples of symmetric and asymmetric encryption and decryption using a key of 5.

Uploaded by

ebawaqbezu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Beka's Computer Sequrity Assignment

The document discusses the S-Box in cryptography, explaining its role in symmetric encryption algorithms like AES, including its operation through substitution, non-linearity, and confusion to enhance security. It also outlines the steps involved in the RSA and DES algorithms for encryption and decryption processes. Additionally, it provides examples of symmetric and asymmetric encryption and decryption using a key of 5.

Uploaded by

ebawaqbezu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

RIFT VALLEY UNIVERSITY GULLALE CAMPUS

Computer Security Individual assignment

Name ID NO

1. Beka keneni 0024/20

Sub to: Mr. Haymanot


1. How S-Box works on cryptography algorithm

The S-Box (Substitution Box) is a component commonly used in symmetric


encryption algorithms, such as the Advanced Encryption Standard (AES). It is
responsible for performing substitution operations on input data.
The construction and design of the S-Box are crucial for the security and strength
of the encryption algorithm. The S-Box is typically designed to be resistant against
various cryptographic attacks, such as differential and linear cryptanalysis.
The S-Box operates on fixed-size input blocks, typically 8 bits (1 byte) or 32 bits
(4 bytes), depending on the specific algorithm. It replaces each input block with a
corresponding output block based on a predefined lookup table.

Here is a simplified explanation of how the S-Box works:


1. Input: The S-Box takes an input block of a fixed size, such as 8 bits.

2. Lookup Table: The S-Box employs a lookup table, which is a bijective


mapping of all possible input values to corresponding output values. This
lookup table is fixed and predefined as part of the algorithm.

3. Substitution: Each input block is substituted with the corresponding output


value obtained from the lookup table. The substitution is based on the
specific mapping defined in the S-Box.

4. Non-linearity: The S-Box is designed to exhibit non-linearity, meaning that


small changes in the input block should result in significant changes in the
output block. This non-linearity property helps enhance the security of the
encryption algorithm by preventing simple algebraic relationships between
the input and output.
5. Confusion: The S-Box introduces confusion by shuffling the bits of the input
block. This helps to obscure any patterns or relationships between the input
and output.
6. Output: The substituted output block replaces the original input block, and
the encryption process continues with the transformed data.

The S-Box is typically used in conjunction with other components, such as


permutation operations, key scheduling, and rounds of transformations, to create a
secure and robust encryption algorithm.

2 . Write the steps of DES & RSA algorithm

RSA Algorithm:
1. Key Generation:
a. Choose two distinct prime numbers, p and q.
b. Compute the modulus, n, by multiplying p and q.
c. Compute Euler's totient function, φ(n), which is the product of (p-1) and (q-1).
d. Choose an encryption exponent, e, which is relatively prime to φ(n) and less
than φ(n).
e. Compute the decryption exponent, d, as the modular inverse of e modulo φ(n).

2. Encryption:
a. Convert the plaintext message into a numeric representation, typically using a
padding scheme.
b. Raise the numeric representation to the power of the encryption exponent (e)
modulo n to obtain the ciphertext.
3. Decryption:
a. Raise the ciphertext to the power of the decryption exponent (d) modulo n to
obtain the decrypted numeric representation.
b. Convert the decrypted numeric representation back into plaintext, typically
removing any padding.
DES Algorithm:
1. Key Generation: Generate a 56-bit encryption key, typically derived from a
user-provided passphrase or randomly generated. This key is used for both
encryption and decryption.
2. Key Expansion: Expand the 56-bit key into sixteen 48-bit round keys, one for
each round of the encryption process. The key expansion process involves
permutation and shifting operations.
3. Initial Permutation (IP): Permute the input plaintext using a fixed permutation
table to rearrange the bits.
4. Encryption Rounds: Perform a series of 16 rounds of encryption. Each round
involves the following steps:
a. Expansion: Expand the 32-bit input to 48 bits using an expansion table.
b. XOR with Round Key: Perform an XOR operation between the expanded
input and the round key for that round.
c. Substitution (S-Box): Divide the 48-bit result into eight 6-bit blocks. Substitute
each block using eight S-Boxes, which are predefined substitution tables.
d. Permutation (P): Permute the 32-bit output of the S-Boxes using a fixed
permutation table.
e. XOR with Previous Output: Perform an XOR operation between the permuted
output and the previous round's output.
5. Final Round: Perform the same steps as in the encryption rounds, but without
swapping the left and right halves of the data.
6. Final Permutation (FP): Permute the output of the final round using a fixed
permutation table to obtain the ciphertext.
3. Encrypt and Decrypt Your Full
Full name:- Beka keneni key=5
Encryption : Ghpf Pjsjso
Decryption: Beka Keneni
Symmetric Encryption and decryption

C= Ek(p ) = (p + k) mod 26 KEY= 5


Encryption :- P = Beka Keneni KEY= 5
C = Ghpf Pjsjso
p = Dk(c ) = (c - k) mod 26
Decryption :- C = Ghpf Pjsjso KEY= 5
P = Beka Keneni

Asymmetric Encryption and decryption

C= Ek(p ) = (p + k) mod 26

Encryption :- C = Ghpf Pjsjso KEY= 5


P = Beka Keneni

P = DKD [EKE (P) ]


Decryption :- C = Ghpf Pjsjso KEY= 21
P = Beka Keneni

You might also like