-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change input to be multiple messages But with same key #6
Comments
I am not sure if this approach will work. In addition to the selection and order of the rotors, ring settings and plugboard connections, encryption of the Enigma messages was controlled by a so called message key, a random group of characters that was unique for each message. It was not allowed to use the same message key for multiple messages. The encryption procedure is described in detail here. Also, please note that the code in this project is not just C++ code, many parts of it are written in a special way to run computations on a GPU. Modification of such code is pretty difficult. |
Thanks for your reply. For example these are my messages: ( THESE ARE DUMMY MESSAGES) FFV A QS 1410 1TLE 1TL 45 = BXF LAP DC3 A AW5 1415 1TLE 2TL 45 = BXF LAP DC3 A AW5 1421 2TLE 2TL 45 = BXF LAP DC3 A SS2 1436 1TLE 1TL 50 = BXF LAP FC3 A SS2 1440 1TLE 1TL 45 = BXF LAP FC3 A FH4 1444 1TLE 1TL 45 = BXF LAP NH9 A EE4 1720 1TLE 1TL 45 = BXF LAP As you see every message send with this key : Ring = ?? and we know in German Army they had a key sheet for W.O and Ring and plugboard , and all of these messages are sent in one day and they have the same Plugs , Ring setting and wheel order and due to lazy operator they have the same Grundstellung. I know your program prepares to do the tasks in some matrix format due to GPU conditions, but my knowledge in GPU programming is little. In CPU program it is pretty easy to change the score function , for example this is my score function:
Now in my main function when i want to calculate the score i have a list with 20 messages and i do score function on all of them:
and in my benchmark it works pretty good and finds the solution but it is slow. |
Even if you know GPU programming very well, it may take you weeks to modify the code the way you have described. It would be much easier to modify the CPU-only program that does basically the same thing, then you would not have to worry about parallelization. |
I agree it's hard to just "wing it" with the GPUs. They are sensitive to even a minor inefficiency which can ruin the experience. A while ago I took a course on Parallel programming https://learn.udacity.com/courses/cs344 (this one is probably out of date by now, but there are others). It makes you fairly proficient with CUDA but you forget quickly if you don't use regularly.. |
Hello my friend. |
Good news is I figured out how to do this , and It works Great!! and solved my problem like a charm in 19 min in one single pass.It was very easy to change the program but understanding CUDA was a little difficult,but I found it.As I said , I cut my messages to be 32 characters long and I took 8 of them and put them all in the input file as a single message .Then in code in "cuda_code.cu" file in " ComputeScramblerIndex" function i add one single line : char_pos = char_pos % 32;and it workssss!! with this one line of code :)the code is :
No common message with 250 characters can resist this function.! |
Hello my friend.
I am working on breaking Enigma M3 messages and doing some work.
I have about 20 messages that are all in depth messages and all of these 20 messages are encrypted with the same key .
I was working on these messages to decode theme , and actually looking for some cribs but I saw your good project and I want to use it.
Actually I have about 700 characters in these 20 messages ,that are encrypted with the same key but not one message.
I wrote a HillClime function in python that is similar to yours and I change the score function to sum all the scores from 20 messages instead of doing a score function on one message, I do score function on all 20 messages and it works fine in CPU mode but it is slow.
I was wondering if i can change your app to score all 20 messages instead of one message and sum all scores and do the other tasks.?
My knowledge about C++ is little and I really want help!!
I follow the cipher_text variable but I want some advice to do that .
So if possible please help me .
Tanx a lot for your good programs. It works very efficiently and fast.
The text was updated successfully, but these errors were encountered: