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
28 views

Multisig function calls

I am making a dapp in which ethereum user accounts that call certain functions are rewarded with an ERC20 token. All the dapp is based on functions using only one ethereum account as parameter. But if ...
0
votes
0answers
27 views

web3.eth.sign() problem [duplicate]

I am using infura and web3 0.20.0 in back-end.(nodejs, I don't want to interact with metamask(front-end)) Now, I am facing a problem. I tried to use ERC865. solidity function ...
1
vote
1answer
11 views

How to retrieve transaction hash value from the Promise object using web3js?

I'm trying to retrieve the transaction hash value after I call my smart contract method. My Promise object looks like below. returnPromise: Promise { "pending" } ​ <state>: "...
0
votes
1answer
17 views

sign 2 things at once

When a user unlocks their private key can two things be signed at once? such as a message as well as a transaction, where the transaction is basically just another message that is meant to be ...
0
votes
0answers
21 views

Create a signature using web3 dapp and verify in Solidity contract

I would like to create a dapp where by users can call a function on a smart contract, proving that they know a secret phrase. I am thinking that I would use web3.js to create an public / private key ...
0
votes
1answer
33 views

How do I get the address from a signature?

As stated in the question, I have the v, r and s values of a signature given and am trying to find the belonging address. All questions similar to this solved it by either using a solidity smart ...
0
votes
0answers
20 views

How to make ECDSA signature of (value_1, value_2) with web3 on Python?

I want to call function with four parameters. I know how to create two of them, but the last two is the r and s components of ECDSA signature of (param_1, param_2). I tried this (and a lot of ...
0
votes
1answer
32 views

Is S of the signature(R,S) invalid when it is larger than N/2 in Ethereum?

In ECDSA, both signature(r,s) and (r,-s) are valid. However, in Bitcoin, it seems that the signature fails to be verified when s-part in the signature is bigger than half of the group order from this ...
3
votes
1answer
45 views

How do I extract the v, r, s values from a signed transaction

If I have a signed transaction such as ...
1
vote
0answers
22 views

Why is ethereum not using threshold signatures like dfinity for randomness? What's the drawback?

So ethereum goes for RANDAO. The disadvantage with randao is that the last validator in the commit-reveal scheme is able to hold his contributed value back and thereby influence the random outcome. ...
0
votes
0answers
33 views

Use Web3 to recover address from message signed by ethers.js?

On the client we are using ethers: const signingKey = new ethers.utils.SigningKey(privateKey) const message = Date.now() const messageBytes = ethers.utils.toUtf8Bytes(String(message)) const ...
0
votes
1answer
24 views

how can a signature for a document on a blockchain be revoked?

I am trying to do document verification through blockchain. The way I'm trying to do this is by digitally signing a document, and storing its hash on the blockchain. Now I'm trying to create a feature ...
1
vote
1answer
34 views

web3js recover returns different address than what signed message

Web3js as of version 1.0.0 beta supports an interface for verifying signed messages: https://github.com/ethereum/web3.js/issues/404 This is documented here: https://web3js.readthedocs.io/en/1.0/web3-...
0
votes
1answer
42 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 ...
3
votes
1answer
65 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
271 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
30 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
51 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
18 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
144 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....
2
votes
0answers
35 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
21 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
2answers
58 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
87 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
47 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
23 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
41 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
20 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
52 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
149 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
258 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
76 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
81 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
185 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
199 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
31 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
42 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
104 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 ...
2
votes
0answers
21 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
14 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
98 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
1k 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
199 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
119 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
72 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
44 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": "...
3
votes
0answers
457 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
232 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
102 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 ...