CNA 537 Project Substitution Technique for Cryptanalysis
lalisaraf
3 views
7 slides
Jun 30, 2024
Slide 1 of 7
1
2
3
4
5
6
7
About This Presentation
CNA537
Size: 116.86 KB
Language: en
Added: Jun 30, 2024
Slides: 7 pages
Slide Content
CNA 537
Individual Project
Submitted to:
Dr. Amos O. Olagunju
Submitted by:
Problem # 1:
Implementation of Cryptanalysis using transposition and
substitution technique.
•Multidimensionalarraywasused.
•OptionforEncryptionorDecryptionwas
provided.
•Transpositionandsubstitutionwere
preformed.
•Andtheresultwasdisplayed.
Flow of program:
•Choose the option
1: Encrypt.
2: for Decrypt.
•For option 1
•Input the string to encrypt.
•Perform operation to remove blank space in string.
•Divide string in four bits each.
•Perform four bits substitution.
•Divide string in six bits each.
•Perform six bits transposition.
•Display the encrypted string.
•End
•For option 2
•Input the string to decrypt.
•Perform operation to remove blank space in string.
•Divide string in six bits each.
•Perform Six bits substitution.
•Divide string into 4 bits.
•Perform 4 bits transposition.
•Perform decrypted string.
•End
•Diffie-HellmanKeyExchangeallowstwo
principalstoagreeonasharedkeyeven
thoughtheyexchangemessagesinpublic.
•Thefirststepistochoosealargeprime
numberp.
•Thesecondistochooseanintegerg
whereg<p
Problem # 3:
Implementation of Diffie –Hellman Key Exchange.
The protocol works as follows:
A computes:
(TB)SA = (gSB mod p)SA
= (gSB)SA mod p = ((gSBSA) mod p)
Similarly B computes:
(TA)SB = = ((gSASB) mod p)
•Therefore,
((gSASB)modp)=((gSBSA)modp)
isthefinalsharedkey.
Flow of program:
•Provide option:
1: To enter values manually
2: To use default values
•For Option 1
–Input the prime number.
–Check the number is prime or not.
–If not prime enter again, if prime ask for primitive root.
–Check if primitive number is less than prime number or not.
–If not, input primitive root again if yes proceed.
–Input private keys for user A and B.
–Check if private keys are less than prime number or not.
–If not, enter again. If yes generate user A and B keys.
–Interchange the user keys.
–Compute the secret keys.
–Check if the secret keys generated by both user is equal or not.
–If not print error, if yes display the secret key.
–End
•For Option 2
–Use the default value for the prime number and primitive root and then
perform from the step 6in above case.
–End