// Calculate the stealth difference func StealthPub(pub, priv []byte) (res []byte) { res = make([]byte, 33) if !secp256k1.Multiply(pub, priv, res) { res = nil } return }
// Calculate the stealth difference func StealthDH(pub, priv []byte) []byte { var res [33]byte if !secp256k1.Multiply(pub, priv, res[:]) { return nil } s := sha256.New() s.Write(res[:]) return s.Sum(nil) }