Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [signature]

The tag has no usage guidance.

0
votes
1answer
27 views

How can Contracts sign transactions, when they dont have a private key?

When transactions are made the sender is identified by his signature. But Contracts dont have a private key to sign any transaction or message. So I have some questions: Can a Contract initiate a ...
2
votes
1answer
27 views

Signing meesage | hex string has length 64, want 40 for common.Address

I am using 'web3.eth.sign` to sign a message, using following code snippet: web3.eth.sign(msgHash, address, async (err, signedMsg) => { if(err) { console.log(err) resolve(false) } else ...
1
vote
0answers
72 views

The object could not be cloned. && DOMException: Failed to execute 'postMessage' on 'Window'

When I try to sign a message with this simple function const signatue = await window.web3.eth.sign(hash, userAddress) I get an error. In firefox I get Unhandled promise rejection DOMException: "The ...
1
vote
0answers
23 views

Ecrecover wrong address is returned

I'm trying to validate signed data with ecrecover. The message is signed like this on the FE: return this.web3.eth.personal.sign( `${nonce}`, publicAddress ).then( ( signature ) => { ...
0
votes
0answers
32 views

How does a message signed in Remix IDE?

What is signing method that is used in remix IDE and how is the hash value calculated from the message that is being signed?
0
votes
2answers
15 views

Is there any command-line tool to sign transactions offline on a Linux machine?

I have an air-gapped machine with Ubuntu Server. Is there any command line tool which I can quickly download to sign offline transactions? Something like: sign-tx private_key_file nonce=10 gasPrice=.....
0
votes
0answers
40 views

TypeError: Cannot read property 'slice' of undefined

web3.eth.accounts.signTransaction(transactionObject, process.env.WALLET_PRIVATE_KEY, function (error, signedTx) { if (error) { log(`${error}`.red); } else { web3.eth....
1
vote
0answers
28 views

Automatic sign of Transaction

Is there any secure solution(without exposing a Private key of the user) to automatically sign transactions, which are requested from a DApp, so that user doesn't have to sign each of them manually? I ...
0
votes
0answers
16 views

In ethereumj, why the signature use loop to get v?

In the java version of Ethereum, I see the signature code as follows: public ECDSASignature sign(byte[] messageHash) { ECDSASignature sig = doSign(messageHash); // Now we have to work ...
1
vote
0answers
25 views

Why does ecrecover() take signature parameters (v,r,s) instead of the full signature?

Is there any reason ecrecover() takes the (v, r, s) signature parameters instead of the full signature, given that these can be easily computed inside the function itself? I am asking because ...
2
votes
1answer
50 views

Recovering address (web3.eth.accounts.recover) does not return the address of message signer

I am writing a test for a function in my smart contract which attempts to verify that a message comes from the signer. I'm currently using web3.eth.accounts.sign to sign my message with the sender ...
0
votes
0answers
25 views

Ethereum Signature Information

I am currently working with Ethereum Signatures (ECDSA and r, s ,v values) and I'm looking for official information about the recovery id v. A few posts like this one explain how the calculation is ...
2
votes
0answers
22 views

How to change prefix of signature in Javascript?

Is it possible to change the signature prefix, which by default: "\x19Ethereum Signed Message:\n32" Can I change it to another prefix? I need to get a signature in solidity in this way: bytes32 ...
2
votes
0answers
30 views

Truffle test to verify events can be queried by the address of the signing user?

I'm trying to write a test which verifies I can query a given type of events by the user/address which sign them. I would like to apply TDD (relevant to say I haven't made the implementation for this ...
0
votes
0answers
16 views

What should we do if s in the ecdsa signature is greater than n/2?

What should we do if s in the ecdsa signature is greater than n/2? As we all know, in the ECDSA signature of Ethernum, the output s must be smaller than n/2, where s is the signature output and n is ...
1
vote
1answer
38 views

Signed Message Verification failing for signed messages with multiple passes

I'm using web3 to verify signed messages using the code below: web3.eth.accounts.recover(message, signature); I'm testing against the list of publicly verified signatures on EtherScan - https://...
1
vote
1answer
90 views

Retrieve public key and check the signature with web3

I create a transaction with signTransaction and I have an output like this: "signedTx": { "messageHash": "0x..", "v": "0x..", "r": "0x..", "s": "0x..", "rawTransaction": "0x....." ...
2
votes
1answer
130 views

Understanding Ethereum signatures

I would like to understand exactly which signatures are used in the Ethereum. Here https://bitcoin.stackexchange.com/questions/12554/why-the-signature-is-always-65-13232-bytes-long it says that there ...
0
votes
1answer
58 views

Sign message (obtain v,r,s) inside Solidity

I'm trying to call an Exchange SmartContract which is POORLY designed/implemented and forces you to sign your own parameters instead of using msg.sender (and provides no alternative). <-- I've just ...
0
votes
1answer
62 views

eth.sign() method giving error

I am using eth.sign from Ethereum wallet developer terminal and getting following error rejection Error: Returned Error: The method eth_sign does not exist/is not available Please advise whats the ...
1
vote
1answer
127 views

Invalid sender when sending Raw Transaction, signed w/ ethereum-tx on PHP

I am using PHP and ethereum-tx library https://github.com/web3p/ethereum-tx to sign transactions but when trying to send them to the node I got an "invalid sender" error. Besides, exactly the same ...
0
votes
2answers
135 views

Signing legal smart contracts

In "conventional", physical legal contracts, parties usually sign them with a handwritten/electronic/digital signature, depending on the form of the contract. But as legal smart contracts are ...
1
vote
2answers
28 views

Why ethereum dons't store transaction signature? [duplicate]

Ethereum doesn't store transaction signature (r,s,v) in its tries. The first answer in that it is state-based, not UTXO based: Retrieve the signature of a transaction on the blockchain But there is ...
0
votes
0answers
38 views

Controlling access to functions with VIEW visibility with signed transactions?

Controlling access to functions that require ETH is straight forward because you get an address you can trust because it has been signed and verified, and therefore upi can use for access control ...
1
vote
0answers
77 views

web3 recover address from signature signed by digital bitbox

I use digital bitbox to sign some data and would like to use web3.js to recover the account address. Following https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#recover I couldn't ...
1
vote
0answers
16 views

Why is an ephemeral key used in creating a digital signature?

When creating the 'S' component of a digital signature, both the actual private key and an ephemeral private key are used. The reasoning I've read is to ensure that the sender’s actual private key ...
0
votes
0answers
13 views

compare signed and unsigned hash [duplicate]

with ecrecover the signer's address can be extracted from a signed hash: ecrecover(signedHash, v, r, s) == address But I could not discover how to validate the hash. function validateHash(...
0
votes
2answers
66 views

avoid replay attacks on signing on smart contracts

the scenario: a user has a privatekey and wants to sign something to send to the contract ex: the user send his (message,signature,publickey) to the contract and the contract can verify it with the ...
0
votes
1answer
20 views

Power of signing transactions and what you can do with that

I have been playing around with state channels and am starting to see the power of signing information/transactions, but haven't got a completely clear idea of what I can do with them. I think I can ...
2
votes
1answer
693 views

How to get private keys on Truffle from Ganache accounts

Doing some ERC-735 tests on truffle+ganache I got stuck when creating claim signatures. They need to be signed from my ganache account, but I don't know its private key. The code to be used is this: ...
1
vote
0answers
143 views

Signing a transaction: What is actually signed? [noob question]

I'm trying to wrap my head around how signing transactions actually works. As I understand ECDSA signatures roughly work like this: There is a magic function, let's call it sign that takes two ...
1
vote
1answer
95 views

web3py: get public key from transaction

I'm trying to retrieve the public key of an address from a transaction. I'm getting the transaction via tx = web3.eth.getTransaction('xxx') According to the docs the public key should be retrievable ...
0
votes
2answers
64 views

Different Values for v, r, s? What am I doing wrong?

lets assume I have this private key (test account on ropsten, no need to worry): 785cdcd731a1b2438ec4511a25d04efbdc499ed350df612364af1aa6f4fd6abd When I use Pyethereum to run v, r, s = ecsign(tx['...
0
votes
1answer
32 views

Facing an issue in transaction signature generation using a C library

I'm trying to generate a signature for a raw transaction using an ECDSA library implemented in C. Here are the transaction parameters: const txParams = { "nonce": "0x05", "gasPrice": "...
2
votes
0answers
360 views

Verify Public Key from an RSA SHA256 signature

Given an RSA SHA256 signature (obtained from encrypting a hash using an RSA Private Key), I must assert whether a provided Public Key matches this signature or not. It is imperative that this ...
3
votes
1answer
174 views

Does Ethereum support pairing operations?

I need to build an application that uses bilinear pairing operations for generating signatures. If I send a message with its signature to Ethereum, can Ethereum verify this message? Does the EVM ...
3
votes
2answers
70 views

how do you sign transactions programatically?

imagine there's a dapp you're building and on your website users type the receiver address, the value and what you do is send from that user's address to the receiver's address the value ether. My ...
0
votes
1answer
118 views

messageHash hash function

In this example, by which algorithm is messageHash hashed by? web3.eth.accounts.sign("Hello, world!", '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef') { message: 'Hello, world!', ...
2
votes
4answers
193 views

Get rid of Metamask sign confirmation dialog

I am using web3 for users to sign some random string from web application. I give user string, he/she signs it after Metamask dialog's "Sign" button. but there is a problem when i want user to sign ...
0
votes
1answer
115 views

Can smart contracts make transactions on behalf of the caller?

I want to make a smart contract that wraps over other various smart contracts. In some of these contracts the user needs to send the transaction themselves. Is it possible to make a smart contract ...
1
vote
1answer
166 views

Why doesn't my contract call create a new transaction in my ganache transaction section?

goes easy on me because I'm quite new to all of this stuff. So I've created a function which signs my transaction using web3js library and looks like this: signTx = async () => { const { ...
2
votes
1answer
111 views

Invalid transaction signature on sending transaction

Hello guys I'm having a "Invalid transaction signature." error. Can't get pass this one. Am I missing something? client, err := ethclient.Dial("path/to/geth.ipc") if err != nil { return err } ks :...
0
votes
1answer
201 views

generating raw trx and sending it to the network shows “invalid sender” error

I'm trying to make an ethereum raw transaction by php and these libraries: https://github.com/simplito/elliptic-php https://github.com/kornrunner/php-keccak https://github.com/web3p/rlp this is my ...
1
vote
1answer
185 views

generate v parameter in ethereum transaction

I'm trying to generate ethereum raw transactions. this is keccak hash of my transaction: f2ad2e2b6f398f76df2f5adacc84e39e926871bd2f82a3055319f8d4f4eeb8ce after signing it with my private key I ...
1
vote
1answer
62 views

Digital Identity with signing

Is there a way to sign some data right out from a smart contract? Let's say I want to create a smart contract, that will represent my Digital Identity and I want it to have sign() method. Maybe ...
0
votes
0answers
36 views

What is an “executable signed message”?

What is an "executable signed message", in non technical as well as in technical terms?
4
votes
1answer
241 views

Verification of externally-created ECDSA signatures in Solidity

I have ECDSA signatures created using Golang without using web3 or anything related to Ethereum, and I want to verify these in Solidity. Step 1: Signing the message in Golang My Go code to create ...
3
votes
1answer
288 views

Recover address from signature using web3j

I have signed a data string using the following code snippet in web3js var data = "hello world"; web3.personal.sign(web3.fromUtf8(data), web3.eth.accounts[0], function(error, result) { if (!...
1
vote
0answers
55 views

How can I sign a transaction using c or c++(arduino) [closed]

I want to create and sign transactions on arduino as offline.But I am not know this.Please help me.
3
votes
1answer
153 views

Why is s in transaction signature limited to n/2+1

In the Yellow paper, appendix F "Signing Transactions", it says a valid signature must satisfy: (281) 0 < s < secp256k1n ÷ 2 + 1 However, in both the cited paper here (ECDSA SIGNATURE ...