Multimobile Development: Building Applications for any Smartphone
the old and the new? WINCRYPT.H
Messages   Related Types
This message was discovered on microsoft.public.dotnet.security.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

hazz
I am designing an encryption/decryption solution. I can use the .NET
System.Security.Cryptography for all of my .NET components but there is one
service written in Visual C++ (6.0) that I will need to decrypt what I
encrypt in the .NET class/component.

VS 6.0, the development environment that the C++ service was created with,
has a file WINCRYPT.H with a data of 4/24/98.

I was hoping to use symettric encryption and specifically use CryptDeriveKey
so that I can convert a password into a key.

If I use CryptDeriveKey in this case for encryption, would I be able to
decrypt it in the C++ component developed within the Visual C++ (6.0)
developement environment. Did they have any mechanisms back in 1998 to do
this?

I see mention of CryptDeriveKey as a Session Key in some documentation back
in 1996 but I don't see any match for CryptDeriveKey in the WINCRYPT.H file
located in C:\Program Files\Microsoft Visual Studio\VC98\Include .

Are there updated versions of the cryptoapi files in C++ I could acquire
that would allow me to use this functionality?

Thanks, -greg

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
Shawn Farkas (VIP)
Hi Greg,

    You sure can do that. I've got some details on my blog entry here: http://blogs.msdn.com/shawnfa/archive/2004/04/14/113514.aspx.
CryptDeriveKey is available in WinCrypt.h, but you seem to have a very old version of the Platform SDK. I recommend downloading a newer
version from here:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

And you'll find some CryptDeriveKey documentation here: http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/seccrypto/security/cryptderivekey.asp

-Shawn
http://blogs.msdn.com/shawnfa

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
--------------------
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Hazzard
Thank you Shawn,

Nicole in an earlier post pointed me to your blog. That got me well on the
way toward getting that to work with an MD5 encrypted password as the key.
It took a little massaging but it works, thanks to Nicole's mentioning of
your excellent info. And thank you for the other link you provided below. I
had come across that earlier today and you just cemented that idea.

Appreciatively,
-Greg
""Shawn Farkas"" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Shawn Farkas (VIP)
Glad to help get you un-stuck :-)

-Shawn
http://blogs.msdn.com/shawnfa

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
--------------------
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
 
System.Security.Cryptography.MD5




Multimobile Development: Building Applications for any Smartphone
Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734