Biz wrote:Does anyone have documentation on how ZKDecrypto scores its solutions? I can't find anything online. I am using the lite version to solve variations (where the columns move) and the using the scores help the computer to determine whether it will accept or reject the column moves. The problem is that in most cases the scores are to similar to make an informed decision. Anyway, I'd like to know how it scores the solutions before I move on to writing a separate program to score the cipher moves.
I think it is something like this:
First, it adds up ngram frequencies and weighs them: sum = bigrams/(2^3) + trigrams/(2^2) + quadgrams/(2) + tetragrams.
Then it calculates index of coincidence, entropy, and chi^2 tests and uses their differences from expected values for English.
Then it combines the score similar to this:
score = sum*(1.05-5*iocdifference)*(1.05-5*entropydifference/150)*(1.05-5*chi2difference/60).
I think the factors 1.05, 5, 60, and 150 came from experimentation to determine which adjustments to the formula give the best results. You might have to run your own experiments - I don't know which values are best or if the ones I used here are the most up to date.
The composite score is important because if it is only ngram-based, it is easy to maximize with spurious plaintexts such as THE THE THE THE THE.