Skip to content

Instantly share code, notes, and snippets.

@doctorevil
doctorevil / curve25519.py
Created Mar 13, 2014
curve25519 ec-kcdsa python impl
View curve25519.py
# 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
@doctorevil
doctorevil / review.md
Last active Feb 13, 2021
NXT Crypto Review of Curve25519.java & Crypto.java
View review.md

Crypto Review of Curve25519.java & Crypto.java

By DoctorEvil on Nextcoin.org

Sponsored by MSIN on BitcoinTalk.org

TL;DR

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

General Methodology