Web3.js Signatures – Is it Okay to Rely on web3.eth.sign for Deterministic Signatures?

ethereumjsgo-ethereumsignatureweb3js

I am using web3.eth.sign(message, address); to generate digital signatures signed by the users private key. Currently the digital signature returned is deterministic given the same message and account. Is this reliable to depend upon?

For my use case, I need the same digital signature to be returned anytime the same message is signed by the same account.

I have read about the RFC 6979 standard which is a secure what of returning deterministic digital signatures but cannot find if this web3 method is an implementation of this.

Thank you

Best Answer

The function is fully deterministic and I don't see any reason why it wouldn't stay like that. Making it non-deterministic would break a lot of implementations.

The message contents may of course contains stuff like nonce, and if that changes, the hash changes.