Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6106
6 votes
Accepted

How do I extract the v, r, s values from a signed transaction?

This part of the signed transaction contains the v, r, and s fields: 25a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b …
Thorkil Værge's user avatar
1 vote

Why does ecrecover() take signature parameters (v,r,s) instead of the full signature?

You should note that what we call a signature is actually 256 bits and is the combination of the r and s field. … The v field only contains one bit of information about the signature and makes it possible to derive the public associated with the signature -- such that you don't need to include that in the signed transaction …
Thorkil Værge's user avatar
6 votes
Accepted

Understanding Ethereum signatures

An Ethereum signature contains three values: v, R, S. A Bitcoin signature contains only two numbers: R and S. … It is possible to convert an RLP signature to a DER encoded signature but not the other way around since the DER signature does not contain the v value. …
Thorkil Værge's user avatar
4 votes
Accepted

Transaction Signing & Hashing

Once the signature is calculated, the r, s values from the signature, along with the recovery bit, are inserted into the final transaction hex, thus creating the signed transaction. … Prior to EIP155, the signature was: ECDSA_secp256k1(private_key, Keccak256(RLP(nonce, gasPrice, gasLimit, To, Value, Data))) With EIP155, the signature is: ECDSA_secp256k1(private_key, Keccak256(RLP(nonce …
Thorkil Værge's user avatar
1 vote

How to sign a message using secp256k1 in Ruby?

A bitcoin signature consists of two parts: (r,s). An Ethereum signature consists of three parts: (v,r,s). … The extra value v which is only one byte allows for the derivation of the public key from the signature. …
Thorkil Værge's user avatar
1 vote
Accepted

No luck recovering public key after EIP 155

Try replacing the 2nd to last line with: var publicKey = ethutil.ecrecover(msgHash, (v & 1 ^ 1) + 27, r, s); Most of your code looks correct to me but the parity of the 2nd argument to ecrecover mu …
Thorkil Værge's user avatar