Funds on Bitcoin aren’t essentially locked by a single key.
Every output on the bitcoin blockchain is locked by a Bitcoin Script. To spend an output, it’s a must to present the right inputs to the locking script, such that the analysis is profitable (and meets different consensus necessities).
Normal addresses, whether or not P2PKH, P2WPKH-P2SH, or P2WPKH, require a legitimate signature from a pre-selected personal key.
To show you can spend such an output, it suffices to show you can produce signatures from that non-public key – this may be completed by signing a message, or spending an output (within the occasion that a number of outputs can be found for a similar locking script, spending a single output suffices as proof).
Nevertheless, there will be other forms of locking scripts – multi-signature scripts require M of N
keys to signal, which in flip would require you to show that you just management no less than M of the N keys listed within the locking script.
There are other forms of scripts, comparable to timelocks or hashing puzzles, which might require ready till a pre-determined block top or time, or offering the pre-image to a selected hash. For these circumstances, you would want to show your potential to attend, or information of the pre-image (which can be troublesome to attain with out sharing the pre-image itself).
Extra advanced scripts (primarily, any situation that may be represented as a collection of Bitcoin Script operations), will be created – with Taproot, you could possibly have a number of branches that enable unlocking of the property beneath completely different situations – proving management of these funds could be script particular.
When sharing such proofs, try to be cautious – proofs not certain by a signature or an identical worth could by accident reveal all required info to unlock an output – as an illustration, a script that solely requires a pre-image for a selected hash, will likely be spendable by anybody who is aware of that pre-image. Thus, sharing that with a third-party, even outdoors of a transaction, could lead to funds being misplaced.