Beka's Computer Sequrity Assignment
Beka's Computer Sequrity Assignment
Name ID NO
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