good encryption/decryption algorithm

This is a discussion on good encryption/decryption algorithm within the C Programming forums, part of the General Programming Boards category; hi all,
I am currently looking for a small, secure, and reliable method of encrypting and decrypting strings. I have ...

good encryption/decryption algorithm

hi all,
I am currently looking for a small, secure, and reliable method of encrypting and decrypting strings. I have a link to one at codeproject, but some users have posted that it is not very reliable.

it will be used to encrypt/decrypt network traffic. it doesn't have to be un-crackable, just not TOO easily crackable. its not like it will be protecting super sensitive government data or anything, not protecting anything really important. reliability and usability is key here, I don't need some rock solid algorithm.

another thing that I am looking for, is the algorithm should not add anything to the encrypted string if possible. I have been fooling with a base64 algo which adds characters to the crypted string. this isn't really important, but if possible I would like to find one that keeps the string size to a minimum (or doesn't affect it at all).

if anyone has any recommendations or suggestions, I would be happy to hear them .

I know very simple & yet effective algorithm,
Just Ex-Or input with known string & result will be encrypted string, on reception again Ex-or with same string to get original string.
U can Ex-or it no. of times each time with seperate string for additional safty.

I know very simple & yet effective algorithm,
Just Ex-Or input with known string & result will be encrypted string, on reception again Ex-or with same string to get original string.
U can Ex-or it no. of times each time with seperate string for additional safty.

This is utter nonsense. First of all, xor is for all practical purposes trivial to break. Second, applying xor multiple times does hardly anything for security - if the lengths of two strings are X and Y, it makes the effective length of the string lcm(X, Y), but does so in a manner that is more open to attack than a single random key of length lcm(X, Y). Third, if the strings sent follow any regular format, that will show in the encryption, and key length won't matter that much anyway, if every message uses the same key.

Edit:

Originally Posted by Perspective

Check the "code snippits" section of this website, there is a simple XOR encryption example there.

There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

was really unnecessary.Im not master of all here,that was my opinion.Anyways Thanks for ur answer on Ex_oring. However I guess encryption are not done by single key all time,until & unless its shared,symmetric key algorithms.
I dont have adaquate knowledge of encryption with Ex-Oring ,thanks for updating it.Yes even Im agree that applying xor multiple times does hardly anything for security. However

if the lengths of two strings are X and Y, it makes the effective length of the string lcm(X, Y), but does so in a manner that is more open to attack than a single random key of length lcm(X, Y)

I ain't got this but I was thinking of Ex-Oring X by Y,where X will be divided in length(Y) parts so that effective string will be same as input string
Thanks & Regards
Vinit.

There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

We are certainly not here for arguements,wll If I've said someting which is not right , then u can say "it was wrong" that will do,No need to use harsh words.Anyways thanks for correcting me,I've nothing to say more on this.Lets be friends instead .

Well, to get back on subject, I work with a very popular commercial security controller hardware which is network accessible. This hardware uses the Electronic Code Book implementation of the AES (Rijndael) algorithm for network communication.

IMHO, AES ECB is easy to work with, yet provides a high level of security.

I've read about AES before and about it being a secure algorithm. I have checked out the link you posted BobS0327 and AES ECB seems pretty easy and after some testing I think it is just what I am looking for.

I can't find cryptoAPI, but would be interested in taking a look at it, if it can save me time and size. do you have a link to where I can find cryptoAPI or a similar lib Brian and if so could you please post it?

I can't find cryptoAPI, but would be interested in taking a look at it, if it can save me time and size. do you have a link to where I can find cryptoAPI or a similar lib Brian and if so could you please post it?