try reverting to old key derivation function
This commit is contained in:
parent
2152cd3246
commit
cc5d94ee5f
@ -21,4 +21,11 @@ func naclCryptoSignDetached(hash, sk []byte) []byte {
|
|||||||
return nacl.CryptoSignDetached(hash, sk)
|
return nacl.CryptoSignDetached(hash, sk)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func seedToKeyPair(seed []byte) (pk, sk []byte) {
|
||||||
|
kp := nacl.LoadSignKey(seed)
|
||||||
|
defer kp.Free()
|
||||||
|
pk, sk = kp.Public(), kp.Secret()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var naclScalarBaseMult = curve25519.ScalarBaseMult
|
var naclScalarBaseMult = curve25519.ScalarBaseMult
|
||||||
|
@ -411,6 +411,7 @@ func cryptoSignFucky(h, sk []byte) string {
|
|||||||
return hexify(sig)
|
return hexify(sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// convert seed to secret key
|
// convert seed to secret key
|
||||||
func seedToKeyPair(seed []byte) (pub ed25519.PublicKey, full ed25519.PrivateKey) {
|
func seedToKeyPair(seed []byte) (pub ed25519.PublicKey, full ed25519.PrivateKey) {
|
||||||
pub = make(ed25519.PublicKey, ed25519.PublicKeySize)
|
pub = make(ed25519.PublicKey, ed25519.PublicKeySize)
|
||||||
@ -430,6 +431,7 @@ func seedToKeyPair(seed []byte) (pub ed25519.PublicKey, full ed25519.PrivateKey)
|
|||||||
log.Println("pk=", hexify(pub[:]))
|
log.Println("pk=", hexify(pub[:]))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func cryptoSignProper(h, sk []byte) string {
|
func cryptoSignProper(h, sk []byte) string {
|
||||||
// convert key
|
// convert key
|
||||||
|
Reference in New Issue
Block a user