Documentation ¶
Index ¶
- Constants
- func DeriveECDHX25519(fromPrivKey, toPubKey *[chacha.KeySize]byte) ([]byte, error)
- func LengthPrefix(array []byte) []byte
- func Nonce(pub1, pub2 []byte) (*[NonceSize]byte, error)
- func PublicEd25519toCurve25519(pub []byte) ([]byte, error)
- func SecretEd25519toCurve25519(priv []byte) ([]byte, error)
Constants ¶
const Curve25519KeySize = 32
Curve25519KeySize number of bytes in a Curve25519 public or private key.
const NonceSize = 24
NonceSize size of a nonce used by Box encryption (Xchacha20Poly1305).
Variables ¶
This section is empty.
Functions ¶
func DeriveECDHX25519 ¶ added in v0.1.7
DeriveECDHX25519 does X25519 ECDH using fromPrivKey and toPubKey.
func LengthPrefix ¶ added in v0.1.4
LengthPrefix array with a bigEndian uint32 value of array's length.
func PublicEd25519toCurve25519 ¶
PublicEd25519toCurve25519 takes an Ed25519 public key and provides the corresponding Curve25519 public key This function wraps PublicKeyToCurve25519 from Adam Langley's ed25519 repo: https://github.com/agl/ed25519 now moved to https://github.com/teserakt-io/golang-ed25519
func SecretEd25519toCurve25519 ¶
SecretEd25519toCurve25519 converts a secret key from Ed25519 to curve25519 format This function wraps PrivateKeyToCurve25519 from Adam Langley's ed25519 repo: https://github.com/agl/ed25519 now moved to https://github.com/teserakt-io/golang-ed25519
Types ¶
This section is empty.