RE: Padding issue with C++ Crypto RC2 encryption

From: kishore (kishore_at_discussions.microsoft.com)
Date: 01/27/05

  • Next message: JohnHorb: "RE: Strange 'bug' with Windows Authentication"
    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.
    >
    >


  • Next message: JohnHorb: "RE: Strange 'bug' with Windows Authentication"

    Relevant Pages

    • Re: Securing data to a process principal
      ... encryption key first time for the user - and use it later). ... secret. ... I need the decryption to ... You MAY think that instead of a filter driver you can simply ...
      (microsoft.public.platformsdk.security)
    • Re: embedded keys - there has to be a less vulnerable approach
      ... the database would be run on top of an encrypting file system ... > The use of an asymmetrical encryption algorithm does not seem to offer ... because the encryption and decryption ... > a hostile attacker is not a member of that small knowledgeable elite. ...
      (comp.security.misc)
    • embedded keys - there has to be a less vulnerable approach
      ... the database would be run on top of an encrypting file system ... The use of an asymmetrical encryption algorithm does not seem to offer ... because the encryption and decryption ... You have a table with customer names and addresses. ...
      (comp.security.misc)
    • NTE_BAD_DATA
      ... decryption module using the self signed certificate. ... My encryption and decryption module are as follows. ... goto Exit_MyDecryptFile; ... // imported from a BLOB read in from the source file or having ...
      (microsoft.public.platformsdk.security)
    • Re: How to Facilitate and Use Data Protection on DOM (WinCE 6.0)
      ... encryption on and off, while still having the filter load. ... Decryption in my file system filter seems to work fine but the 2nd ... FS filter is NOT APPLIED to Removable USB ... Hard Disk as well as the Removable USB media. ...
      (microsoft.public.windowsce.platbuilder)