2007-11-18 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / Mono.Security / Mono.Security.Cryptography / ChangeLog
1 2007-11-18  Sebastien Pouliot  <sebastien@ximian.com>
2
3         * RSAManaged.cs: Fix the rare case where the inverse of q modulo p 
4         can result in bigint one byte shorter than expected, which could 
5         mess up the export/import of the key.
6
7 2007-05-08  Randolph Chung  <tausq@debian.org>
8
9         * CryptoConvert.cs: Add DSA blob conversion functions.
10
11 2007-03-05  Sebastien Pouliot  <sebastien@ximian.com>
12
13         * SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption 
14         with no padding or zero padding. Part of the fix for #81008.
15
16 2007-01-08  Sebastien Pouliot  <sebastien@ximian.com>
17
18         * SymmetricTransform.cs: Fix #80439 again. This time we have tests for
19         all ciphers, modes and padding.
20
21 2007-01-04  Sebastien Pouliot  <sebastien@ximian.com>
22
23         * SymmetricTransform.cs: Fix previous fix (for #80439) as we were now
24         too permissive.
25
26 2007-01-03  Sebastien Pouliot  <sebastien@ximian.com>
27
28         * SymmetricTransform.cs: Reduce inputCount if larger than the output
29         data can hold. Fix bug #80439.
30
31 2006-12-11  Sebastien Pouliot  <sebastien@ximian.com>
32
33         * PKCS8.cs: Normalize the private key X integer, not it's ASN.1
34         container, to 20 bytes.
35
36 2006-10-04  Sebastien Pouliot  <sebastien@ximian.com>
37
38         * PKCS1.cs: Remove compatibility block where all padding wasn't 
39         verified (can't find the original test case for it). Note: the 
40         existing implementation wasn't affected by CVE-2006-4339, aka RSA 
41         PKCS#1 1.5 signature forgery (but we're stronger without it).
42
43 2006-09-27  Sebastien Pouliot  <sebastien@ximian.com>
44
45         * RSAManaged.cs: Ensure that the results of Encrypt and Decrypt will
46         always be the same length as the key. If smaller then we left pad the
47         result with 0x00 (same integer, correct length for everyone). Fix bug
48         #79502 where an LDAP/SSL server didn't like the missing byte.
49
50 2006-09-05  Sebastien Pouliot  <sebastien@ximian.com>
51
52         * RSAManaged.cs: Backport NRE fix from mscorlib.dll.
53
54 2006-06-15  Sebastien Pouliot  <sebastien@ximian.com>
55
56         * CryptoTools.cs: Fix offset in block processor. This fix the HMAC
57         algorithms when large buffer where used (with multiple calls to
58         TransformBlock).
59
60 2006-02-28  Sebastien Pouliot  <sebastien@ximian.com>
61
62         * CryptoConvert.cs: Make sure we can import a keypair into our RSA 
63         instance (even if the key store isn't available). See bug #77559.
64         * PKCS8.cs: Make sure we can import a keypair into our RSA instance
65         (even if the key store isn't available). See bug #77559.
66
67 2005-11-23  Sebastien Pouliot  <sebastien@ximian.com>
68
69         * SymmetricTransform.cs: Synched with corlib version (IV behaviour for
70         NET_2_0). Virtualized some methods (like Dispose). Fix bug #76801.
71
72 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com>
73
74         * KeyPairPersistence.cs: Use PlatformID.Unix under NET_2_0. 
75         * PKCS8.cs: In sync with corlib;
76
77 2005-04-18  Sebastien Pouliot  <sebastien@ximian.com> 
78  
79         * Null.cs: New "null" symmetric encryption for debugging. This class 
80         isn't (and shouldn't be) built by default.
81         * SymmetricTransform.cs: Fixed a division by zero if someone changes 
82         the feedback value to 0.
83         * SHA224Managed.cs: Fixed warning about unused private constant.
84
85 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
86
87         * SymmetricTransform.cs: Fixed a padding bug affecting that can occurs
88         when no padding is used.
89
90 2005-03-07  Sebastien Pouliot  <sebastien@ximian.com>
91
92         * MD2Managed.cs: Removed memory allocation from the transform method.
93         * MD4Managed.cs: Moved memoty allocation to constructor (from init).
94         * SHA224Managed.cs: Fixed bug #73404 which gaves bad results when the
95         digested data is longer than 2^32 bits.
96
97 2005-01-11  Sebastien Pouliot  <sebastien@ximian.com>
98
99         * SymmetricTransform.cs: Added support for ANSI X9.23 padding and
100         ISO 10126 padding modes (applies to all symmetric block ciphers).
101
102 2004-12-22  Sebastien Pouliot  <sebastien@ximian.com>
103
104         * KeyPairPersistence.cs: Commented imperative asserts until it is 
105         supported by the runtime.
106
107 2004-12-06  Sebastien Pouliot  <sebastien@ximian.com>
108
109         * RSAManaged.cs: Implement key blinding for RSA decryption with, or
110         without, using CRT.
111
112 2004-11-23  Sebastien Pouliot  <sebastien@ximian.com>
113
114         * PKCS1.cs: Fix PKCS#1 v1.5 decryption when the ciphertext isn't 
115         exactly the same of the public key (which happens sometimes on Fx 1.1
116         probably because it doesn't do the last I2OSP operation to left pad
117         the resulting big integer with zeros).
118
119 2004-11-10  Sebastien Pouliot  <sebastien@ximian.com>
120
121         * RC4.cs: Fixed RC4 for compatibility with .NET 2.0. The algorithm is 
122         OK but the check for IV, unused for stream ciphers, has changed.
123
124 2004-10-28  Sebastien Pouliot  <sebastien@ximian.com>
125
126         * KeyPairPersistence.cs: Added localization for exceptions messages.
127         Also added more details (type and path) when an exception is thrown.
128
129 2004-09-29  Sebastien Pouliot  <sebastien@ximian.com>
130
131         * RSAManaged.cs: In synch with corlib. KeySize is now always a 
132         multiple of 8 bits. Fix #66929.
133
134 2004-09-17  Sebastien Pouliot  <sebastien@ximian.com>
135
136         * CryptoConvert.cs: In synch with corlib version. Fixed all level 4 
137         compilation warnings.
138         * KeyPairPersistence.cs: In synch with corlib version. Fixed all level
139         4 compilation warnings.
140         * PKCS1.cs: In synch with corlib version. Fixed all level 4 
141         compilation warnings.
142         * SHA224Managed.cs: Fixed all level 4 compilation warnings.
143
144 2004-09-17  Sebastien Pouliot  <sebastien@ximian.com>
145
146         * SHA224.cs: New. Abstract class for all SHA224 implementations.
147         * SHA224Managed.cs: New. Managed implementation of SHA224 (a SHA256
148         derivate) as specified in RFC3874 and FIPS 180-2 Change Notice.
149
150 2004-06-23  Sebastien Pouliot  <sebastien@ximian.com>
151
152         * SymmetricTransform.cs: Reduce by one the number of block when 
153         decrypting. This operation was in CryptoStream before but is only
154         required for decryption (which CryptoStream can't know). 
155         Fix bug #60573.
156
157 2004-05-27  Sebastien Pouliot  <sebastien@ximian.com>
158
159         * ARC4Managed.cs: Added missing exception handling in TransformBlock 
160         and TransformFinalBlock.
161         * SymmetricTransform.cs: Fixed possible integer overflow. Added 
162         missing exception handling in TransformBlock and TransformFinalBlock.
163
164 2004-05-10  Sebastien Pouliot  <sebastien@ximian.com>
165
166         * PKCS8.cs: Fixed negative Version check.
167         * MD2Managed.cs: Added readonly to static array constants.
168         * MD4Managed.cs: Removed unrequired memory allocation in MD4Transform.
169
170 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
171
172         * CryptoConvert.cs: Added support for truncated, but still valid, RSA
173         private key blob. Fix #57941 (couldn't sign with nunit key).
174         * RSAManaged.cs: Normalized the size of D when not present. This 
175         allows us to output a compatible base64 representation of 1024bits 0.
176
177 2004-04-28  Sebastien Pouliot  <sebastien@ximian.com>
178
179         * SymmetricTransform.cs: Fixed bug when offset > 0 in destination 
180         buffer.
181
182 2004-04-22  Sebastien Pouliot  <sebastien@ximian.com>
183
184         * CryptoConvert.cs: FxCop-ized. Sealed class. Use Buffer.BlockCopy.
185         * CryptoTools.cs: FxCop-ized. Sealed KeyBuilder class. Delay creation
186         of RNG object. Use Buffer.BlockCopy.
187         * DiffieHellman.cs: FxCop-ized. Removed public constructor.
188         * DiffieHellmanManaged.cs: FxCop-ized. Actualized with changes from
189         BigInteger.
190         * KeyPairPersistance.cs: FxCop-ized. Updated version for management
191         of keypairs.
192         * MD2Managed.cs: Use Buffer.BlockCopy instead of Array.Copy.
193         * PKCS1.cs: FxCop-ized. Sealed class. Use Buffer.BlockCopy instead of
194         Array.Copy. Also includes endian patches from Bernie Solomon.
195         * PKCS8.cs: FxCop-ized. Sealed class. 
196         * RSAManaged.cs: FxCop-ized. Actualized with changes from BigInteger.
197         * SymmetricTransform.cs: Use Buffer.BlockCopy instead of Array.Copy.
198
199 2004-04-20  Sebastien Pouliot  <sebastien@ximian.com>
200
201         * CryptoConvert.cs: Synched with corlib version to get endian fixes 
202         from Bernie Solomon.
203
204 2004-03-23  Sebastien Pouliot  <sebastien@ximian.com>
205
206         * CryptoConvert.cs: Added exception for null and bad parameters.
207         * RSAManaged.cs: CryptographicException thrown when trying to export
208         the private key when only the public key is present (CRT aware).
209
210 2004-03-22  Sebastien Pouliot  <sebastien@ximian.com>
211
212         * CryptoConvert.cs: Added new methods to convert [From|To]Hex. Added
213         new version of FromCapiPublicKeyBlob with an integer offset.
214
215 2004-03-10  Sebastien Pouliot  <sebastien@ximian.com>
216
217         * PKCS8.cs: Added EncodeRSA, EncodeDSA and completed GetBytes() so it
218         is now possible to encode PKCS8 files (this is required to encode 
219         PKCS12 files).
220
221 2004-02-15  Sebastien Pouliot  <sebastien@ximian.com>
222
223         * ARC4Managed.cs: Removed all % 256 (modulo) because typecasting to 
224         byte already ensure the result would be correct (as suggested by 
225         Technoboy). Now use KeyBuilder to create new keys.
226
227 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
228
229         * DHKeyGeneration.cs: New. Enumuration of possible key generation for
230         Diffie-Hellman. Contributed by Pieter Philippaerts (mentalis.org).
231         * DHParameters.cs: New. Structure to hold the different elements of a
232         Diffie-Hellman key. Contributed by Pieter Philippaerts (mentalis.org).
233         * DiffieHellman.cs: New. Astract class as base for all Diffie-Hellman
234         implementations. Contributed by Pieter Philippaerts (mentalis.org).
235         * DiffieHellmanManaged.cs: New. Managed implementation of the Diffie-
236         Hellman key agreement algorithm. Contributed by Pieter Philippaerts.
237
238 2004-02-09  Sebastien Pouliot  <sebastien@ximian.com>
239
240         * PKCS1.cs: New. Copied from corlib. Required for RSAManaged.
241         * RSAManaged.cs: New. Copied from corlib. Required for TLS - some
242         parts (MD5SHA1) cannot work with the default RSACryptoServiceProvider.
243
244 2004-02-06  Sebastien Pouliot  <sebastien@ximian.com>
245
246         * CryptoTools.cs: New. Copied from corlib to offer the sames services
247         to symmetric algorithms in Mono.Security assembly.
248         * KeyPairPersistance.cs: Provides a similar to CryptoAPI persistence 
249         mechanism for keypairs (based on CspParameters).
250         * SymmetricTransform.cs: New. Copied from corlib to offer the sames 
251         services to symmetric algorithms in Mono.Security assembly.
252
253 2004-01-12  Sebastien Pouliot  <spouliot@videotron.ca>
254
255         * CryptoConvert.cs: RSA doesn't start with a Q - at least that what
256         a strongname told me. Sorry Ron :(
257
258 2003-11-27  Sebastien Pouliot  <spouliot@videotron.ca>
259
260         * MD4.cs: New. Asbtract class for all MD4 implementations. WARNING:
261         The MD4 algorithm is BROKEN (collisions) and SHOULDN'T be used in 
262         NEW designs. However some higher level algorithms (like NTLM) requires 
263         MD4 (and may even be secure using it). YOU'RE WARNED!
264         * MD4Managed.cs: New. Managed implementation of MD4 (RFC1320).
265         * PKCS8.cs: New. Added Private-Key Information Syntax Standard as a 
266         building block for PKCS12.
267
268 2003-10-30  Sebastien Pouliot  <spouliot@videotron.ca>
269
270         * CryptoConvert.cs: Fixed strongname generation for small exponents 
271         (like 17). Part of the fixed for bug #50341.
272
273 2003-06-19  Nick Drochak <ndrochak@gol.com>
274
275         * CryptoConvert.cs: Work around for mcs? bug 45127.
276
277 2003-03-07  Sebastien Pouliot  <spouliot@videotron.ca>
278
279         * ARC4Managed.cs: New. Implementation of the Alleged RC4(tm)
280         stream cipher in managed code (required for SSL/TLS).
281         * CryptoConvert.cs: New. Helper class to help convert between
282         Windows crypto structures and .NET crypto classes (required
283         for security tools).
284         * MD2.cs: New. Abstract class for all MD2 hash implementations.
285         * MD2Managed.cs: New. Managed implementation of the MD2 hash
286         algorithm (required for old, but still valid, X.509 certificates).
287         * RC4.cs: New. Abstract class for all RC4 stream cipher 
288         implementations.