summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/crypto/ed25519/ed25519.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-11-16 07:53:23 +0200
committerGitHub <noreply@github.com>2017-11-16 07:53:23 +0200
commit3138417c632370b7c62af2c79e1bc840a68e43d3 (patch)
tree0b10fac34fb24c9864f6c003626cfccb971ff360 /vendor/golang.org/x/crypto/ed25519/ed25519.go
parent074f6c1b4937c4a3d83ef1e5ff21d4a1f7710379 (diff)
downloadgitea-3138417c632370b7c62af2c79e1bc840a68e43d3.tar.gz
gitea-3138417c632370b7c62af2c79e1bc840a68e43d3.zip
Update golang x/crypto dependencies (#2923)
Diffstat (limited to 'vendor/golang.org/x/crypto/ed25519/ed25519.go')
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go
index f1d95674ac..4f26b49b6a 100644
--- a/vendor/golang.org/x/crypto/ed25519/ed25519.go
+++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go
@@ -3,20 +3,20 @@
// license that can be found in the LICENSE file.
// Package ed25519 implements the Ed25519 signature algorithm. See
-// http://ed25519.cr.yp.to/.
+// https://ed25519.cr.yp.to/.
//
// These functions are also compatible with the “Ed25519” function defined in
-// https://tools.ietf.org/html/draft-irtf-cfrg-eddsa-05.
+// RFC 8032.
package ed25519
// This code is a port of the public domain, “ref10” implementation of ed25519
// from SUPERCOP.
import (
+ "bytes"
"crypto"
cryptorand "crypto/rand"
"crypto/sha512"
- "crypto/subtle"
"errors"
"io"
"strconv"
@@ -177,5 +177,5 @@ func Verify(publicKey PublicKey, message, sig []byte) bool {
var checkR [32]byte
R.ToBytes(&checkR)
- return subtle.ConstantTimeCompare(sig[:32], checkR[:]) == 1
+ return bytes.Equal(sig[:32], checkR[:])
}