Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership proofs – message signing and verification #1462

Open
windsok opened this issue Feb 2, 2023 · 9 comments
Open

Ownership proofs – message signing and verification #1462

windsok opened this issue Feb 2, 2023 · 9 comments

Comments

@windsok
Copy link
Contributor

windsok commented Feb 2, 2023

Provide a way to sign a message to prove ownership of an inscription

eg:
ord wallet sign <inscription id> <some text message>

Produces a signature for the the text message which can be verified by anyone else using

ord wallet verify <inscription id> <some text message> <signature text>

https://github.com/rust-bitcoin/rust-bitcoin/blob/master/bitcoin/src/sign_message.rs

@casey
Copy link
Collaborator

casey commented Feb 2, 2023

This is reasonable, and I think the suggested command CLI is good. I would suggest it be:

ord wallet sign <inscription id> TEXT_FILE

So you can't mix up the args. One thing that is hard: If an inscription moves after a signature is produced, you need to know its historical locations in order to verify it.

@windsok
Copy link
Contributor Author

windsok commented Feb 2, 2023

Ah interesting, I think I understand - because the inscription id is the genesis transaction id, but we actually want to be signing and verifying for the pubkey of the current location.

I guess this means that when we run ord wallet verify ord should be checking if the signature is not only valid, but valid for the current location that the inscription exists at

@casey
Copy link
Collaborator

casey commented Feb 2, 2023

Ah interesting, I think I understand - because the inscription id is the genesis transaction id, but we actually want to be signing and verifying for the pubkey of the current location.

I think we want to see if the signature is valid for any previous location, and print how many transfers back it was. That way, old signatures that verified earlier won't be rendered invalid, ord wallet verify will just print if htey're current, or they were multiple hops back.

We can do it in two steps:

  • PR 1: Verify for current location
  • PR 2: Verify for previous locations, and indicate how many hops back it was

@casey casey changed the title Easy way to prove ownership of an inscription (message signing and verification) Ownership proofs – message signing and verification Feb 6, 2023
@casey
Copy link
Collaborator

casey commented Feb 8, 2023

If we could use https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki, that would be the dream. If that's too long-term, we should definitely make an issue so we remember. @kallewoof do you happen to know if there is a rust implementation of BIP-322? The issue is that we want to sign to prove ownership of inscriptions, but the wallet is taproot only, so we can't use Bitcoin's existing signed message format.

@wagmiwiz
Copy link

wagmiwiz commented Feb 9, 2023

Given that BIP322 could take a while then I wonder if a temporary workaround to prove ownership is to move some amount of cardinal sats out of the same address as the inscription? I imagine there is a blocker though on ord supporting safe cardinal sends.

So something like:

  1. Alice: prove you own address X by sending this unique cardinal sat amount Y out of that address
  2. Bob: ord wallet getaddress <inscription id> then ord wallet sendcardinal <amount> <from address> <optional to address> (if to address is not supplied it goes back to your wallet)

In theory you would only have to do this once for any centralised service that tracks ownerhips (like say https://vulcan.xyz/)

@4N1S
Copy link

4N1S commented Feb 15, 2023

this could especially be used to create DAO via the possession of ordinals in its wallet! what it would be necessary is to be able to sign by proving the property of the satoshi in its wallet; It should thus be also envisaged to be able to sign for several ordinal

@windsok
Copy link
Contributor Author

windsok commented Feb 15, 2023

Bitcoin Core BIP-322 implementation PR - bitcoin/bitcoin#24058

@nammaki
Copy link

nammaki commented Mar 23, 2023

This is so needed 🙏

@utxo-detective
Copy link

I created a draft PR to start the work on this - I still need to write some tests for this. I dont think it's 100% right as it was giving me some weird results when i was using it locally, like giving a success on invalid signatures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants