zhoujianfu

Joined Jun 15, 2018

Profile not set

Mute
1A3Q9S8DnCwZXpi28VVUZJ8dJMuZdvkYTP
Actions 70
Following 1
Followers 2
Topics following 2
Muted 0
Is Muted By 0

zhoujianfu
2202d · Direct/Private Messages
(Just because it's hardish to re-do the encryption for me, plus I'm hoping this protocol will just work on people's addresses they use to post without any extra steps necessary!)
zhoujianfu
2202d · Direct/Private Messages
I think that's the pubkey for your addr (1FVPqAyKRLWa9YFCNKwSk9SqY89V8xxqA9/qz00qa6y27wp7r4uxuc2lsa46yuvvzfn45v9jcte7g). Is it? I got it from script_asm. Do you have the privkey?
zhoujianfu
2202d · Direct/Private Messages
020210245fcee5a97feb79c00a9a57c83b2e6e5011137e397c2c1927c66b62abe6 from bch-chain.api.btc.com/v3/tx/78c355e549f09fa3b9e925ffd471487523e51b32c663bfddf4dd67362c41f967?verbose=3 ?
zhoujianfu
2203d · Wallets
zhoujianfu
2203d · Direct/Private Messages
(You need const { encrypt, decrypt } = require('bitcoin-encrypt'); first). And here's my pubkey: var alicePub = '038f68504dabd8bf4b6faef83b888e3b681a5f47185a2548e1c13239617e220226';
zhoujianfu
2203d · Direct/Private Messages
Here's the js to decode it: var decoded = new Buffer(encoded, 'base64'); var decrypted = decrypt(alicePub, bobPriv, decoded); my pub (alicePub) is posted earlier in this topic!
zhoujianfu
2203d · Start mirroring Twitter?
It'd be kinda cool to make a bot that takes a twitter account and mirrors all its posts to memo... eh?!
zhoujianfu
2203d · Direct/Private Messages
Oh yeah, it's base64.. I assumed that's fine because these aren't going to be hand copied ever.. were you able to decode it?!
zhoujianfu
2203d · Direct/Private Messages
Oops, that one was encoded bad. Here, try decoding this: ekSRl+rqiq0Uz/dt5qIGWdfLQu3DpkaM1Bs2/ol1pvb2NgLPlA== .. get my pubkey from github.com/zhoujianfu/Public-Key-from-BCH-Address
zhoujianfu
2203d
3TYdU0VC98AH4tb5VYctk2vKocV159y3SAqXP9WwSVu1qkvT9DnqpfjgLKIybg==
zhoujianfu
2203d
ÈrTŽJÀ±ì)ÿ9°çd„ÁWGÞîÃù;üü}6õ”©*æDž&
zhoujianfu
2203d · Direct/Private Messages
Ah, that's what I was doing but I had to get the newest version of node/npm.. bitcoin-encrypt works for me now! now.. ÈrTŽJÀ±ì)ÿ9°çd„ÁWGÞîÃù;üü}6õ”©*æDž&
zhoujianfu
2207d · Direct/Private Messages
(So, it wouldn't limit messages to be sent to active keys centrally stored on memo servers.) Any way you'd publish a key would req. sending a txn so might as well just use its own?
zhoujianfu
2207d · Direct/Private Messages
I think deriving it from the blockchain only requires that the address has ever sent a txn, right (sending a txn reveals your public key in the blockchain)?
zhoujianfu
2208d · Direct/Private Messages
If it also took a "-u URL" flag for where to post the too-long message to, a "-m" flag to give the actual valid memo txn (not just the encrypted string), and a -b to broadcast it!!!
zhoujianfu
2208d · Direct/Private Messages
And I suppose if it also decrypted with like a -d flag, all the better! (Note, it would connect to a blockchain API to get their pub_key from a pub_address when nec and possible.)
zhoujianfu
2208d · Direct/Private Messages
Yeah, if there were just a command line python script that was like "bitprivate.py [your_private_key] [their_pub_address or their_pub_key] 'message to encrypt'" that would be super!
zhoujianfu
2209d · Direct/Private Messages
They wouldn't be able to send you the message though unless you've ever sent a txn before (revealing your public key), but that seems like it'd always be the case anyway!
zhoujianfu
2209d · Direct/Private Messages
Note, you can decode the OP_RETURN using your private key and the public key of the person who sent the txn (which is revealed in the blockchain because they sent a txn).
zhoujianfu
2209d · Direct/Private Messages
(If the encrypted message is too big for OP_RETURN, it should instead decode to a URL to the encrypted message. If encrypted URLs are still too big, then unencrypted URLs...?)
zhoujianfu
2209d · Direct/Private Messages
So to summarize, the protocol simply scans the blockchain for txns (opt. only from addrs you follow), if there's an OP_RETURN you can decode using your priv key, it's a msg to you!
zhoujianfu
2209d · Direct/Private Messages
Cool, 038f68504dabd8bf4b6faef83b888e3b681a5f47185a2548e1c13239617e220226 ... but um, I'm having a hard time getting bitcoin-encrypt to work from the example there. Anybody got it?
zhoujianfu
2210d · Direct/Private Messages
And please post here with a link to the whole protocol once you've described it!
zhoujianfu
2210d · Direct/Private Messages
I love it.. I think you're a bit beyond me with some of this stuff, but I wanted to point out paste.city for example does exactly the post/update txt files thing for free now.
zhoujianfu
2211d · Direct/Private Messages
That would be cool, but might be overkill.. the messages would be completely encrypted even if the URL was public. Still, it'd be cool if the URL was encrypted too.. more privacy!