6th December 2019 at 10:10 am #44676JfairyMember
Madness how do you always manage to submit first! Do you have some program which automatically pulls stuff from the webpage and then submits it or do you just use your program very quickly?6th December 2019 at 4:09 pm #44701
> Do you have some program which automatically pulls stuff from the webpage?
> and then submits it?
for the usual ciphers
> or do you just use your program very quickly?
for the other ciphers, yes
So far it has been working relatively well. There have been two problems, but I got
Just so you know:
1. I am not eligible for prizes, so you don’t have to complete with me. You may, if you
want to work on your own coding skills. I certainly don’t want to discourage anyone, and
I welcome the competition.
2. I write all of my own programs. No cheating.
3. I have been assuming that there are others who automate much of things. That’s why I
worked so hard to get my tools to be fast. I suspect that Cribbage and Chiffre Dechiffrable
have a similar setup. Are you two here and want to respond?
I am happy to discuss how to automate, and techniques for cracking various ciphers. Ask any
question, and I’ll say whatever Harry will allow.6th December 2019 at 5:55 pm #44708GsempleMember
I’m team Chiffre Déchiffrable and I have been trying to implement solvers for ciphers from previous years in python. I’m aiming to rewrite most of it in C for next year as python gets quite slow. What language do you do it in?7th December 2019 at 1:21 pm #44715JfairyMember
I have currently got all my programs in python too, but if I go much further should really transfer to C.
I don’t know much about the communication with other applications so have to input everything manually into my programs which sometimes means that I submit quite late if I’m busy. This is my second and last year competing (my team is intellect devourers) I’ll probably carry on in future years and try to get quicker along the way (I’ll be doing a degree in maths)
Out of interest which algorithms are you both using for substitution and transposition? I use simulated annealing and a key space search although these both feel a little on the inefficient side. (I don’t have the best setup on my sim-anneal what ngrams do you find best?).7th December 2019 at 1:21 pm #44714EpicgeethMember
Well now I have plans for next year…7th December 2019 at 1:22 pm #44716CribbageMember
Madness has indeed been awesome. It is very difficult to see how Madness could have submitted solutions so quickly to the challenges in the recent rounds without a thorough understanding of how to analyse the encrypted messages. The playfulness in the twists on the ciphers used means that dependence on previously written code will only get you so far. That has been my experience this year (my second year, and what a great year it has been already – thanks Harry!). I too have written my own set of cipher-cracking and word segmentation tools, but the most enjoyment has come when the challenges have gone beyond what they can accomplish.
Thanks Cribbage, glad you are enjoying it!
Harry7th December 2019 at 1:23 pm #4472167105112104101114Member
I’m interested in how you automatically take the ciphers from the website Madness, is it just url requests and then parsing to get the required data? I am also interested in what language you use, I currently use python but have been considering moving over to julia as it is similarly high-level but much faster, and I coding too much C hurts my brain.7th December 2019 at 1:24 pm #44731
There was one year when we posted the last challenge as a gif, just to slow everyone down!
Harry8th December 2019 at 11:22 am #44743
@Jfairy Yes, moving some programs to C would benefit you.
For mono substitutions, I do not use annealing. I use Jakonsen’s 1995 algorithm, and find that
there is no need for a “temperature”. For that I use tetragrams (4). This one is in C.
For transpositions, if I know the keylength, I do a stochastic hill climb with a constant
“temperature”/jitter. For each iteration, I swap two elements of the permutation key.
It’s fast enough that I can try lots of keylengths until I get a good fitness.
For that I am still using trigrams. This one is in Python.8th December 2019 at 11:23 am #44748EpicgeethMember
The BeautifulSoup library is probably a good way to parse the webpage and extract the ciphertext for anyone using python.8th December 2019 at 11:23 am #44746
I am using Python and C. Sometimes I use Python for one part of a cipher, but then it calls
a C program for another part. For that I use the “subprocess” module. It’s nice, because
classifying the cipher is easier in Python anyway.9th December 2019 at 10:43 am #44768
So, Harry’s not letting me post code on how to download the ciphertexts, so here are some
suggestions: The wget program works in a terminal or script to get pages. Then you can use
other tools to cut the ciphertext out of the page. Wget is on Mac and linux, and I seem to
remember seeing a Windows executable once.
In Python, the “requests” library gets web pages and remembers cookies, etc. In python it
should be easy, once you have the web page, to cut out the ciphertexts and save them.9th December 2019 at 10:43 am #44774
Thanks for your patience, Madness. Figured it was more valuable letting people try to work this out for themselves, but the hints are good. Keep them coming!11th December 2019 at 4:08 pm #44745
What was your submission time last year for 10B? Just curious. My Python program took
almost 2 hours. I have a C version now that is much faster.
You have me intrigued about your use of your own website. Did you make forms so that you
copy and paste into text inputs, then wait for the result? Did you make the site private?
If you ever want to break a Playfair cipher, you will definitely feel the need for more speed!
- You must be logged in to reply to this topic.