I do the following in geth:
var msgHash = web3.sha3("hello")
var signature = eth.sign(eth.accounts[0], msgHash)
var r = signature.slice(0,64)
var s = "0x" +signature.slice(64,128)
var v = signature.slice(128,130)
r = signature.slice(0,64) "0x6d49c891d29b33c292232f690c9972e17e0dbead7d4fc446bb4ce5892f0e55" s = signature.slice(64,128) "a22c9f3c20a7f0bc90666d1d1c6f269658a0ccd56b1db1812671e23331d8ad2c" v = signature.slice(128,130) "52"
I then call the following solidity code
function verify(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) public {
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
bytes32 prefixedHash = keccak256(prefix, msgHash);
a = ecrecover(prefixedHash, v, r, s);
}
Which returns the following:
0x0000000000000000000000000000000000000000
Absolutely stumped by this, I've taken a look at the following threads to no success: