puppeth: handle encrypted ssh keys (closes #15442) (#15443)

* cmd/puppeth: handle encrypted ssh keys

* cmd/puppeth: fix unconvert linter error
This commit is contained in:
Bo
2017-11-12 12:24:42 -08:00
committed by Péter Szilágyi
parent f47adc9ea8
commit cb8bbe7081
238 changed files with 51248 additions and 27691 deletions

View File

@ -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[:])
}