LECTURE NOTES ON Classical Cryptographic Techniques (: Substitution Ciphers System)
LECTURE NOTES ON Classical Cryptographic Techniques (: Substitution Ciphers System)
LECTURE NOTES ON Classical Cryptographic Techniques (: Substitution Ciphers System)
DepartmentofSoftware
LECTURENOTESONClassicalCryptographic
Techniques(SubstitutionCiphersSystem)
By
Dr.SamaherHusseinAli
CollegeofInformationTechnology,UniversityofBabylon,Iraq
[email protected]
ClassicalCryptographicTechniques
havetwobasiccomponentsofclassicalciphers : Substitution and Transposition
ClassicalCiphers
Transposition
Substitution
Fig1.ClassicalcipherMethods
InSubstitutionCipherslettersarereplacedbyotherletters ,suchasthewordmessageinthefollowing:
KEY=7
PHVVDJH
TLZZHNL
KEY=3
MESSAGE
YQEEMSQ
HZNNVBZ
KEY=21
KEY=12
SubstitutionCiphersSystem
Simplesubstitutionsystem(mono)
Homophonicsubstitutionsystem
Polyalphabeticsubstitutionsystem
Dr.SamaherHusseinAli
NotesofLecture3
SubstitutionCiphersSystem
1.
SimpleSubstitutionSystem\ MonoSubstitutionSystem
AdditiveCipher
MultiplicativeCipher
AffineCipher
ReverseCipher(27P)
AdditiveCipher
CipherText(C)
PlainText(P)
+
Key(K)
Plain
Text(P)
Key(K)
CipherText
Mod26Mod26
(C)
C=(P+K)Modn
P=(CK)Modn
LetC=CipherText
P=PlainText
K=Key;K=2,3,.,25
n=26,ofEnglishalphabetic
Example:Let,Plaintext=help,key=3(orusingCeaserMethod)
Plaintext: HELP
Ciphertext: KHOS
Dr.SamaherHusseinAli
NotesofLecture3
SubstitutionCiphersSystem
AdditiveCipher(TheCaesarcipher)
Key=3
Outer:plaintext
Inner:ciphertext
ForakeyK=3,
plaintextletter:
ABCDEF...UVWXYZ
ciphter textletter:
DEFGHI... XYZABC
Example:
TREATY IMPOSSIBLE
istranslatedinto
WUHDWB LPSRVVLEOH
Dr.SamaherHusseinAli
NotesofLecture3
SubstitutionCiphersSystem
MultiplicativeCipher
CipherText(C)
PlainText(P)
*
Key(K)
Mod26
CipherText
(C)
*
Inv.
Key(K)
C=(P*K)Modn
Mod26
Plain
Text(P)
P=(C*inv (K))Modn
LetC=CipherText
P=PlainText
K=Key;K=2,3,.,25
n=26,ofEnglishalphabetic
Example:Let,Plaintext=help,key=3
Plaintext: HELP
Ciphertext: XOJV
Note:wecanfindtheinv(key)asfollowing
(K*Inv(K))Modn=1
Example:Let,Key=3
(3*X)mod26=1
(3*9)mod26=27mod26=1 inv(3)=9
Dr.SamaherHusseinAli
NotesofLecture3
SubstitutionCiphersSystem
Note: Thenumberofusefulkeyinmultiplicative
Keyinversekey
39
5
21
9 3
11 19
15 7
17 23
19 11
21 5
23 17
25 25
Example:Let,Key=5
(5*X)mod26=1
(3*21)mod26=105mod26=1 inv(5)=21
Example:Let,Plaintext=MYDOCUMENT,key=21,FindtheciphertextusingMultiplicativeCipher
Sol:Key=21;inv(21)=5
C=(P*K)Mod26
Plaintext: MYDocument
Ciphertext:.
Then,P=(C*Inv(K))Mod26
Ciphertext:.
Plaintext: MYDocument
Dr.SamaherHusseinAli
NotesofLecture3
SubstitutionCiphersSystem
AffineCipher
Affinecipher:Itisahybridbetweenanadditiveandmultiplicativemethods
PlainText(P)
PlainText(P)
* +
+Mod26*Mod26
Or
Key(K2)
CipherText(C)
Key(K1)
Key(K1)
Key(K2)
CipherText(C)
C=((P*K1)+K2)ModnC=((P+K2)*K1)Modn
CipherText(C)
CipherText(C)
Key(K2)
Inv(K1)
PlainText(P)
Inv(K1)
PlainText(P)
Key(K2)
P=((CK2)*Inv (K1))ModnP=((P*INV(K1)K2)Modn
K1=Multiplicativecipherkey
K2=Additivecipherkey
Dr.SamaherHusseinAli
NotesofLecture3
ClassicalCryptographicTechniques
Asaresultclassicalciphers : substitution and transposition
Classical
Cipher
Methods
Message
Reversal
Horizontal
Geometric
Patterns
Transposition
Substitution
Methods
Methods
Route
variations
Vertical
Zig Zag
Transposit
ion
Diagonal
Route
transposit
ion
Clockwise
Simple
substitution
system
Homophonic
substitution
system
Polyalphabetic
substitution
system
Counter
Clockwise
Fig.ExpendingofClassicalcipherMethods
Dr.SamaherHusseinAli
NotesofLecture2