Skip to content
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

Index out of range error in cryptanalib.evaluate_vigenere_key_length #82

Open
kaushiksk opened this issue Aug 16, 2018 · 3 comments
Open
Labels

Comments

@kaushiksk
Copy link

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

@unicornsasfuel
Copy link
Contributor

I'll have to dig into this. This was contributed code I'm not super familiar with. Thank you for the report!

@kaushiksk
Copy link
Author

Let me know if you need any help!

@unicornsasfuel
Copy link
Contributor

I would welcome help, pull requests are accepted as long as they respect the contributing rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants