BitcoinTalk

Suggestion: Allow short messages to be sent together with bitcoins ?

BitcoinTalk
#1
From:
ShadowOfHarbringer
Subject:
Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
Bitcoin is great, but it misses one thing that usual bank transfers have: payment title.

Perhaps it should be possible to include short (<=512 bytes) message for each transaction.
The message could be encrypted with public/private keys so only the receiver can see its contents.

What do You think ?

PS.
I might be wrong, but the messages could also be used to increase randomness of hashing process by the way, couldn't they ? If not, never mind.
BitcoinTalk
#2
From:
grondilu
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
Bitcoin is great, but it misses one thing that usual bank transfers have: payment title.

Perhaps it should be possible to include short (<=512 bytes) message for each transaction.
The message could be encrypted with public/private keys so only the receiver can see its contents.

What do You think ?

I red somewhere that the kind of keys used in the software supports signature, but not encryption.

Since it is very easy to create a new bitcoin address for each transaction, a paiement label is not necessary.  Just use the bitcoin address as a reference for your message, and transmit it via email or any other way of communication.
BitcoinTalk
#3
From:
ShadowOfHarbringer
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
a paiement label is not necessary.

Sure it is "not necessary" but still would be useful for people.

Perhaps some people would like to keep one BTC address for some reasons.
Also bigger financial institutions won't really like the idea of different account number for each transation.

BitcoinTalk
#4
From:
grondilu
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
a paiement label is not necessary.

Sure it is "not necessary" but still would be useful for people.

Perhaps some people would like to keep one BTC address for some reasons.
Also bigger financial institutions won't really like the idea of different account number for each transation.


I don't think the keys should really be thought of as an account number per transaction. That logic I think is misleading. You can have millions of keys associated to one wallet / account.

What about the increase of the block size, then ?

Even if 512o per transaction is small, it might represent a significative amount since all has to be stored in the block chain.

BitcoinTalk
#5
From:
ShadowOfHarbringer
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
What about the increase of the block size, then ?
Even if 512o per transaction is small, it might represent a significative amount since all has to be stored in the block chain.

I will tell You what have i just done.
I clicked "quote", copied the message and pasted it in a text file.

Then, i have truncated the file to 512 bytes, and EDIT: GZIPPED  it. It now takes 329 bytes.
Next, i have bzipped it. Now it takes 288 bytes.

Of course, there is no need for such a long message. Let's try 384 bytes. I used lorem ipsum generator from here: http://lipsum.com/
Results:
Code:
-rw-r--r--  1 user user  384 2010-10-23 19:09 ipsum.txt (uncompressed)
-rw-r--r--  1 user user  274 2010-10-23 19:08 ipsum.txt.bz2 (bzip2)
-rw-r--r--  1 user user  268 2010-10-23 19:10 ipsum.txt.gz (gzip)

I think that maximum ~260-280 bytes per transaction is not bad.
BitcoinTalk
#6
From:
theymos
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
Like grondilu said, encryption isn't possible.

It's possible to modify Bitcoin to send messages. Just create transactions that start with something like this:
Code:
BTCMESSAGEv1--This is a message OP_DROP

The network will accept these, but I don't think your recipient will recognize them unless he is also using your modified Bitcoin.
BitcoinTalk
#7
From:
ShadowOfHarbringer
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
I found something interesting.

http://stackoverflow.com/questions/1138345/best-compression-algorithm-for-short-text-strings

There is a small OS project on github, which does good compression of short text strings.
http://github.com/antirez/smaz

Quote
'This is a small string' compressed by 50%
'foobar' compressed by 34%
'the end' compressed by 58%
'not-a-g00d-Exampl333' enlarged by 15%
'Smaz is a simple compression library' compressed by 39%
'Nothing is more difficult, and therefore more precious, than to be able to decide' compressed by 49%
'this is an example of what works very well with smaz' compressed by 49%
'1000 numbers 2000 will 10 20 30 compress very little' compressed by 10%

In general, lowercase English will work very well. It will suck with a lot
of numbers inside the strings. Other languages are compressed pretty well too,
the following is Italian, not very similar to English but still compressible
by smaz:

'Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura' compressed by 33%
'Mi illumino di immenso' compressed by 37%
'L'autore di questa libreria vive in Sicilia' compressed by 28%

It can compress URLS pretty well:

'http://google.com' compressed by 59%
'http://programming.reddit.com' compressed by 52%
'http://github.com/antirez/smaz/tree/master' compressed by 46%

So we could further get the 384 bytes down to <200 or <175 bytes.
BitcoinTalk
#8
From:
grondilu
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
I also wonder if the message has to be taken into account for the hash computation.  Not doing so would allow to delete it later.

I very much don't like this idea of a message.  Since it is not necessary to the protocol, I'm not sure if it would be easy to find a place where it really fits.  I'm not a programmer though.  I'd be curious to have Satoshi's thought on this.

Edit.  I have a funny idea.  Imagine that numeric precision is increased way beyond 8 decimals, say 128 decimals for instance.

What about using those decimals to code your message ?  Somehow you would have a "natural fee" for this service, and we won't have to modify anything from the protocol.

Edit #2.  Gosh I LOVE this idea Smiley

Edit #3.  We don't need 128 decimals.  Correct me if I'm wrong, but with 32 decimals you can code a 17 characters-longed uncompressed message in a 64 characters set.  (32*log(10)/log(64)  = 7.717)
BitcoinTalk
#9
From:
ShadowOfHarbringer
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
I very much don't like this idea of a message.  Since it is not necessary to the protocol, I'm not sure if it would be easy to find a place where it really fits.  I'm not a programmer though.  I'd be curious to have Satoshi's thought on this.

Yeah, I'm curious of that too.
BitcoinTalk
#10
From:
satoshi
Subject:
Re: Suggestion: Allow short messages to be sent together with bitcoins ?
Date:
ECDSA can't encrypt messages, only sign signatures.

It would be unwise to have permanently recorded plaintext messages for everyone to see.  It would be an accident waiting to happen.

If there's going to be a message system, it should be a separate system parallel to the bitcoin network.  Messages should not be recorded in the block chain.  The messages could be signed with the bitcoin address keypairs to prove who they're from.