Hia guys, I’m helping out a friend with some code and so am trying to wrap my head around “Index of Coincidence” as seen here: http://jdege.us/crypto-python/ar01s08.html#id2963591
Essentially: I have a string output coming out of a for loop, and I want to calculate its index of coincidence, eventually I’ll have it only displaying outputs which have a value over a threshold, but that can wait for now!
Any tips or guidance here would be appreciated!
Have a look at the Wikipedia article. The index of coincidence of a text is defined as
where
c=26,n_iis the frequency of each letter, andNis the length of the text.