1 CNG stands for "Cryptography API: Next Generation"
3 CNG is the replacement for CryptoAPI under Windows Vista (and later) and
4 just like CryptoAPI it is a Windows-specific, native (unmanaged) library.
6 In MS implementation the *Cng classes are simply managed wrappers around
7 the native CNG libraries. This is similar to older *CryptoServiceProvider
8 classes that provided managed wrappers around CryptoAPI.
10 In Mono implementation the *Cng classes are, mostly[1], wrappers around
11 existing managed classes provided in older version of the framework.
12 This is essentially similar to what Mono already does for the
13 *CryptoServiceProvider classes (i.e. provide managed implementation).
15 Of couse this won't affect people using the base algorithm classes to
16 create the default instance of their algorithm.
19 SHA256 hash = SHA256.Create ();
20 has been working for years and will continue to do so.
23 New CNG crypto classes Wrapper around
24 ---------------------- --------------
26 ECDiffieHellmanCng none [1]
27 MD5Cng MD5CryptoServiceProvider [mscorlib]
28 SHA1Cng SHA1Managed [mscorlib]
29 SHA256Cng SHA256Managed [mscorlib]
30 SHA384Cng SHA384Managed [mscorlib]
31 SHA512Cng SHA512Managed [mscorlib]
34 [1] Two specific cases, namely ECDH and ECDSA, are new algorithms that
35 were not available before CNG and for which Mono does not, at the
36 present time, have managed alternatives.
38 The *actual* behavior of both class is to throw a PlatformException
39 just like running the same code would do under Windows XP (or earlier).
40 Once we have managed implementations for both algorithms we'll behave