Sei sulla pagina 1di 16

NEW WAY FOR ENCRYPTION DATA

USING HOURGLASS



Author HAMID MEHDI
Department of Computer , Andimeshk Branch, Islamic Azzad University , Andimeshk Iran

Presented By Muslem
NRP 2213206705
Abstrack
Introduction
Terms of an Algoritma Encryption
Proposed Algorithm EDH
Step of Algorithm EDH
Ilustrate Algorithm EDH
Advantages EDH
Conclusion





2
Outline
Nowadays, There are many encryprion algorithms to protect
data,
Data confidentiality is one of the most important functions of
encryption algorithms,
Algorithms encryption must maintain data integrity and provide
availability for information
Encryption must be complexities and not easily detectable
3
Abstrack
INTRODUCTION


Encryption
Decryption
Public key Algorithm
Private Key Algorithm
4
Algorithms Encryption methods have two important
specifications
1. Diffusion,
2. Confusion,
5
Terms of an Algorithm
6
which is called encryption algorithm
using hourglass (EDH), shown in figure.
Algorithm is designed by a circle, top
semicircle is Plain text and another
semicircle is cipher text. Algorithm
includes 26 circles for any characters in
alphabet.
Proposed algorithm EDH



Key to achieve Plaintext is called FPART
Key for achieve Chiper Text is called SPART
7
Proposed algorithm
1. The first character must be indicated in plain text via FPART and must find
its position then must find peer to peer position in cipher text(SPART).
2. When position character in plain text is odd or even permutation continue
while reach to first position in Fpart
3. when calculated character was odd permutation must be continued while
character reaches to the first in spart but in even at second position in spart


8
Steps Of algorithm EDH
9
Ilustrate the algorithm
Assumse Fpart and Spart are belom values :
FPART= PTLNBQDEOYSFAVZKGJRIHWXUMC
SPART= HXUCZVAMDSLKPEFJRIGTWOBNYQ
And plaintext is HAMID
1. Finding the first character position of plaintext in fpart
PTLNBQDEOYSFAVZKGJRIHWXUMC
2. And finding peer to peer the first character in Spart
HXUCZVAMDSLKPEFJRIGTWOBNYQ
3.Permutation Fpart and Spart as results:
FPART= HWXUMCPTLNBQDEOYSFAVZKGJRI
SPART= WOBNYQHXUCZVAMDSLKPEFJRIGT
4.Now, When character increase, in Fpart must be permutation continued while
character reaches the last position then target character must insert at row
number position, also this operation must do by spart but reverse






10
Ilustrate Algorithm (Encryp)
string FPART = MDSLKPEFJYQHXUCZVARIGTWOBN";
string SPART= PYSHWTLNBQDEOXUMCFAVZKGJRI";
string Encrypt(string plainText){
char[] temp ;
char[] temp1 ;
int target;
for (int i = 0; i < plaintext.Length; i++){
Console.WriteLine("{0} {1}", new string(FPART),new string(SPART));
target = Array.IndexOf (SPART, plaintext[i]);
// permute FPART
for (int j = target; j < 26; j++) temp[j - target] = FPART[j];
for (int j = 0; j < target; j++) temp[26 - target + j] = FPART[j];
temp.CopyTo(FPART, 0);
//---------permute SPART
if (i % 2 == 0){target++;}
for (int j = target; j < 26; j++) temp[j - target] = SPART[j];
for (int j = 0; j < target; j++) temp[26 - target + j] = SPART[j];
temp.CopyTo(SPART, 0);}
INSERT CHARACTER IN ROW NUMBER Position FROM RIGHT

11
Algorithm Pseudo Code [Encrypt]

12
Ilustrate Decryption
char[]FPART= FPART.ToCharArray();
char[] FPART1 = FPART.ToCharArray();
char[] SPART = sAlphabet.ToCharArray();
char[] temp ;
char[] temp1;
int target;
for (int i = 0; i < ciphertext.Length; i++){
Console.WriteLine("{0} {1}", new string(FPART), new string(SPART));
target = Array.IndexOf (FPART, ciphertext[i]);
plaintext[i] = SPART[target];
// permute FPART
for (int j = target; j < 26; j++) temp[j - target] = FPART[j];
for (int j = 0; j < target; j++) temp[26 - target + j] = FPART[j];
temp.CopyTo(FPART, 0);
// permute SPART
if (i % 2 == 0){target++; }
for (int j = target; j < 26; j++) temp[j - target] = SPART[j];
for (int j = 0; j < target; j++) temp[26 - target + j] = SPART[j];
temp.CopyTo(SPART, 0);
INSERT CHARACTER IN ROW NUMBER Position FROM LEFT

13
Algorithm Pseudo Code [Decrypt]
Changeability of methods for using in different forms,
Changeability with less cost and it is complexity,
Keys changeability, that is possible easily
14
Advantages Of EDH
Cryptography is One of The Most Important methods to
Prevention of robberies, misuses and etc
Algorithm EDH method is user-friendly and has difficult
encryption.
Not easily detectable and efficient
Enough complexity and also it can be used easily

15
Conclusion
THANK YOU
16