From: Mark Wooding Date: Thu, 11 May 2017 09:42:15 +0000 (+0100) Subject: catacomb/__init__.py: Add `beginhash', `endhash' to the EdDSA interface. X-Git-Tag: 1.2.0~7 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/058f0a00a3fbce84d8963e140505a5fa35962b90 catacomb/__init__.py: Add `beginhash', `endhash' to the EdDSA interface. This is consistent with the other DSA-ish classes. --- diff --git a/catacomb/__init__.py b/catacomb/__init__.py index 7ac5baf..b9818e7 100644 --- 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)