Jump to content
  • Advertisement
Sign in to follow this  
garyfletcher

WIN32 cryptography/.NET cryptography compatibility

This topic is 4408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there I was wondering if the Win32 cryptoAPI data en/decoding functions and the .NET objects provided by the System.Security.Cryptography namespace are compatible. I have a C# front-end that generates a config file. The config file is used by C processes to derive general configuration details. Some of these details are sensitive and,therefore, require encrtyption (within the C# app) and decryption (within the C processes). Does anyone know about compatibilty?

Share this post


Link to post
Share on other sites
Advertisement
It looks like nobody knows.

Perhaps you could test the two out on a few cases. This wouldn't give any definitive positive conclusion, but if you find them to be incompatible you can put the idea behind you and start looking for an alternative.

If you fancy getting your hands dirty, you could reverse-engineer the two interfaces and see where they end up (you may need a kernel-mode debugger if the Cryptographic Service is involved). It may turn out that they both wrap the same DLL, in which case compatibility would be a good bet.

Regards
Admiral

Share this post


Link to post
Share on other sites
I you use the same encryption algorithms on the same data with the same key and two different implementations are incompatible, then one or both of those implementations are severely broken and incredibly non-useful.

The APIS used to encrypt or decrypt may be different, but if you don't get out of one end what you put in the other, there's really no point. That is, after all, the basis of cryptography.

Share this post


Link to post
Share on other sites
Same thing applies to hashes, if your different implementations use different salts the resulting hashes will be different, even if the implementations have the exactly the same characteristics.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!