Hi all.

I'm looking for a simple, fairly secure, symmetric algorithm with an easily interfaceable implementation in C or C++, to encrypt/decrypt packets in a simple client/server app I'm making.

It doesn't need to be amazingly secure, just secure enough that casual inspection of the packets won't yield anything useful (i.e. to stop kiddies from sniffing it)

I am happy with using a symmetric key, which will be distributed to the client by some reasonable means. The key size doesn't matter that much to me - I imagine 128 bits will be plenty.

Performance is not that important as it will be fairly low-bandwidth.

I am not sure what algorithm to use, there are a lot floating around.

Any suggestions (ideally with links to src code) would be helpful.

I am not very familiar with cryptanalysis. If I encrypt all my packets with the same symmetric key, and their contents are very similar, is that going to provide attacks?

Because I may use unreliable transport, state must not need to be maintained between packets, as there is a possibility they may be missed. Essentially the cipher will be reset for each packet (although this may be a weak thing to do also). I guess that adding some random junk near (or at) the beginning of the data to encrypt will make it more secure?

Thanks
Slarty