summaryrefslogtreecommitdiff
path: root/src/ecdsa/numbertheory.py
Commit message (Collapse)AuthorAgeFilesLines
* better handling for malformed curve parametersHubert Kario2022-04-011-6/+12
| | | | | | Since explicit curve parameters may not use prime numbers as the field (see CVE-2022-0778), make sure that our square_root_mod_prime() handles non-prime p gracefully
* use new version of blackHubert Kario2022-03-291-3/+0
|
* docs: Fix a few typosTim Gates2021-09-051-1/+1
| | | | | | | | | | | | | | There are small typos in: - src/ecdsa/ellipticcurve.py - src/ecdsa/numbertheory.py - src/ecdsa/test_malformed_sigs.py - versioneer.py Fixes: - Should read `support` rather than `suport`. - Should read `languages` rather than `langauges`. - Should read `internally` rather than `interanlly`. - Should read `arbitrarily` rather than `arbitrarly`.
* fix LGTM alertsHubert Kario2020-12-111-1/+0
| | | | remove unused imports, bad assert methods, unused variables etc.
* update URIs and badges after migration to tlsfuzzer orgHubert Kario2020-12-101-7/+7
|
* ignore environment-caused lack of branch coverage for inverse_mod()Hubert Kario2020-12-091-6/+9
|
* use native inverse modulo when availableHubert Kario2020-12-021-7/+17
| | | | | the builtin pow() can handle negative powers on python 3.8 and later, so do use it
* Fix docstring indentation issuesTaneli Hukkinen2020-01-271-37/+34
|
* Format with blackTaneli Hukkinen2020-01-261-356/+569
|
* Fix for Python 4: replace unsafe six.PY3 with PY2Hugo2020-01-161-4/+4
|
* numbertheory.py: fix flakesHubert Kario2019-12-171-5/+5
|
* also allow the older gmpyHubert Kario2019-12-021-0/+25
| | | | | since on older distros like CentOS 6 there is python-gmpy but not python-gmpy2, support gmpy too
* use gmp2 for faster arithmeticHubert Kario2019-12-021-10/+22
|
* Merge pull request #147 from tomato42/speed-upHubert Kario2019-11-011-18/+9
|\ | | | | Minor speed-up
| * speed up inverse_modHubert Kario2019-10-311-18/+9
| | | | | | | | | | | | since the divmod() is comparatively expensive, and inverse_mod() is extensively used, use a slightly different implementation that doesn't use it
* | Use math.gcd if availableOctavian2019-10-311-6/+8
|/
* numbertheory: deprecate modular_expHubert Kario2019-10-301-20/+15
| | | | | the function is just a wrapper around pow() builtin, so don't use it, mark it deprecated, exclude from coverage (as we're not testing it)
* deprecate unused methodsHubert Kario2019-10-101-7/+43
| | | | | There are few pure-maths methods that are unused by the library code, mark them deprecated so that we can remove them in the future
* support for SEC/X9.62 formatted keysHubert Kario2019-10-011-7/+16
| | | | | | Adds support for encoding and decoding verifying keys in format specified in SEC 1 or in X9.62. Specifically the uncompressed point encoding and the compressed point encoding
* Merge PR60: unbundle 'six'Brian Warner2016-11-161-2/+2
|
* switch to tox, move test functions into separate filesBrian Warner2016-11-161-123/+1
|
* move sources into src/Brian Warner2016-11-161-0/+652