<p>Seth wants to send Martha a message and is willing to spend 10 BTC to see it delivered. Charlie is happy to deliver it from South Dakota to Michigan at that price.
Seth would like to ensure the message is delivered and Charlie wants to ensure he gets paid for his trouble.</p>
<p>They could do the following;</p>
<ul>
<li>Seth signs and encrypts the plaintext message (m1) to Martha into a cyphertext message (c1) using Martha's public key and his private key.</li>
<li>Seth further encrypts the cypher text message with a nonce (n1) into a new cypertext message (c2)</li>
<li>Seth builds a bitcoin transfer (t1) and adds the nonce (n1) to the transfers comment section and signs it. (t2)</li>
<li>Seth then encrypts the signed transfer and nonce (t2) with Charlie's public key into a new message (t3).</li>
<li>Seth then encrypts both the encrypted transfer (t3) and the nonce encrypted message (c2) with Martha's public key. This final package is good for shipping (c3)</li>
<li>Charlie takes our package to Martha, it's a long trip but the 10btc is worth it.</li>
<li>Martha decodes the package (c3) into it's parts the encrypted transfer (t3) and nonce encrypted message (c2)</li>
<li>Martha gives Charlie the encrypted transfer (t3)</li>
<li>Charlie decrypts the encrypted transfer (t3) into the a signed transfer and nonce (t2)</li>
<li>Charlie tells everyone on the plant about the transfer (t2) including Martha. He wants to do this so people know he has the money.</li>
<li>Martha takes the transfer (t2) and extracts the nonce (n1) and uses it to decrypt her message (c2) into the signed message (c1)</li>
<li>Martha then decrypts the message (c1) again with her private key and gets Seth's letter (m1)</li>
</ul>
<p>Lets see if I can make this a truth table;</p>
<h1>Seth</h1>
<pre><code>(m1, seth_pk, martha_pub) =&gt; c1
(c1, n1) =&gt; c2
(t1, n1, seth_pk) =&gt; t2
(t2, charlie_pub) =&gt; t3
(t3 + c2, martha_pub) =&gt; c3
</code></pre>
<h1>Martha</h1>
<pre><code>(c3, martha_pk) =&gt; t3, c2
</code></pre>
<h1>Charlie</h1>
<pre><code>(t3, charlie_pk) =&gt; t2
</code></pre>
<h1>Martha</h1>
<pre><code>(t2) =&gt; t1, n1
(n1, c2) =&gt; c1
(c1, martha_pk) =&gt; m1
</code></pre>

CC BY-SA 3.0
2014-03-01T05:17:34.747Z
I think this answer covers everything. There are a couple flaws (like Seth could double spend before delivery - which may be ok) and I completely ignored BTC contracts.
reconbot
CC BY-SA 3.0
2014-03-01T20:22:32.720Z
Doesn't Charlie have to broadcast the transaction in order to get it in the blockchain? If he doesn't do that Seth could double spend.
reconbot
CC BY-SA 3.0
2014-03-02T18:08:39.613Z
Those are valid points =)
reconbot
CC BY-SA 3.0
2014-03-01T05:12:37.163Z
2014-03-01T05:12:37.163Z
2020-06-16T11:10:03.350Z
reconbot
<p>I'm exploring having a bitcoin (or any blockchain) backed a distributed secure messaging system.</p>

<p>This is a peer to peer network that would pay for transport. In essence, it's the wild west, your key pair is your wax seal, and you've given someone $10 to deliver your letter back home to New York. I want to use Bitcoin to hold that $10 in escrow until the letter has been delivered. </p>

<p>I know Bitcoin can do multi-signature transactions but I'm not positive Bitcoin can do what I want, so I turn to this community.</p>

<ul>
<li>Bitcoin gives us public and private keys for secure message delivery.</li>
<li>Bitcoin gives us the ability to pay people for transport. </li>
<li>We have 3 parties involved. A courier, sender and receiver.</li>
<li>We also have two transactions. One of the message from sender to receiver (or a key for said message), and one of the payment from sender to courier.</li>
</ul>

<p>I'd like to ensure both transactions happen simultaneously. Without trust.</p>

<multi-signature><message-signing>
Is it possible to do a digital charge on delivery (COD)?
reconbot
# Is it possible to do a digital charge on delivery (COD)?

(Asked by: username_0 on 2014-02-28)

I'm exploring having a bitcoin (or any blockchain) backed a distributed secure messaging system.

This is a peer to peer network that would pay for transport. In essence, it's the wild west, your key pair is your wax seal, and you've given someone $10 to deliver your letter back home to New York. I want to use Bitcoin to hold that $10 in escrow until the letter has been delivered.

I know Bitcoin can do multi-signature transactions but I'm not positive Bitcoin can do what I want, so I turn to this community.

* Bitcoin gives us public and private keys for secure message delivery.
* Bitcoin gives us the ability to pay people for transport.
* We have 3 parties involved. A courier, sender and receiver.
* We also have two transactions. One of the message from sender to receiver (or a key for said message), and one of the payment from sender to courier.

I'd like to ensure both transactions happen simultaneously. Without trust.

**Tags:** multi-signature, message-signing


---

## 1 answers

### Answer by username_0 on 2014-03-01. Score: 0

Seth wants to send Martha a message and is willing to spend 10 BTC to see it delivered. Charlie is happy to deliver it from South Dakota to Michigan at that price.
Seth would like to ensure the message is delivered and Charlie wants to ensure he gets paid for his trouble.

They could do the following;

* Seth signs and encrypts the plaintext message (m1) to Martha into a cyphertext message (c1) using Martha's public key and his private key.
* Seth further encrypts the cypher text message with a nonce (n1) into a new cypertext message (c2)
* Seth builds a bitcoin transfer (t1) and adds the nonce (n1) to the transfers comment section and signs it. (t2)
* Seth then encrypts the signed transfer and nonce (t2) with Charlie's public key into a new message (t3).
* Seth then encrypts both the encrypted transfer (t3) and the nonce encrypted message (c2) with Martha's public key. This final package is good for shipping (c3)
* Charlie takes our package to Martha, it's a long trip but the 10btc is worth it.
* Martha decodes the package (c3) into it's parts the encrypted transfer (t3) and nonce encrypted message (c2)
* Martha gives Charlie the encrypted transfer (t3)
* Charlie decrypts the encrypted transfer (t3) into the a signed transfer and nonce (t2)
* Charlie tells everyone on the plant about the transfer (t2) including Martha. He wants to do this so people know he has the money.
* Martha takes the transfer (t2) and extracts the nonce (n1) and uses it to decrypt her message (c2) into the signed message (c1)
* Martha then decrypts the message (c1) again with her private key and gets Seth's letter (m1)

Lets see if I can make this a truth table;

# Seth

```
(m1, seth_pk, martha_pub) => c1
(c1, n1) => c2
(t1, n1, seth_pk) => t2
(t2, charlie_pub) => t3
(t3 + c2, martha_pub) => c3

```

# Martha

```
(c3, martha_pk) => t3, c2

```

# Charlie

```
(t3, charlie_pk) => t2

```

# Martha

```
(t2) => t1, n1
(n1, c2) => c1
(c1, martha_pk) => m1

```

> **Comments:**
> **username_0**: I think this answer covers everything. There are a couple flaws (like Seth could double spend before delivery - which may be ok) and I completely ignored BTC contracts.  
> **username_0**: Doesn't Charlie have to broadcast the transaction in order to get it in the blockchain? If he doesn't do that Seth could double spend.  
> **username_0**: Those are valid points =)  

---

