Questions tagged [signature]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
28 views

Recovered address not matching signer address (using ethers)

Below is a simple signature verification flow I wrote, along with a test case with Buidler (all mainly to learn how to verify signatures in a Solidity smart contract). The problem is that the address ...
2
votes
1answer
18 views

Create signed message without JSON RPC node in PHP

I am trying to recreate effect of web3's eth.accounts.sign in PHP and I struggle to find good resources how to do it properly. I have seen this (found it thanks to this thread) and based on what I ...
2
votes
0answers
13 views

Why does clef not implement ethereum's JSON-RPC

Assuming that the RPC standard still matches what is to be found today on the ethereum wiki, I was rather surprised to learn that the method calls provided by clef do not match the signer methods in ...
0
votes
2answers
26 views

Offline creation of signed contract transactions with web3js v1.2.11

I'm attempting to sign a contract transaction offline using web3js v1.2.11. signingAddr = //my eth address signingPk = //my private key // docs: The options object for the contract instance. from, ...
0
votes
0answers
12 views

Signing text with special UTF8 characters browser vs node web3js

I am attempting to get consistent signatures / recovery for text containing special characters. For example, the bitcoin symbol U+20BF, ₿ Junk address and private key: ...
0
votes
1answer
20 views

Signing a request with a signature gives the wrong from address

I am using ethers to get a signed request. I have a signature for the address 0x518171C334AD3adc1cF990A884D67963201B675F. It is, ...
0
votes
1answer
14 views

What is the equivalent of “buildTransaction” of web3Py in web3JS?

I'm using Node to interact with my smart contract. I understand that I need to first sign my transaction before sending it. In one of the StackExchange answers I see that it can be done using ...
1
vote
1answer
24 views

Does the term “Ethereum ECDSA signature” have a consistent meaning?

If you were writing some instructions and one of them was: Provide the Ethereum ECDSA signature of the file using the person's Ethereum address. Would the above instruction have a consistent meaning ...
2
votes
1answer
34 views

Signing a message to sell NFT/token - what happens if you transfer the NFT later?

If you sign a message with intent to list an NFT/token for sale - how does that work if you transfer the item later? For example on an NFT marketplace - you list your NFT for sale by signing a message....
0
votes
2answers
43 views

Signature test failed at Truffle js

I'm trying to test validAddress function from my contract ValidationUser, using truffle and test with JS. I checked the V value from the signature and its 27,28 so it is not the problem. Also, I have ...
3
votes
1answer
29 views

Ethereum Signing using HSM

I tried signing a Message using the SHA256withECDSA algorithm . It gives a different signed(r,s) output everytime. When i try to recover the address using the ecrevover method .it gives me a different ...
0
votes
1answer
35 views

signing transaction in web3 is not returning msgHash

I am trying to write provble_transfer where owner can pay gas fee for the transaction. Below is the code for signing transaction to my test contact. let rawTransaction = { 'from': ...
1
vote
1answer
42 views

Signing a raw transaction, wrong R and S values

I am trying to sign a raw transaction in javascript without relying on dependencies like web3, ethereumjs, etc. I am following the python tutorial found here, and porting to JS as I go: https://...
0
votes
1answer
33 views

Is it best practice to check signature malleability in ecrecover

I am wondering if it is considered best practice to guard against signature malleability to check against the half curve order like this or if this is totally unnecessary. uint256 constant ...
1
vote
1answer
33 views

Verifying Signatures from other ECC Curves with ecRecover

My Question is, can I verify a ECDSA Signature from a different ECC Curve like scep128r1 or secp256k1 with the ecRecover function? If not, are there any good Library's which have implemented this ...
2
votes
0answers
34 views

When is a “shard block” cross-linked into a “finalized beacon block”?

In Ethereum 2.0, a shard block for being finalized needs to be linked into a finalized beacon block. Under which conditions a "shard block" cross-linked into a "finalized beacon block"? Having 2/3 of ...
0
votes
0answers
67 views

ethereumjs-tx : sign transaction using unlocked account

Web3js has the following method : web3.eth.signTransaction(transactionObject, address [, callback]) to sign a transaction using an unlocked account. Can we sign a transaction in a similar way, ...
0
votes
1answer
27 views

How to sign transactions while Geth does not provide private key?

I've lunched Geth for the first time and created some accounts on it. While creating accounts, I entered a password for each, and a key file is generated which contains encrypted private key belonging ...
1
vote
3answers
65 views

Get method signature from contract rather than manually constructing

Is there a way to get a method signature from the contract object (using Web3.py) rather than manually constructing it? I don't see a function in there that accomplishes this. It seems like ...
2
votes
2answers
51 views

How to decode a transaction to verify its signature in Javascript?

I noticed that it's possible to sign a transaction with a wrong private key. I took the following example found at https://github.com/ethereumjs/ethereumjs-tx const EthereumTx = require('ethereumjs-...
2
votes
1answer
49 views

What if a malicious validator denies to sign a new block in a shard committee in Ethereum 2.0?

In Ethereum 2.0 (Sharding Blockchain), a new block requires to be signed by all the validators as members of a committee, where blockchain has been sharded in smaller parts for supporting parallel ...
1
vote
0answers
36 views

address recovery from signature

Sorry for the long question, I tried to keep it as standalone as possible. For my master thesis I'm analyzing historical data coming from price oracles contract events. In particular, the MakerDAO ...
1
vote
0answers
12 views

web3.eth.personal.sign is not a function error when deployed on heroku

I am building dApp with react as my front-end frame work, i encountered this error when I deployed on Heroku, sign function doesn't work and it displays that error, specifically TypeError: A.t2.sign....
0
votes
0answers
15 views

How to pay Gas for client? [duplicate]

I'm building a DApp for donations and I do not want my donator ( or donatee) to pay for Gas. Thus I'm looking for a solution wherein gas is to be deducted from my wallet (third party) and not from ...
2
votes
0answers
26 views

Signatures real use case? [closed]

I'm new to this Ethereum community and I've been reading about signatures processes in Ethereum and smart contracts processes and always end up finding a general use-case where someone signs a "hello ...
1
vote
1answer
32 views

Understanding Transaction in Bitcoin [closed]

I read a lecture about Bitcoin Blockchain. As shown in the slide below, a user Alice sends a transaction to BoB. Alice should 1-) Hash(Hash of the transaction of the coin || Bob Public Key || Alice ...
1
vote
1answer
44 views

Signing message with private key and verifying signer in smart contract

I have a smart contract that provides a message to sign and then validates the signer of the message. Something like: mapping(address => uint) public userNonce; function getSigner(bytes32 ...
2
votes
1answer
48 views

What's the magic numbers meaning of 27 or 28 in VRS ( use to ecrover the sender) ? why not 0 or 1?

What's the magic numbers meaning of 27 or 28 in VRS ( use to ecrover the sender) ? why not 0 or 1? Ecrecover need 0 or 1, but transaction RLP is 27 or 28. Before ecrecover, sub 27 to get 0 or 1. Why ...
0
votes
0answers
35 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(...
1
vote
1answer
213 views

Metamask Signing gives different signature than web3.js

I have successfully been using metamask to sign EIP712 data. I am currently trying to write truffle tests and need to replicate the signing process outside the browser. The issue I am facing is that ...
2
votes
0answers
58 views

EIP-712 typed signature for arrays

I'm trying to generate a typed signature for an array in JavaScript based on EIP-712 and using eth-sig-util. My problem is that I need to sign an array. It says in the specification to use Type[] or ...
0
votes
2answers
35 views

Recovering of typed signature fails because it's too long

I have a typed signature generated by EIP712 V3. It is 132 characters long. I'm trying to recover it using recoverTypedSignature from eth-sig-util. This fails saying: index.js:1 Error: Invalid ...
0
votes
0answers
16 views

How to recover a signature on the server side?

I need to verify the signer of a signature in my node server. const fortmaticApiKey = 'pk_live_...'; const checkPersonalSignature = async (data, signature, signer) => { try { const { get } =...
1
vote
1answer
57 views

Different address make same signature for one message

Is it possible two different wallets (address) make the same signature for one message? I have one message: '...
1
vote
0answers
22 views

Recover public key from message and signature [duplicate]

I try to recover a public key (not an address) from a message and a signature. I have the following message: def offer_hash(msg, nonce): types = ['bytes', 'bytes', '...
0
votes
2answers
80 views

Own private key of smart contract to sign a line of text

For my project it is necessary for smart contract to sign a message (for example, EC-signature) I have not found a way to generate a pair of public and private keys inside the contract so that the ...
1
vote
1answer
34 views

Knowing the message, can a signature be derived from an address or pubkey?

tl;dr if I were to sign an Ethereum message, eg. web3.eth.personal.sign("Bitcoin", "SOME-ETH-ADDRESS"), would it be reasonably safe to use a 32-byte hash of the signature as the private key for a ...
0
votes
1answer
52 views

Simple Question on ecrecover

I think that I can verify a hash of a message using my signature within a Solidity contract, something like this: contract ecrecover { function testRecovery(bytes32 hash, bytes signature) returns ...
0
votes
2answers
307 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(...
0
votes
0answers
18 views

RSA signature verification: Inputs to Precompile contract

I am trying to verify an RSA signature using Ethereum smart contract. I have some doubts regarding my design. I am using the precompile at address 0X05 to generate s^e mod n, where s is the ...
0
votes
1answer
47 views

DDEX Api Question for Python… Signing ETH Transactions?

Having an issue with signing a message for the DDEX api... I'm trying to do it in python, and for some reason my signature is off by two characters. Here's my code using the private key and UTC ...
1
vote
1answer
85 views

How Can I Sign A Transaction Server-Side?

I have a server-side Node.js app that sends a transaction to an Ethereum smart contract like so: const transaction = await contract.methods .method_name([params]).send({ from: [...
0
votes
0answers
118 views

How to calculate v for signature?

I created Ethereum private network with chainID 10 (networkID in genesis.json). I have to create raw transaction and sign on it manually too. How to calculate v in signature ? According to this ...
1
vote
1answer
35 views

Risk of Messages Not Having a Signature

As per my understanding transactions are signed before sending to Ethereum. Else, no transfer of Ether will happen. However, messages sent to Smart Contracts (SC) aren't signed (e.g., using methods....
2
votes
1answer
108 views

ecrecover in c++

can anyone spot what I am doing wrong? I am trying to recover the public address from data signed by web3.personal.sign in Metamask and with this code the public address comes out wrong. Hash and hex/...
0
votes
1answer
174 views

How to extract or create a message with web3.js to sign with an external hardware device?

I'm using the Web3 library. I want to extract a signature hash from a Web3 transaction to send to an external hardware device, sign it there, then use the signature I get from there to broadcast my ...
1
vote
1answer
69 views

How can i `ecrecover` in solidity to verify the digest produced by `web3.utils.soliditySha3` in JS side?

Javascript side: id = 128 uri = "xxx://xxx" hash = web3.utils.soliditySha3(id,uri) sign = web3.eth.accounts.sign(hash1, privateKey) Solidity side: function(uint256 id, string memory uri,bytes v, ...
2
votes
1answer
30 views

How is the length of the message counted when calling eth_sign?

According to https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) +...
1
vote
0answers
135 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-...
0
votes
1answer
173 views

Solidity: extract data from signed message?

In an effort to reduce gas costs for users, I'm looking for a way to delegate certain transactions to a contract owner so that the owner makes a transactions that would have been otherwise sent by the ...

1
2 3 4 5 6