Re: Crypto API using RC2 instead of RC4?

From: Matt (mtaylor_at_gladstonemrm.com)
Date: 11/24/05


Date: 23 Nov 2005 15:27:00 -0800

Hello Valery,

My test application creates a random string.
It then passses that string to be encrypted.
The returned encrypted string is then immediately decrypted to make
sure it matches the original string.
This works about 19 out of 20 times until the CryptDecrypt API call
returns False resulting in an error being raised.

I'm not clued up on encryption but as far as I can tell all the padding
is done in the
'-- Prepare data for decryption.--' section in the function I posted,
and that is identical to the Encrypt function so should work fine?
The KB example code certainly does not provide the ability to set any
padding, only the ciphers and a password key.

If you are willing I am happy to send you a ready to run test project
so that you can see for yourself.

Thanks,

Matt



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: 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.dotnet.languages.csharp)
  • 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)