Merge pull request #93 from konrad-kruczynski/dispatcher_timer_fix
[mono.git] / mcs / class / System.Core / System.Security.Cryptography / README.CNG
1 CNG stands for "Cryptography API: Next Generation"
2
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.
5
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.
9
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).
14
15 Of couse this won't affect people using the base algorithm classes to
16 create the default instance of their algorithm. 
17
18 E.g.
19         SHA256 hash = SHA256.Create ();
20 has been working for years and will continue to do so.
21
22
23 New CNG crypto classes          Wrapper around
24 ----------------------          --------------
25 ECDsaCng                        none [1]
26 ECDiffieHellmanCng              none [1]
27 MD5Cng                          MD5CryptoServiceProvider [mscorlib]
28 SHA1Cng                         SHA1Managed [mscorlib]
29 SHA256Cng                       SHA256Managed [mscorlib]
30 SHA384Cng                       SHA384Managed [mscorlib]
31 SHA512Cng                       SHA512Managed [mscorlib]
32
33
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.
37
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
41 like Vista.