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