catacomb/__init__.py: Settle on SHAKE256 for X448 box-key generation.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 11 May 2017 09:42:15 +0000 (10:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 14 May 2017 03:29:42 +0000 (04:29 +0100)
This matches Ed448 hashing, which is probably a good thing.

catacomb/__init__.py

index 4840eef..5cbf993 100644 (file)
@@ -889,7 +889,7 @@ class X448Pub (_XDHPub):
 class X448Priv (_XDHPriv, X448Pub):
   _KEYSZ = KeySZSet(X448_KEYSZ)
   def _op(me, k, X): return x448(k, X)
-  ##def _hashkey(me, z): return ???
+  def _hashkey(me, z): return Shake256().hash(z).done(salsa20.keysz.default)
 
 class _EdDSAPub (_BasePub):
   def beginhash(me): return me._HASH()