-1

Really Secure Awesome Cryptography is a protocol for sending messages based on public-key cryptography. Assume that messages are simple text strings of at most 500 characters. Users choose a private key, which is a whole number between $1$ and $10^{81}$. They apply the Wonky Doodle Algorithm (a generalisation of elliptic curves – the details are irrelevant to this problem) to map the private key to a public key. The public key is also a number between $1$ and $10^{81}$, and is known to everybody who also uses RSA Cryptography (duh!).

You can assume that:

  1. A whole number between $1$ and $10^{81}$ corresponds to a bijective function that maps strings to strings (i.e. possible input and output strings are in 1-1 correspondence).
  2. Any such function will map any sensible string (e.g. the title of this puzzle) to a different string that “looks completely random”.
  3. A private/public key pair corresponds to two functions that are inverses of each other
  4. It is not feasible to invert the WDA and find the private key. In particular $10^{81}$ is large enough to withstand a brute force attack

Alice, Bob and Eve have chosen the following private keys: enter image description here

Joe Bloggs wants to send the message “HAPPYSTAR’S PUZZLES ARE AWESOME” that can be read by his friends Alice and Bob but not Eve. How can he achieve this? Joe wants to achieve this in a single message (i.e. he can't make two copies of the same message and apply Alice’s public key to the first and Bob’s public key to the second). Admittedly this isn't a realistic application of cryptography, but I intended this as a fun puzzle.

EDIT: This problem assumes some knowledge of public key cryptography in particular public key encryption.

DISCLAIMER: Not sure if my understanding of cryptography is 100% sound, and it’s been a while since I was at university. But if this problem gets a negative score … then it gets a negative score.

happystar
  • 7,534
  • 12
  • 54
  • "Of course he could make two copies of the same message and apply Alice’s public key to the first and Bob’s public key to the second – but that is not in the spirit of the problem!" Why not? How does this not satisfy the requirements? I'm not sure what the spirit of the problem is exactly, if this doesn't fit. (And is it necessary that we know their actual keys, given that we don't know the algorithm? If not, why provide them at all?) – Deusovi Oct 10 '20 at 04:38
  • but that is not in the spirit of the problem! So what's the spirit of the problem? Do you want one single encrypted message that works? Also, with the current axioms of the system, all numbers from $1$ to $10^{81}$ seem to be of equal position, thus I don't see any point in giving the exact private keys. – WhatsUp Oct 10 '20 at 04:44
  • There's a massive difference between "can be read by Alice and Bob" and "can be read by either Alice or Bob". The text implies the latter but says the former. – Bass Oct 10 '20 at 05:30
  • I've edited the problem. Joe Bloggs needs to send a single message to both Alice and Bob. I have also stated some working knowledge of public key cryptography is assumed. – happystar Oct 10 '20 at 09:29
  • What stops me from generating a temporary shared key k, encrypt the message with k, make two copies of the key, k1 and k2, encrypt k1 with Alice's public key, encrypt k2 with Bob's public key, package all of them together into one single message (k1, k2, c) and send that to both of them? Sure, they need to know that this was done, but IMO that would be a valid answer. – Lukas Rotter Oct 10 '20 at 11:48

2 Answers2

1

I asked OP for clarification on the matter of

does the question really mean "can be read by Alice and Bob" or the more usual "can be read by either Alice or Bob"

and OP responded obliquely that the question was edited, and we need to send a single message to both Alice and Bob, so I'll have to assume that "can be read by his friends Alice and Bob but not Eve" means exactly what it says.

So we are going to construct a cipher message that

can be read by Alice and Bob together, but not Eve.

To do that, we simply

encrypt the message with Alice's public key, and the re-encrypt the result with Bob's public key.

This message can only be read by

decrypting with Bob's private key, and then decrypting the result with Alice's private key.

Yes, this is definitely in the zone, but since OP deliberately didn't change the wording in the puzzle, I'll have to assume this is what is intended. Also, most of the puzzle is just chaff (Joe cannot possibly know the private keys, so why are they included? "The details are irrelevant", so why is $10^{81}$ repeatedly mentioned, etc etc.), so there's very little we can do with the actual information that is left.

Bass
  • 77,343
  • 8
  • 173
  • 360
  • This basically is saying that A and B are the same person... – WhatsUp Oct 10 '20 at 12:51
  • 1
    @WhatsUp No it isn't, but if we are to take that tone, then your answer is basically saying that if you don't actually count the messages, then you can send 2 messages even though it is expressly forbidden. I think we can both agree that the puzzle needs some major polishing. – Bass Oct 10 '20 at 16:49
1

Here is one possible way of sending "one single message" that both A and B can decrypt, but E cannot.

First encrypt original message with the public keys of A and B to get two strings MessageA and MessageB.

Then send the following public message to everyone:

A, please decrypt this:"MessageA" B, please decrypt this:"MessageB"

How this works:

Because of axiom 2, the encrypted MessageA and MessageB will "look completely random". Thus A and B are able to identify the unencrypted instructions in the final message.

WhatsUp
  • 7,387
  • 18
  • 46