| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
we want to test both with and without openssl command present
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
| |
remove unused imports, bad assert methods, unused variables etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
the public key recovery needs to truncate large hashes just like
the signature verification and creation, so reuse the code that does
that
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
While not recommended, it is well-defined, so allow use of large hashes
with small curve (like SHA-512 with NIST256p)
test against OpenSSL
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
looks like few merges/rebases didn't go exactly as planned and ended up
duplicating test code, remove it
|
|
|
|
| |
make all test cases execute in less than 0.3s on i7 4790K
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
the X9.62 standard defines also a hybrid public key representation,
add support for it
|
|
|
|
|
| |
make the decoding of malformed point raise the same exception irrespective
of the formatting of the key/public point
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
* Added recover_public_keys() to Signature
* Added pk recovery support in wrapper
|
| |
|
| |
|
|
|