From 058f0a00a3fbce84d8963e140505a5fa35962b90 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 11 May 2017 10:42:15 +0100 Subject: [PATCH] catacomb/__init__.py: Add `beginhash', `endhash' to the EdDSA interface. This is consistent with the other DSA-ish classes. --- catacomb/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.11.0