Debian Codegraph @

NEWS

raw
1 * Release 0.19.1 (13 Mar 2025)
2
3 New API:
4 * ``der.remove_implitic`` and ``der.encode_implicit`` for decoding and
5 encoding DER IMPLICIT values with custom tag values and arbitrary
6 classes
7
8 Bug fixes:
9 * Minor fixes around arithmetic with curves that have non-prime order
10 (useful for experimentation, not practical deployments)
11 * Fix arithmetic to work with curves that have (0, 0) on the curve
12 * Fix canonicalization of signatures when ``s`` is just slightly
13 above half of curve order
14
15 Maintenance:
16 * Dropped official support for Python 3.5 (again, issues with CI, support
17 for Python 2.6 and Python 2.7 is unchanged)
18 * Officialy support Python 3.12 and 3.13 (add them to CI)
19 * Removal of few more unnecessary `six.b` literals (Alexandre Detiste)
20 * Fix typos in warning messages
21
22
23 * Release 0.19.0 (08 Apr 2024)
24
25 New API:
26 * `to_ssh` in `VerifyingKey` and `SigningKey`, supports Ed25519 keys only
27 (Pablo Mazzini)
28
29 New features:
30 * Support for twisted Brainpool curves
31
32 Doc fix:
33 * Fix curve equation in glossary
34 * Documentation for signature encoding and signature decoding functions
35
36 Maintenance:
37 * Dropped official support for 3.3 and 3.4 (because of problems running them
38 in CI, not because it's actually incompatible; support for 2.6 and 2.7 is
39 unaffected)
40 * Fixes aroung hypothesis parameters
41 * Officially support Python 3.11 and 3.12
42 * Small updates to test suite to make it work with 3.11 and 3.12 and new
43 releases of test dependencies
44 * Dropped the internal `_rwlock` module as it's unused
45 * Added mutation testing to CI, lots of speed-ups to the test suite
46 to make it happen
47 * Removal of unnecessary `six.b` literals (Alexandre Detiste)
48
49 Deprecations:
50 * `int_to_string`, `string_to_int`, and `digest_integer` from `ecdsa.ecdsa`
51 module are now considered deprecated, they will be removed in a future
52 release
53
54 * Release 0.18.0 (09 Jul 2022)
55
56 New API:
57 * `curve_by_name` in `curves` module to get a `Curve` object by providing curve
58 name.
59
60 Bug fix:
61 * Make the `VerifyingKey` encoded with explicit parameters use the same
62 kind of point encoding for public key and curve generator.
63 * Better handling of malformed curve parameters (as in CVE-2022-0778);
64 make python-ecdsa raise `MalformedPointError` instead of `AssertionError`.
65
66 Doc fix:
67 * Publish the documentation on https://ecdsa.readthedocs.io/,
68 include explanation of basics of handling of ECC data formats and how to use
69 the library for elliptic curve arithmetic.
70 * Make object names more consistent, make them into hyperlinks on the
71 readthedocs documentation.
72 * Make security note more explicit (Ian Rodney)
73 * Fix the `explicit` vs `named_curve` confusion in `VerifyingKey` docs.
74
75 Maintenance:
76 * Updated black version; slight changes to formatting
77 * Include interoperability tests for Ed25519 and Ed448 with OpenSSL.
78
79 * Release 0.18.0-beta2 (05 Jan 2022)
80
81 New features:
82 * Support for point precomputation for EdDSA.
83
84 Maintenance:
85 * Fix few typos (thanks to Tim Gates and Kian Meng Ang).
86
87 Bug fix:
88 * Accept private EdDSA keys that include public key in the ASN.1 structure.
89 * Fix incompatibility with Python 3.3 in handling of memoryviews of empty
90 strings.
91
92 * Release 0.18.0-beta1 (03 Aug 2021)
93
94 New features:
95 * Support for EdDSA (Ed25519, Ed448) signature creation and verification.
96 * Support for Ed25519 and Ed448 in PKCS#8 and public key files.
97
98 New API:
99 * CurveEdTw class to represent the Twisted Edwards curve parameters.
100 * PointEdwards class to represent points on Twisted Edwards curve and
101 provide point arithmetic on it.
102
103 * Release 0.17.0 (27 May 2021)
104
105 New API:
106 * Keys that use explicit curve parameters can now be read and written.
107 Reading of explicit curves can be disabled by using the
108 `valid_curve_encodings` keyword argument in `VerifyingKey.from_pem()`,
109 `VerifyingKey.from_der()`, `SigningKey.from_pem()`, and
110 `SigningKey.from_der()`.
111 * Keys can now be written with use of explicit curve parameters,
112 use `curve_parameters_encoding` keyword argument of `VerifyingKey.to_pem()`,
113 `VerifyingKey.to_der()`, `SigningKey.to_pem(), or `SigningKey.to_der()` to
114 specify the format. By default `named_curve` will be used, unless the
115 curve doesn't have an associated OID (as will be the case for an unsupported
116 curve), then `explicit` encoding will be used.
117 * Allow specifying acceptable point formats when loading public keys
118 (this also fixes a minor bug where python-ecdsa would accept raw
119 encoding for points in PKCS#8 files). Set of accepted encodings is controlled
120 by `valid_encodings` keyword argument in
121 `ECDH.load_received_public_key_bytes()`, `VerifyingKey.from_string()`,
122 `VerifyingKey.from_pem()`, VerifyingKey.from_der()`.
123 * `PointJacobi` and `Point` now inherit from `AbstractPoint` that implements
124 the methods for parsing points. That added `from_bytes()` and
125 `to_bytes()` methods to both of them.
126 * Curve parameters can now be read and written to PEM and DER files. The
127 `Curve` class supports new `to_der()`, `from_der()`, `to_pem()`, and
128 `from_pem()` methods.
129
130 Doc fix:
131 * Describe in detail which methods can raise `RSZeroError`, and that
132 `SigningKey.sign_deterministic()` won't raise it.
133
134 Bug fix:
135 * Correctly truncate hash values larger than the curve order (only impacted
136 custom curves and the curves added in this release).
137 * Correctly handle curves for which the order is larger than the prime
138 (only impacted custom curves and the secp160r1 curve added in this release).
139 * Fix the handling of `==` and `!=` for `Public_key`, `Private_key`, `Point`,
140 `PointJacobi`, `VerifyingKey`, and `SigningKey` so that it behaves
141 consistently and in the expected way both in Python 2 and Python 3.
142 * Implement lock-less algorithm inside PointJacobi for keeping shared state
143 so that when a calculation is aborted with KeyboardInterrupt, the state
144 doesn't become corrupted (this fixes the occasional breakage of ecdsa in
145 interactive shells).
146
147 New features:
148 * The `speed.py` script now provides performance for signature verification
149 without the use of precomputation.
150 * New curves supported: secp112r1, secp112r2, secp128r1, secp160r1.
151
152 Performance:
153 * Use 2-ary Non-Adjacent Form for the combined multiply-add. This speeds up
154 single-shot verify (i.e. without precomputation) by about 4 to 5%.
155 * Use native Python 3.8 support for calculating multiplicative inverses.
156
157 Maintenance:
158 * Include Python 3.9 in PyPI keywords.
159 * More realistic branch coverage counting (ignore Python version-specific
160 branches).
161 * Additional test coverage to many parts of the library.
162 * Migrate to Github Actions for Continuous Testing.
163
164 * Release 0.16.1 (12 Nov 2020)
165
166 New API:
167 `VerifyingKey.precompute()` supports `lazy` argument to delay precomputation
168 to the first time the key is used to verify a signature.
169
170 Doc fixes:
171 Documentation for the `VerifyingKey.precompute()` method.
172
173 Bug fix:
174 Make created signatures correct when the hash used is bigger than the curve
175 order bit size and the curve order is not a multiple of 8 (this affects
176 only users of custom curves or hashes with output larger than 512 bits).
177
178 Performance:
179 Speed up library load time by calculating the generator point multiplication
180 tables the first time the points are used, not when they are initialised.
181
182 Maintenance:
183 Include Python 3.9 in CI testing.
184 Test coverage for the `VerifyingKey.precompute()` method.
185 Small speed-ups for the test suite.
186
187 * Release 0.16.0 (27 Aug 2020)
188
189 New features:
190 Support for reading and writing private keys in PKCS#8 format.
191
192 New API:
193 `to_pem` and `to_der` now accept new parameter, `format`, to specify
194 the format of the encoded files, either the default, legacy `ssleay`, or
195 the new `pkcs8` to use PKCS#8. Note that only unencrypted PKCS#8 files are
196 supported.
197 Add `allow_truncate` to `verify` in `VerifyingKey`, it defaults to True,
198 when specified as False, the use of large hashes smaller than curves will be
199 disallowed (as it was in 0.14.1 and earlier).
200
201 Bug fix:
202 Correctly calculate signatures for private keys equal to n-1.
203 Make `PointJacobi` and thus `SigningKey` and `VerifyingKey` pickleable.
204
205 Doc fixes:
206 `to_pem` functions return `bytes` not `str`, document them as such.
207 `from_pem` and `from_pem` in `SigningKey` returns `SigningKey`, document them
208 as such.
209
210 Maintenance:
211 Ensure that version checks will work with Python 4.
212 Format the source with black.
213 Fix uses of `assert_` in the test suite.
214 Use newer Ubuntu in Travis to test against OpenSSL 1.1.1 (and thus
215 test the interoperability of ECDH code in Travis).
216
217 * Release 0.15 (02 Jan 2020)
218
219 Bug fixes:
220 `from curves import *` will now correctly import `BRAINPOOLP256r1` and
221 `BRAINPOOLP320r1` curves.
222
223 New features:
224 ECDH operations have a public explicit API.
225 Large hashes are now supported with small curves (e.g. SHA-256 can be used
226 with NIST192p).
227 `VerifyingKey` now supports the `precompute()` method to further speed up
228 signature verification with the given instance of the key.
229
230 New API:
231 `VerifyingKey`, `SigningKey`, `Public_key`, `Private_key` and
232 `CurveFp` now have `__eq__` methods.
233 `ecdsa.ecdh` module and `ECDH` class.
234 `PointJacobi` added.
235 `VerifyingKey.verify_digest`, `SigningKey.sign_digest` and
236 `SigningKey.sign_digest_deterministic` methods now accept the `allow_truncate`
237 argument to enable the use of hashes larger than the curve order.
238 `VerifyingKey` `from_pem` and `from_der` now accept `hashfunc` parameter
239 like other `from*` methods.
240 `VerifyingKey` has the `precompute` method now.
241 `VerifyingKey.from_public_point` may now not perform validation of public
242 point when `validate_point=False` argument is passed to the method.
243 `CurveFp` constructor now accepts the `h` parameter - the cofactor of the
244 elliptic curve, it's used for the selection of algorithm of public point
245 verification.
246
247 Performance:
248 `randrange` now will perform much fewer calls to the system random number
249 generator.
250 `PointJacobi` introduced and used as the underlying implementation; speeds up
251 the library by a factor of about 20.
252 The library has now optional dependencies on `gmpy` and `gmpy2`. When they are
253 available, the elliptic curve calculations will be about 3 times faster.
254
255 Maintenance:
256 expected minimum version of `six` module (1.9.0) is now specified explicitly
257 in `setup.py` and tested against.
258 Significantly faster test suite execution.
259
260 * Release 0.14.1 (06 Nov 2019)
261
262 Remove the obsolete `six.py` file from wheel
263
264 * Release 0.14 (06 Nov 2019)
265
266 Bug fixes:
267 Strict checking of DER requirements when parsing SEQUENCE, INTEGER,
268 OBJECT IDENTIFIER and BITSTRING objects.
269 DER parsers now consistently raise `UnexpectedDER` exception on malformed DER
270 encoded byte strings.
271 Make sure that both malformed and invalid signatures raise `BadSignatureError`.
272 Ensure that all `SigningKey` and `VerifyingKey` methods that should accept
273 bytes-like objects actually do accept them (also avoid copying input strings).
274 Make `SigningKey.sign_digest_deterministic` use default object hashfunc when
275 none was provided.
276 `encode_integer` now works for large integers.
277 Make `encode_oid` and `remove_object` correctly handle OBJECT IDENTIFIERs
278 with large second sub-identifier and padding in encoded sub-identifiers.
279
280 New features:
281 Deterministic signature methods now accept the `extra_entropy` parameter to
282 further randomise the selection of `k` (the nonce) for signature, as specified
283 in RFC6979.
284 Recovery of the public key from signature is now supported.
285 Support for SEC1/X9.62 formatted keys, all three encodings are supported:
286 "uncompressed", "compressed" and "hybrid". Both string, and PEM/DER will
287 automatically accept them, if the size of the key matches the curve.
288 Benchmarking application now provides performance numbers that are easier to
289 compare against OpenSSL.
290 Support for all Brainpool curves (non-twisted).
291
292 New API:
293 `CurveFp`: `__str__` is now supported.
294 `SigningKey.sign_deterministic`, `SigningKey.sign_digest_deterministic` and
295 `generate_k`: extra_entropy parameter was added
296 `Signature.recover_public_keys` was added
297 `VerifyingKey.from_public_key_recovery` and
298 `VerifyingKey.from_public_key_recovery_with_digest` were added
299 `VerifyingKey.to_string`: `encoding` parameter was added
300 `VerifyingKey.to_der` and `SigningKey.to_der`: `point_encoding` parameter was
301 added.
302 `encode_bitstring`: `unused` parameter was added
303 `remove_bitstring`: `expect_unused` parameter was added
304 `SECP256k1` is now part of `curves` `*` import
305 `Curves`: `__repr__` is now supported
306 `VerifyingKey`: `__repr__` is now supported
307
308 Deprecations:
309 Python 2.5 is not supported anymore - dead code removal.
310 `from ecdsa.keys import *` will now import only objects defined in that module.
311 Trying to decode a malformed point using `VerifyingKey.from_string`
312 will rise now the `MalformedPointError` exception (that inherits from
313 `AssertionError` but is not it).
314 Multiple functions in `numbertheory` are considered deprecated: `phi`,
315 `carmichael`, `carmichael_of_factorized`, `carmichael_of_ppower`,
316 `order_mod`, `largest_factor_relatively_prime`, `kinda_order_mod`. They will
317 now emit `DeprecationWarning` when used. Run the application or test suite
318 with `-Wd` option or with `PYTHONWARNINGS=default` environment variable to
319 verify if those methods are not used. They will be removed completely in a
320 future release.
321 `encode_bitstring` and `decode_bitstring` expect the number of unused
322 bits to be passed as an argument now. They will emit `DeprecationWarning`
323 if they are used in the deprecated way.
324 modular_exp: will emit `DeprecationWarning`
325
326 Hardening:
327 Deterministic signatures now verify that the signature won't leak private
328 key through a very unlikely selection of `k` value (the nonce).
329 Nonce bit size hiding was added (hardening against Minerva attack). Please
330 note that it DOES NOT make the library secure against side-channel attacks
331 (timing attacks).
332
333 Performance:
334 The public key in key generation is not verified twice now, making key
335 generation and private key reading about 33% faster.
336 Microoptimisation to `inverse_mod` function, increasing performance by about
337 40% for all operations.
338
339 Maintenance:
340 Extended test coverage to newer python versions.
341 Fixes to examples in README.md: correct commands, more correct code (now works
342 on Python 3).
343 Stopped bundling `six`
344 Moved sources into `src` subdirectory
345 Made benchmarking script standalone (runnable either with `tox -e speed`, or
346 after installation, with `python speed.py`)
347 Now test coverage reported to coveralls is branch coverage, not line coverage
348 Autodetection of curves supported by OpenSSL (test suite compatibility with
349 Fedora OpenSSL package).
350 More readable error messages (exceptions) in `der` module.
351 Documentation to `VerifyingKey`, `SigningKey` and signature encoder/decoder
352 functions added.
353 Added measuring and verifying condition coverage to Continuous Integration.
354 Big clean-up of the test suite, use pytest parametrisation and hypothesis
355 for better test coverage and more precise failure reporting.
356 Use platform-provided `math.gcd`, when provided.
357
358 * Release 0.13.3 (07 Oct 2019)
359
360 Fix CVE-2019-14853 - possible DoS caused by malformed signature decoding and
361 signature malleability.
362
363 Also harden key decoding from string and DER encodings.
364
365 * Release 0.13.2 (17 Apr 2019)
366
367 Restore compatibility of setup.py with Python 2.6 and 2.7.
368
369 * Release 0.13.1 (17 Apr 2019)
370
371 Fix the PyPI wheel - the old version included .pyc files.
372
373 * Release 0.13 (07 Feb 2015)
374
375 Fix the argument order for Curve constructor (put openssl_name= at the end,
376 with a default value) to unbreak compatibility with external callers who used
377 the 0.11 convention.
378
379 * Release 0.12 (06 Feb 2015)
380
381 Switch to Versioneer for version-string management (fixing the broken
382 `ecdsa.__version__` attribute). Add Curve.openssl_name property. Mention
383 secp256k1 in README, test against OpenSSL. Produce "wheel" distributions. Add
384 py3.4 and pypy3 compatibility testing. Other minor fixes.
385
386 * Release 0.11 (10 Mar 2014)
387
388 Add signature-encoding functions "sigencode_{strings,string,der}_canonize"
389 which canonicalize the S value (using the smaller of the two possible
390 values). Add "validate_point=" argument to VerifyingKey.from_string()
391 constructor (defaults to True) which can be used to disable time-consuming
392 point validation when importing a pre-validated verifying key. Drop python2.5
393 support (untested but not explicitly broken yet), update trove classifiers.
394
395 * Release 0.10 (23 Oct 2013)
396
397 Make the secp256k1 available in __init__.py too (thanks to Scott Bannert).
398
399 * Release 0.9 (01 Oct 2013)
400
401 Add secp256k1 curve (thanks to Benjamin Dauvergne). Add deterministic (no
402 entropy needed) signatures (thanks to slush). Added py3.2/py3.3 compatibility
403 (thanks to Elizabeth Myers).
404
405 * Release 0.8 (04 Oct 2011)
406
407 Small API addition: accept a hashfunc= argument in the constructors for
408 SigningKey and VerifyingKey. This makes it easier to write wrappers that e.g.
409 use NIST256p and SHA256 without their obligating callers to pass
410 hashfunc=sha256 in each time they call sign() or verify().
411
412 * Release 0.7 (28 Nov 2010)
413
414 Fix test failure against OpenSSL-1.0.0 (previous versions only worked against
415 openssl-0.9.8 or earlier). Increase python requirement to py2.5 or later
416 (still no py3 compatibility, but work is underway). Replace the use of obsolete
417 'sha' library with modern 'hashlib'. Clean up unit test runner (stop using
418 subprocesses).
419
420 * Release 0.6 (15 Oct 2010)
421
422 Small packaging changes: extract the version number from git, add
423 'setup.py test' command, set exit code correctly on test failure. Fix pyflakes
424 warnings.
425
426 * Release 0.5 (27 Apr 2010)
427
428 Initial release. EC-DSA signature for five NIST "Suite B" GF(p) curves:
429 prime192v1, secp224r1, prime256v1, secp384r1, and secp521r1. DER/PEM
430 input/output functions, seed-to-randrange helper functions.