usually ownership of a private key is checked by providing some random message to user and ask him to sign that random message.

I want to know if security goes below acceptable level If instead of generating random message for every user I have one hardcoded message that I force everyone to sign and check against that signature.

I'm mostly interested if someone knowing someone else public key is able to generate private key that do not match public key but produce same signature (or at least signature resulting in the same result of ecrecover)

function Check(bytes32 r, bytes32 s, uint8 v) public returns (bool) {

    bytes32 hashToHeck = bytes32(0x9facbcdfee2581f3a6c4910ce00191fd302bddab310608cfed743e3812b142a0);
    return(msg.sender == ecrecover(hashToHeck, v, r, s));


P.S. I'm aware of front running attacks but it does not apply in that scenario since it will be on private network

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.