3

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

Martol1ni
  • 131
  • 1

2 Answers2

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();
Gerard Persoon
  • 326
  • 1
  • 6
0

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

whisping
  • 1
  • 1