By DoctorEvil on Nextcoin.org
Sponsored by MSIN on BitcoinTalk.org
NXT's Crypto.java and Curve25519.java look kosher aside from a signing bug that is currently being worked around.
| # 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 http://hyperelliptic.org/EFD/g1p/auto-montgom.html | |
| from hashlib import sha256 | |
| from ecdsa.numbertheory import square_root_mod_prime, SquareRootError, inverse_mod | |
| CURVE_P = 2**255 - 19 | |
| CURVE_A = 486662 |
By DoctorEvil on Nextcoin.org
Sponsored by MSIN on BitcoinTalk.org
NXT's Crypto.java and Curve25519.java look kosher aside from a signing bug that is currently being worked around.