-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement the Nihilist Cipher Auto-Solver #386
Comments
There's still a bit of work needed on the cryptanalysis solver, so this issue isn't fully resolved yet. Mostly aesthetic changes, but some bug fixes, are coming soon. |
I'm liking this so far, but I'm running into some areas you might want to look at if you haven't already:
|
Thanks for the feedback! To address your first point, I personally think the space should be included when picking the crib, since the point of the crib is to match the plaintext exactly - you wouldn't be able to distinguish between certain preferred cribs otherwise. This is more of a personal preference though, other people can give input on that. Your second point is definitely a bug though, and I'm glad you caught it. I just fixed the issue (#499) and pushed the new changes out to production. I tested it on your given input - and a few others - and it all seems to work now. |
The space in the crib is an issue I've struggled to figure out how to use properly throughout the tool. I used to always put it in (not in the Nihilist ciphers specifically, but anywhere I was using a crib with spaces), but then I felt like I was having some problems so I began removing it because I thought that was the expected behavior on my part. I think that was before I learned about github and now I'd be hard-pressed to remember which problems I was experiencing, and maybe they've been fixed in the meantime! In this case, though, since I was trying to change my block size to remove/alter the spacing, I think I should be allowed to omit it without a penalty. With any block size other than 0, the Nihilist doesn't really have spaces in the plaintext. It would be kind of me to put it in, but I'm not always kind :) |
Ooooh, these are exciting changes. I'm looking forward to giving these to my students this week. If I do this same quote, it tells me that the solver was unable to recover the keyword - but it definitely finds MOVIE towards the end. Does it give the same "unable to recover the keyword" error because it was unable to recover the Polybius key? |
If it can't find the keyword, it tells you and then CHEATS and continues to solve with what it knows to be. You can look at how many keyword options and what it found to decide if you want to let it be a problem to solve. |
OK, I looked back at one we did last week.
|
Ok this was definitely hard to fix, but I've gone through and done a bit of restructuring. In the process I've added code to analyze how much of the answer is revealed to give better feedback on the crib. |
Fixed and pushed to production |
I'm still experiencing this same issue, where the AutoSolver doesn't finish its thought that begins with "...only the choice of 15+32 works which means that", without finishing the sentence, and then jumps right into "Since K1 'L' must be", involving an erroneous choice, and getting the wrong answer: So it says, "Since K1 'L' could be any of '12, 13, 14, 15' and 'L' at position 14 can be any of '31, 32', but they also have to add up to be 47, only the choice of 15+32 works which means that Since K1 'L'..." It seems like what it's doing with the plaintext at the very bottom doesn't match the table - it clearly shows L in 15 in the PTable, which it should. I think it should have determined that E is 32 based on its reasoning above, but it leaves that spot in the table blank and assigns L to the value 32 when making decisions on the plaintext for all values of 32 except the ones in the crib. Similarly, in this one: It has the same "doesn't finish its thought" issue between the two PTables in Step 4. But, fascinatingly, in this case the last table clearly shows S in position 45, but when it assigns to the plaintext, it assigns R to the 45s. (And S to the 22s, which is the same as the case above where it should be known to be A.) Edited to add: At the bottom of Step 2, it correctly determines the tens digit for K7 to be either 3 or 4 (and the ones digit is 5), but once it gets to Steps 3 and 4, it widens the possibility to 15, 25, 35, 45, 55. I'm very confused then in Step 3 where it states "Because we know that the ones digit of K7 at position 13 is 2 by subtraction from 67, we can eliminate all the values for A that don't have 2 in the ones position. This leaves only '12, 22, 32, 42, 52' as potential values for A and '55, 45, 35, 25, 15' as potential values for K7" - which contradicts its earlier knowledge about the ones digit (and the tens digit) of K7. Hope this feedback is helpful. |
Provide an interactive guide to show coaches and participants how to approach and solve the Nihilist Substitution cipher.
This is dependent on #385
The text was updated successfully, but these errors were encountered: