Questions tagged [signature]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
38
votes
4answers
16k views

Get public key of any ethereum account

Can I somehow get the public key of an ethereum account knowing just the corresponding ethereum address (e.g. 0x54dbb737eac5007103e729e9ab7ce64a6850a310)?
40
votes
6answers
20k views

Create and sign OFFLINE raw transactions?

I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method. I would like to do this offline using code or an open-source library OR online but ...
19
votes
4answers
13k views

workflow on signing a string with private key, followed by signature verification with public key

I know this question has been asked and answered, but while trying to get everything to work, I've come across some problems. This is what I'm trying to do: 1. take a target string 'Schoolbus' 2. ...
28
votes
5answers
9k views

How can I sign a piece of data with the private key of an Ethereum address?

I would like to use the key pair of one of my Ethereum accounts to sign a piece of data. How can this be done?
25
votes
1answer
12k views

Ethereum ecrecover signature verification and encryption

The question of signing and verifying signatures with Solidity has been asked in these questions, both of which I have tried to study: How can I sign a piece of data with the private key of an ...
15
votes
1answer
2k views

Getting the wrong address back from ecrecover

When I sign a string using the following code I get back a different address to the one I signed with. The address returned is different for different strings. const util = require('ethereumjs-util') ...
33
votes
1answer
4k views

Where is the private key for a contract stored?

This is a question that I am asked often by developers who assume that a contract has a private key of its own to sign any transactions that it makes.
10
votes
3answers
17k views

How to properly create a raw transaction and sign it using web3 in browser

I want to create and sign a transaction in browser using web3. In order to create a raw transaction, I think I have to do something like this (hopefully you can fill the gaps of my knowledge) var pk =...
3
votes
1answer
538 views

I need help with signatures

So, for my studies, I am supposed to interact with a contract function that has the following built in condition: if (ecrecover(_h, _v, _r, _s) == msg.sender && _h == sha3(this)) I am ...
1
vote
2answers
2k views

Should signed text messages use the “\x19Ethereum Signed Message” prefix?

Background: I want to implement sign message feature in Trezor. Is there a standard for signing text messages? So far I found out that etherscan.io signs messages without the prefix, i.e. it signs ...
16
votes
2answers
5k views

Is it safe to reuse Ether addresses?

I believe it's viewed as unsafe in Bitcoin because of the way transactions are signed. Is this also true for Ether addresses?
0
votes
0answers
295 views

(NEW UPDATE: I need to run “testrpc”) Signing a message using “ethereumjs-abi”? (Error: Invalid JSON RPC response: “”)

I am trying to sign a message using following JavaScript code (from HERE) function constructPaymentMessage(contractAddress, amount) { return ethereumjs.ABI.soliditySHA3( ["address", "uint256"], ...
9
votes
2answers
5k views

How does one properly use ecrecover to verify Ethereum signatures?

I've been searching to figure out what I'm doing wrong here, but I've had no luck yet. As far as I can tell, I'm using ecrecover correctly, but I can't seem to get back the signing Ethereum address. ...
8
votes
1answer
5k views

Getting an address from ethereumjs-utils ecrecover

I am trying to sign a string using web3.eth.sign() and then get the public key I signed with from the signature. To do this I am using ecrecover() from ethereumjs-utils, which returns a buffer. When I ...
4
votes
1answer
568 views

How can we verify BGLS aggregate signatures in Solidity?

BGLS [1] is an aggregate signature scheme by Boneh et al., that allows aggregation of signatures on n different messages from n different signers. What I want to achieve is to verify such signatures ...
4
votes
1answer
403 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 ...
27
votes
1answer
12k views

What does v, r, s in eth_getTransactionByHash mean?

In Ethereum JSON-RPC I found the return is: Returns Object - A transaction object, or null when no transaction was found: hash: DATA, 32 Bytes - hash of the transaction. nonce: QUANTITY - the number ...
26
votes
3answers
3k views

Is Ethereum secure against an attack by quantum computers?

Does Ethereum implement Post-quantum cryptography? Or will the network break once a malicious actor gains control of an effective quantum computer?
3
votes
1answer
460 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 ...
11
votes
1answer
6k views

How can I verify a signature with the web3 javascript API?

Using the javascript web3 API I can create a signature like this: > web3.eth.sign(eth.coinbase, "0xdeadbeef") "...
14
votes
5answers
8k views

How do you sign an verify a message in javascript proving you own an Ethereum address?

Is there a js library or even just pure js where I can sign and verify I own an Ethereum address?
11
votes
2answers
8k views

Invalid sender error on private chain

I created a transaction in Go, signed it with a EIP155Signer signer, but when I try to publish the transaction through the Go client to the private blockchain, I get the error Invalid sender. Any idea ...
8
votes
2answers
649 views

What if two ether functions have the same signature?

It should not be hard to find collision. There is only 4 294 967 296 possible signatures.
3
votes
1answer
490 views

Ecrecover after eth_sign update with preamble

I've just discovered that with b59c839 geth is now pre-appending the string: *\x19Ethereum Signed Message:\n<length of message>* before signing the passed message. I've read here that to use ...
3
votes
1answer
2k views

How to sign a send method in web3 1.0?

I have the following function and don't want to manually sign the transaction every time it's called, how would I go about setting up a way of signing this transaction with an object. I've seen ...
4
votes
3answers
1k views

Retrieve the signature of a transaction on the blockchain

How can you find the signature of a transaction? web3.eth.getTransaction() doesn't appear to make that available.
2
votes
3answers
4k views

Signing message: Provided address is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted

Provided address is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted is not a dupe, this is about signing messages My code: const ...
0
votes
1answer
515 views

“Updated :” How to see “output” of “web3.personal.sign” in “browser”? (“Method personal_sign not supported”)

Note: I updated the html / JavaScript code according to the answer and I used THIS META MASK sample code for web3 provider. However, I receive the same error. I eventually did not understand that do I ...
12
votes
1answer
758 views

Ethereum signature verification not matching

What I want to achieve is sign a message and then verify the signature whether verified by same address or not. Contract to Invoke ecrecover method to verify the address contract MyAuth { ...
7
votes
2answers
4k views

Do I have to unlock my account in geth to call a web3.eth.sign() in JavaScript?

I have: A geth account Access to web3 API I want to: Invoke the function, web3.eth.sign(coinbase, sha) If I put this in a javascript file sign.js, and I call node.js, will it sign my message? Or ...
4
votes
1answer
2k views

Verifying personal.sign signature with pyethereum

I'm trying to verify a signed message from Metamask with pyethereum. I can not seem to recover the correct address from the signature. Lack of documentation isn't helping matters. On the client ...
2
votes
4answers
1k views

When is a transaction signature checked in a contract?

In the Solidity tutorial and examples here, I don't see any signature checking. In particular, in the contracts provided there, they don't check whether the sender of a message is actually the person ...
1
vote
1answer
394 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 ...
5
votes
2answers
2k views

smart contract transaction signature

I have a thought about the smart contract. I would like to know when the smart contract sends a transaction (send ether to someone) did it sign the transaction if yes how it does? does it have a ...
4
votes
1answer
333 views

Verifying Bicoin signed message in Ethereum smart contract

I'd like to explore the option to verify the messages that have been signed in Bitcoin wallets in Ethereum smart contracts. Ethereum smart contract is given a list of Bitcoin addresses Ethereum smart ...
2
votes
1answer
2k 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: ...
2
votes
0answers
80 views

How the following pairing equality be verified in Etherum Smart contracts?

I have found available precompiled contracts in solidity. For example, this answer enter link description here points out a precompiled contract that can verify BLS signature. However, looking to the ...
1
vote
0answers
82 views

EIP712 implementation for web3 1.0

I tried replicating the instructions in this article to implement EIP712 signing, however, it doesn't appear to work for web3 1.0 versions. https://medium.com/metamask/eip712-is-coming-what-to-expect-...
1
vote
1answer
1k views

Python ECDSA Public Key Recovery

How do you recover the EC public key from a VRS style signature in python? I am trying to setup some encryption between two parties via ECIES, but I first wanted to obtain the public key via recovery ...
0
votes
2answers
101 views

Sign message with web3 and verify with openzeppelin-solidity ECDSA.sol

I'm trying to get a little example working with ECDSA.sol here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol This contract: Generate a random(...
3
votes
2answers
2k views

Is it possible to sign a message in Solidity?

I am trying to sign and verify a signature in Solidity. I understood that it is possible to verify a signature using ecrecover. However, I am not able to find any useful information on signing.
3
votes
1answer
216 views

Error using web3.eth.personal.sign

I'm getting an error using web3.eth.personal.sign, with it complaining that the call "Expected 0 arguments, but got 3". I call it in an Angular/Typescript/javascript environment: this.bottleSig=this....
2
votes
1answer
689 views

Secp256k1 bindings are not compiled. Pure JS implementation will be used

I am trying to create a meteor dapp that can sign a piece of data and then recover the address it was signed with. When I run the dapp I get this error in the console: Secp256k1 bindings are not ...
2
votes
1answer
737 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 ...
1
vote
1answer
399 views

Implementing EIP 155 for Signing Party

EIP-155 states: If block.number >= FORK_BLKNUM and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing the hash of a transaction for purposes of signing or recovering, instead ...
1
vote
3answers
372 views

How to cryptographically challenge a public/private address key pair?

I know that in the Ethereum protocol, users submit transaction by cryptographically 'signing' their transactions using their private key to prove to the miners that they do own that key but without ...
0
votes
0answers
26 views

Signature not matching the sig obtained from MyEtherWallet

I am serializing the unsigned txn in C, then I found Keccak-256 hash and I signed it with the privatekey. However, the resulting signature is not the same as in MyEtherWallet for the same values(...