Archived
1
0

try reverting to old key derivation function

This commit is contained in:
Jeff Becker 2017-08-25 10:37:46 -04:00
parent 2152cd3246
commit cc5d94ee5f
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 9 additions and 0 deletions

View File

@ -21,4 +21,11 @@ func naclCryptoSignDetached(hash, sk []byte) []byte {
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

View File

@ -411,6 +411,7 @@ func cryptoSignFucky(h, sk []byte) string {
return hexify(sig)
}
/*
// convert seed to secret key
func seedToKeyPair(seed []byte) (pub ed25519.PublicKey, full ed25519.PrivateKey) {
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[:]))
return
}
*/
func cryptoSignProper(h, sk []byte) string {
// convert key