1

I'm not sure if I am conceptually wrong. I'm running some tests and trying to recover the text from a signed message.

it( "Should owner should be signer", async function ()
        {
            msg = "Hallo Welt";
            let signature = await owner.signMessage( msg );
            let signer = ethers.utils.verifyMessage( msg, signature );
            expect( signer ).to.equal( owner.address );
        } ); 

This is working fine, but I would like to do the other way around. Can I provide the signature and the signer retrieve the msg (Hello World). Couldn't find anything in the docs. Thanks for your time!

1 Answer 1

2

You indeed are conceptually wrong. You can't recover the text message.

You probably are misinterpreting the function of signatures in Ethereum. Signature are utilised to create a piece of data that proves that a particular address has signed a message, yet the message is required when verifying the signature.

You are probably looking for some sort of encryption.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.