perlin-network / noise

A decentralized P2P networking stack written in Go.
https://godoc.org/github.com/perlin-network/noise
MIT License
1.79k stars 211 forks source link

ecdh: Use library functions for Ed25519->X25519 conversion #283

Open Yawning opened 4 years ago

Yawning commented 4 years ago

Since this was using agl's PublicKeyToCurve25519/PrivateKeyToCurve25519, the X25519 implementation being used provides equivalent functionality ( https://github.com/oasislabs/ed25519/commit/267bbda82b5ea724eb3d890e57edaf5c24d18fa5), so it is possible to avoid having to do it with math/big.

Note: The differences referred to in the commit message that adds the functionality have to do with the function prototypes, the conversion routines should produce identical results.