Re: DPAPI with User Profile

From: Nicole Calinoiu (nicolec_at_somewhere.net)
Date: 08/27/04


Date: Fri, 27 Aug 2004 14:19:40 -0400

A few questions:

1. Which MSDN article(s) did you use as your source(s)?

2. Are you using the user or machine store? (i.e.: Are you setting the
CRYPTPROTECT_LOCAL_MACHINE flag when calling DPAPI?)

3. Are you trying to decrypt data on Win2K machines when the original
encryption was performed on a WinXP machine? (See
http://support.microsoft.com/default.aspx?scid=kb;en-us;309408#6.)

"Kiran Kumar Pinjala" <KiranKumarPinjala@discussions.microsoft.com> wrote in
message news:62F8BDA5-4315-4379-896B-9AD37402A25B@microsoft.com...
> Hi all,
> I am using DPAPI to encrypt and decrypt strings. Copied all the code
> from
> the MSDN site. Everything works fine if I do both encryption and
> decryption
> on one machine.
>
> I have posted this error before and was told to use roaming profile by
> Steve Jansen, so i did that.
>
> The user profile that I am using is a network user with roaming profile.
>
> The problem is when I encrypt a string on machine1 and try to decrypt
> the
> encrypted stirng on the machine2, I keep getting the error "Key not valid
> for
> use in the specified state"
>
> Can anybody help me with this?
>
> Thanks in advance.
> Kiran Kumar Pinjala



Relevant Pages

  • How do I Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)?
    ... Use DPAPI to Encrypt and Decrypt Data ... The code below demonstrates how to call Data Protection API (DPAPI) ... In addition to encryption and decryption, ... public static string Encrypt ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • 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: CryptAPI(encryption/decryption)
    ... It seems like you're missing the Base64 decode step when trying to decrypt ... I misspelled the Private Key as Primary Key. ... Is there any variation in the encryption format in openssl compared to ... "Dylan DSilva " wrote: ...
    (microsoft.public.pocketpc.developer)
  • Re: Writing spaghetti code for obfuscation/encryption
    ... > undocumented opcodes and simple encryption? ... do the protection and distribution (I'll justify this later, ... This key was used to decrypt the main program code. ... So here's the scheme in action: Put disk in, ...
    (comp.lang.asm.x86)
  • Re: Which is more secure RC2 or RC4 ?
    ... Credit card info... ... If your application can decrypt the information (in order to send it ... one goofy solution may be to use public key encryption on ... decryption key on a separate computer (laptop). ...
    (sci.crypt)