summaryrefslogtreecommitdiff
path: root/src/ecdsa/errors.py
diff options
context:
space:
mode:
authorHubert Kario <hubert@kario.pl>2021-04-29 01:26:47 +0200
committerHubert Kario <hubert@kario.pl>2021-05-21 00:08:50 +0200
commit315f312fcec29b05a0ee02b2dba7cb0472f4d3c7 (patch)
tree87f6d1b91e16420e095556612c767893e51ffaeb /src/ecdsa/errors.py
parenta385c44060f8e9f9d5cf2850405d1205b12c24e1 (diff)
downloadecdsa-315f312fcec29b05a0ee02b2dba7cb0472f4d3c7.tar.gz
move parsing of points from VerifyingKey to parent class of points
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.
Diffstat (limited to 'src/ecdsa/errors.py')
-rw-r--r--src/ecdsa/errors.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ecdsa/errors.py b/src/ecdsa/errors.py
new file mode 100644
index 0000000..6edcf47
--- /dev/null
+++ b/src/ecdsa/errors.py
@@ -0,0 +1,6 @@
+class MalformedPointError(AssertionError):
+ """Raised in case the encoding of private or public key is malformed."""
+
+ pass
+
+