Questions tagged [public-key]

This tag should be used for questions regarding public keys. A public key is the public half of the public/private keypair. Anyone can use a public key check that a signature is correct, but they can't generate the signature themselves with the public key.

Filter by
Sorted by
Tagged with
1 vote
0 answers
27 views

Bitcoin script and unsecure ScriptPubKey

The following is taken from problem 3 in HW1 of CS 251 Stanford's course (https://cs251.stanford.edu/syllabus.html). Alice is on a backpacking trip and is worried about her devices containing private ...
1 vote
1 answer
51 views

replicating Hash160 with SHA256/RIPEMD160

I have a dumb question about Hash160 (specifically, going from a public key to Hash160). If I take a public key: ...
1 vote
1 answer
60 views

How to add multihreading to a continuous SECP256K1 Python function?

I have an infinite loop Python function for measuring how fast are SECP256K1 public Keys are generated. The script: from time import time a = 0 b = 7 n = ...
2 votes
2 answers
33 views

What is the difference between a push-based transaction model and a pull-based transaction model?

What is a pull-based transaction model? What is a push-based transaction model? I've heard people describe bitcoin as a push-based transaction model. I've heard people describe traditional financial ...
1 vote
0 answers
57 views

Uncompressed to compressed bitcoin public key with public address?

Is there a script in which i could convert multiple bitcoin uncompressed public keys to compressed and also get public address as well? I search the web with no luck. Thanks in advance!
  • 47
-1 votes
2 answers
36 views

Why is it that some software crypto wallets are restricted to certain networks only?

My basic understanding so far is that crypto wallets are nothing more than a collection of the owner/user's public keys derived from the unique seed or mnemonic using different hashing algorithms. If ...
2 votes
1 answer
168 views

Were uncompressed public keys always supported by Bitcoin?

I was wondering when compressed public keys were introduced to bitcoin, then I saw this quote from this answer: The original Bitcoin software didn't use compressed keys only because their use was ...
  • 779
1 vote
1 answer
52 views

The left-half 256 bits of the hash are added to the parent key to produce the child private key

So in mastering bitcoin it mentioned that to generate child key,The left-half 256 bits of the hash are added to the parent key so if we add that it will be 512 bits.But we need 256 bit so do we hash ...
  • 31
1 vote
1 answer
148 views

Is it true that Public keys with even y coordinate correspond to private key that are less than n/2 and vice versa? (Secp256k1)

The question is somewhat complex and directed to clearing thing out. Suppose that n is the order of the cyclic group. It n - 1 is the number of all private keys possible n = ...
1 vote
0 answers
23 views

Incorrectly counts the we have added a generator point to itself in a loop (SECP256K1, Python),

I have a script that converts a bitcoin private key into x and y coordinate with parameters of a Secp256k1 curve. Here's the script: a = 0 b = 7 #Order of the finite field prime = 2**256 - 2**32 - 977 ...
1 vote
1 answer
70 views

How to convert a compressed public key into uncompressed one in Python?

I've searched really hard for a Python script that coverts a compressed public key into uncompressed one, since I don't know how to code this. I stumbled upon these links: https://stackoverflow.com/...
2 votes
1 answer
551 views

Why do compressed and uncompressed public keys have to produce different addresses?

I am reading through the "Mastering Bitcoin" book. I understand that in the beginning the public key was both the x and y on the elliptic curve. Then it was optimized to only contain the x, ...
2 votes
1 answer
82 views

Fail at coding my private to public key converter (Pyhon)

Fail at coding my private to public key converter script for Bitcoin (Secp256k1) Currently going through the book "Programming Bitcoin by Jimmy Song", got stuck on page 61 (Chapter 3), but ...
2 votes
1 answer
80 views

Is the G in elliptical curve same for bitcoin and ethereum

Is the G in elliptical curve same for bitcoin and ethereum? If yes then why can't we send bitcoin and ethereum to same public address? If no then what's the reason behind implementing like that? if ...
  • 31
1 vote
1 answer
170 views

Generate Public Keys from Extended Public Key in python

I want to get a normal Public Key from an extended Public Key in Python. Actually I want to get the same result as here in the Extended Public Key Children section. I know I need this structure: ...
  • 13
-1 votes
1 answer
52 views

suppose if I derived a public key from another algorithm instead of elliptical curve will the node reject my tx?

Or I changed the value of G in EC (K=k*G) what will happen
  • 31
1 vote
2 answers
93 views

Can I verify a child public key derived from its parent public key without involving any private keys and child index?

I have a extended private key, I'm creating multiple child private key / public key pair. If want to verify that the child public is derived from the parent public key. Can I do that? Thanks in ...
0 votes
1 answer
55 views

How the extended key in wallet is 512 bits?

For extended private key it is 512 bits but for extended public key how it is 512? It will be 264+256 right? And why in the book mastering bitcoin they said extended key is either 512 bits or 513 bits
  • 31
1 vote
1 answer
63 views

Why this witness doesn't seems to contain a public key?

I am learning how transactions are coded in the blockchain, so I used a python script to compute bitcoin address from public key. This works with the public key: ...
0 votes
1 answer
52 views

How does the bitcoin network use public and private keys when one wants to transfer funds?

I am familiar with Public keys, private keys and addresses. But, I don't understand how they are used when I want to transfer funds to a different wallet. For example, what is the process that is ...
  • 147
2 votes
2 answers
165 views

Why can't I reverse secp256k1's public key point in order to determine the private key?

I understand that the public key q is generated by the point addition of g (some secp256 k1 constant) u times such that u is a big number (private key). This process can be simplified in this diagram ...
  • 147
2 votes
1 answer
90 views

How does ECDSA work when generating the public key?

I know the curve has formula y^{2}=x^{3}+ax+b. However, some websites are saying that a=0 and b=7 for secp256k1? What is secp256k1? Is it the curve that is always used or does it generate the field in ...
  • 147
1 vote
1 answer
56 views

Import Bitcoin core pubkey into Electrum for multisig setup

Background I have a service running on a server using bitcoin core that is signing transactions from a Bitcoin wallet automatically. However, if anyone were to get access to this server, they'd have ...
1 vote
1 answer
88 views

Baffled by endianness: How do I compute the HASH160 of the public key of a base58 address?

Given an address as follows: > spend_address=$(btc-cli getnewaddress '' legacy) > btc-cli getaddressinfo $spend_address spend_address info { "address": "...
  • 251
1 vote
1 answer
159 views

GPG Suite cannot find Thomas Voegtlin's public key for Electrum

I'm trying to reinstall Electrum but cannot find Thomas Voegtlin's public key using GPG Suite, so cannot verify the downloaded Electrum software. Do I just need to keep trying or is there an ...
  • 33
1 vote
1 answer
120 views

Why is the Generator Point G for secp256k1 curve typically indicated in (y,-x) quadrant?

Generator Point G for the secp256k1 curve is typically indicated below where the curve intersects the y-axis. At x=0, y=sqrt(7) and -sqrt(7), which are both small numbers less than 3, but G is an ...
  • 33
1 vote
1 answer
101 views

Is it feasible to calculate EC private key k from public key K for very low values of k?

If an EC private key k is very small, say "1", is it feasible to calculate the private key k from its public key K, since there would only be one step back to generator point G and therefore ...
  • 33
1 vote
0 answers
45 views

WitnessPubKeyHash to address

I'm trying to derive address from pubkeyhash in GoLang. Current i'm getting invalid address Current i'm getting SegWit address but mine chain doesn't support Segwit. addr, err := btcutil....
2 votes
1 answer
119 views

How to calculate the public key, compute point P and create signature using ECDSA?

I'm quite new to the intricacies of bitcoin cryptography and ECDSA and elliptic curve cryptography has me quite stymied. I am faced with a curve with the equation: y^2 = x^3 + 7 of order N=39 with ...
0 votes
2 answers
72 views

What is the difference between a 'hot' and 'cold' wallet

Problem I don't understand the difference between a 'hot' crypto wallet, and a 'cold' crypto wallet. Assumptions My understanding of blockchains is that they use public/private cryptography in order ...
1 vote
1 answer
301 views

How to get Private Keys for the corresponding HD generated Child Public Keys?

If we take a look at the Mastering Bitcoin book by Antonopoulos it is explained how to derive child keys as described in BIP-32: From this image it is easily visible that we can use parent public key ...
  • 57
0 votes
0 answers
79 views

PHP Blockcypher error validating generated transaction: Error running script for input 0

Attempting to use Blockcypher's /txs/send endpoint using detailed here: https://www.blockcypher.com/dev/bitcoin/#creating-transactions and I'm getting the following error: Error validating generated ...
0 votes
2 answers
65 views

How can I manually connect a bitcoin network and create a bitcoin account?

I am not sure that I'm 100% technically correct, but I want to create a key value pair which is essentially my Bitcoin account. Please correct me if I am wrong. So what does it take me to make my ...
1 vote
0 answers
38 views

How to calculate modulo (%) of bitcoin publick key?

Good day. How to calculate modulo (%) of bitcoin publick key ? Absolutely any methods are welcome, please. Br
0 votes
1 answer
139 views

Bitaddress.org gives me legacy address instead of Bech32 address

I have my private key, but when I put it into bitaddress.org, it gives me a legacy address (starting with "1") and not the Bech32 address (starting with "bc1") that I was expecting....
2 votes
1 answer
272 views

Addresses in Electrum wallet start bc1 but other tool gives addresses starting 1

I am using the Electrum wallet for Bitcoin on Windows 10. I'm able to get the private key of my main receiving address. I'm sure this address works to receive BTC as I've been able to before. I was ...
1 vote
1 answer
47 views

What will be the security risks if we persist "e" as part of schnorr signature=(r,s,e) and extract publicKey from signature at verification

We know unlike ecrecover, it is impossible to get to public key given schnorr signature = (r,s) since rG = sG-eP . So, would like to understand what are the security risks, if we say signature=F(r,s,e)...
0 votes
1 answer
53 views

Keypath spending: Verify destination address across address formats [duplicate]

In a Tapscript Keypath Transaction (there is an unrelated Scriptpath too) I can have outputs to all possible address? (I.e. to P2PKH, P2SH, P2WPKH / P2WSH and P2TR) I have a list of addresses in all ...
  • 133
0 votes
1 answer
60 views

Using EQUALVERIFY with different public keys, but generated from the same seed

I am building certain system that involves Bitcoin and therefore I need to understand well how it works under the hood. In order to receive funds, for every new transaction new public key and its hash ...
  • 57
1 vote
1 answer
180 views

How to generate a public key in wallet rpc commands

I'm trying to generate a public key associated with a wallet. How would I do this using the wallet rpc commands, I couldn't find a command in reference docs which does this. Thanks.
  • 131
0 votes
1 answer
86 views

What happens to the public and private keys after a transaction? Specifically, how (and why) do they change upon payment?

Feel free to answer/address as many of these topics as you like: In particular, I am interested in how bitcoins can be stolen, e.g., the 2016 Bitfinex hack. If I am not mistaken, the only way to steal ...
  • 3
0 votes
2 answers
156 views

Is it possible to have multiple receiving addresses (bc1q) related to the same public key hash

I am trying to get the big picture of the bitcoin entities starting from seed to btc receiving addresses in Hierarchical deterministic wallets without being too technical about hash functions or too ...
  • 17
0 votes
1 answer
46 views

Where is the revelead public key in a spending transaction?

I am pursuing a deeper understanding of Bitcoin. Reading Grokking Bitcoin now. I am trying to asess the understanding of different concepts by exploring a BTC RPC explorer. I got some understanding ...
  • 17
0 votes
2 answers
66 views

Does a pass phrase uniquely identify public and private keys?

If I go to bitaddress.org and create a paper wallet with BIP38 and a pass phrase, what it doing with that pass phrase specifically? Since it can make multiple paper wallets from one pass phrase, the ...
  • 103
0 votes
1 answer
84 views

One address 2+ private keys. Bitcoin future

Since bitcoin uses cryptography algorithms to create private and public keys there is a possibility it could repeat. Person 1: L54w...KraG -> bc1...kq4 Person 2: L3mV...JU8G -> bc1...kq4 So ...
1 vote
1 answer
73 views

How many times and where exactly is ECDSA used in Bitcoin?

I'm currently a little confused about where exactly ECDSA is used in the transaction process... some resources seem to say it's used once, whereas others seem to say it's used three times. Which is ...
  • 13
0 votes
1 answer
103 views

How much can be stripped of a base58 address in a recoverable way?

Since P2PKH and P2SH addresses use Base58Check_encoding, the 4 byte checksum appended in binary contains some redundancy. Strictly mathematically speaking, those 4 bytes correspond to ca. floor(log(2^...
0 votes
1 answer
77 views

Creating HD wallet using Blockcypher

I'm using Blockcypher to create an HD wallet, which requires me to send extended_public_key. How do I create the extended keys? While generating a new address using the API I'm getting something like: ...
  • 137
0 votes
0 answers
33 views

Libbitcoin - Failing to generate correct wallet addresses from ypub and zpub

I am playing with Libbitcoin and I want to calculate addresses from xpub, ypub and zpub. Whatever I do though I cannot generate correct addresses from ypub or zpub. I don't have problems with xpub. ...
  • 27
0 votes
1 answer
93 views

Getting "Public key is neither compressed or uncompressed" error when pushing a transaction, but everything looks fine to me

I am very new to Bitcoin development and trying to make some personal milestones, one of which is broadcasting a transaction to the testnet. However, I am having a hard time due to the following error....

1
2 3 4 5
10