Re: Encryption/Decryption

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Don Dumitru [MSFT] (dondu_at_online.microsoft.com)
Date: 08/18/04


Date: Tue, 17 Aug 2004 18:04:58 -0700


>From the thread going on in the microsoft.public.windowsce.embedded.vc
newsgroup, I am going to assume that this is getting resolved as an issue of
using an ANSI pass-phrase on the desktop, and a Unicode pass-phrase on the
device.

--Don

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
"Don Dumitru [MSFT]" <dondu@online.microsoft.com> wrote in message 
news:OPB1KmLhEHA.904@TK2MSFTNGP09.phx.gbl...
> Can you provide the full URL for the sample, so I can be sure that we are 
> looking at exactly the same thing?  Without it, I don't know which actual 
> sample you might be looking at, and I can only guess at what problems you 
> are having, and I won'd be able to reliably reproduce the behavior myself.
>
> From your description, it sounds like the sample works by generating an 
> RC4 key into a key container for the user, and then encrypting / 
> decrypting the file using that key.  I am guessing here, but...  You run 
> an "init user" app on both the sender and the receiver, and give it the 
> same pass-phrase?  And it generates an RC4 key and places it in the user's 
> key container?  You then run an encryption program, which uses the stored 
> key to encrypt a file.  You move the file to the other machine, and run 
> the decryption program, which accesses the stored key and decrypts the 
> file.
>
> That's what it sounded like it was doing.
>
> The first thing to verify would be that you can decrypt the file 
> successfully, on the desktop, without Windows CE involved.  The next thing 
> to do is to build the "init user" app for Windows CE, and run it, and see 
> if it succeeds.  Ideally, you would single-step through with a debugger, 
> and examine each error return, in case the application itself does not 
> adequately report some error that it receives.  Finally, you need to build 
> the decryption program for Windows CE, run it, and again hopefully 
> single-step through it to examine error codes which might be getting 
> returned from various API's.
>
> From your description of how the app's are supposed to work, I would look 
> closely at how the "init user" and decryption programs access the RC4 key 
> stored in the key container.  Since Windows CE has a different user model 
> than the desktop, and since key containers are associated with users, this 
> is an area where the app could be getting different behavior than it was 
> expecting.  The most likely case is that some error is being returned, and 
> the app simply isn't checking the error code, and blindly cruising along 
> as if the API had succeeded.
>
> --Don
>
>
> "Arvind" <arvinds@erivasystems.com> wrote in message 
> news:%23yBu2MBhEHA.3964@TK2MSFTNGP12.phx.gbl...
>>i got it from www.msdn.com
>>
>> basically theres 2 applications..
>>
>> desktop for encrypting
>>
>> pocket pc for decrypting..
>>
>> ive used RC4 to encrypt and using the same to decrypt..
>> but im getting the wrong output file.
>>
>> i have used the inituser for client for storing and generating
>> keys(Container)
>>
>> but i couldnt find the same init user application for pocket pc
>>
>> can i get one?
>>
>> --
>> Thanks,
>>
>> Arvind
>>
>>
>> --
>> "eRiva Systems" - Where Technology Meets Life, Every Minute.
>>
>> arvindr@erivasystems.com
>>
>> www.erivasystems.com
>>
>> "Don Dumitru [MSFT]" <dondu@online.microsoft.com> wrote in message
>> news:#5ujxoYgEHA.1356@TK2MSFTNGP09.phx.gbl...
>>> Can you provide a URL for the sample which you used?  Was it a specific
>>> Windows CE sample, or a more general Win32 sample?  Presumably, some
>>> function call is failing, and the sample isn't reporting the failure.
>>>
>>> --Don
>>>
>>> --
>>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>>
>>>
>>> "Arvind" <arvinds@erivasystems.com> wrote in message
>>> news:u1BRZURgEHA.2764@TK2MSFTNGP11.phx.gbl...
>>> > Hello,
>>> >
>>> > im trying to use crypto API's in pocket pc (EVC++)
>>> >
>>> > to encrypt the WMV Files and decrypt the same.
>>> >
>>> > what i did is just copied the sample application which is provided in
>> the
>>> > help and tried to run in the pocket pc
>>> >
>>> > the application for encryption creates the destination file but the
>>> > content
>>> > are not added in that..
>>> > (File shows 0 BYTES)
>>> >
>>> > is there any other way around i have to try?
>>> >
>>> > plese let me know ur ideas..
>>> >
>>> > --
>>> > "eRiva Systems" - Where Technology Meets Life, Every Minute.
>>> >
>>> > arvindr@erivasystems.com
>>> >
>>> > www.erivasystems.com
>>> >
>>> >
>>>
>>>
>>
>>
>
> 


Relevant Pages

  • Re: how create hard drive password
    ... Since no operating system is running at that point (where you want some password prompt to have access to the hard drive), just WHAT software do *you* want to be loaded before the OS loads to then execute those commands to present you with the prompt? ... Alternatively, there are programs that usurp the bootstrap program in the MBR to run their program to provide a password to decrypt your encrypted hard drive, but decrypting incurs overhead for the time to do the decryption so there will be a performance penalty. ... it is highly unlikely that you have any real need despite your perception of such a need to encrypt or hide the operating system or the commercial applications since anyone could buy or steal a copy to get that code. ... You could use TrueCrypt for that to create encrypt container in which you keep your data files, and when you want to access that data you then open the container and get a password prompt to gain access. ...
    (microsoft.public.windowsxp.basics)
  • Re: SPES (my new encryption) one of its kind
    ... test data should be $0000) and encrypt it. ... decryption is successfull (output is the expected known data, ... feature the output will not be validated since the authentication tag ...
    (sci.crypt)
  • Re: (Complete post) Decrypting CAPICOM objects with System.Security.Crypto methods
    ... CAPICOM Encrypt method is a proprietary implementation this is designed to ... then you can use the .NET Pkcs classes for decryption. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.platformsdk.security)
  • Re: whats wrong with this code?, getting lot of
    ... I have created some code which encrypt and decrypt text. ... If I have the string "sambi" and encrypt it... ... Rijndael is a 128 bit block cypher, so a block is 16 bytes. ... that the problem is somewhere on the decryption side. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Attaching conditions to RIPA ?
    ... if it is shown that that person was in possession of a key ... encrypt something and not be able to decrypt. ... Are you saying that you encrypt files that you do not intend to retrieve ... for me to provide the decryption key. ...
    (uk.legal)