# Questions tagged [ecdsa]

In cryptography, the Elliptic Curve Digital Signature Algorithm offers a variant of the Digital Signature Algorithm which uses elliptic curve cryptography.

39 questions
Filter by
Sorted by
Tagged with
1answer
20 views

### secp256k1 library does not create correct public key

I am trying to get public key from private key using secp256k1 library. https://github.com/bitcoin-core/secp256k1 I set same private key(sk) in here. https://github.com/ethereumbook/ethereumbook/blob/...
0answers
21 views

### Cross-posted from Stack-Overflow: Using Google Cloud Key Management Service to sign an Ethereum transaction

Cross-posted from question I've been working on writing a signer service for an Ethereum transaction manager and I need to sign Ethereum transactions using Google KMS Golang APIs. I'll try and ...
1answer
31 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 ...
1answer
378 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 ...
1answer
40 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 return v,r,s parameters ...
0answers
19 views

### Does value of v represent that coordinate y of (deterministic k * G) is even or odd in Ehereum?

I'm quite confused about whether value v is related to deterministic k derived from RFC6979. I know that we can try 4 possibilities of v and compare to public key. And if (lower r, y is even), then ...
1answer
61 views

### What's wrong with my code, I am signing a transaction? Invalid v,r,s error?

func main() { privateKey, err := crypto.GenerateKey() if err != nil { log.Fatal(err) } auth := bind.NewKeyedTransactor(privateKey) balance := new(big.Int) balance....
0answers
61 views

### Signing a raw transaction, OpenSSL, C++

I'm trying to sign my raw transaction and each time I'm getting a different signature (r, s). Please help me how to sign transactions properly in C++ OpenSSL. I'm trying the following way but ...
1answer
32 views

### Lib to sign messages using the same version of ECDSA of Ethereum

I want to sign a message using the private key of my physical RSA digital certificate and I want to validate this signature onchain. Does anyone know a lib that can sign messages offchain using the ...
0answers
30 views

### What way there is to implement a new signing scheme in Ethereum?

I want to deploy a new signing scheme for the Ethereum transactions as an alternative to the currently implemented ECDSA. This will be for future research purposes on post-quantum signing schemes. The ...
1answer
147 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 ...
1answer
270 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 ...
1answer
50 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 ...
1answer
36 views

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

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 ...
1answer
249 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 ...
2answers
338 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 (...
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 ...
0answers
103 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 ...
2answers
32 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 ...
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 ...
1answer
321 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, ...
1answer
173 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 ...
1answer
55 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": "...
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? ...
1answer
491 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 ...
1answer
1k 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 ...
0answers
274 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"], ...
2answers
483 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 ...
2answers
398 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 ...
0answers
416 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 ...
2answers
566 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 ...
1answer
264 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 ...
1answer
138 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(...
1answer
739 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) ...
0answers
139 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 ...
2answers
367 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 ...
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 ...
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 ...
1answer
8k 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 ...