21 votes
Accepted

Is any 256-bit combination a Bitcoin private key?

A secp256k1 private key is an integer between 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336, inclusive. The latter can be written as 2256 - ...
user avatar
10 votes
Accepted

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

My question is: Why cant you just uncompress the compressed public key (effectively making it an uncompressed public key) and then derive the address. That way even if you use the compressed key, ...
user avatar
5 votes

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

If you naively implement this G * G * G...* G method, you will have to perform an enormous number of operations until get your public key. For instance, if your public key is 2^128, you need to add G ...
user avatar
4 votes

Will taproot change public key generation?

No, Taproot does not change how private keys and their corresponding public keys are generated. The same secp256k1 curve is used, and public keys are still points on that curve. What Taproot changes ...
user avatar
  • 62.4k
4 votes
Accepted

How to protect my private key from an unexpected new owner of the address that already belongs to me?

The mitigation is the absolutely massive address space. Other than that, there is no way to 'protect' or otherwise 'claim' a keypair/address as yours and yours alone. If someone (by some unfathomable ...
user avatar
  • 17.4k
4 votes

Does someone know how to recovery a private key

After some health problem I have lost the private key but I still have the password. If you don't have the wallet file, the password is useless, as the password only encrypts the file. If you don't ...
user avatar
3 votes

I have reinstalled my PC and lost BitcoinCore, still have the Private Key, can i get my Wallet back?

Yes, just make a new wallet in BitcoinCore and import your private key using importprivkey <your key here> in the console (Window -> Console, if you are using the GUI). You may have to ...
user avatar
  • 152
3 votes

What is the relationship between a Bitcoin Private Key / Public Key / Address?

What is the relationship between a Bitcoin Private Key / Public Key / Address? The Public Key (a curve point) is equal to the Generator (a fixed curve point) multiplied by the Private Key (an integer)...
user avatar
  • 278
3 votes
Accepted

Is it possible to you convert privkey to BIP39 mnemonic (or entropy)?

So far as I know this isn't possible. The mnemonic phrase is hashed to get a seed number. Hashing algorithms are one-way algorithms. See BIP39 To create a binary seed from the mnemonic, we use the ...
user avatar
3 votes
Accepted

is bitcoin keyspace flawed?

This is a property of elliptic curves. It is expected, and does not meaningfully impact security. Points on an elliptic curve have an X and Y coordinate. In the case of secp256k1, these coordinates ...
user avatar
3 votes
Accepted

Private keys for mainnet vs testnet

Yes. A valid private key can be used either on testnet and mainnet. But key reuse is never a good thing, even within the same chain. Just use two different wallets, it's free!
user avatar
3 votes
Accepted

Bitcoin private key, key range calculation?

is there a way to calculate private key range of the address No. Addresses of the most popular type of locking scripts are a hash of a public key. Hashes are designed to produce values that give no ...
user avatar
3 votes

Where is the private key stored. Also, how is a seed-phrase one's private key?

Note that the questions should be about bitcoin, and therefore, so are the answers. Any other cryptocurrency MetaMask supports might not have the same procedure for generating private keys. Also, this ...
user avatar
  • 116
3 votes

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

Sounds like a complicated way to lose money. Since most output types are based on hashes, it's likely that a sender would not be able to tell that your public key is not on secp256k1. Your transaction ...
user avatar
  • 64.5k
3 votes
Accepted

How secure are the private keys on a hardware wallet?

Is my understanding correct that even when connected to a computer with an internet connection the private keys are unaccessible and the only thing that can be seen is a signature/signed transaction? (...
user avatar
2 votes
Accepted

Why MakeNewKey in key.cpp isn't called when getnewaddress or generate

Since Bitcoin Core 0.13, the wallet uses deterministic key derivation. That means that the wallet stores a single seed, and uses that to derive keys whenever needed. See BIP32 for details. This has ...
user avatar
2 votes

Signature doesn't prove that the owner of a Private Key produced a given message

If you properly create the public key and address, there is no chance that the signature created from the private key will fail. This was true before BIP32 and BIP39. It remains true.
user avatar
2 votes

bitcoin private key usage

The usage is a digital signature. It is a form a cryptography, but it is distinct from encryption. In fact, nowhere in Bitcoin's protocol does any form of encryption get used. A digital signature, ...
user avatar
2 votes

how target walled address is secure to save received amount?

If I understand the scenario you're describing, you are effectively constructing an independent, second transaction that also pays the receiver, but using your own funds rather than the original ...
user avatar
2 votes

Can I be rewarded for discovering, creating, and proving bugs on Bitcoin?

Yes, finding bugs in Bitcoin would be valuable. However this doesn't seem to be one. What's shown here is a series of supposed "signatures". However, a cryptographic signature is only ...
user avatar
  • 64.5k
2 votes
Accepted

Does inserting a passphrase also changes the private key of a wallet.dat file

When encrypting a wallet, the wallet will generate new keys. If you transfer to those keys, the old, unencrypted backup will not be able to spend the funds. Only the encrypted wallet will have the ...
user avatar
  • 11.4k
2 votes

How to generate private/public key pairs in c++ using openssl

Usually you'd just pass around the EVP_PKEY structure to other OpenSSL calls. To put the secret into memory, you can use char* secret_key; BIO* bio_priv = BIO_new(BIO_s_mem()); ...
user avatar
  • 11.4k
2 votes

As a developer, what steps do I need to take to generate private-public keys?

This is written in swift, it's open source and you can check out the source code to get an idea of what's happening: https://github.com/BlockchainCommons/GordianSeedTool-iOS But as I'm coming to ...
user avatar
2 votes

How can I verify that a system is generating legit Private Key and Native SegWit address pairs?

You could try to import the private keys that the Javascript function gives you into wallet software like Electrum, then check that the associated payment address shows up on the 'Addresses' tab. You ...
user avatar
  • 2,002
2 votes

Bitcoin Base 58 wif format Private Key recovery Front 5 character are missing

A private key in WIF format has a checksum of 4 bytes, and with that checksum you can check every possible key for a valid checksum. I made a program do recover missing characters in a private key. ...
user avatar
  • 237
2 votes
Accepted

Is passphrase (the 25th word) using open source algorithms? Can I recover the passphrase on any hardware wallets?

Most wallets use the same algorithm, as it is an open standard, BIP-39. A notable exception is Electrum, which uses a similar, but slightly different mechanism. This is publicly documented and can be ...
user avatar
  • 3,239
2 votes
Accepted

Can hot wallets be secure?

The problem here is not cryptography, but the number of attack vectors. To tackle the first point, cryptography: It doesn't matter if you use the most sophisticated seed generation process if someone ...
user avatar
2 votes

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

in the second method the child key which we would previously in the first method consider as PRIVATE, here we consider as PUBLIC key - it just seems as we just give the resulting left-256 bits ...
user avatar
  • 62.4k
2 votes

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

TL;DR: hot / cold wallets refers to whether or not the private keys are on Internet-connected systems or not. I think this is closest to your misconception: A wallet address is a public key. While a ...
user avatar
2 votes

How do crypto exchanges create wallet for their customers?

but in this case the wallet's password( I think it's called private key) Passwords and private keys are two very different things. In the case of interacting with an online exchange service, your ...
user avatar
  • 17.4k

Only top scored, non community-wiki answers of a minimum length are eligible