Would it be possible to encrypt some data using a wallet address as the public key, then only the owner of the wallet could decrypt the data?
A public key needs to be communicated but there are no methods where a bitcoin address (just a derivative of the private key) works as the public key for encrypting a message.
If Bitcoin had a payment request protocol, the public key could be communicated through that.
This is discussed here:
19:31 gavinandresen gmaxwell: I'd like it to be generic enough that lots of interesting applications can be built, like private messages between sender and receiver.
19:31 gavinandresen gmaxwell: ... and I think those interesting applications CAN be built if we can get an immutable hash attached to a transaction, as jgarzik says
19:33 gavinandresen (e.g. private message from receiver back to sender can easily be done if the metadata includes my public gpg key and, maybe, my email address)
19:33 gavinandresen (private message the other way can be done if we've got a payment protocol so I get the recipients public key, etc etc)
19:33 gmaxwell gavinandresen: That doesn't work unless you have a cannel to get the metadata to the other end. If you have that you can just send the same metadata signed with the scriptsig's keys.
19:34 gavinandresen gmaxwell: hmm? gpg key plus email address is enough to send me a private message.
19:34 gavinandresen gmaxwell: encrypt that bit of metadata with the recipient's public key and that opens up secure, private communication
19:35 gmaxwell You don't have the recipents public key, not with any existing address type.
19:35 gavinandresen right, I agree we need a payment protocol.
-
http://bitcoinstats.com/irc/bitcoin-dev/logs/2012/09/10#l4463898