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 [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.

0
votes
1answer
51 views

Why can a wallet not compute the private-key from a public-key?

my goal of questions this is why any wallet not able to compute private key created with public key generate?
2
votes
2answers
33 views

What if two public keys have the same hash? [duplicate]

What if two public keys have the same hash? Although the chance is very very small, I am still interested in what would happen. Suppose that Alice makes a transaction to Bob using Pay To Public Key ...
0
votes
0answers
12 views

PHP generate address

I have a problem with generating addresses using PHP. So I have a electrum cold storage and took there a Master Public Key. So in my online server I want to generate addresses using PHP only and ...
2
votes
1answer
48 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
1answer
32 views

I have a 100 character text message and I want to encrypt this message with my bitcoin “PUBLIC KEY” and decrypt it with my private key in Javascript

Are there any javascript libraries that can encrypt a 100 character text message using your bitcoin public key, but only be able to decrypt it with your bitcoin private key? I'm looking to create a ...
0
votes
0answers
29 views

Why my altcoin only generate wrong key (only with prefix 3)

I created and run an altcoin blockchain. It's seems everything is good besides all the keys produced by the blockchain are with prefix 3 (seems like all are p2sh). I have tried the past two weeks to ...
2
votes
0answers
66 views

Becoming Bitcoin wallet provider from scratch [closed]

I want to launch a bitcoin wallet service website for creating new wallets. And i want to provide a tool for user for importing their old wallets using public and private key. I know i can use some ...
1
vote
1answer
30 views

can I run bitcoin core with public key only

I'm looking a way for secure setup of web site that accepts bitcoin payments. Ideally I'd like to create wallet off-site and be able to deploy bitcoin core online with public key only that I believe ...
0
votes
0answers
12 views

Python code to recover private key from public key [migrated]

Helllo, I would like to use this code to generate/recover my private key, I'm using Python 3.6 and installed ecdsa package but how should I edit the code with my public key? I'm quite new to python, ...
0
votes
1answer
25 views

Use of Bitcoin paper wallet

A Bitcoin paper wallet contains a pair keys: public key (address used to receive coins) and private key (allows to spend coins stored at that address). Those keys are printed in a form of QR-codes so ...
0
votes
0answers
12 views

How is “level” of user privacy in “Zerocash” (Zcach)?

Is it correct that Zerocash allows two users to engage in transactions without either party revealing their addresses (their public key) to the other? Or it only ensures privacy of the content of the ...
0
votes
1answer
28 views

P2PKH - Sharing a wallet address does not reveal my pub key?

Is it technically correct to say that if I share my address with the network, nobody has access to my pubkey still? But if I share a valid signature to a P2PKH UTXO, someone can derive my pubkey and ...
1
vote
1answer
70 views

General private/public key generation

Not sure if this is the correct forum to ask, but I couldn't find a general one for all cryptocurrencies I wanted to get an idea on how the whole cold-storage private/public key generation works for ...
0
votes
2answers
29 views

Why most of pubkeys in the first batch of blocks in blk00000.dat are different

For example: the pubkey in the first 3 coinbase's output are 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f ...
1
vote
1answer
32 views

How does a Doge public key is created from a private key?

I am looking for the differences between the creation of Doge public keys and Bitcoin public keys when inserting a private key. I am trying to make a small web-app that signs messages. There are a ...
0
votes
1answer
40 views

What makes an extended public or private key?

I was under the impression that an extended public key was comprised of the public key + chain code, and I'm unfamiliar with what comprises the extended private key. However this does not seem to be ...
0
votes
2answers
51 views

Extended Public Key 's mechanism misinterpreting in 'Mastering Bitcoin' by Andreas

I am a newbie and start exploring from the 'Mastering Bitcoin' book. The figure below to me is a little inaccurate, I think the arrow from HMAC-SHA256 should point right to the child public key. Am I ...
0
votes
1answer
40 views

How would one extract the list of public keys from Electrum wallet?

I am looking for a way to extract all of the public keys associated with my electrum wallet. I am aware that listaddresses() does this for public addresses, such as 1CWX7o1Ppe4JpEpSLmuovU4HFY3D6Ay24C ...
1
vote
2answers
55 views

Can one recover the full list of public keys generated in electrum with the seed/private key?

I used the wallet.change_gap_limit command in the electrum console in order to generate some 20.000 public keys. Would I be able to recover all of these using my seed after completely removing ...
0
votes
1answer
34 views

Is auditing a BIP32 tree only possible if it is non-hardened?

BIP 32 allows you to to implement the auditor use case: Audits: N(m/*) In case an auditor needs full access to the list of incoming and outgoing payments, one can share all account public ...
0
votes
1answer
80 views

How to import an extended public key into bitcoin core 0.16

I exported an xpub key from a HW wallet and want to import it into my own node to keep track of changes to the balance. My node is running satoshi 0.16.1 Can someone help me find the right syntax for ...
1
vote
1answer
61 views

bitcoin address from xpub key

I want to create bitcoin address from extended public key, without exposing private key but did not get any success till now. Do someone know how to do it? I am using bitcore-lib package
2
votes
2answers
129 views

Is It Possible to Prove Ownership of Public Key Hash without Public Key?

I am building a system where I would like the user to specify a public key hash of a wallet that they have control over in the event of tips, refunds, and/or otherwise needing to send value back to ...
3
votes
1answer
299 views

Sweeping a bitcoin private key using PHP

Is there a PHP script where it validates a bitcoin private key and also gets the public address from the key? My goal was to: verify the private key Get the public address using that private key ...
0
votes
1answer
98 views

Can I export a xpub/zpub/ypub key in bitcoin core?

I'd like to add a master public key (any of xpub/zpub/ypub https://support.samourai.io/article/49-xpub-s-ypub-s-zpub-s) for tracking purposes to Sentinel watch-only wallet https://samouraiwallet.com/...
0
votes
0answers
41 views

What's the difference between all kinds of bitcoin addresses (Single, multisig, etc…) also compared to all bitcoin forks?

Bitcoin addresses start with 1. Multisig/Script addresses start with 3. Other forks of bitcoin have single letters that are different at the beginning. Is this letter simply and only prepended to the ...
1
vote
1answer
122 views

Can we derive parent’s private key using child’s private key?

In the book named Mastering Bitcoin by Andreas, the author described the usage of derived child keys. One thing I noted was that he said(page 108), The derivation function is a one-way function, ...
0
votes
1answer
134 views

How to get public and private keys by giving seed explicitly?

I am using bitcore to generate the public and private keys. I am using 'getnewaddress' method to generate a public address and dumpprivkey to generate a private key. When I am calling the ...
1
vote
1answer
61 views

Digital Signature and private/public key

I am new to Bitcoin and Blockchain and I am writing a thesis for my university about this topic. I have a general question about digital signatures, which are needed to verify a transaction. As ...
1
vote
2answers
227 views

Bitcoin public keys from uncompressed to compressed version with code sample

Hi there I was looking for some code sample on compressing a bitcoin public keys from the curve secp256k1. Just for me to get a good grasp, I have seen code going from compressed to uncompressed, I'd ...
0
votes
1answer
44 views

What is the significance of the version byte in front of RIPEMD-160 hash?

Public Address is generated from the private key following some steps. Please refer Bitcoin wiki to see the process.
0
votes
1answer
117 views

python bitcoin public key to address code error

import hashlib b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def hex_open_key_to_hex_hesh160(hex_open_key): h160 = hashlib.new('ripemd160') h160.update(hashlib.sha256(('04'+...
0
votes
1answer
461 views

python-bitcoinlib | Create Private Keys, Public Keys and Addresses - How to Do It?

I'm trying to use the python-bitcoinlib library but its docs aren't entirely clear to me. I'm a programmer but quite new to Python, and not very versed in the Bitcoin protocol. What's the process, ...
1
vote
1answer
72 views

How is Recipient's Public Key Used When Receiving Coins (if at all)?

I understand the above image is dated--I posted here just for reference. Assume the first tx is for Alice (Owner 1) and the second is for Bob (Owner 2). My previous question (Confused About Hash In ...
2
votes
1answer
113 views

Why do we need public key as part of Witness in P2WPKH transactions?

As we want to minimize the data payload in a blockchain, which also led to concepts like SegWit, and is matter of discussion in Signature aggregation etc, I wonder why do we actually need to supply ...
3
votes
1answer
1k views

How to generate specific private keys from 12-word backup and wallet address?

A single seed can lead to billions of addresses. Some wallets are unable to scan and find all used addresses. Is it a way to infer the private key from 12-word backup and wallet ID / (public key). ...
0
votes
1answer
82 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 ...
3
votes
2answers
137 views

How do you know your public key from a private key?

In my understanding, when you create a public-private key pair, first, you create a pair of complementary keys by using cryptographic software. Then you give one key the name public key, and give the ...
0
votes
2answers
106 views

base58 cannot get 34 chars results (as Bitcoin address does) but 68 chars

I am trying to convert public key hex to Bitcoin address. From this website http://gobittest.appspot.com/Address, I can do some test. For example, I have this public key: ...
1
vote
3answers
184 views

Public key cryptography question - Is Private or Public key used to sign? Confusion between which key is used to sign and which is used to encrypt

I am relatively new to cryptography and blockchain and am learning about how public key cryptography works, and its application in Bitcoin's environment. I read two different articles , the 1st which ...
1
vote
1answer
80 views

Bitcoin RIPEMD160 purpose

Bitcoin uses RIPEMD160 on top of SHA256. Is its sole purpose to make public key address shorter or does it strengthen security in any way?
1
vote
1answer
105 views

What format is this scriptPubKey?

I'm running BitcoinUnlimited's giga_perf branch of bitcoin in regest mode, and I'm noticing a different format than P2PKH in the scriptPubKey when running listunspent over rpc. Typically I see ...
1
vote
1answer
733 views

How do HD wallets use mnemonic to recover all private keys?

As I understand, a wallet like BRD wallet can have many private keys and receiving addresses. When I give them the mnemonic, how do they re-generate all of the relevant private keys from that ...
0
votes
1answer
105 views

Basic Concept of Bitcoin (public and private) Keys

Can anyone please tell me the difference in the following Bitcoin terms? Difference between xpriv and xpub Difference between xpub and tpub. Difference between ypub and upub. Difference between ...
0
votes
1answer
83 views

Why do the biggest exchanges reuse Bitcoin addresses if doing so is unsafe?

It's generally accepted that using one address for multiple transactions is unsafe, because sending a transaction reveals your public key (whereas only the hash of your public key is required to ...
0
votes
2answers
1k views

how to get the whole balance of a privatekey or publickey BTC

As there are some bitcoin address types of one privatekey or publickey. I can get the balance of one address, but how can I get the whole balance of the privatekey or publickey. How can list all the ...
3
votes
1answer
449 views

SECP256K1 Minimum Value for Private Key

I've been looking into Elliptic Curve Cryptography, in particular the SECP256K1 spec which is used in Bitcoin and Ethereum. So I understand that the Generator point G is fixed based on the spec and ...
0
votes
3answers
62 views

How do I know the public key of the person I need to pay?

As per the answer to this question, we cannot retrieve the public key of a user.1)How does my wallet get the value (public key/public key hash) to which I need to make the payment?2)What is the harm ...
0
votes
2answers
67 views

Why is this script invalid, and how can I generate valid public key/digital signature pairs?

Why does the default P2PKH transaction at http://bitcoin-script-debugger.visvirial.com/ return NULL rather than true? I haven't tried to swallow the gory details of OP_CHECKSIG yet, but everything ...
0
votes
1answer
288 views

How can I create uncompressed public key in C++?

I need to derive public key from my private key in uncompressed form. I know how to create compressed one with libbitcoin, but I can't find appropriate method for uncompressed form there. Are there ...