summaryrefslogtreecommitdiff
path: root/src/ecdsa/test_pyecdsa.py
Commit message (Collapse)AuthorAgeFilesLines
* add test coverage for canonicalizing signature encodersHubert Kario2023-03-021-2/+80
|
* test_pyecdsa: remove unused variableHubert Kario2023-02-281-2/+0
|
* don't mix import styles for imports from moduleHubert Kario2023-02-281-46/+56
|
* test_pyecdsa: make coverage realisticHubert Kario2023-02-241-2/+2
| | | | we want to test both with and without openssl command present
* interoperability tests for EdDSA with opensslHubert Kario2022-04-021-0/+116
|
* use new version of blackHubert Kario2022-03-291-15/+15
|
* add support for writing keys with explicit curve parametersHubert Kario2021-05-211-0/+24
|
* move parsing of points from VerifyingKey to parent class of pointsHubert Kario2021-05-211-0/+6
| | | | | | | | | | | For decoding points it's not necessary to have all the data useful for decoding public keys. This will also make it possible to decode explicit EC parameters, as decoding of a public key requires knowledge of the curve's base point and the base point is in defined in the parameters, creating a chicken and an egg problem with using the VerifyingKey.from_string() to parse the base point.
* allow limiting point formats, don't accept malformed PEM public filesHubert Kario2021-04-241-0/+59
| | | | | | | Allow specifying what point formats are supported when loading public keys. Limit the point formats when loading PEM and DER public files to the formats actually allowed in them: uncompressed, compressed, and hybrid. Previous code would allow raw encoding too.
* more tests for util.randrangeHubert Kario2020-12-121-0/+12
|
* fix LGTM alertsHubert Kario2020-12-111-6/+0
| | | | remove unused imports, bad assert methods, unused variables etc.
* use more specific asserts in test_pyecdsa moduleHubert Kario2020-12-101-6/+6
|
* add secp160r1; fix handling curves with order > pHubert Kario2020-12-091-2/+23
| | | | | | | | | | | | | | | the secret multiplier is limited by the order of the base point, that also informs the size of elements for the signature (as they are calculated modulo order), but the public point is a point, so its elements are modulo prime from the curve. The same thing applies to the shared secret: it's just one coordinate of the point, so it's modulo p of the curve, not modulo order of generator. for all curves up till now the size of order and size of the prime was the same so it worked fine, but secp160r1 is different, so it showed the bugs so fix this bug and add secp160r1 as the test coverage for it
* add secp128r1Hubert Kario2020-12-091-0/+15
|
* add secp112r2Hubert Kario2020-12-081-0/+15
|
* add secp112r1Hubert Kario2020-12-081-0/+15
|
* fix from_public_key_recovery() and sign() for large hashesHubert Kario2020-12-081-3/+4
| | | | | | the public key recovery needs to truncate large hashes just like the signature verification and creation, so reuse the code that does that
* Reformat to make black happyblag2020-08-061-5/+8
|
* Add OPENSSL_SUPPORTED_CURVESblag2020-07-291-0/+5
|
* Fix exception pathblag2020-07-291-1/+1
|
* Add tests for allow_truncate=Falseblag2020-07-291-0/+38
|
* AutoformatOwen Yamauchi2020-04-301-1/+2
|
* Add testing for uncovered branches; OpenSSL roundtrip testingOwen Yamauchi2020-04-301-1/+90
|
* Format with blackTaneli Hukkinen2020-01-261-433/+841
|
* add vectors from RFC4754Hubert Kario2019-12-161-1/+66
|
* support large hashes with small curvesHubert Kario2019-12-021-11/+50
| | | | | | | While not recommended, it is well-defined, so allow use of large hashes with small curve (like SHA-512 with NIST256p) test against OpenSSL
* Public_key: fix check for x and y sizeHubert Kario2019-12-021-1/+1
| | | | | | | the x and y needs to be on curve, so they need to be smaller than the curve's prime, not the base point order See Section 3.2.2.1 of SEC 1 v2
* coverage: exclude environment branches in test casesHubert Kario2019-12-021-21/+5
| | | | | | | | | | | since some branching in hypothesis strategies and in handling different python, hypothesis, openssl and unittest versions is necessary, ignore them for branch coverage remove benchmarking code and dead code from test_pyecdsa.py (we have speed.py now) and exclude a disabled test case from coverage
* remove duplicated test casesHubert Kario2019-12-021-139/+1
| | | | | looks like few merges/rebases didn't go exactly as planned and ended up duplicating test code, remove it
* speed up test suiteHubert Kario2019-12-021-9/+12
| | | | make all test cases execute in less than 0.3s on i7 4790K
* der: fix encoding and decoding OIDsHubert Kario2019-11-031-11/+0
| | | | | | | | | | | | make the code handle oids with a large second subidentifier (fixes #155) make the code raise correct exception when the encoded multi-byte subidentifier is missing the last byte move OID test coverage to test_der module and extend it update the OID generators in random DER generator to generate OIDs with large second subidentifier
* Move some brainpool key tests in separate testsShrirang Bhate2019-11-021-10/+15
|
* Remove leftover codeShrirang Bhate2019-11-021-5/+0
|
* Add RFC 6932 test vectorsShrirang Bhate2019-11-021-2/+61
|
* Skip tests if the curves are not supported by OpenSSLShrirang Bhate2019-11-021-2/+3
|
* Add RFC 7027 test vectorsShrirang Bhate2019-11-021-0/+51
|
* Apply brainpool to new files after mergeShrirang Bhate2019-11-021-3/+7
|
* Added support for Brainpool r1bhate2019-11-021-2/+286
|
* make our code follow the new calling convention for bistringHubert Kario2019-10-171-4/+24
|
* don't allow for creation of malformed DER filesHubert Kario2019-10-171-0/+13
| | | | | | when ancoding in ASN.1 the public point has to use uncompressed, compressed or hybrid representation, raw is not allowed so disallow it in API
* make sure assert is not optimised outHubert Kario2019-10-101-2/+168
| | | | | | | | as assert will be optimised out if the module is compiled with optimisations on, we can't use them for checking user-provided data use an exception that inherits from it, so that existing code will behave as expected
* add support for X9.62 hybrid public key formatHubert Kario2019-10-011-1/+14
| | | | | the X9.62 standard defines also a hybrid public key representation, add support for it
* unify exceptions between raw and compressed encodingHubert Kario2019-10-011-0/+8
| | | | | make the decoding of malformed point raise the same exception irrespective of the formatting of the key/public point
* support for SEC/X9.62 formatted keysHubert Kario2019-10-011-3/+101
| | | | | | 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
* use hashfunc parameter in from_public_key_recovery()Hubert Kario2019-09-271-1/+30
| | | | | | | | the call to klass.from_public_key_recovery_with_digest() used the hardcoded sha1, effectively ignoring the hashfunc passed as the parameter to from_public_key_recovery() also use the canonical name of first parameter in classmethods
* Pk Recovery (#102)gianlucafrei2019-01-151-0/+27
| | | | * Added recover_public_keys() to Signature * Added pk recovery support in wrapper
* check if system openssl supports a curve before running testHubert Kario2018-09-111-0/+29
|
* Merge PR60: unbundle 'six'Brian Warner2016-11-161-1/+1
|
* move sources into src/Brian Warner2016-11-161-0/+701