Stack Exchange Network

Stack Exchange network consists of 174 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 Elliptic Curve Digital Signature Algorithm

57
votes
2answers
8k views

If someone wanted to pretend to be Satoshi by posting a fake signature to defraud people how could they?

If a random fraudster wanted to post a bunch of mysterious ECDSA signatures that the public would believe came from Bitcoin's creator, in order to disrupt the Bitcoin market, extract money from people,...
0
votes
0answers
555 views

Whats wrong with the calculation? (python)

Transaction: f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 https://www.blockchain.com/btc/tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 RawTX: ...
0
votes
0answers
23 views

Can the window.crypto.subtle generateKey function be used to build bitcoin addresses?

I've been working on some code to generate bitcoin addresses on the client side using JavaScript. I know there are lots of repos for doing this, but I wanted to make my own from scratch for ...
1
vote
2answers
51 views

Bitcoind does not like ECDSA (r, s) pair produced by OpenSSL

I am writing transactions manually and have stumbled across a rather bizarre situation. Only one in a few of the transactions I broadcast to bitcoind is accepted, otherwise I get a REJECT_NONSTANDARD ...
2
votes
1answer
53 views

Why are some public keys prefixed with 0x00?

ECDSA public keys seem to always start with 0x02/0x03/0x04/0x05 1, followed by either 32 bytes of 64 bytes. However, I encounter some public keys prefixed with 0x00. For example, the source output ...
1
vote
0answers
45 views

How verify p2sh spending transaction signature using public key with btcsuite?

I'm trying to verify inputs signatures in Go using Verify Signature script of package btcec. Decoding this p2sh spending transaction rawSpendingTxd := ...
2
votes
1answer
51 views

Can someone explain me ECDSA (creating public from private key) with 8-bit numbers? [closed]

Trying to understand Elliptic Curve maths with 256-bit numbers seems like hard to explain/understand. I wonder if by lowering down the possible numbers get's a little bit easier.
5
votes
2answers
737 views

What is is minimum possible number for an ECDSA private key?

Private keys are 256 bit numbers. I know the max. possible number is something around: 115792089237316195423570985008687907852837564279074904382605163141518161494336 What about the min. number ...
0
votes
1answer
117 views

How to find Values N and K given R,S and Z in ECDSA?

How to find Value N and K ? I have the values for R, S and Z. for example these: BigInteger R =("00d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1")); BigInteger S =("...
1
vote
1answer
69 views

OpenSSL bitcoin addresses generation

Using OpenSSL ver 1.1.0h on win 8.1 - 32 bit Im trying to recreate this post using cmd: OpenSSL generate Bitcoin address But on step 3: openssl ec -in c:\keys\private.pem -outform DER|tail -c +8|...
2
votes
1answer
358 views

What is the maximum size of a DER encoded ECDSA signature?

I've been told by a seasoned Bitcoin contributor that signatures in Bitcoin could be up to 75 bytes. I'm curious to find out how that maximum comes to pass. According to this answer on Why the ...
2
votes
1answer
74 views

Hypothetical Scenario - Address collision with address with already confirmed outgoing transaction

In a typical case of finding a collision with an address, as long as the private key provided has a consistent public key that hashes to the address, then the coins in that address can be spent. The ...
0
votes
2answers
59 views

ECDSA Input When Transferring Bitcoin From Owner A to Owner B

I want to get my terms right and master how transactions work within the Bitcoin network. Keeping things simple, when Alice wants to transfer 1 BTC to Bob, Alice signs a message with her private key....
0
votes
1answer
84 views

Address and Public key [duplicate]

I am reading about cryptography in Bitcoin. Bitcoin adress is created by applying cryptographic hash function to public key of the wallet. I know that this function is a trap door function but what ...
2
votes
2answers
312 views

Bitcoin - Technical difference between P2PKH and P2SH address generation?

I was convinced that the only difference between the generation of addresses starting with '1' and '3' was simply changing the prefix added to the digest from 0x00 to 0x05 after the ripemd160 part. ...
3
votes
2answers
170 views

Unable to construct a correct raw transaction for bitcoin cash testnet

I am trying to construct a raw transaction for bitcoin cash testnet. I have made a lot of use out of this very nice answer to how to construct a raw transaction, but am still unable to construct a ...
0
votes
0answers
81 views

Would it be possible for an 8-bit microprocessor to create a bitcoin keypair?

Context for question: With the latest security breaches around modern CPU's (Spectre / Meltdown) I was wondering if we could generate ECDSA keypairs on cheap, small and/or simple air gapped (micro)...
0
votes
0answers
98 views

How to make calculations using Decimal to Hex converter?

Help me understand this article ECDSA Signature and the “z” valueI have questions on the calculation of these formulas? I use to calculate MATLAB all the values ​​I converted via (Decimal to Hex ...
11
votes
2answers
2k views

How do you derive the private key from two signatures that share the same k value?

I wrote my own ECDSA signature algorithm just for the purpose of creating unit tests. With it I created two signatures which went into transaction 56ec7ca7df..., sending from 1GXFXm3es.... These ...
1
vote
3answers
1k views

Bitcoin public key to private key

I did go thru a lot of articles which say's It's highly impossible to break the bitcoin public-key and get a private key from it. I understand that the public key does hold some info of it's ...
4
votes
2answers
1k views

How are compressed PubKeys generated?

Just read this: https://bitcoin.stackexchange.com/a/1715/ What is the process to generate compressed pub keys via ECDSA?
1
vote
0answers
20 views

Why 256 bit for a cryptocurrency is enough but 1024 bit for ssh is not? [duplicate]

If 256-bit private key is secure enough for Bitcoin and Ethereum then why people are moving from 1024 to 2048-bit RSA for day-to-day cryptographic operations (such as ssh) and even this can be not ...
0
votes
2answers
599 views

How can I fix this: (Non-canonical signature: S value is unnecessarily high)

I've written a small script that will create a bitcoin transaction from scratch, using an ECDSA library. It works, but sometimes I get this error: 64: non-mandatory-script-verify-flag (Non-canonical ...
0
votes
1answer
116 views

Secure Generation of Private Keys

Suppose you've created a random private key by rolling dices. You've checked in the blockchain and nobody else has ever used the respective address of such private key. Issue Is this process ...
1
vote
1answer
77 views

What means “messege” in the bitcoin blockchain? [elliptic curve cryptography]

I am stuck with one question in my research. I found some mentions that bitcoin(or blockchain) is a messeging system, I played with couple curve encoding algorithms and it was like: Curve params, ...
1
vote
1answer
106 views

Why does ScriptSig contain public key, since it can be recovered from the signature and message?

Using ECDSA, given a signature and the message signed, it is possible to recover the public key. So it seems to be a waste of up to 65 bytes in each transaction. Why does bitcoin do it? Which ...
0
votes
0answers
171 views

What are the R and S values from an ECDSA signature?

I'm trying to build a transaction and in order to calculate the scriptSig, I'm in need of the R and S values of the ECDSA signature. What do they stand for, and how do I calculate / extract them? In ...
4
votes
2answers
427 views

Invalid public key was spent! How was this possible?

From previous questions this bitcoin 1FYMZEHnszCHKTBdFZ2DLrUuk3dGwYKQxh address had an invalid public key of "00" and was unspendable but the coins are now spent?? The invalid key was generated by a ...
1
vote
1answer
2k views

ecdsa - Create Private key and Bitcoin Address

I have the following code: import binascii import hashlib from fastecdsa import keys, curve # generate a private key for curve P256 priv_key = keys.gen_private_key(curve.secp256k1) print (priv_key) ...
4
votes
1answer
665 views

Replacing ECDSA (SECP256k1) with Schnorr signatures

On March 23, 2017 the Bitcoin Core team published a technology roadmap, expressing their intent to replace ECDSA (SECP256k1) with Schnorr signatures: https://bitcoincore.org/en/2017/03/23/schnorr-...
0
votes
1answer
1k views

Signature verification in python

When trying to implement OP_CHECKSIG, I am unable to figure out how to do the actual signature verification in python (python3) I obtained the signature, public key, and hashed message digest of a ...
0
votes
1answer
1k views

Recovering ECDSA public key from the signature

How to recover ECDSA public key from the signature? I know that all is need is a hash of the unsigned message and signature. But may be there is some detailed method for to calculate ECDSA public ...
1
vote
3answers
293 views

Sign a tx with “low s” value using OpenSSL

I currently try to sign a tx using OpenSSL. After some tinkering I think I got most of the tx right but Electrum complains with mandatory-script-verify-flag-failed (Non-canonical signature: S value is ...
-1
votes
2answers
1k views

how do you figure out the r and s out of a signature using python [closed]

ECDSA r, s encoding as a signature this link doesnt seem to add up, any suggestions?
1
vote
1answer
92 views

Possibility of contructing a valid transaction without knowning private key

From here you get that in step 2 of ECDSA sign process, you use z, the Ln leftmost bits of e = HASH(message/transaction) in both the process of generating and verifing the signature. I understand ...
2
votes
1answer
468 views

How were the secp256k1 base point coordinates decided?

79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 seems very random to me. I see how this point is on the curve, but how ...
1
vote
1answer
57 views

If newer versions of bitcoin and or bitcoin cash don't allow 0x04 uncompressed public keys, what do you do if you have an address based on one?

So if you have an address with coins in it that uses an uncompressed public key (preceeded by a "04") then how can coins from that wallet be utilized with a network that doesn't allow such public keys?...
2
votes
1answer
670 views

Are Schnorr signatures quantum-computer resistant?

Here (https://bitcoincore.org/en/2017/03/23/schnorr-signature-aggregation/) it says Schnorr replaces ECDSA, we know that ECDSA can be broken by quantum computers. Can Schnorr be broken by q-computers ...
1
vote
0answers
520 views

Is the following a valid bitcoin private key? - FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE

In secp256k1 (Bitcoin's elliptic curve) it is defined that valid private keys may range from 1 to FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141 - 1. (https://crypto....
2
votes
3answers
13k views

online tool to play around with ECDSA public keys, message signature verification?

I realize that this question may be borderline bannable because it's asking for suggestions on tools, but it will really help newbies. This online tool allowed me to play around with hashes and to ...
1
vote
1answer
125 views

Is there a simple reference implementation of ECDSA algorithms?

I'm using Node.js's elliptic library to do some signing on my app, but there is some chance I'll migrate it to another language. That library is kinda big and not easy to port, so, I wonder, is there ...
5
votes
1answer
3k views

How to sign raw transaction given a private key and SHA hash (in java)

I have followed the instructions here to build my own bitcoin transaction. Redeeming a raw transaction step by step example required Currently my code can create a transaction and compute the SHA ...
1
vote
1answer
225 views

Why transaction is signed with locking script from the input transaction?

Finally, I've successfully made a raw transaction with Python and this is the last thing, which is totally mistic for me. In my case, here's the input transaction and it's locking script is: OP_DUP ...
4
votes
1answer
1k views

OpenSSL and Secp256k1 differing in implementation of ECDSA signatures?

OpenSSL (from ssl in Mac OS X Version 10.11.6) and Secp256k1 (from the bitcoin-core repository) seem to differ in their implementations of ECDSA. I'm having issues with these differences and want to ...
2
votes
1answer
2k views

How to generate Bitcoin private - public keys with ECDSA module?

Pretty same question was asked here, but maybe there is a way to generate keys using ecdsa module in just a few lines of code?
0
votes
1answer
136 views

Should signature verification by key recovery ignore compression status?

The bitcoinj library's API offers a signMessage method of the ECKey class which returns a signature (r,s) as 65 bytes encoded as a Base64 string. The crunch of the encoding lies in the additional ...
3
votes
1answer
1k views

How do I convert Public Key x value to y in Python and verify?

I have been using the BTC Address utility which enables me to type in something like: 020F031CA83F3FB372BD6C2430119E0B947CF059D19CDEA98F4CEFFEF620C584F9 Then clicking a button the program can spit ...
0
votes
1answer
466 views

Testing the blockchain for ECDSA signature random collision

The wikipedia page on ECDSA signature explains how the signer's private key can be recovered if two signatures are produced with the same random (private key looking) element k. In fact, it is claimed ...
2
votes
1answer
146 views

Why is it harder to generate addresses starting with 1s?

Here's a table I got from bitcoin wiki. They say: A special case, leading numbers 1 (one) is especially difficult. But why?
0
votes
1answer
153 views

Troubleshooting pybitcointools transaction signing/verification

I'm having several problems getting tests to successfully run under my fork (or vbuterin's pybitcointools, and I'm hoping someone with a combined Python / Bitcoin knowledge can provide some insight. ...