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