aboutsummaryrefslogtreecommitdiffstats
path: root/noise-helpers.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 19:33:41 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 19:34:28 +0200
commit2326d6a4d75f9f3736046cc526eb593a403d4c7a (patch)
treeda31622899bb84e256b22addd1604b8250582c44 /noise-helpers.go
parentCleanup ratelimiter (diff)
downloadwireguard-go-2326d6a4d75f9f3736046cc526eb593a403d4c7a.tar.xz
wireguard-go-2326d6a4d75f9f3736046cc526eb593a403d4c7a.zip
Odds and ends
Diffstat (limited to '')
-rw-r--r--noise-helpers.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/noise-helpers.go b/noise-helpers.go
index 6e23d83..63e45b3 100644
--- a/noise-helpers.go
+++ b/noise-helpers.go
@@ -71,14 +71,13 @@ func isZero(val []byte) bool {
return acc == 1
}
+/* This function is not used as pervasively as it should because this is mostly impossible in Go at the moment */
func setZero(arr []byte) {
for i := range arr {
arr[i] = 0
}
}
-/* curve25519 wrappers */
-
func newPrivateKey() (sk NoisePrivateKey, err error) {
// clamping: https://cr.yp.to/ecdh.html
_, err = rand.Read(sk[:])