extra25519

package
v0.0.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 truncated and fed into the elligator bijection (which covers half of the points on the elliptic curve).

func PrivateKeyToCurve25519

func PrivateKeyToCurve25519(curve25519Private *[32]byte, privateKey *[64]byte)

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

func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool

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

func ScalarBaseMult(publicKey, representative, privateKey *[32]byte) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL