featherduster
featherduster copied to clipboard
Index out of range error in cryptanalib.evaluate_vigenere_key_length
The code
import cryptanalib as ca
ca.evaluate_vigenere_key_length("ucoizsbtkxhtadcg", 10)
Traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cryptanalib/classical.py", line 226, in evaluate_vigenere_key_length
ioc_list.append(ind_of_coinc(ciphertext, length))
File "cryptanalib/classical.py", line 188, in ind_of_coinc
freq[offset][to_number(text[i*distance+offset])] += 1
IndexError: list index out of range
Get the same error for max_length = 5, 20 as well
I'll have to dig into this. This was contributed code I'm not super familiar with. Thank you for the report!
Let me know if you need any help!
I would welcome help, pull requests are accepted as long as they respect the contributing rules.