<p>No. There is no way for anything to be encrypted in a Bitcoin transaction as there are no opcodes that support encryption or decryption.</p>

CC BY-SA 3.0
2017-07-07T06:41:31.913Z
That's not relevant. Even if such opcodes existed, they wouldn't let you (1) decrypt something that others can't since everything in the chain is public and (2) change in behaviour after some time.
Pieter Wuille
CC BY-SA 3.0
2017-06-27T17:05:06.733Z
2017-06-27T17:05:06.733Z
Ava Chow
<p>I don't think that is possible with only nLockTime. There are however "smart" contracts, by using a 2-of-2 multisignature where each party deposits an insurance worth more than the shared secret. The economic loss is more than they gain if both parties don't follow through on their part of the deal.</p>

<p>On a note, this would actually be possible with the technology currently used ZCash. Using zk-SNARKS, you could generate proof that a piece of content is encrypted by key X. In that same zk-SNARK signature you could prove that hash(X) = Y and create an economic construct that will only allow a transaction after X is revealed, creating Y and allowing a party to get their money. </p>

CC BY-SA 3.0
2017-06-27T17:33:01.730Z
Very interesting, thank you. Where could I find such contracts? Are you talking about ethereum-based contracts?
Nikksno
CC BY-SA 3.0
2017-06-29T19:12:01.677Z
@Nikksno These contracts are also possible on Bitcoin, using the OP_CLTV. Basically past block X, you destroy access to all funds for both parties. This is mainly a economical construct, research the Nash equilibrium. The best example I can find is probably https://voluntary.net/bitmarkets/whitepaper/
Penquin
CC BY-SA 3.0
2017-06-27T16:33:53.707Z
2017-06-29T19:17:39.683Z
2017-06-29T19:17:39.683Z
Penquin
<p>I know you can delay a transaction's accepted date by using nLockTime. I'm still looking for the simplest way to generate a transaction with nLockTime, but that's another topic.</p>

<p><strong>I'm wondering if there's a way to use this feature to send a message that will only decrypt after the time is due.</strong></p>

<p>I know that a transaction broadcast with nLockTime already has all details visible and the amount is simply not yet spendable by the recipient. Is there a way to also make the note on that transaction encrypted until such date? Can I use bitmessage to achieve this somehow? How about another coin such as Dash or zCash which I assume also encrypt the transaction's note to anyone except the recipient [do they actually do this, especially Dash]?</p>

<p><strong>The idea is to send a message that only the recipient can decrypt and only after a certain date, with no manual intervention in the future, nor anything else involved.</strong> It would be ideal if they received that message in their wallet like any transaction after it's due, but the message shouldn't be viewable by others nor by the recipient in advance searching, say, in a block explorer.</p>

<p>Thank you</p>

CC BY-SA 3.0
2017-06-27T16:28:35.340Z
I don't think that's possible.
Penquin
<encryption><message><locktime>
Encrypted message with nLockTime
Nikksno
# Encrypted message with nLockTime

(Asked by: username_0 on 2017-06-27)

I know you can delay a transaction's accepted date by using nLockTime. I'm still looking for the simplest way to generate a transaction with nLockTime, but that's another topic.

**I'm wondering if there's a way to use this feature to send a message that will only decrypt after the time is due.**

I know that a transaction broadcast with nLockTime already has all details visible and the amount is simply not yet spendable by the recipient. Is there a way to also make the note on that transaction encrypted until such date? Can I use bitmessage to achieve this somehow? How about another coin such as Dash or zCash which I assume also encrypt the transaction's note to anyone except the recipient [do they actually do this, especially Dash]?

**The idea is to send a message that only the recipient can decrypt and only after a certain date, with no manual intervention in the future, nor anything else involved.** It would be ideal if they received that message in their wallet like any transaction after it's due, but the message shouldn't be viewable by others nor by the recipient in advance searching, say, in a block explorer.

Thank you

**Tags:** encryption, message, locktime

> **Comments:**
> **username_1**: I don't think that's possible.  

---

## 2 answers

### Answer by username_2 on 2017-06-27. Score: 0

No. There is no way for anything to be encrypted in a Bitcoin transaction as there are no opcodes that support encryption or decryption.

> **Comments:**
> **username_3**: That's not relevant. Even if such opcodes existed, they wouldn't let you (1) decrypt something that others can't since everything in the chain is public and (2) change in behaviour after some time.  

---

### Answer by username_1 on 2017-06-27. Score: 0

I don't think that is possible with only nLockTime. There are however "smart" contracts, by using a 2-of-2 multisignature where each party deposits an insurance worth more than the shared secret. The economic loss is more than they gain if both parties don't follow through on their part of the deal.

On a note, this would actually be possible with the technology currently used ZCash. Using zk-SNARKS, you could generate proof that a piece of content is encrypted by key X. In that same zk-SNARK signature you could prove that hash(X) = Y and create an economic construct that will only allow a transaction after X is revealed, creating Y and allowing a party to get their money.

> **Comments:**
> **username_0**: Very interesting, thank you. Where could I find such contracts? Are you talking about ethereum-based contracts?  
> **username_1**: @username_0 These contracts are also possible on Bitcoin, using the OP_CLTV. Basically past block X, you destroy access to all funds for both parties. This is mainly a economical construct, research the Nash equilibrium. The best example I can find is probably https://voluntary.net/bitmarkets/whitepaper/  

---

