Questions tagged [signature]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
102 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 ...
4
votes
1answer
451 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
571 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
104 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.
4
votes
1answer
398 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 ...
2
votes
1answer
72 views

What is “electrum style signature”?

In the Yellow paper, appendix F "Signing Transactions", (BYZANTIUM VERSION f72032b - 2018-05-04 to be specific), it says: The method of signing transactions is similar to the ‘Electrum style ...
1
vote
1answer
456 views

Recover JavaScript Signed Message in Python Web3

Running into problems taking a signed message from Web3.js, and recovering the signing address in Web3.py. Here is my code in JavaScript to create a signed message: async function sign_message() { ...
0
votes
1answer
2k views

How to be sure about “MetaMask web3 Provider” connection?

Note: This question is related to this : "Updated :" How to see "output" of "web3.personal.sign" in "browser"? ("Method personal_sign not supported") ...
0
votes
1answer
514 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 ...
1
vote
1answer
2k views

How to use “web3.js library” in a “JavaScript” file without using “require(”web3“)”?

Consider we want to use web3.personal.sign in a JavaScript file. So, we need to add : Web3 = require("web3") web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); at top of our ...
2
votes
1answer
332 views

Is the signature generated by “web3.personal.sign” different with “web3.eth.sign”?

Are web3.personal.sign and web3.eth.sign difference in value of generate signature ? Or both of them generate an equal output ? I could test web3.eth.sign using testRPC, however web3.personal.sign ...
0
votes
0answers
103 views

UPDATE: (I need to run testrpc before running the code) Problem with signing a message with “web3.eth.personal.sign” or “web3.eth.sign”

I use exactly the example of web3js (here) to sign a text. So, I generated a .js file asfollows : Web3 = require("web3") web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); ...
0
votes
0answers
294 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"], ...
0
votes
2answers
267 views

Broadcast error rlp: non-canonical integer (leading zero bytes) for uint64

Here's a transaction to broadcast: ...
4
votes
1answer
566 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 ...
1
vote
2answers
449 views

How can I simply sign an Ethereum transaction?

I want to use blockcypher to work with the Ethereum network. In the documentation they give an example of a signer tool written on Go, but I'm use Python. What is the simplest way to sign a ...
3
votes
1answer
469 views

Truffle web3.eth.sign produces wrong signature

Somehow truffle produces an invalid signature. To clarify this I imported the private key of the first Ganache account to metamask and compared the results. The following code used in a chrome ...
1
vote
1answer
481 views

Error: MetaMask Tx Signature: Unknown problem:

Can anyone tell me what's going wrong? My contract function is working fine for some accounts, then not for other's. It completely random also, sometimes it's one account sometimes it's another. ...
0
votes
1answer
45 views

Is there any way to ecrecover something twice? (I.e. something signed by two different people)

I have a signature. That signature was then signed by someone else. If I pass this doubly-signed message as an argument to my function, is there a way to recover both signers?
1
vote
1answer
70 views

Is it possible to have a signature as the mapping key type?

If I have someone's signature and I want to use it in a mapping, is there a way to have it serve as the key in that mapping? Would I need to use mapping (string => uint), or mapping (bytes32 => ...
1
vote
1answer
489 views

Generating and signing a transaction - what am I doing wrong?

I am writing a program in c++ for generating and signing transactions. The transaction it generates seem to be invalid. Every time I try to broadcast it, I get an error saying insufficient funds on ...
0
votes
1answer
264 views

Transaction Signing & Hashing

I've been looking through EthereumJ, Trying to understand how transaction hashing and signing works. From what I can tell from the code, the signature is created by signing the hash of the RLP ...
0
votes
3answers
386 views

What happens to a transaction with an invalid signature?

Understand VRS is the output of ECDSA. Not many will use ecrecover() to check for the signature. How does the public ethereum network handle an invalid transaction signed with an invalid private key? ...
0
votes
1answer
95 views

Can smart contract perform decryption?

Assume a scenario where we want to send digital signatures to a smart contract. A user will sign a message with his/her private key and use the signature as input when triggering a smart contract. A ...
5
votes
1answer
416 views

How are tuples handled for the function selector?

How are tuple types encoded into the function signature to generate the 4 byte function selector? The official specification doesn't state anything for tuple types.
0
votes
1answer
247 views

What is the function selector of the fallback function?

The function selector are the first four bytes of the keccak256 hash of the function signature. What is the signature of the fallback function? It neither has a name nor any inputs. If there is no ...
2
votes
0answers
120 views

How to set the nonce in offline transaction?

Let's suppose, I already executed 48 Tx onchain and I signed an offchain Tx with nonce 49. Now, If: I don't sign the offchain Tx with nonce, the transaction will be invalid because every Tx must ...
0
votes
2answers
466 views

How multiple people signing works?

I had created a DAO smart contract where around 20 people vote for proposals. They each make new Tx. Offline signing is nice to minimize gas cost. Wondering how offline signing works with contract ...
3
votes
3answers
1k views

How to recover public from tx signature(r,s) and verify signature?

My first question is how to verify signature using only r,s and elliptic curve paramete, and an address (which is hashed of public key, so cannot retrieve public key from the address)? Next question ...
0
votes
1answer
117 views

How off-chain Tx reduce the cost and problems?

X and Y locked up 1 ETH each on-chain. Balance: X (1 ETH) & Y (1 ETH). X signed off-chain Tx sending 0.1 ETH to Y. Balance: X (0.9) & Y (1.1). X signed off-chain Tx sending 0.2 ETH to Y. ...
0
votes
1answer
174 views

OpenZeppelin ECRecovery does not work

I am trying to use the OpenZeppelin ECRecovery library for a project I am working on. Unfortunately I don't fully understand how it works and there's no documentation for it. Let's say I want to ...
0
votes
1answer
258 views

Signing messages off-chain (reproducing keccak256 off chain)

I'm trying to follow this tutorial: https://programtheblockchain.com/posts/2018/02/17/signing-and-verifying-messages-in-ethereum/ But I cant seem to get it to work: The following method doesnt make ...
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 ...
1
vote
1answer
142 views

No luck recovering public key after EIP 155

I'm trying to understand Ethereum transaction signing, but for some reason I'm unable to verify the signature. I have a test account, 0xb2c899884790aa9e256a2d4b2256ca3319e64e32, its public key is ...
3
votes
1answer
1k views

Authorization via Metamask

On my site I do not want to use email/pass authorization, but insteand I'd like to use Metamask sign functionality (it is impossible to work with site without Metamask or browser with web3). I ...
3
votes
1answer
345 views

Why does a signed transaction include a “hash” field?

When signing a transaction using the go-ethereum library, the resulting object looks something like this: "tx": { "nonce": "0x7", "gasPrice": "0x77359400", "gas": "0x5208", ...
1
vote
1answer
1k views

Validating Go Ethereum key signature with ecrecover

Resolved The basic process flow of what I'm writing goes as follows. Sign a message with a private key and create an Ethereum address from the private key (AKA the vettingAddress) Pass the signature ...
1
vote
1answer
289 views

verify ecdsa signature in solidity

I want to create a smart contract that contains the public key of a party (the key is generated outside the blockchain) and contains a function to verify signed data. How can we implement this ...
2
votes
0answers
76 views

Can a view function from a funded smart contract execute a send() transaction on an external contract?

I'm creating an open source voting app with a Node.JS front end. I'm hoping I can create a smart contract that can use funds allocated to it at creation time, so that participating voters don't have ...
1
vote
0answers
28 views

Recovering the message that is digitally signed not only the address

Is there a way to recover a digitally signed message in a smart contract? ecrecover(msgHash, v, r, s) returns the address that signed the msgHash. I am looking for something that can return the ...
2
votes
2answers
166 views

Dynamic number of inputs to a smart contract

Assume we a smart contract that accepts a number of cryptographically signed attributes. The smart contract will validate each signature and check that all the addresses of those signed signatures ...
0
votes
1answer
475 views

Error “does not exist” using web3.eth.personal.sign

In Error using web3.eth.personal.sign , the problem with the number of arguments was resolved. But now that I can try the actual call, I'm getting a "does not exist" error. console.log("Calling ...
0
votes
1answer
453 views

How to sign pieces of data (ie strings of text) with golang?

I'm trying to figure out how to sign a piece of data (in this case a string) using golang. So far everything I can find is about signing transactions which wont work for signing pieces of data that is ...
3
votes
1answer
214 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
0answers
146 views

Ethereum public key recovery validation

I always thought that only the person(s) in possession of the private key to an address would be able to spend or change state for that account. But by using the recover technique rather than the ...
2
votes
2answers
424 views

Get public key from signature in a smart contract (note, public key, not address)

Are there any libraries to get a public key from a signature in a smart contract? The ecrecover method returns an address, not a public key, and to do computations that need to derive a public key ...
1
vote
0answers
1k views

Why the value of v is always either 27 (11011) or 28 (11100)?

Why the value of v is always either 27 (11011) or 28 (11100), and, how is it known wether it will be 27 or 28?
0
votes
1answer
643 views

How can I obtain my public key (using web3)

I know my Ethereum address, my Metamask wallet will give it to me, and I can run : web3.eth.coinbase But I want to know what my public key is. Is there any way I can find that ? (the reason I want ...
3
votes
4answers
887 views

Should UIs handle 4Byte signature collisions

With 4 bytes collissions are possible. But they are not very likely. Currently in the 6,846 signatures in the 4Byte.direcory there are no collisions. Still they are possible. Now I wonder if UIs ...
1
vote
0answers
113 views

Correct way to verify address server-side with Web3 [duplicate]

I'm trying to use web3 1.0 to authenticate users on a web server. Instead of having unauthenticated users submit a username and password, I want them to send their address (public key). I'll respond ...