chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
925aa45
)
catacomb/__init__.py: Add `beginhash', `endhash' to the EdDSA interface.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 11 May 2017 09:42:15 +0000
(10:42 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 14 May 2017 03:29:42 +0000
(
04:29
+0100)
This is consistent with the other DSA-ish classes.
catacomb/__init__.py
patch
|
blob
|
blame
|
history
diff --git
a/catacomb/__init__.py
b/catacomb/__init__.py
index 7ac5baf91383fba7f4f55635b7a4b55f6826aa3e..b9818e71a7eb3c717f538a82f0f24c21964c21fb 100644
(file)
--- a/
catacomb/__init__.py
+++ b/
catacomb/__init__.py
@@
-892,13
+892,15
@@
class X448Priv (_XDHPriv, X448Pub):
##def _hashkey(me, z): return ???
class _EdDSAPub (_BasePub):
- pass
+ def beginhash(me): return me._HASH()
+ def endhash(me, h): return h.done()
class _EdDSAPriv (_BasePriv, _EdDSAPub):
pass
class Ed25519Pub (_EdDSAPub):
_PUBSZ = KeySZSet(ED25519_PUBSZ)
+ _HASH = sha512
def verify(me, msg, sig):
return ed25519_verify(me.pub, msg, sig)