Bitcoin Forum
October 07, 2024, 12:17:28 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 226 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: 7348


Decentralization Maximalist


View Profile
October 06, 2024, 08:38:10 PM
 #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
Today at 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
Today at 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
Today at 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.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!