]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgo/go/golang.org/x/crypto/curve25519/doc.go
Add error check on return value of build_co_await
[thirdparty/gcc.git] / libgo / go / golang.org / x / crypto / curve25519 / doc.go
CommitLineData
c2047754
ILT
1// Copyright 2012 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Package curve25519 provides an implementation of scalar multiplication on
dd931d9b 6// the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
aa8901e9 7package curve25519 // import "golang.org/x/crypto/curve25519"
c2047754
ILT
8
9// basePoint is the x coordinate of the generator of the curve.
10var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
11
12// ScalarMult sets dst to the product in*base where dst and base are the x
13// coordinates of group points and all values are in little-endian form.
14func ScalarMult(dst, in, base *[32]byte) {
15 scalarMult(dst, in, base)
16}
17
18// ScalarBaseMult sets dst to the product in*base where dst and base are the x
19// coordinates of group points, base is the standard generator and all values
20// are in little-endian form.
21func ScalarBaseMult(dst, in *[32]byte) {
22 ScalarMult(dst, in, &basePoint)
23}