Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mailBoxB = keyA^msg = 589505
mailBoxA = keyB^mailBoxB = 326166
mailBoxB2 = mailBoxA^keyA = 576941
keyA^msg = 589505
keyB^keyA^msg = 326166
keyB^keyA^msg^keyA = 576941
keyA^msg = 589505
keyB^keyA^msg = 326166
keyB^msg^keyA^keyA = 576941
keyA^msg = 589505
keyB^keyA^msg = 326166
keyB^msg^0 = 576941
keyA^msg = 589505
keyB^keyA^msg = 326166
keyB^msg = 576941
keyA^msg = 589505
keyB^589505 = 326166
keyB^msg = 576941
keyA^msg = 589505
keyB = 326166^589505
keyB^msg = 576941
keyA^msg = 589505
keyB = 326166^589505
msg = 576941^326166^589505
keyA = 589505^576941^326166^589505
keyB = 326166^589505
msg = 576941^326166^589505
keyA = 800699
keyB = 787671
msg = 313722
Related Rants
-
devTea55Any rubik’s cube fan? I ordered a rubik’s cube to help me when I faced a bug since I don’t know how to u...
-
Sefie5Beating https://regexcrossword.com/ felt good. But I have to admit: I could not beat the last one without bre...
-
ClySuva18One of my favourite, encryption puzzles is this: ITuyVT93oUZtLKWyVT5iqPO3nTS0VUEbMKxtp2IyoD== Answer is plai...
A puzzle, just for fun.
Two friends, (a)lice and (b)ob are communicating through a channel encrypted with random numbers XOR'd together, like so:
keyA = randint(1024, 1024**2)
keyB = randint(1024, 1024**2)
msg = randint(1024, 1024**2)
You, an interloper, have watched all these communications, siphoning the packets as they went.
When alice sends a message to bob's mailbox, she does it like so:
mailBoxB = keyA^msg
Bob's mailbox receives the mail automatically, and applies his own key, sending it back to alice's mailbox:
mailBoxA = keyB^mailBoxB
Next, Alice's mailbox notices the message, and automatically removes her key and sends it back to bob's mailbox. All of this, the first message, the second, and the third, happens in milliseconds, the back and forth.
mailBoxB2 = mailBoxA^keyA
Finally, bob's mailbox removes his key, and deposits the now unencrypted message in his box, for him to read in the morning:
mailBoxBFinal = mailBoxB2^keyB
As as a spy, you know the first packet sent to bob, had a value of 589505.
The packet bob sent back to alice, after applying his key, has a value of 326166
The message sent *back* to bob after alice removed *her* key, had a value of:
576941
What are the values of keyA, keyB, and what is the value of the msg?
question
puzzle