Search code examples
encryptioncaesar-ciphervigenere

How to check if string is nonsense or set of english words


I am trying to crack Vigenère cipher from school homework by brute-force and I want to write my own script for it, because I have no information about KEY.

Is there any tool what can check how much real english words is included in input string?

Example:

This string is nonsense: 'GHDSGBHJWVHUSAFRSFUYWFBDYFTSA'

This string seems like proper OPEN TEXT: 'THENAMETOOOFTENSTOREMANAGER'

Any existing packages for Javascript, Java or Python? Or some public API what can tell me how much if any words found?


Solution

  • You could simply feed a plaintext dictionary of English words into a regex comparison with each known word against the string. Then you can do your logic after that to determine if you think it's a real English string or not.