Bitcoin Forum
April 25, 2024, 01:56:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Feature request : signing a text with a wallet key  (Read 7386 times)
grondilu (OP)
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
December 20, 2010, 07:28:03 AM
 #1


I'd like to be able to use one of my wallet keys to sign an ASCII text.

syntax of the command would be :

Code:
$ bitcoind signwithaddress BITCOIN_ADRESS < somefile > somefile.asc
$ bitcoind verifysignature < somefile.asc
correct signature done on DATE by address BITCOIN_ADRESS
Message was :
....

somefile.asc could be written in a form such as :

---- BEGIN ECDSA SIGNED MESSAGE ----
...
---- END ECDSA SIGNED MESSAGE ----

Or something like that.

1714010181
Hero Member
*
Offline Offline

Posts: 1714010181

View Profile Personal Message (Offline)

Ignore
1714010181
Reply with quote  #2

1714010181
Report to moderator
1714010181
Hero Member
*
Offline Offline

Posts: 1714010181

View Profile Personal Message (Offline)

Ignore
1714010181
Reply with quote  #2

1714010181
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714010181
Hero Member
*
Offline Offline

Posts: 1714010181

View Profile Personal Message (Offline)

Ignore
1714010181
Reply with quote  #2

1714010181
Report to moderator
1714010181
Hero Member
*
Offline Offline

Posts: 1714010181

View Profile Personal Message (Offline)

Ignore
1714010181
Reply with quote  #2

1714010181
Report to moderator
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 20, 2010, 10:21:39 AM
 #2

This would be nice.

Actually it would be even nicer if we could treat our wallet.dat file as a generic keystore, importing and exporting keys.
This would allow merging and splitting of wallets as well, besides signatures as suggested above.
grondilu (OP)
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
December 20, 2010, 10:33:36 AM
 #3

Actually it would be even nicer if we could treat our wallet.dat file as a generic keystore, importing and exporting keys.
This would allow merging and splitting of wallets as well, besides signatures as suggested above.

+1

gene
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
December 20, 2010, 12:02:47 PM
 #4

This violates the "one job and do it well" philosophy. There already exist established standards for cryptographic signatures.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
grondilu (OP)
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
December 20, 2010, 12:14:08 PM
 #5

This violates the "one job and do it well" philosophy. There already exist established standards for cryptographic signatures.

Ok then someone tells me how I can :

- extract an ECDSA private key from a wallet file ;
- use this key to sign data ;
- verify data signed this way ;

gene
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
December 20, 2010, 12:20:05 PM
 #6

This violates the "one job and do it well" philosophy. There already exist established standards for cryptographic signatures.

Ok then someone tells me how I can :

- extract an ECDSA private key from a wallet file ;
- use this key to sign data ;
- verify data signed this way ;


My point is that bitcoin is a currency. It shouldn't be in the business of general-use public key crypto. If you want to sign data, something like gpg would do a better job. You can already associate a gpg key to an account. I think it would be best to avoid encumbering bitcoin with redundant functionality. We should be mindful that with features come code. Code which must be written, debugged, maintained... and code which may potentially be exploited. The slimmer bitcoin remains, the better.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
grondilu (OP)
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
December 20, 2010, 12:28:14 PM
Last edit: December 20, 2010, 02:55:25 PM by grondilu
 #7

We should be mindful that with features come code. Code which must be written, debugged, maintained... and code which may potentially be exploited. The slimmer bitcoin remains, the better.

Well, I guess you're right.

davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
December 20, 2010, 12:30:35 PM
 #8

This violates the "one job and do it well" philosophy. There already exist established standards for cryptographic signatures.

That's a unix principle, not a bitcoin one.

I like this feature, it's not overloading the protocol in any way and I can see a bunch of potential uses.

Opened a git issue : https://github.com/bitcoin/bitcoin/issues/issue/6

gene
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
December 20, 2010, 12:39:37 PM
 #9

This violates the "one job and do it well" philosophy. There already exist established standards for cryptographic signatures.

That's a unix principle, not a bitcoin one.

I like this feature, it's not overloading the protocol in any way and I can see a bunch of potential uses.

Opened a git issue : https://github.com/bitcoin/bitcoin/issues/issue/6

It all depends on what you want bitcoin to be. If you wish for it to become a monolithic application which can perform arbitrary cryptographic functions, by all means, go for it. I think this would be exactly the wrong way to go. I want bitcoin to succeed as a currency. The slimmer the standard and codebase, the easier it is to develop portable implementations and improve chances for adoption. Really, how hard is it to associate a pgp key to an account?

Security is also of paramount importance for bitcoin, and you can't exploit code that doesn't exist.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 20, 2010, 12:40:56 PM
 #10

My point is that bitcoin is a currency. It shouldn't be in the business of general-use public key crypto.

Signing with a bitcoin private key provides proof of ownership. This may have many use cases. It's a good feature.

Also, being able to split/merge wallets is interesting too. Today maybe not much, since transfers are free. But they won't remain free forever, and even today, each transfer does imply in a small cost to the entire network. Merging/splitting wallets would be a way to move money around without using the chain. It's also a good feature to have.

You can already associate a gpg key to an account.

Can you? I don't know how... I thought the account feature wasn't even public... can anyone knows how much I own on account X just by checking the block chain?
How do I create a key related to this account and use it to sign something, proving that I am the owner of such amount?
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 20, 2010, 12:47:11 PM
 #11

It all depends on what you want bitcoin to be. If you wish for it to become a monolithic application which can perform arbitrary cryptographic functions, by all means, go for it.

It doesn't need to be monolithic. The code that manages the wallet doesn't have to be the same that interacts to the network. They'd better not be, imho.

The wallet is a specific type of keystore. As a keystore, it would be nice to be able to import/export keys, and actually using them.

For example, another use case would be to encrypt some message for the owner of address X only. It could be encrypted using the public key of such address. The receiver must be able to retrieve the corresponding private key and use it to decrypt the message.
gene
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
December 20, 2010, 12:48:44 PM
 #12

My point is that bitcoin is a currency. It shouldn't be in the business of general-use public key crypto.

Signing with a bitcoin private key provides proof of ownership. This may have many use cases. It's a good feature.
Proof of ownership of an account number? Or of funds in an account? Proof of ownership of an account number can be done with pgp.

Quote
Also, being able to split/merge wallets is interesting too. Today maybe not much, since transfers are free. But they won't remain free forever, and even today, each transfer does imply in a small cost to the entire network. Merging/splitting wallets would be a way to move money around without using the chain. It's also a good feature to have.
Perhaps, but I see this as an issue separate from signatures.

Quote
You can already associate a gpg key to an account.

Can you? I don't know how... I thought the account feature wasn't even public... can anyone knows how much I own on account X just by checking the block chain?
How do I create a key related to this account and use it to sign something, proving that I am the owner of such amount?
You can associate a public key to an arbitrary identity, not just a name or email address. Gpg allows this. If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
December 20, 2010, 01:01:53 PM
 #13

Proof of ownership of an account number? Or of funds in an account? Proof of ownership of an account number can be done with pgp.
Proof of ownership of the actual funds.

Quote
Quote
Can you? I don't know how... I thought the account feature wasn't even public... can anyone knows how much I own on account X just by checking the block chain?
How do I create a key related to this account and use it to sign something, proving that I am the owner of such amount?
You can associate a public key to an arbitrary identity, not just a name or email address. Gpg allows this. If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.
You can't associate a key with an account. They're managed internally by the client.

Point is you can prove ownership of funds by signing arbitrary data with a private key, so I see this feature as very useful.

caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 20, 2010, 01:08:53 PM
 #14

Proof of ownership of an account number? Or of funds in an account? Proof of ownership of an account number can be done with pgp.

I meant the funds. But even the account number, how do you prove it's yours? The account numbers go to the chain somehow?

Quote
Also, being able to split/merge wallets is interesting too. Today maybe not much, since transfers are free. But they won't remain free forever, and even today, each transfer does imply in a small cost to the entire network. Merging/splitting wallets would be a way to move money around without using the chain. It's also a good feature to have.
Perhaps, but I see this as an issue separate from signatures.

Well, if you can export keys, you can sign with them using an external tool at least.

You can associate a public key to an arbitrary identity, not just a name or email address. Gpg allows this.

As far as I understand, the link "gpg key" => "arbitrary identity" is possible, since proof of gpg key ownership is possible though signature.
But "arbitrary identity" => "gpg key" I can't see how, since there's no generic way to prove ownership of an arbitrary identity.

Like, I can create a GPG key and link it to your name. But that isn't my name. See what I mean?

If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.

You just sign something with the same private key that owns the coins and that's it, you prove you own such coins. The other party just need to check the block chain to confirm.
gene
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
December 20, 2010, 01:51:43 PM
 #15

Proof of ownership of an account number? Or of funds in an account? Proof of ownership of an account number can be done with pgp.
Proof of ownership of the actual funds.
Interesting. To what ends? What good is the proof after the proof has been generated?

Quote
Quote
Quote
Can you? I don't know how... I thought the account feature wasn't even public... can anyone knows how much I own on account X just by checking the block chain?
How do I create a key related to this account and use it to sign something, proving that I am the owner of such amount?
You can associate a public key to an arbitrary identity, not just a name or email address. Gpg allows this. If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.
You can't associate a key with an account. They're managed internally by the client.

What about this?
Code:
$ gpg -k yourbitcoinaddresshere
pub   1024D/deadb33f 2010-01-11 [expires: never]
uid                  yourbitcoinaddresshere
sub   2048g/beefd34d 2010-01-11 [expires: never]

Quote
Point is you can prove ownership of funds by signing arbitrary data with a private key, so I see this feature as very useful.
You can prove ownership of funds at the time you make a signature? What good does that do you after the time of signature?

===
Proof of ownership of an account number? Or of funds in an account? Proof of ownership of an account number can be done with pgp.

I meant the funds. But even the account number, how do you prove it's yours? The account numbers go to the chain somehow?
That's where trust comes in. The old PKI/WOT issue.

Quote
Quote
Also, being able to split/merge wallets is interesting too. Today maybe not much, since transfers are free. But they won't remain free forever, and even today, each transfer does imply in a small cost to the entire network. Merging/splitting wallets would be a way to move money around without using the chain. It's also a good feature to have.
Perhaps, but I see this as an issue separate from signatures.

Well, if you can export keys, you can sign with them using an external tool at least.

You can associate a public key to an arbitrary identity, not just a name or email address. Gpg allows this.

As far as I understand, the link "gpg key" => "arbitrary identity" is possible, since proof of gpg key ownership is possible though signature.
But "arbitrary identity" => "gpg key" I can't see how, since there's no generic way to prove ownership of an arbitrary identity.

Like, I can create a GPG key and link it to your name. But that isn't my name. See what I mean?
See above.

Quote
If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.

You just sign something with the same private key that owns the coins and that's it, you prove you own such coins. The other party just need to check the block chain to confirm.
Maybe I am overlooking something critical. What is the point of telling somebody how much money you have at some instant, when at any subsequent time, the proof is no longer valid?

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 20, 2010, 02:00:14 PM
 #16

That's where trust comes in. The old PKI/WOT issue.

If you depend on trust you're not proving anything. Normally proofs are asked exactly when there isn't enough confidence.

Maybe I am overlooking something critical. What is the point of telling somebody how much money you have at some instant, when at any subsequent time, the proof is no longer valid?

The proof is valid while the funds remain in the same address. They may remain there for a long time.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
December 20, 2010, 02:07:46 PM
Last edit: December 20, 2010, 03:10:00 PM by gavinandresen
 #17

I like this feature request; I think it will enable even more interesting uses of bitcoin.  I created a feature request at github for it.

Example:  a store that accepts bitcoins could verify that a customer sending in a question about some transaction actually IS the same person who sent them the bitcoins, by asking the customer to sign their message using one of the same bitcoin addresses they used to sign the coins.

If the "store" is a privacy-focused VPS provider and the question is "Hey, I lost the root password to the virtual server, could you generate a new one and encrypt it with this gpg public key", then tying that message to a bitcoin transactions is extremely useful.

How often do you get the chance to work on a potentially world-changing project?
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
December 20, 2010, 02:10:32 PM
 #18

Interesting. To what ends? What good is the proof after the proof has been generated?
It's still good and can be re-checked at any time against the block chain data.

What about this?
Code:
$ gpg -k yourbitcoinaddresshere
pub   1024D/deadb33f 2010-01-11 [expires: never]
uid                  yourbitcoinaddresshere
sub   2048g/beefd34d 2010-01-11 [expires: never]

Quote
Point is you can prove ownership of funds by signing arbitrary data with a private key, so I see this feature as very useful.
You can prove ownership of funds at the time you make a signature? What good does that do you after the time of signature?
That's basically what's being discussed here, being able to use the bitcoin wallet as a keystore, which it ultimately is.
Also, as stated earlier, signatures prove you own the private key that matches an address, an address balance can be checked at any time.

That's where trust comes in. The old PKI/WOT issue.
No trust is involved, at any point.

Well, if you can export keys, you can sign with them using an external tool at least.
The point is not to sign the keys, but sign using the keys.

See above.
That is pretty much what is being requested as a feature.

If you want to prove you hold certain funds in an account, I am not sure how extending bitcoin to perform cryptographic signatures can help.
Performing the signatures or exporting the keys pretty much solve the problem of easily proving ownership of funds.
I would like to see the signature part in the main client, it does not add overhead to the protoco/blockchainl *at all* and can be forked and patched by you if you disagree with the consensus that seems to emerge.

Maybe I am overlooking something critical. What is the point of telling somebody how much money you have at some instant, when at any subsequent time, the proof is no longer valid?
You are overlooking lots of things and you should probably spend some time reading about how bitcoin works.

Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
December 20, 2010, 02:13:37 PM
 #19

Oh, and RE: extracting private keys from the wallet:

I'm less excited about that idea.  What if the private keys are stored in a tamper-proof "trusted security module" hardware doo-hickey, and are impossible to export?

How often do you get the chance to work on a potentially world-changing project?
grondilu (OP)
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
December 20, 2010, 02:42:04 PM
 #20


Gosh I've just noticed that this thread has gone long.

I haven't read everything, but I'd like to explain why I wanted this feature.

I am writing a CGI script for my private stockholdings brokerage system.

To that end, instead of using passwords, I wanted to use private keys.  So naturally I was planning to use GnuPG.  But during writing, I realised at some point the owner should send a bitcoin address where to receive dividends.  It seemed to me that I was using two keys pairs (a GnuPG one, and a ECDSA one), in order to identify the same person.  Since only ECDSA is really necessary (dividends have to go somewhere in the end), I realised that it might be better to identify owner with this pair.  It would also be better for confidentiallity (since most GnuPG keys use real names).

Pages: [1] 2 3 »  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!