3

Without knowing anything else than the signature itself, what information if any can be publicly read from the signature?

2 Answers 2

1

Basically the signature doesn't give information.
However if you know what has been signed you can retrieve the account of the signer. Here is a piece of code to show this:

const Web3 = require('web3');
const web3 = new Web3();
async function f() { 
    const privateKey = web3.utils.keccak256('Test');
    const address = web3.eth.accounts.privateKeyToAccount(privateKey); 
    const toSign="This is a test";    
    const signedData = await web3.eth.accounts.sign(toSign, privateKey);
    console.log(`Signing "${toSign}" by account ${address.address} gives signature ${signedData.signature}`);
    const signer=web3.eth.accounts.recover(toSign, signedData.signature);
    console.log(`Knowing the signed text: "${toSign}" we can get the signer: ${signer}`);
}     
f();
0

It's one-way hash function, so with only signature you don't have any information.

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.