func New(rand io.Reader) (*KX, error) {
	kx := new(KX)
	_, err := io.ReadFull(rand, kx.Scalar[:])
	if err != nil {
		return nil, err
	}
	kx.Scalar[0] &= 248
	kx.Scalar[31] &= 127
	kx.Scalar[31] |= 64
	curve25519.ScalarBaseMult((*[32]byte)(&kx.Public), (*[32]byte)(&kx.Scalar))
	return kx, nil
}
New begins a new key exchange by generating a public and secret value.
Public portions must be exchanged between parties to derive a shared secret
key.
package x25519
import (
	"io"
	"golang.org/x/crypto/curve25519"
)
type Public [32]byte
type Scalar [32]byte
type KX struct {
	Public
	Scalar  
}