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

2
votes
1answer
33 views

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

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.
3
votes
2answers
454 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
49 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 =("...
0
votes
1answer
46 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
153 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
39 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
58 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
80 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
198 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
115 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
59 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
77 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
785 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 ...
3
votes
2answers
813 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
19 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
448 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
109 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
96 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
137 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
375 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
1k 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
627 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
868 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 ...
0
votes
3answers
241 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
90 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
436 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
55 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
626 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
485 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
10k 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
108 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 ...
4
votes
1answer
2k 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
221 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
885 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
129 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
420 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
145 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
149 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. ...
1
vote
1answer
1k views

How can I convert a bitcoin private key (hex) into a Bitcoin public key? [duplicate]

How can I take a bitcoin private key encoded in hex: d1d9a2e9fd3da7e7710310ea17a9edff9e08845c7a6f2ea3d650ba4ae7ee0d3b and convert it to the corresponding public key: ...
5
votes
1answer
320 views

Bitcoin safe if ECDSA is broken?

I've read that one reason to use a new address for each transaction is because it hides the pubkey behind a hash, so that even if ECDSA is broken and someone is able to derive my privkey from my ...
0
votes
2answers
425 views

Signing data with ECDSA

I was reading about the math behind bitcoins in this article, and one thing I can't seem to wrap my head around is how the said algorithm is used to sign "data". What exactly is this "data"? Is it my ...
2
votes
1answer
441 views

Can't find correct z1 & z2 for transaction

I've been trying to understand the issue and repeat Willem Hengeveld's answer, but I think I'm failing at getting correct script for hash. I'm looking for this transaction, my scripts are: ...
1
vote
1answer
371 views

how base point of bitcoin public key x , y formed

n = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F base point of bitcoin public key x , y Gx = ...
0
votes
3answers
258 views

How Bitcoin handles addresses collisions?

Since the addresses are hashes of a public portion of a public/private ECDSA keypair, what would happen to two different people with different keys that hashes into the same address? How would ...