You are a robo-soldier in the distant planet Minos. That planet is inhabited only by robots which mine and process Uranium ores and send enriched Uranium back to their mother planet Krawge, a planet full of life.
Suddenly, you received a message from Krawge. Unfortunately the antenna was sabotaged by the evil Egfwark, a race of space pirates that want to steal the Uranium. And as a result, you got the message seriously garbled:
AGAW DVQE CE EMMPDRD AWT GAQTDRD IW JWAF SGZXUWYIQ
You examined the antenna in order to fix it and hopefully ungarble the message. But you couldn't. All that you could know is that the message was encrypted using a key with 10 characters length and that the encryption just skipped the spaces keeping them untouched.
Without knowing the key, you start to look around. The antenna was fully operational a few minutes ago, so whoever sabotaged it should not be far away. You could detect an unindentified robot hidden behind a rock and went to catch him. Knowing that it has been detected, it starts its self-destruct sequence, but you shot him in time to just cause some minor physical damage, turning off the robot and avoiding its complete self-destruction.
You disassembled the enemy robot in hope to be able to retrieve the key to the received message, but all that you found is that it was derived from another text that was itself garbled in the self-destruct process. That text is this:
W,=885*5~:9;/,=*5/0+~~~~~~~~~~~~~
I0:9,~=~+3%~/8~:)+*~~~~~~~~~~~~~~
]~;/0+*=0*~'=(9~/8~*90+5/0~~~~~~~
O0~*/.~/8~<,/390~*,)+*~~~~~~~~~~~
J69~29++/0+~*6=*~%/)~*=)76*~19~~~
U~29=,09:~'9,9~09(9,~*,)9~~~~~~~~
P/'~U~850:~1%+928~50~-)9+*5/0~~~~
J69%~./50*~*69~85079,~=*~19~=7=50
W)52*%~<%~=++/;5=*5/0~~~~~~~~~~~~
E/)~./50*~*69~85079,~=*~19~=7=50~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U~'=00=~,)0='=%~~~~~~~~~~~~~~~~~~
P9(9,~+=%~7//:<%9~~~~~~~~~~~~~~~~
U~'=00=~30/'~*69~*,)*6~~~~~~~~~~~
U0+*9=:~/8~'/0:9,507~'6%~~~~~~~~~
U~'=00=~30/'~*69~=0+'9,+~~~~~~~~~
P/~1/,9~259+~~~~~~~~~~~~~~~~~~~~~
U~'=00=~+6)*~*69~://,~~~~~~~~~~~~
]0:~/.90~).~1%~150:~~~~~~~~~~~~~~
You suspected that all those ~
could be destroyed parts of the text containing the key, but after detailed investigation of the enemy robot leftovers, you found that this is not the case, and in fact that multiple repeating ~
are not artifacts of the self-destruction procedure nor artifacts of the encryption, they are indeed features of the plain-text. Further, all the line breaks in the encrypted message should be line breaks in the plain-text.
Examining the damaged memory cells of the enemy robot, most of them were able to unrecoverably self-destruct, but one of them could not. In that memory cell you found a crib (a part of the message, in the case the message containing the key). This is the crib:
myself
Can you recover the text containing the key, the key and the received message?
Please, use spoiler blocks to protect sensitive parts of your answer. Use >!
for spoiler blocks and use <br>
to break lines inside spoilers.