Bitcoin Forum
October 08, 2024, 02:17:14 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Is It Possible to "Reserve" a Private Key?  (Read 302 times)
johndebord (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 06, 2024, 08:29:50 PM
 #21

I appreciate the insights and suggestions provided, especially regarding the process of signing messages to prove ownership of a private key. To further clarify, I'm working on a concept where proving the initial ownership of a private key is central to the protocol.

From my understanding, signing a message and including it on the blockchain is one of the simplest ways to demonstrate control over a private key. However, this raises an interesting question: in the event of a private key collision, where two different users independently generate the same private key and sign messages with it in the same block, wouldn’t that create a conflict? It seems like a situation analogous to a "double spend" or a "double reserve" of the same key. Both parties could claim ownership at the same time in the same block.

To mitigate this, I’m considering an alternative approach: instead of relying solely on signatures, what if ownership was demonstrated by allocating a minimal amount of Bitcoin (e.g., 1 satoshi) to the address derived from the private key? This would tie the private key to an on-chain transaction, with the balance of the associated address acting as proof of ownership. The protocol could then verify ownership by checking whether the address has a balance of 1 at the time of the claim or reservation.

Would this method be effective in preventing collisions or conflicts? And within the Bitcoin protocol, could this be scripted in a way that ensures compatibility with its existing framework? Or is there a better way?
d5000
Legendary
*
Offline Offline

Activity: 4060
Merit: 7359


Decentralization Maximalist


View Profile
October 06, 2024, 08:38:10 PM
Merited by pooya87 (4)
 #22

[...] in the event of a private key collision, where two different users independently generate the same private key and sign messages with it in the same block, wouldn’t that create a conflict? It seems like a situation analogous to a "double spend" or a "double reserve" of the same key. Both parties could claim ownership at the same time in the same block.
Thanks for giving some insights about your use case. I had previously written another answer (about inheritance and similar constructs) but I think this no longer applies after your answer. (Edit: Basically I was about to recommend you this Locktime-based protocol).

There's however imo a misunderstanding on your part. If "private key collisions" were a problem for Bitcoin, then Bitcoin would be completely broken. Thus, your "proof of ownership" approach is not necessary. The probability of a private key collision is so low that it's almost impossible for it to happen (as long as two users don't use a flawed randomness source for example).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
khaled0111
Legendary
*
Offline Offline

Activity: 2674
Merit: 3016


Top Crypto Casino


View Profile WWW
October 06, 2024, 09:11:12 PM
 #23

However, this raises an interesting question: in the event of a private key collision, where two different users independently generate the same private key and sign messages with it in the same block, wouldn’t that create a conflict? It seems like a situation analogous to a "double spend" or a "double reserve" of the same key. Both parties could claim ownership at the same time in the same block.
If you use a reliable and secure script to generate the private keys (any of the reputable wallets will do) then you haven’t to worry about private key collision. The chances that such script will generate the same private key more than oce are astronomically small.In your case, the odds are even lower since the identical private keys need to be generated in a short period of time so that the signed messages get included in the same block.

Sending a specific amount as a proof of ownership is way more insecure than signing a message.

vjudeu
Copper Member
Legendary
*
Offline Offline

Activity: 865
Merit: 2103



View Profile
October 06, 2024, 09:23:13 PM
 #24

Quote
Is there a way to maintain ownership of a private key even when you intend to reveal it to someone else?
Yes, it is called "Proof of Work". For example: https://mempool.space/testnet4/address/tb1qzsjnew5qcn75e4cqdsc6r9v8fjy5ensancqmv2l2n82p0q5f5tls758l9d

Then, even if everyone knows the private key, and even if it is always revealed, the destination is still protected by the Proof of Work. Which means, that everyone else would also need to repeat the signature grinding, to move those coins somewhere else, and to create any kind of double spend.

Also, this is the reason, why miners' coins are safe in the first place. They create a coinbase transaction, where they "reserve" some funds. And then, they broadcast the whole block to the whole network. But: for the next 100 blocks, nobody can touch those coins, as they have to reach maturity, and be confirmed by other miners (you can use OP_CHECKLOCKTIMEVERIFY or OP_CHECKSEQUENCEVERIFY, if you need it).

Quote
in the event of a private key collision, where two different users independently generate the same private key and sign messages with it in the same block, wouldn’t that create a conflict?
This was solved in the past by first-seen-safe rule, and now is handled by full-RBF. Currently, blocks are always handled as first-seen-safe (so you need to create at least two blocks, to reorg a single block), while transactions are just included, based on their fees (the highest fee is confirmed, everything else should stay unconfirmed).

Quote
what if ownership was demonstrated by allocating a minimal amount of Bitcoin (e.g., 1 satoshi) to the address derived from the private key?
Then, you can have more than one transaction in the same block, sending coins to the same address. And even if you consider the first occurrence, then still, it doesn't mean, that it was the earliest attempt. The only bulletproof solution is Proof of Work, where hashrate majority decides, what happened first. And if you need that kind of protection, then you can just require a signature, below a given size, which will force your users to grind it (and the biggest hashrate will win).

Also, you don't have to put everything on-chain, you can just commit a batched version every sometimes. Because sending one satoshi is below the dust limit, and you will quickly run out of coins, if you would try to launch all of that on mainnet. I guess the best way is to try it on some testnet first.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
johndebord (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 07, 2024, 12:36:15 AM
 #25

Thank you for the insightful responses. I’ll be looking into everything that’s been mentioned here. One point I’d like to clarify, though, is that in the protocol I’m working on, private key collisions are expected to be a regular occurrence. I understand this might seem unconventional.
JiiBs
Full Member
***
Offline Offline

Activity: 246
Merit: 113


View Profile
October 07, 2024, 05:09:03 AM
 #26

Thank you for the insightful responses. I’ll be looking into everything that’s been mentioned here. One point I’d like to clarify, though, is that in the protocol I’m working on, private key collisions are expected to be a regular occurrence. I understand this might seem unconventional.
Private key collision,
That’s something unheard of but again, you say it’s the protocol your working on.

What might be the reasons why you think this possible or would be?
Could it be an expectation that you feel there would be a running out of possible combinations?

It is unconventional as you say!
FatFork
Legendary
*
Offline Offline

Activity: 1750
Merit: 2650


Crypto Swap Exchange


View Profile WWW
October 07, 2024, 08:26:15 AM
 #27

Thank you for the insightful responses. I’ll be looking into everything that’s been mentioned here. One point I’d like to clarify, though, is that in the protocol I’m working on, private key collisions are expected to be a regular occurrence. I understand this might seem unconventional.

In that case, the simplest way I can think of is to maintain a centralized database of all already generated private keys. This would allow you to check for collisions before assigning a new key, similar to how web applications verify the uniqueness of usernames or email addresses. However, this approach has its drawbacks. Even with encryption and security measures in place, there's always a risk of data breaches or unauthorized access.

Decentralized protocols like Bitcoin and Tor have successfully addressed this issue by eliminating the need for a central authority. They employ cryptographic techniques that make it virtually impossible for two private keys to collide, even with a massive number of keys in circulation. The probability of a collision is so low that it's considered negligible.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
d5000
Legendary
*
Offline Offline

Activity: 4060
Merit: 7359


Decentralization Maximalist


View Profile
October 07, 2024, 06:30:19 PM
 #28

One point I’d like to clarify, though, is that in the protocol I’m working on, private key collisions are expected to be a regular occurrence. I understand this might seem unconventional.
We'd really need some more info to be able to help Smiley

Is it perhaps some kind of gambling application, where you purposefully use low-quality randomness and your risk is that some other party is colliding with yours? That's the only thing I can imagine where private key collisions could be useful in some way ...

In this case, maybe the answer I wrote originally yesterday would be perhaps useful.

The idea is that simply you add another "item" or "piece of information" the original creator of a private key must know to move funds. This can be another key - we'd be talking about a multisig address in this case - but also an arbitrary secret you use for a hashlock. If all funds are sent -- instead of the P2(W)PKH address corresponding to the private key -- to a P2(W)SH address which represents the contract with the hashlock, or a multisig address requiring an additional key, then the funds can only be moved by the original owner.

To go more into detail or for alternative approaches I'd need more info about the protocol. If you don't want to reveal the character of the protocol, it's already useful if you answer just the following two questions:

1) what's the purpose that an user sometimes reveals the private key to others, instead of simply signing a message with it to prove ownership?
2) why do you allow private key collisions - i.e. use a low quality randomness source?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
odolvlobo
Legendary
*
Offline Offline

Activity: 4466
Merit: 3391



View Profile
Today at 03:00:47 AM
 #29

Thank you for the insightful responses. I’ll be looking into everything that’s been mentioned here. One point I’d like to clarify, though, is that in the protocol I’m working on, private key collisions are expected to be a regular occurrence. I understand this might seem unconventional.

In general, if you "expect" private keys to collide, then they are not secure because the space would be small enough for an attacker to successfully guess keys.

You need a second private key that can't collide and would be used to determine the owner in case of a collision. Or how about 2-of-2 multisig?

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
hd49728
Legendary
*
Offline Offline

Activity: 2240
Merit: 1095



View Profile
Today at 03:45:28 AM
 #30

Is it possible to "reserve" a private key? In other words, can someone select a private key and perform an action (such as creating a specific transaction or something else) that effectively claims or reserves that key?
You don't need to find an atom in the universe and reserve it.

Reserving a Bitcoin private key and its public address can be considered as not good practice for your privacy too. If you leave your public address publicly somewhere, you should abandon that address when you feel a need of securing your privacy and anonymity better.

Bitcoin private keys
Quote
The size of Bitcoin’s private key space (2256) is an unfathomably large number. It is approximately 1077 in decimal. For comparison, the visible universe is estimated to contain 1080 atoms.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
pooya87
Legendary
*
Offline Offline

Activity: 3598
Merit: 10925



View Profile
Today at 08:43:51 AM
 #31

From my understanding, signing a message and including it on the blockchain is one of the simplest ways to demonstrate control over a private key.
That is like a "double proof" because you can just spend coins from that address and the signature you produce in that transaction is just like the signature you'd use when signing a message. There is no need to sign a message and inject that into your tx.

FatFork
Legendary
*
Offline Offline

Activity: 1750
Merit: 2650


Crypto Swap Exchange


View Profile WWW
Today at 11:35:17 AM
 #32

From my understanding, signing a message and including it on the blockchain is one of the simplest ways to demonstrate control over a private key.
That is like a "double proof" because you can just spend coins from that address and the signature you produce in that transaction is just like the signature you'd use when signing a message. There is no need to sign a message and inject that into your tx.

Yes, its like "double proof". But, if you don't add some arbitrary data to your transaction, anyone could later claim to have made that transaction (using the same private key).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!