[corlib] Improve CancellationTokenSource test
[mono.git] / mcs / class / corlib / Mono.Security.Cryptography / ChangeLog
1 2010-05-25  Jb Evain  <jbevain@novell.com>
2
3         * CryptoTools.cs: make types internal for INSIDE_SYSCORE as well.
4
5 2010-03-16  Jb Evain  <jbevain@novell.com>
6
7         * CryptoTools.cs, PKCS1.cs, PKCS8.cs, SymmetricTransform.cs,
8         KeyPairPersistence.cs: use MOONLIGHT symbol to disambiguate
9         MonoTouch and Moonlight code.
10
11 2009-09-18  Sebastien Pouliot  <sebastien@ximian.com>
12
13         * PKCS1.cs: Fix compiler warning for NET_2_1
14
15 2009-04-30  Sebastien Pouliot  <sebastien@ximian.com> 
16
17         * CryptoConvert.cs, PKCS8.cs: Adapt to work with only [DSA|RSA]
18         Managed when built for NET_2_1, i.e. remove use of [DSA|RSA]
19         CryptoServiceProvider
20         * KeyPairPersistence.cs: Remove from NET_2_1
21
22 2009-04-29  Sebastien Pouliot  <sebastien@ximian.com>
23
24         * PKCS1.cs: Make this work under NET_2_1 where SHA384 and SHA512
25         are not available in the BCL.
26
27 2008-08-07  Sebastien Pouliot  <sebastien@ximian.com>
28
29         * SymmetricTransform.cs: Make this (more) usable with SL2 limited
30         crypto support.
31
32 2008-08-05  Sebastien Pouliot  <sebastien@ximian.com>
33
34         * CryptoTools.cs: Make this usable with Silverlight 2.0 (NET_2_1)
35
36 2008-04-21  Sebastien Pouliot  <sebastien@ximian.com>
37
38         * CryptoConvert.cs: Fix HMAC to respect start index inside an array.
39         Patch by Kazuki Oikawa.
40
41 2008-03-13  Sebastien Pouliot  <sebastien@ximian.com>
42
43         * CryptoConvert.cs: Re-order exception handling to report the most
44         precise error to caller. Apply RSA extra check to DSA.
45         * RSAManaged.cs: Test imported parameters to ensure the public and 
46         private parts of the keypair match together.
47
48 2008-03-04  Sebastien Pouliot  <sebastien@ximian.com>
49
50         * SymmetricTransform.cs: Fix ANSIX923 padding check (#366623) to be
51         just like PKCS7 (but comparing to 0).
52
53 2008-02-03  Sebastien Pouliot  <sebastien@ximian.com>
54
55         * DSAManaged.cs: Replace "" (found by Gendarme) with more useful text.
56         * RSAManaged.cs: Replace "" (found by Gendarme) with more useful text.
57
58 2008-01-10  Sebastien Pouliot  <sebastien@ximian.com>
59
60         * PKCS1.cs: Add a new method that optionally checks for badly 
61         padding, technically invalid, PKCS#1 block. This is required to
62         support timestamping verification for Authenticode (since the 
63         main timestamping service does this). Fix for #350958
64
65 2007-11-18  Sebastien Pouliot  <sebastien@ximian.com>
66
67         * RSAManaged.cs: Fix the rare case where the inverse of q modulo p 
68         can result in bigint one byte shorter than expected, which could 
69         mess up the export/import of the key.
70
71 2007-05-08  Sebastien Pouliot  <sebastien@ximian.com>
72
73         * CryptoConvert.cs: Sync with Mono.Security version - mostly the patch
74         from Randolph Chung to add DSA CAPI BLOB support.
75
76 2007-05-08  Randolph Chung  <tausq@debian.org>
77
78         * DSAManaged.cs: Do not reject the input if only Y is null.
79         Fixes #81558. [small edits from Sebastien]
80
81 2007-03-22  Sebastien Pouliot  <sebastien@ximian.com>
82
83         * SymmetricTransform.cs: Before 2.0 an IndexOutOfRangeException was 
84         thrown (for all unmanaged transforms) in case of an overflow.
85
86 2007-03-05  Sebastien Pouliot  <sebastien@ximian.com>
87
88         * SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption 
89         with no padding or zero padding. Part of the fix for #81008.
90
91 2007-01-08  Sebastien Pouliot  <sebastien@ximian.com>
92
93         * SymmetricTransform.cs: Fix #80439 again. This time we have tests for
94         all ciphers, modes and padding.
95
96 2007-01-04  Sebastien Pouliot  <sebastien@ximian.com>
97
98         * SymmetricTransform.cs: Fix previous fix (for #80439) as we were now
99         too permissive.
100
101 2007-01-03  Sebastien Pouliot  <sebastien@ximian.com>
102
103         * SymmetricTransform.cs: Reduce inputCount if larger than the output
104         data can hold. Fix bug #80439.
105
106 2006-12-11  Sebastien Pouliot  <sebastien@ximian.com>
107
108         * PKCS8.cs: Synchronize source with Mono.Security.dll
109
110 2006-09-27  Sebastien Pouliot  <sebastien@ximian.com>
111
112         * RSAManaged.cs: Ensure that the results of Encrypt and Decrypt will
113         always be the same length as the key. If smaller then we left pad the
114         result with 0x00 (same integer, correct length for everyone). Fix bug
115         #79502 where an LDAP/SSL server didn't like the missing byte.
116
117 2006-09-05  Sebastien Pouliot  <sebastien@ximian.com>
118
119         * RSAManaged.cs: Fix a NRE when decrypting without a private key 
120         (#79269). We now throw a CryptographicException with an appropriate
121         text message.
122
123 2006-06-15  Sebastien Pouliot  <sebastien@ximian.com>
124
125         * CryptoTools.cs: Fix offset in block processor. This fix the HMAC
126         algorithms when large buffer where used (with multiple calls to
127         TransformBlock).
128
129 2005-11-23  Sebastien Pouliot  <sebastien@ximian.com>
130
131         * SymmetricTransform.cs: Virtualized some methods (like Dispose). Fix
132         bug #76801.
133
134 2005-11-22  Sebastien Pouliot  <sebastien@ximian.com>
135
136         * DSAManaged.cs: Don't export J if it wasn't imported (i.e. it was 
137         calculated from the other parameters).
138
139 2005-10-21  Sebastien Pouliot  <sebastien@ximian.com>
140
141         * SymmetricTransform.cs: Clone IV so it cannot be changed once the 
142         transform starts. Generate a new IV if null is specified (not really
143         useful but compatible with MS behaviour). Added a check for IV length
144         on 2.0.
145
146 2005-05-26  Ben Maurer  <bmaurer@ximian.com>
147
148         * KeyPairPersistence.cs: Lock *before* checking if things are null
149         to prevent race conditions. Also, do not lock on typeof object.
150
151 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com>
152
153         * KeyPairPersistence.cs: Use PlatformID.Unix under NET_2_0. 
154
155 2005-04-27  Sebastien Pouliot  <sebastien@ximian.com>
156
157         * PKCS8.cs: New. Copied from Mono.Security.dll to allow support of
158         PKCS#12 files in X509Certificate for 2.0.
159
160 2005-04-18  Sebastien Pouliot  <sebastien@ximian.com>
161
162         * SymmetricTransform.cs: Fixed a division by zero if someone changes 
163         the feedback value to 0.
164
165 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
166
167         * SymmetricTransform.cs: Fixed a padding bug affecting that can occurs
168         when no padding is used.
169
170 2005-01-11  Sebastien Pouliot  <sebastien@ximian.com>
171
172         * DSAManaged.cs: PublicOnly now reports false when a key hasn't yet 
173         been generated.
174         * RSAManaged.cs: PublicOnly now reports false when a key hasn't yet 
175         been generated.
176
177 2005-01-10  Sebastien Pouliot  <sebastien@ximian.com>
178
179         * MACAlgorithm.cs: Added support for different padding modes (required
180         in 2.0).
181         * SymmetricTransform.cs: Added support for ANSI X9.23 padding and
182         ISO 10126 padding modes (applies to all symmetric block ciphers).
183
184 2004-12-22  Sebastien Pouliot  <sebastien@ximian.com>
185
186         * KeyPairPersistence.cs: Commented imperative asserts until it is 
187         supported by the runtime.
188
189 2004-12-06  Sebastien Pouliot  <sebastien@ximian.com>
190
191         * RSAManaged.cs: Implement key blinding for RSA decryption with, or
192         without, using CRT.
193
194 2004-11-23  Sebastien Pouliot  <sebastien@ximian.com>
195
196         * PKCS1.cs: Fix PKCS#1 v1.5 decryption when the ciphertext isn't 
197         exactly the same of the public key (which happens sometimes on Fx 1.1
198         probably because it doesn't do the last I2OSP operation to left pad
199         the resulting big integer with zeros).
200
201 2004-10-28  Sebastien Pouliot  <sebastien@ximian.com>
202
203         * KeyPairPersistence.cs: Added localization for exceptions messages.
204         Also added more details (type and path) when an exception is thrown.
205
206 2004-09-29  Sebastien Pouliot  <sebastien@ximian.com>
207
208         * RSAManaged.cs: KeySize is always a multiple of 8 bits (promotion to
209         a bigger size if required) to match MS implementation (and other 
210         issues like SSL).
211
212 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
213
214         * CryptoConvert.cs: Fixed warning (l4) for unused variables.
215         * KeyPairPersistence.cs: Fixed warning (l4) for unused variable.
216         * PKCS1.cs: Added empty {} to fix warning about possible empty stmnt.
217
218 2004-07-07  Sebastien Pouliot  <sebastien@ximian.com>
219
220         * MACAlgorithm.cs: Removed the hardcoded PaddingMode.Zeros as this is 
221         now selectable in Fx 2.0.
222         * SymmetricTransform.cs: Throw CryptographicException when CipherMode
223         CTS or OFB is being used (to match MS implementation).
224
225 2004-06-23  Sebastien Pouliot  <sebastien@ximian.com>
226
227         * SymmetricTransform.cs: Reduce by one the number of block when 
228         decrypting. This operation was in CryptoStream before but is only
229         required for decryption (which CryptoStream can't know). 
230         Fix bug #60573.
231
232 2004-05-27  Sebastien Pouliot  <sebastien@ximian.com>
233
234         * SymmetricTransform.cs: Fixed possible integer overflow. Added 
235         missing exception handling in TransformBlock and TransformFinalBlock.
236
237 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
238
239         * CryptoConvert.cs: Synched with Mono.Security.dll. Fix bug #57941 
240         (truncated key pair).
241         * RSAManaged.cs: Synched with Mono.Security.dll. Fix bug #57941 
242         (truncated key pair).
243
244 2004-04-28  Sebastien Pouliot  <sebastien@ximian.com>
245
246         * CryptoConvert.cs: In sync with Mono.Security.dll version.
247         * CryptoTools.cs: In sync with Mono.Security.dll version.
248         * DSAManaged.cs: Changed delegate to please FxCop.
249         * PKCS1.cs: In sync with Mono.Security.dll version.
250         * RSAManaged.cs: In sync with Mono.Security.dll version.
251         * SymmetricTransform.cs: Fixed a bug when offset > 0 in destination
252         buffer. Changed Array.Copy to Buffer.BlockCopy.
253
254 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
255
256         * KeyPairPersistence.cs: Completed key pair protection for both
257         Linux and Windows (protection done by runtime).
258
259 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
260
261         * PKCS1.cs: Use BitConverterLE
262
263 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
264
265         * CryptoConvert.cs: Add private methods to always
266         handle data as little endian (GetBytesLE, ToInt32LE, ToUInt32LE).
267
268 2004-03-23  Sebastien Pouliot  <sebastien@ximian.com>
269
270         * CryptoConvert.cs: Added support for public keys preceded by an 
271         header like the one generated by "sn -e".
272
273 2004-03-23  Sebastien Pouliot  <sebastien@ximian.com>
274
275         * CryptoConvert.cs: Added exception for null and bad parameters.
276         * RSAManaged.cs: CryptographicException thrown when trying to export
277         the private key when only the public key is present (CRT aware).
278
279 2004-03-22  Sebastien Pouliot  <sebastien@ximian.com>
280
281         * CryptoConvert.cs: Added new methods to convert [From|To]Hex. Added
282         new version of FromCapiPublicKeyBlob with an integer offset.
283
284 2004-02-06  Sebastien Pouliot  <sebastien@ximian.com>
285
286         * DSAManaged.cs: Added an event after key generation (so that
287         DSACryptoServiceProvider can persist the keypair if required). Added
288         PublicOnly property (like 1.2) so we do not have to catch an exception
289         to know if a private key is present or not. Added a Random property so
290         we do not always have to create a RNG instance (not always required).
291         * RSAManaged.cs: Added an event after key generation (so that
292         DSACryptoServiceProvider can persist the keypair if required). Added
293         PublicOnly property (like 1.2) so we do not have to catch an exception
294         to know if a private key is present or not.
295         * SymmetricTransform.cs: This class was split from S.S.C.
296         SymmetricAlgorithm.cs so it could be reused in Mono.Security 
297         assembly for other symmetric algorithms transforms.
298
299 2004-02-05  Sebastien Pouliot  <sebastien@ximian.com>
300
301         * KeyPairPersistence.cs: New. Class to persist keypairs in an XML
302         format to mimic the CryptoAPI key containers.
303
304 2004-01-12  Sebastien Pouliot  <spouliot@videotron.ca>
305
306         * CryptoConvert.cs: RSA doesn't start with a Q - at least that what
307         a strongname told me. Sorry Ron :(
308
309 2003-12-15  Sebastien Pouliot  <spouliot@videotron.ca>
310
311         * MACAlgorithm.cs: Fixed difference between 1.0 and 1.1 framework. 
312         The 1.0 framework is adding an additional  padding block (empty) 
313         to MAC when MACing an exact multiple of the TripleDES block size.
314         * PKCS1.cs: Fixed a typo which prevented "lame" (without OID) 
315         signature verification.
316
317 2003-10-30  Sebastien Pouliot  <spouliot@videotron.ca>
318
319         * CryptoConvert.cs: Fixed strongname generation for small exponents 
320         (like 17). Part of the fixed for bug #50341.
321
322 2003-10-17  Sebastien Pouliot  <spouliot@videotron.ca>
323
324         * CryptoConvert.cs: Added from Mono.Security to support StrongNames.
325
326 2003-07-05  Sebastien Pouliot  <spouliot@videotron.ca>
327
328         * DSAManaged.cs: Fixed bugs that appeared with the new unit tests.
329         * RSAManaged.cs: Fixed bugs that appeared with the new unit tests.
330
331 2003-07-02  Zoltan Varga  <vargaz@freemail.hu>
332
333         * PKCS1.cs DSAManaged.cs: Changed strange characters in comments to 
334         human-readable ones, since they break XML export in monocov.
335
336 2003-06-15  Sebastien Pouliot <spouliot@motus.com>
337
338         * RSAManaged.cs: Now includes CRT (Chinese Remainder Theorem) 
339         optimization when using the private key (DecryptValue). This
340         cut more than 5 seconds of nunit on my system (out of 14 sec
341         for complete asymmetric tests). Thanks to Ben Maurer for help!
342
343 2003-06-11  Sebastien Pouliot <spouliot@motus.com>
344
345         * DSAManaged.cs: Refactored from DSACryptoServiceProvider.cs. Cannot
346         be reused outside [ms]corlib because DSA constructor is internal :-(
347
348         * PKCS1.cs: Now support any hash algorithm when encoding PKCS 1.5
349         (i.e. not limited to pre-calculated values for known hashes). Some
350         other API changes to ease the use of other hash algorithms.
351
352         * RSAManaged.cs: Refactored from RSACryptoServiceProvider.cs. This 
353         class is required for custom PKCS#1 padding in SSL (which is not 
354         possible using RSACryptoServiceProvider).
355
356 2003-05-12  Sebastien Pouliot  <spouliot@videotron.ca>
357
358         * PKCS1.cs: Corrected I2OSP to match PKCS#1 v.2.1 test vector
359         and fix the OAEP incompatibility issue.
360
361 2003-04-01  Sebastien Pouliot  <spouliot@videotron.ca>
362
363         * PKCS1.cs: Corrected fix (partially) for the lame PKCS1 v1.5
364         signatures done without specifying an OID.
365         
366 2003-03-01  Sebastien Pouliot  <spouliot@videotron.ca>
367
368         * PKCS1.cs: Fix for some (lame) PKCS1 v1.5 signatures done
369         without specifying an OID.
370
371 2003-02-08  Sebastien Pouliot  <spouliot@videotron.ca>
372
373         * CryptoTools.cs: Renamed namespace to match new location.
374         * PKCS1.cs: Renamed namespace to match new location.
375         * HMACAlgorithm.cs: New. Generic class to implement HMAC
376         using any hash algorithm (was in S.S.C.HMACSHA1.cs).
377         * MACAlgorithm.cs: New. Generic class to implement MAC
378         using any symmetric algorithm (was in S.S.C.MACTripleDES.cs).
379