From 0cbeb26f93f34eecbcfad6db126277f365e7b55e Mon Sep 17 00:00:00 2001 From: Tim Williams Date: Sat, 30 Jun 2018 16:45:03 -0400 Subject: [PATCH] format the msg parameter to Ecrecover so it has 32 bytes --- shyftRingWalletConn/app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shyftRingWalletConn/app.go b/shyftRingWalletConn/app.go index b03f308b1f..15a5bb8159 100644 --- a/shyftRingWalletConn/app.go +++ b/shyftRingWalletConn/app.go @@ -59,7 +59,8 @@ func handleRequest(conn net.Conn) { // and the bytes array of the signature var msg = []byte(dat["msg"].(string)) var sig = []byte(dat["sig"].(string)) - var address, err = crypto.Ecrecover(msg, sig) + new_msg := crypto.Keccak256(msg) + var address, err = crypto.Ecrecover(new_msg, sig) if err != nil { fmt.Println("The error is ") fmt.Println(err)