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