Documentation ¶
Index ¶
- func HashToEdwards(out *edwards25519.ExtendedGroupElement, h *[32]byte)
- func PrivateKeyToCurve25519(curve25519Private *[32]byte, privateKey *[64]byte)
- func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool
- func RepresentativeToPublicKey(publicKey, representative *[32]byte)
- func ScalarBaseMult(publicKey, representative, privateKey *[32]byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashToEdwards ¶
func HashToEdwards(out *edwards25519.ExtendedGroupElement, h *[32]byte)
HashToEdwards converts a 256-bit hash output into a point on the Edwards curve isomorphic to Curve25519 in a manner that preserves collision-resistance. The returned curve points are NOT indistinguishable from random even if the hash value is. Specifically, first one bit of the hash output is set aside for parity and the rest is tuncated and fed into the elligator bijection (which covers half of the points on the elliptic curve).
func PrivateKeyToCurve25519 ¶
PrivateKeyToCurve25519 converts an ed25519 private key into a corresponding curve25519 private key such that the resulting curve25519 public key will equal the result from PublicKeyToCurve25519.
func PublicKeyToCurve25519 ¶
PublicKeyToCurve25519 converts an Ed25519 public key into the curve25519 public key that would be generated from the same private key.
func RepresentativeToPublicKey ¶
func RepresentativeToPublicKey(publicKey, representative *[32]byte)
RepresentativeToPublicKey converts a uniform representative value for a curve25519 public key, as produced by ScalarBaseMult, to a curve25519 public key.
func ScalarBaseMult ¶
ScalarBaseMult computes a curve25519 public key from a private key and also a uniform representative for that public key. Note that this function will fail and return false for about half of private keys. See http://elligator.cr.yp.to/elligator-20130828.pdf.
Types ¶
This section is empty.