chiark / gitweb /
catacomb/__init__.py: Calculate `X25519_BASE' and `X448_BASE'.
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:20 +0000 (04:29 +0100)
Easier on the eyes and brain.

catacomb/__init__.py

index da7ff15bda0d5d66e416326e835b2c423604c927..860cfb5e07cd3d119a45771fed15068b360fd572 100644 (file)
@@ -735,12 +735,8 @@ _augment(KCDSAPriv, _tmp)
 ###--------------------------------------------------------------------------
 ### Bernstein's elliptic curve crypto and related schemes.
 
-X25519_BASE = \
-  bytes('0900000000000000000000000000000000000000000000000000000000000000')
-
-X448_BASE = \
-  bytes('05000000000000000000000000000000000000000000000000000000'
-        '00000000000000000000000000000000000000000000000000000000')
+X25519_BASE = MP(9).storel(32)
+X448_BASE = MP(5).storel(56)
 
 Z128 = bytes('00000000000000000000000000000000')