Re: Help needed with encryption algorithm




Nemok wrote:
> Writing my own encryption (strong) is proving to take more time that I
> have thought. What I need is a small, portable (in C\C++) encryption
> algorithm for encrypting strings, that has a small output (encrypted
> string) that is the same length (or a little bigger) as the original
> 'to be encrypted' string. AES is not an option because I need something
> that doesn't have fixed block sizes and key sizes and is somewhat
> smaller in size. I don't need something too advanced or theoretically
> unbreakeable.

AES doesn't have to be used in a CBC/ECB style mode. CTR would give
you a flexible ciphertext size.

Also I don't get the "smaller key size" bit. Bits are cheap [one good
quote from Bruce]. How will using a 128-bit key cost dramatically more
than say a 40-bit key? That said you can always zero pad the key and
use the resulting string for AES [I'd just repeat the key itself but
zero pad should be ok too].

Of course I'd just use 128-bit at a minimum regardless...

As for "too advanced" that's why you use a crypto library. I'd also
suggest you read up more on the subject matter before you field
anything.

Tom

.



Relevant Pages

  • Re: Byte array to string and back - newbie question
    ... // Create a symmetric algorithm. ... This is done to make encryption more ... // Encrypt a string into a string using a password ... // Decrypt a byte array into a byte array using a key and an IV ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Web app security
    ... to make the.NET AES encryption to work together with the AES encryption ... BTW, in your code, you first use Unicode Encoding to convert string to ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Using Python To Create An Encrypted Container
    ... an encrypted archive utility designed for secure archiving ... A match string allows you to only extract files matching a given ... Encrypt the string s using passwd and encryption cipher enc ...
    (comp.lang.python)
  • Re: How good an encryption algorithm is this?
    ... As long as the string can be converted to/from a byte stream, ... then you can apply that after the encryption. ... > So I decided to invent my own algorithm, and I just wanted anybody's> opinion on how secure this could be compared to the Win32 API version. ... > HCRYPTHASH hCryptHash; ...
    (microsoft.public.vc.language)
  • Length of the data to decrypt is invalid
    ... I found this code on a site for doing string encryption/decryption. ... // Create a symmetric algorithm. ... // This is done to make encryption more secure. ... // This will tell it that we have done our decryption ...
    (microsoft.public.dotnet.framework.aspnet)