Remove ads

Introducing the LemonFools Personal Finance Calculators

Secret message

jfgw
Lemon Slice
Posts: 576
Joined: November 4th, 2016, 3:36 pm
Has thanked: 83 times
Been thanked: 101 times

Secret message

#83367

Postby jfgw » September 25th, 2017, 2:54 pm

I am a secret agent and I have a secret message that must be delivered intact to another secret agent. It is important that no part of the message falls into the hands of the enemy so I must encrypt the message and send the ciphertext and any keys separately. Three messengers from the other secret agent will come to collect them. However, it is known that one of these messengers is a double-agent who will send copies of everything he is given to the enemy. It is also known that the enemy will send one of their own messengers who will deliver whatever I give him to the enemy but not to the other secret agent. I have no way of knowing which messenger is whom.

How can I reliably send the message without the enemy being able to read any of it?

Julian F. G. W.

UncleEbenezer
Lemon Quarter
Posts: 2233
Joined: November 4th, 2016, 8:17 pm
Has thanked: 196 times
Been thanked: 266 times

Re: Secret message

#83375

Postby UncleEbenezer » September 25th, 2017, 3:29 pm

Ferchrissake, PGP is 25 years old. This is a long-solved problem!

My first thought was that it looks like the "roads to heaven and hell", where you get to ask yes/no questions, but it isn't that. The problem you have posed lacks any kind of asymmetry onto which a logical solution could be hooked. You really need some (pre-existing) shared secret, so if you're disallowing that and ruling out a public key infrastructure (or some wheeze like sending a decoy message to elicit a reaction) you're stuffed.

Unless I'm going even more senile than I realised ...

jfgw
Lemon Slice
Posts: 576
Joined: November 4th, 2016, 3:36 pm
Has thanked: 83 times
Been thanked: 101 times

Re: Secret message

#83388

Postby jfgw » September 25th, 2017, 4:33 pm

UncleEbenezer wrote:Ferchrissake, PGP is 25 years old. This is a long-solved problem!

My first thought was that it looks like the "roads to heaven and hell", where you get to ask yes/no questions, but it isn't that. The problem you have posed lacks any kind of asymmetry onto which a logical solution could be hooked. You really need some (pre-existing) shared secret, so if you're disallowing that and ruling out a public key infrastructure (or some wheeze like sending a decoy message to elicit a reaction) you're stuffed.

Unless I'm going even more senile than I realised ...


I do have a solution. There is no pre-shared secret or public key. There is no two-way conversation at all. I can send a description of the method in plaintext so that the other secret agent can read the message and this will not allow the enemy to read it.

Four messengers will collect what I have prepared for them. Two will deliver straight to the other secret agent, one will deliver to the other secret agent after making a copy to send to the enemy, and the other will deliver straight to the enemy.

I could have posed a similar but simpler problem but have taken into account the intelligence of readers of this board.

Julian F. G. W.

Rover110
Posts: 11
Joined: November 6th, 2016, 4:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Secret message

#83391

Postby Rover110 » September 25th, 2017, 4:45 pm

This was written before jfgw's follow-up.

As I see it, 4 messengers will come to me.
2 are trustworthy and will only pass their given message to my fellow agent.
1 is a double-agent who will pass his given message to my fellow agent but also to the enemy
1 is a fake who will only pass his given message to the enemy.

So of the 4 messages I hand out, 3 will get to my fellow agent and 2 will get to the enemy.

I have no way of knowing who will get what. But I need to ensure that my fellow agent will be able to recover the original message from the three-out-of-four messages he gets, but the enemy will not be able to recover the original message from his two-out-of-four.

Suppose each message I give is in two parts: encryption-key and encrypted-message.
Then in message 1 I could put Key_A and Key_B(Key_C(message))
message 2 could have Key_B and Key_C(Key_D(message))
message 3 could have Key_C and Key_D(Key_A(message))
message 4 could have Key_D and Key_A(Key_B(message))
where Key(Message) is the result of encrypting Message by Key.

My fellow agent will end up with three keys and 3 encrypted messages. And by applying the appropriate keys will be able to decode the message.
But the enemy will not have enough to decrypt.

- Rover

jfgw
Lemon Slice
Posts: 576
Joined: November 4th, 2016, 3:36 pm
Has thanked: 83 times
Been thanked: 101 times

Re: Secret message

#83396

Postby jfgw » September 25th, 2017, 5:05 pm

Correct answer Rover110.

There are other methods but that may well be the neatest.

Julian F. G. W.

UncleEbenezer
Lemon Quarter
Posts: 2233
Joined: November 4th, 2016, 8:17 pm
Has thanked: 196 times
Been thanked: 266 times

Re: Secret message

#83459

Postby UncleEbenezer » September 25th, 2017, 8:15 pm

jfgw wrote:Four messengers will collect what I have prepared for them. Two will deliver straight to the other secret agent, one will deliver to the other secret agent after making a copy to send to the enemy, and the other will deliver straight to the enemy.

Aha! That's different. Last time it was the classic three messengers, one being the enemy and one being both. At least as I read it: perhaps there was a bit of prejudiced expectation there, from a culture where puzzles conventionally involve three agents.

With 2+1+1 it's far too easy: any solution that relies on the recipient getting any three of the messages works. A robust solution would be to send each messenger with an individual elliptic curve encryption of the message, and a two-part M-Pin decryption key split across each other pair of messengers. Thus the agent receiving three messages has (three times over for a bit of redundancy) the message and both parts of a key to unlock it, whereas the enemy receiving two messages only has one half of each key.

davidmichaels
Posts: 4
Joined: June 13th, 2018, 8:10 am

Re: Secret message

#145372

Postby davidmichaels » June 13th, 2018, 8:19 am

Can any one explain this to me :p :o

Rover110
Posts: 11
Joined: November 6th, 2016, 4:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Secret message

#145390

Postby Rover110 » June 13th, 2018, 9:12 am

davidmichaels wrote:Can any one explain this to me :p :o

I'm sure there are people who are willing to explain it. But it's not easy unless you expand on what the "this" is that you'd like explaining. And it would be helpful if you could also describe your level of knowledge and what understanding you're after.

For example, I don't know what "elliptic curve" encryption is, and I wouldn't be surprised if how it works couldn't easily be explained without reference to degree-level mathematics. You might get a feel of it by reading the Wikipedia page.

Regards,
Rover


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 1 guest