]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
this method does not need field_data1
[thirdparty/openssl.git] / CHANGES
CommitLineData
81a6c781 1
f1c236f8 2 OpenSSL CHANGES
651d0aff
RE
3 _______________
4
4d94ae00
BM
5 Changes between 0.9.7 and 0.9.8 [xx XXX 2002]
6
b53e44e5
BM
7 *) Extend the BIGNUM API by creating new macros that behave like
8 functions
9
10 void BN_set_sign(BIGNUM *a, int neg);
11 int BN_get_sign(const BIGNUM *a);
12
13 and avoid the need to access 'a->neg' directly in applications.
14 [Nils Larsch <nla@trustcenter.de>]
15
5c6bf031
BM
16 *) Implement fast modular reduction for pseudo-Mersenne primes
17 used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
18 EC_GROUP_new_curve_GFp() will now automatically use this
19 if applicable.
20 [Nils Larsch <nla@trustcenter.de>]
21
19b8d06a
BM
22 *) Add new lock type (CRYPTO_LOCK_BN).
23 [Bodo Moeller]
24
6f7c2cb3
RL
25 *) Change the ENGINE framework to automatically load engines
26 dynamically from specific directories unless they could be
27 found to already be built in or loaded. Move all the
28 current engines except for the cryptodev one to a new
29 directory engines/.
30 The engines in engines/ are built as shared libraries if
31 the "shared" options was given to ./Configure or ./config.
32 Otherwise, they are inserted in libcrypto.a.
33 /usr/local/ssl/engines is the default directory for dynamic
874fee47
RL
34 engines, but that can be overriden at configure time through
35 the usual use of --prefix and/or --openssldir, and at run
36 time with the environment variable OPENSSL_ENGINES.
6f7c2cb3
RL
37 [Geoff Thorpe and Richard Levitte]
38
30afcc07
RL
39 *) Add Makefile.shared, a helper makefile to build shared
40 libraries. Addapt Makefile.org.
41 [Richard Levitte]
42
fc6a6a10
DSH
43 *) Add version info to Win32 DLLs.
44 [Peter 'Luna' Runestig" <peter@runestig.com>]
45
9a48b07e
DSH
46 *) Add new 'medium level' PKCS#12 API. Certificates and keys
47 can be added using this API to created arbitrary PKCS#12
48 files while avoiding the low level API.
49
50 New options to PKCS12_create(), key or cert can be NULL and
51 will then be omitted from the output file. The encryption
52 algorithm NIDs can be set to -1 for no encryption, the mac
53 iteration count can be set to 0 to omit the mac.
54
55 Enhance pkcs12 utility by making the -nokeys and -nocerts
56 options work when creating a PKCS#12 file. New option -nomac
57 to omit the mac, NONE can be set for an encryption algorithm.
58 New code is modified to use the enhanced PKCS12_create()
59 instead of the low level API.
60 [Steve Henson]
61
230fd6b7
DSH
62 *) Extend ASN1 encoder to support indefinite length constructed
63 encoding. This can output sequences tags and octet strings in
64 this form. Modify pk7_asn1.c to support indefinite length
65 encoding. This is experimental and needs additional code to
66 be useful, such as an ASN1 bio and some enhanced streaming
67 PKCS#7 code.
68
69 Extend template encode functionality so that tagging is passed
70 down to the template encoder.
71 [Steve Henson]
72
9226e218
BM
73 *) Let 'openssl req' fail if an argument to '-newkey' is not
74 recognized instead of using RSA as a default.
75 [Bodo Moeller]
76
ea262260
BM
77 *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
78 As these are not official, they are not included in "ALL";
79 the "ECCdraft" ciphersuite group alias can be used to select them.
80 [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]
81
e172d60d
BM
82 *) Add ECDH engine support.
83 [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]
84
85 *) Add ECDH in new directory crypto/ecdh/.
49a0f778
BM
86TODO: more general interface (return x coordinate, not its hash)
87TODO: bug: pad x with leading zeros if necessary
e172d60d
BM
88 [Douglas Stebila (Sun Microsystems Laboratories)]
89
95ecacf8
BM
90 *) Let BN_rand_range() abort with an error after 100 iterations
91 without success (which indicates a broken PRNG).
92 [Bodo Moeller]
93
6fb60a84
BM
94 *) Change BN_mod_sqrt() so that it verifies that the input value
95 is really the square of the return value. (Previously,
96 BN_mod_sqrt would show GIGO behaviour.)
97 [Bodo Moeller]
98
7793f30e
BM
99 *) Add named elliptic curves over binary fields from X9.62, SECG,
100 and WAP/WTLS; add OIDs that were still missing.
101
102 [Sheueling Chang Shantz and Douglas Stebila
103 (Sun Microsystems Laboratories)]
104
105 *) Extend the EC library for elliptic curves over binary fields
106 (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
107 New EC_METHOD:
108
109 EC_GF2m_simple_method
110
111 New API functions:
112
113 EC_GROUP_new_curve_GF2m
114 EC_GROUP_set_curve_GF2m
115 EC_GROUP_get_curve_GF2m
7793f30e
BM
116 EC_POINT_set_affine_coordinates_GF2m
117 EC_POINT_get_affine_coordinates_GF2m
118 EC_POINT_set_compressed_coordinates_GF2m
119
120 Point compression for binary fields is disabled by default for
121 patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
122 enable it).
123
124 As binary polynomials are represented as BIGNUMs, various members
125 of the EC_GROUP and EC_POINT data structures can be shared
126 between the implementations for prime fields and binary fields;
127 the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
128 are essentially identical to their ..._GFp counterparts.
9e4f9b36
BM
129 (For simplicity, the '..._GFp' prefix has been dropped from
130 various internal method names.)
7793f30e
BM
131
132 An internal 'field_div' method (similar to 'field_mul' and
133 'field_sqr') has been added; this is used only for binary fields.
134
135 [Sheueling Chang Shantz and Douglas Stebila
136 (Sun Microsystems Laboratories)]
137
9e4f9b36 138 *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
7793f30e
BM
139 through methods ('mul', 'precompute_mult').
140
141 The generic implementations (now internally called 'ec_wNAF_mul'
142 and 'ec_wNAF_precomputed_mult') remain the default if these
143 methods are undefined.
144
145 [Sheueling Chang Shantz and Douglas Stebila
146 (Sun Microsystems Laboratories)]
147
148 *) New function EC_GROUP_get_degree, which is defined through
149 EC_METHOD. For curves over prime fields, this returns the bit
150 length of the modulus.
151
152 [Sheueling Chang Shantz and Douglas Stebila
153 (Sun Microsystems Laboratories)]
154
155 *) New functions EC_GROUP_dup, EC_POINT_dup.
156 (These simply call ..._new and ..._copy).
157
158 [Sheueling Chang Shantz and Douglas Stebila
159 (Sun Microsystems Laboratories)]
160
1dc920c8
BM
161 *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
162 Polynomials are represented as BIGNUMs (where the sign bit is not
163 used) in the following functions [macros]:
164
165 BN_GF2m_add
166 BN_GF2m_sub [= BN_GF2m_add]
167 BN_GF2m_mod [wrapper for BN_GF2m_mod_arr]
168 BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr]
169 BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr]
170 BN_GF2m_mod_inv
171 BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr]
172 BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr]
173 BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr]
174 BN_GF2m_cmp [= BN_ucmp]
175
176 (Note that only the 'mod' functions are actually for fields GF(2^m).
177 BN_GF2m_add() is misnomer, but this is for the sake of consistency.)
178
179 For some functions, an the irreducible polynomial defining a
180 field can be given as an 'unsigned int[]' with strictly
181 decreasing elements giving the indices of those bits that are set;
182 i.e., p[] represents the polynomial
183 f(t) = t^p[0] + t^p[1] + ... + t^p[k]
184 where
185 p[0] > p[1] > ... > p[k] = 0.
186 This applies to the following functions:
187
188 BN_GF2m_mod_arr
189 BN_GF2m_mod_mul_arr
190 BN_GF2m_mod_sqr_arr
191 BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv]
192 BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div]
193 BN_GF2m_mod_exp_arr
194 BN_GF2m_mod_sqrt_arr
195 BN_GF2m_mod_solve_quad_arr
196 BN_GF2m_poly2arr
197 BN_GF2m_arr2poly
198
199 Conversion can be performed by the following functions:
200
201 BN_GF2m_poly2arr
202 BN_GF2m_arr2poly
203
204 bntest.c has additional tests for binary polynomial arithmetic.
205
909abce8
BM
206 Two implementations for BN_GF2m_mod_div() are available.
207 The default algorithm simply uses BN_GF2m_mod_inv() and
208 BN_GF2m_mod_mul(). The alternative algorithm is compiled in only
209 if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
210 copyright notice in crypto/bn/bn_gf2m.c before enabling it).
1dc920c8
BM
211
212 [Sheueling Chang Shantz and Douglas Stebila
213 (Sun Microsystems Laboratories)]
214
16dc1cfb
BM
215 *) Add new error code 'ERR_R_DISABLED' that can be used when some
216 functionality is disabled at compile-time.
217 [Douglas Stebila <douglas.stebila@sun.com>]
218
ea4f109c
BM
219 *) Change default behaviour of 'openssl asn1parse' so that more
220 information is visible when viewing, e.g., a certificate:
221
222 Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
223 mode the content of non-printable OCTET STRINGs is output in a
224 style similar to INTEGERs, but with '[HEX DUMP]' prepended to
225 avoid the appearance of a printable string.
226 [Nils Larsch <nla@trustcenter.de>]
227
254ef80d
BM
228 *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
229 functions
230 EC_GROUP_set_asn1_flag()
231 EC_GROUP_get_asn1_flag()
232 EC_GROUP_set_point_conversion_form()
233 EC_GROUP_get_point_conversion_form()
234 These control ASN1 encoding details:
b8e0e123
BM
235 - Curves (i.e., groups) are encoded explicitly unless asn1_flag
236 has been set to OPENSSL_EC_NAMED_CURVE.
5f3d6f70 237 - Points are encoded in uncompressed form by default; options for
254ef80d
BM
238 asn1_for are as for point2oct, namely
239 POINT_CONVERSION_COMPRESSED
240 POINT_CONVERSION_UNCOMPRESSED
241 POINT_CONVERSION_HYBRID
5f3d6f70
BM
242
243 Also add 'seed' and 'seed_len' members to EC_GROUP with access
244 functions
245 EC_GROUP_set_seed()
246 EC_GROUP_get0_seed()
247 EC_GROUP_get_seed_len()
248 This is used only for ASN1 purposes (so far).
458c2917
BM
249 [Nils Larsch <nla@trustcenter.de>]
250
251 *) Add 'field_type' member to EC_METHOD, which holds the NID
252 of the appropriate field type OID. The new function
253 EC_METHOD_get_field_type() returns this value.
254 [Nils Larsch <nla@trustcenter.de>]
255
6cbe6382
BM
256 *) Add functions
257 EC_POINT_point2bn()
258 EC_POINT_bn2point()
259 EC_POINT_point2hex()
260 EC_POINT_hex2point()
261 providing useful interfaces to EC_POINT_point2oct() and
262 EC_POINT_oct2point().
263 [Nils Larsch <nla@trustcenter.de>]
264
b6db386f
BM
265 *) Change internals of the EC library so that the functions
266 EC_GROUP_set_generator()
267 EC_GROUP_get_generator()
268 EC_GROUP_get_order()
269 EC_GROUP_get_cofactor()
270 are implemented directly in crypto/ec/ec_lib.c and not dispatched
271 to methods, which would lead to unnecessary code duplication when
272 adding different types of curves.
6cbe6382 273 [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
b6db386f 274
47234cd3
BM
275 *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
276 arithmetic, and such that modified wNAFs are generated
277 (which avoid length expansion in many cases).
278 [Bodo Moeller]
279
82652aaf
BM
280 *) Add a function EC_GROUP_check_discriminant() (defined via
281 EC_METHOD) that verifies that the curve discriminant is non-zero.
282
283 Add a function EC_GROUP_check() that makes some sanity tests
284 on a EC_GROUP, its generator and order. This includes
285 EC_GROUP_check_discriminant().
286 [Nils Larsch <nla@trustcenter.de>]
287
4d94ae00
BM
288 *) Add ECDSA in new directory crypto/ecdsa/.
289
5dbd3efc
BM
290 Add applications 'openssl ecparam' and 'openssl ecdsa'
291 (these are based on 'openssl dsaparam' and 'openssl dsa').
4d94ae00
BM
292
293 ECDSA support is also included in various other files across the
294 library. Most notably,
295 - 'openssl req' now has a '-newkey ecdsa:file' option;
296 - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
297 - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
298 d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
299 them suitable for ECDSA where domain parameters must be
e172d60d
BM
300 extracted before the specific public key;
301 - ECDSA engine support has been added.
f8e21776 302 [Nils Larsch <nla@trustcenter.de>]
4d94ae00 303
af28dd6c 304 *) Include some named elliptic curves, and add OIDs from X9.62,
ed5e37c3 305 SECG, and WAP/WTLS. Each curve can be obtained from the new
7eb18f12 306 function
ed5e37c3
BM
307 EC_GROUP_new_by_nid(),
308 and the list of available named curves can be obtained with
309 EC_get_builtin_curves().
254ef80d
BM
310 Also add a 'curve_name' member to EC_GROUP objects, which can be
311 accessed via
4d94ae00
BM
312 EC_GROUP_set_nid()
313 EC_GROUP_get_nid()
314 [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
315
3e06fb75
BM
316 Changes between 0.9.6h and 0.9.7 [XX xxx 2002]
317
54a656ef
BL
318 *) Introduce safe string copy and catenation functions
319 (BUF_strlcpy() and BUF_strlcat()).
320 [Ben Laurie (CHATS) and Richard Levitte]
321
322 *) Avoid using fixed-size buffers for one-line DNs.
323 [Ben Laurie (CHATS)]
324
325 *) Add BUF_MEM_grow_clean() to avoid information leakage when
326 resizing buffers containing secrets, and use where appropriate.
327 [Ben Laurie (CHATS)]
328
329 *) Avoid using fixed size buffers for configuration file location.
330 [Ben Laurie (CHATS)]
331
332 *) Avoid filename truncation for various CA files.
333 [Ben Laurie (CHATS)]
334
335 *) Use sizeof in preference to magic numbers.
336 [Ben Laurie (CHATS)]
337
338 *) Avoid filename truncation in cert requests.
339 [Ben Laurie (CHATS)]
340
54a656ef
BL
341 *) Add assertions to check for (supposedly impossible) buffer
342 overflows.
343 [Ben Laurie (CHATS)]
344
345 *) Don't cache truncated DNS entries in the local cache (this could
346 potentially lead to a spoofing attack).
347 [Ben Laurie (CHATS)]
348
349 *) Fix various buffers to be large enough for hex/decimal
350 representations in a platform independent manner.
351 [Ben Laurie (CHATS)]
352
353 *) Add CRYPTO_realloc_clean() to avoid information leakage when
354 resizing buffers containing secrets, and use where appropriate.
355 [Ben Laurie (CHATS)]
356
357 *) Add BIO_indent() to avoid much slightly worrying code to do
358 indents.
359 [Ben Laurie (CHATS)]
360
361 *) Convert sprintf()/BIO_puts() to BIO_printf().
362 [Ben Laurie (CHATS)]
363
364 *) buffer_gets() could terminate with the buffer only half
365 full. Fixed.
366 [Ben Laurie (CHATS)]
367
368 *) Add assertions to prevent user-supplied crypto functions from
369 overflowing internal buffers by having large block sizes, etc.
370 [Ben Laurie (CHATS)]
371
2b2ab523
BM
372 *) New OPENSSL_assert() macro (similar to assert(), but enabled
373 unconditionally).
374 [Ben Laurie (CHATS)]
375
54a656ef
BL
376 *) Eliminate unused copy of key in RC4.
377 [Ben Laurie (CHATS)]
378
379 *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
380 [Ben Laurie (CHATS)]
381
382 *) Fix off-by-one error in EGD path.
383 [Ben Laurie (CHATS)]
384
385 *) If RANDFILE path is too long, ignore instead of truncating.
386 [Ben Laurie (CHATS)]
387
388 *) Eliminate unused and incorrectly sized X.509 structure
389 CBCParameter.
390 [Ben Laurie (CHATS)]
391
392 *) Eliminate unused and dangerous function knumber().
393 [Ben Laurie (CHATS)]
394
395 *) Eliminate unused and dangerous structure, KSSL_ERR.
396 [Ben Laurie (CHATS)]
397
398 *) Protect against overlong session ID context length in an encoded
399 session object. Since these are local, this does not appear to be
400 exploitable.
401 [Ben Laurie (CHATS)]
402
3e06fb75
BM
403 *) Change from security patch (see 0.9.6e below) that did not affect
404 the 0.9.6 release series:
405
406 Remote buffer overflow in SSL3 protocol - an attacker could
407 supply an oversized master key in Kerberos-enabled versions.
408 (CAN-2002-0657)
409 [Ben Laurie (CHATS)]
dc014d43 410
7ba3a4c3
RL
411 *) Change the SSL kerb5 codes to match RFC 2712.
412 [Richard Levitte]
413
ba111217
BM
414 *) Make -nameopt work fully for req and add -reqopt switch.
415 [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]
416
3f6db7f5
DSH
417 *) The "block size" for block ciphers in CFB and OFB mode should be 1.
418 [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]
419
f013c7f2
RL
420 *) Make sure tests can be performed even if the corresponding algorithms
421 have been removed entirely. This was also the last step to make
422 OpenSSL compilable with DJGPP under all reasonable conditions.
423 [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]
424
648765ba 425 *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
c6ccf055
LJ
426 to allow version independent disabling of normally unselected ciphers,
427 which may be activated as a side-effect of selecting a single cipher.
648765ba
BM
428
429 (E.g., cipher list string "RSA" enables ciphersuites that are left
430 out of "ALL" because they do not provide symmetric encryption.
431 "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
c6ccf055
LJ
432 [Lutz Jaenicke, Bodo Moeller]
433
041843e4
RL
434 *) Add appropriate support for separate platform-dependent build
435 directories. The recommended way to make a platform-dependent
436 build directory is the following (tested on Linux), maybe with
437 some local tweaks:
438
439 # Place yourself outside of the OpenSSL source tree. In
440 # this example, the environment variable OPENSSL_SOURCE
441 # is assumed to contain the absolute OpenSSL source directory.
3e06fb75
BM
442 mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
443 cd objtree/"`uname -s`-`uname -r`-`uname -m`"
041843e4
RL
444 (cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
445 mkdir -p `dirname $F`
446 ln -s $OPENSSL_SOURCE/$F $F
447 done
448
449 To be absolutely sure not to disturb the source tree, a "make clean"
450 is a good thing. If it isn't successfull, don't worry about it,
451 it probably means the source directory is very clean.
452 [Richard Levitte]
453
a6c6874a
GT
454 *) Make sure any ENGINE control commands make local copies of string
455 pointers passed to them whenever necessary. Otherwise it is possible
456 the caller may have overwritten (or deallocated) the original string
457 data when a later ENGINE operation tries to use the stored values.
458