RE: Padding issue with C++ Crypto RC2 encryption
From: kishore (kishore_at_discussions.microsoft.com)
Date: 01/27/05
- Previous message: Nicole Calinoiu: "Re: sn.exe -Vr assembly"
- In reply to: kishore: "Padding issue with C++ Crypto RC2 encryption"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 27 Jan 2005 06:45:02 -0800
Got rid of the padding issue when I switched the encryption algorithm from
RC2 to RC4.
"kishore" wrote:
> Hello, I'm using the Crypto API RC2 encryption under Visual Studio 6 C++.
>
> I've written some code and got encryption and decryption working fine.
>
> The problem is when data is encrypted, the data is padded to accommodate for
> block size. So I have the data encrypted with these additional characters.
> The problem then is when I decrypt it, I get back the decrypted data with
> the additional characters. My question(s) are :
>
> 1. How can I prevent the additional characters being padded and encrypted?
> Is this even possible?
>
> 2. If I can't prevent #1 above, how can I extract only the encrypted
> substring associated with the original string. If my original string was
> "hello", I tried extracting only 5 chars from the encrypted string so I could
> use this for decryption to get back "hello", but this didn't work.
>
> Is there a one to one correspondence between the length of a string and the
> lenght of an encrypted string? E.g. If have the string "hello" and have it
> encrypted, will each letter in "hello" be associated with a single character
> in the encrypted string?
>
> Thanks.
>
>
- Previous message: Nicole Calinoiu: "Re: sn.exe -Vr assembly"
- In reply to: kishore: "Padding issue with C++ Crypto RC2 encryption"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|