# encryption algorithm (urgent)

yo im making my own (stream) encryption algorithm which is basically

for 0<=x<=length of text to be encrypted

text character(x) is xored by every pass character in turn

text character(x) is xored by the length of the entire password

text character(x) is xored by 1 pass character which rotates (i.e. the x th pass character mod the length of the password)

my problem is: if the password is longer than the text, the order of the excess of the password does not matter i.e.

text: ab
pass: 12345678

the incorrect pass: 12876543 will sucessfully decrypt the ciphertext :(

plz list ANY ideaz coz i really need to have this finished REALLY soon

thankz

suma
LVL 1
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
If the text to be encrypted is shorter than the key, why not pad the text out?

Or, consider the following.  So short a piece of plain text, in and of itself, should never carry much import, as a brute force and ignorance attack is quickly successful.  For example, not even the greenest security officer would every condone such a short, say, password for even the least userid.

0
Author Commented:
ok i have tried padding the text but this does not increase security,  for example

text: abcd

pass: 12345678

incorrect pass: 12348765

plaintext produced from decrypting with incorrect pass: abcdXXXX (X stands for any character)

this does not solve the problem coz it will be very obvious that the X's are just padding

0
Commented:
Hence the comment about little security for short plain text.

Now, if the recipient knows the good part is just, in this case, two bytes, and the cracker doesn't, padding with randomized instances of the plain text (e.g., abbbabaa) would make the crackers life a tad more difficult.

<justthinkingoutloud>
I wonder if you'd have the same problem with something like:

a <- leftcircularshift(a,1)

a <- leftcircularshift(a,1)

a <- leftcircularshift(a,1)

with the decrypt being:

a <- rightcircularshift(chunk,1)

a <- rightcircularshift(a,1)

a <- rightcircularshift(a,1)
</justthinkingoutloud>
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
xoring with a password is a very weak encryption system even whenmodified to avoid the above problems
Here is a list of some stronger encryption algorithms
http://www.ssh.fi/support/cryptography/algorithms/symmetric.html
0
Author Commented:
thankz cookre... that should work heaps good :)
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.