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
0 votes
1 answer
26 views

Are fees smaller to transact to addresses generated from a zpub master public keys compared to xpub?

Will it affect the fees in any way when one sends money to an address generated from zpub master public key compared the xpub? What might also be part of this question is, understanding whether it is ...
  • 235
2 votes
1 answer
98 views

Calculating addresses from Bitcoin transaction data

What would be the easiest way to retrieve addresses that are used in specific transaction? For instance, if you look at following transaction which is retrieved by getblock of JSON RPC with argument ...
  • 87
1 vote
1 answer
58 views

How to generate a bitcoin public key from an existing private key using openssl?

I want to generate bitcoin priv/pub key manually. I generated random binary numbers by flipping some coins and converted them to hex. Now,I got a bitcoin private key in hex:...
  • 11
6 votes
2 answers
502 views

Is a P2TR address a compressed public key?

From what I understand, a public key can be compressed from 64 bytes into 32 bytes, but an additional byte is needed for the sign, so it usually winds up being 33 bytes total. But P2TR addresses only ...
  • 173
0 votes
1 answer
86 views

How to check whether a hex string is a key or an address and how to import it?

So after long digging I finally found my private key which is in hex format. When I paste it in one website it does validate the address, it is a legacy address, it is in hex format, but it's 66 ...
0 votes
1 answer
43 views

Bitcoin Core shows addresses that Electrum says don't belong to my wallet (imported MPK via EPS). What is going on?

I got a full node (pruned) up and running with Bitcoin Core via Tor. I installed Electrum Personal Server (EPS) and connected my hardware wallet with Electrum via Tor. I generated a watch-only wallet ...
  • 1
-1 votes
1 answer
78 views

Potential new BIP Proposal?

I’ve been working on a project which will help manufacturers of physical products and NFT makers to distribute their NFTs in the real world. My solution is to box up a paper wallet loaded with the NFT....
0 votes
0 answers
29 views

NameError at /register name 'privtopub' is not defined

from django.shortcuts import render, redirect from django.contrib.auth.models import User, auth from django.contrib import messages from .models import Details from bitcoin import * import random ...
1 vote
0 answers
142 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
121 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
98 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
51 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
63 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!
  • 45
-1 votes
2 answers
37 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 ...
  • 15
2 votes
1 answer
177 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
61 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 ...
  • 49
1 vote
1 answer
224 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
28 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
231 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
665 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
96 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
107 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 ...
  • 49
1 vote
1 answer
300 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
54 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
  • 49
2 votes
2 answers
185 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 ...
1 vote
1 answer
86 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
  • 49
1 vote
1 answer
84 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
58 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 ...
  • 157
2 votes
2 answers
236 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 ...
  • 157
2 votes
1 answer
123 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 ...
  • 157
1 vote
1 answer
129 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
101 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": "...
  • 261
1 vote
1 answer
205 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
176 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
125 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
63 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
151 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
88 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
389 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
1 answer
123 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
76 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
40 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
184 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
396 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
50 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
67 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
70 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
227 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.
  • 141
0 votes
1 answer
137 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
210 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

1
2 3 4 5
10