Trying to find a simple symmetric encryption algorithm.
3 replies, posted
Hi. I've been searching for a simple symmetric encryption algorithm for a while and I just simply cannot find a lightweight yet secure algorithm that's implemented in C++ (I don't understand the diagrams and so I cannot code it myself). Ideally, it would be a stream algorithm (as opposed to block) with a key size of 128 bits where the input and key would be a string. Would anyone be able to give me a link to such an algorithm or a pointer on where to look that I might have missed? Thanks.
AES or Triple DES which are both available through [URL="http://www.cryptopp.com/"]Crypto++[/URL], as well as many other ciphers.
Be careful with stream ciphers: they're weak if you ever use the same key twice, and attackers can in some cases modify the message in chosen ways without knowing the key. (See [url=https://en.wikipedia.org/wiki/Stream_cipher_attack]this[/url] for more info.)
Stream ciphers can make sense for encrypting things like communication lines, but block ciphers are typically more appropriate for encrypting computer files; that's why the widely-used standards, such as AES and DES, are block ciphers.
I have been looking into block ciphers, they do seem like a better choice, however when I have looked up bindings for the algorithms, I haven't understood at all how to use them, so could someone please post an example usage of say an AES binding?
Sorry, you need to Log In to post a reply to this thread.