Skip to content

Instantly share code, notes, and snippets.

doctorevil /
Created Mar 13, 2014
curve25519 ec-kcdsa python impl
# a pedagogical implementation of curve25519 with ec-kcdsa
# coded by doctorevil to validate nxt's port of Matthijs van Duin's implementation
# warning: this implementation is not timing attack resistant
# ec arithmetic equations from
from hashlib import sha256
from ecdsa.numbertheory import square_root_mod_prime, SquareRootError, inverse_mod
CURVE_P = 2**255 - 19
CURVE_A = 486662
doctorevil /
Last active Feb 13, 2021
NXT Crypto Review of &

Crypto Review of &

By DoctorEvil on

Sponsored by MSIN on


NXT's and look kosher aside from a signing bug that is currently being worked around.

General Methodology