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