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 [ecdsa]

The tag has no usage guidance.

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 ...
1
vote
1answer
43 views

How to pass bytes32 to Web3.methods.function.call

I have a contract that is doing an ecrecover: function recover(bytes32 h, uint8 v, bytes32 r, bytes32 s) public returns (address) { return ecrecover(h, v, r, s); } It works ...
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 ...
1
vote
0answers
25 views

Can transaction hash be used to get v, r, s parameters using web3js?

I am trying to create a function which can be used to get the v, r, s parameters (ECDSA) of the signature. So i am thinking to pass a random tx hash from etherscan and it will v,r,s parameters of the ...
0
votes
0answers
43 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 ...
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 ...
0
votes
0answers
18 views

Is still the solidity can not handle prime256v1 operations [duplicate]

I would like to use prime256v1 instead of secp256k1 because prime256v1 is more secures,so can I do that and implement the operations of Blind ECDSA operation verification in solidity? I mean I want ...
0
votes
2answers
22 views

Can't find v, r & s values in the signed transaction of myetherwallet

I tried to create a simple transaction using myetherwallet by importing my account from metamask. Once I've put the 'to' address, ether value and gas price, I clicked on 'generate transaction' which ...
1
vote
1answer
190 views

How to generate public key from private key in Rust?

How to generate Ethereum public key from private key in Rust? I found rust-secp256k1 and it seems to be what I need, but there is no documentation at all, which makes this crate for me, Rust newbie, ...
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
116 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
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": "...
0
votes
1answer
325 views

account recovery with web3 privateKeyToAccount()

I'm currently stucked by this strange thing: I started by exporting my private key(fdba67e41f7c6767100969ae3f045d10a59e35d380acf5b37a3b208bd2969347) from my metamask account, which i can use to login ...
2
votes
1answer
208 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
238 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"], ...
1
vote
2answers
336 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 ...
6
votes
1answer
235 views

Any understandable cryptography book/article/lecture to introduce to signatures, hashes, ECDSA etc..? [closed]

It's a long time I'm searching for cryptography lectures related to ethereum inside mechanisms, and everything I found has a high mathematical level. I'm an engineer, not a mathematics, so any article ...
1
vote
0answers
349 views

ECDSA Transaction Signature Values (V-R-S) — Interpreting and presenting it to layman users

In Quorum + Web3, I used getTransaction and it returned me the necessary details and also V-R-S. Understand that VRS is part of the ECDSA signature. There is a need to interpret and present these ...
1
vote
1answer
129 views

What the sha3 function do with 2 parameters?

Who can explain what the second line exactly do ? this function verify ecdsa signature. the msg is already hashaed and it seems like with sha3(prefix,msgHash) will be hashed twice. function isSigned(...
1
vote
1answer
240 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
118 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
1answer
854 views

During ECDSA signing, how do I generate the Recovery ID?

I'm working on authoring Ethereum transactions using ECDSA with SECP256K1. On the tail end of an Ethereum transaction is the V, R, and S values of signing a hash of the message. V is defined as ...
6
votes
1answer
669 views

Why doesn't my private key's public key generate the correct public address?

Private Key: 9ccbcabf23e271183dbed503b43277f4c6eee9ac918cd6cda75ebb73ceb35c7d Corresponding Public Address: 0xa73Fb234B1773ed7b115D18A1f0a15579bA2C1e1 (check for yourself on MyCrypto, for example) ...
1
vote
2answers
436 views

Why doesn't my verification of a signed message signature work in PHP?

I am attempting to verify a signed message in PHP. To be clear, I am not looking to interface with JSON-RPC or any external service, which I both a) know works and b) successfully verifies the ...
1
vote
2answers
327 views

Do private keys work across chains and networks?

If I generate a private key on mainnet now, would I be able to use it at the same address on Ethereum Classic? What about testnets? In what cases would the keys not give the same address on different ...
3
votes
2answers
314 views

Does solidity handle prime256v1 ECDSA signatures

I'm just starting with solidity and I would like to know if it can be used to verify a ECDSA signature. I saw topics about secp256r1 but I was curious to know if it would work on other curves (...
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
1answer
1k views

using solidity to verify ECDSA signature from external key pair

say a user has an external public key (unrelated to ethereum address). they use the private key associated with this public key to sign sha3(message) via ECDSA. the message, public key and signature ...
5
votes
2answers
501 views

What's wrong with this Golang code for transaction signing? Invalid v,r,s error?

So I'm learning more about Ethereum, and I wrote this gist in Go to start interacting with geth nodes and publishing transactions to the network. I'm getting an error that says: panic: invalid ...
7
votes
4answers
1k views

How can I verify a secp256r1 signature using solidity

Sorry if you find these questions are basic, but I am new to encryption. As far as I know, Solidity have ecrecover function for this purpose, but it use secp256k1 signature. which I am intend to use ...
5
votes
2answers
2k views

How to implement cryptographic algorithms in smart contracts?

I need to implement cryptographic algorithms such as AESCCM and elliptic curve algorithms (ECDSA, ECIES) within a smart contract. Is there any implementation of such algorithms in Solidity or Serpent? ...
11
votes
1answer
7k views

EthereumJS: How to get public key from private key

I am trying to create a private key and its corresponding public key using EthereumJS library. So far so good I've been able to create private keys using keythereum.create() method. Nevertheless I ...