Wednesday, September 21, 2005

Encryption Algorithm

Hi Reader,
Here is the encryption algorithm which i developed at HP (Hewlett-Packard,Bangalore) and used in system "Hermes" which i developed as a part of my final semester project.

Steps:

Encryption:

1.
Decide 3-digit key. All 3 digits of key should be different.
Ex. 236


2.
Generate a random number between 0-255. Fill zeros before if required, but number should be of digits.
Ex.178


3.
Place digits of this random number at places indicated by key digits in encrypted string.
Ex. Place 1 at 2nd place, 7 at 3rd place and 8 at 6th place.

4.Now X-OR password characters’ ASCII values and random number. Place them sequentially from left to right at remaining places of encrypted string.

Ex. Password string is “abc” then put 97 X-OR 178 at first place.
Where 97 is ASCII of ‘a’. Put 98 X-OR 178 at forth place, since second and third place is for storing random no. Put 99 X-OR 178 at fifth place.

Decryption:

1.
Extract random no from encrypted string using key.
Ex. Generate number back from picking digits at 2nd, 3rd and 6th places.


2.
Take a character at a time from encrypted except the key value places and X-OR them with random number just generated.

Complexity:
Encryption and decryption complexity is theta(n) ,where n is password length

0 Comments:

Post a Comment

<< Home