NCIM Group sponsored problem.
The NCIM Group does a lot of work on IT solutions in defense and security. Good security usually starts with picking a strong password. Generating a password at random is generally a good practice. For example, a password like "2R4eZ9Rqup" is a bit harder to guess than "god", "love", "sex" or "secret".
The problem with passwords consisting of random letters and digits is that they are hard to remember. Instead of using letters and digits it is also possible to generate passwords by putting random words together. Words are easier to remember than letters and digits.
Using a dictionary of 7776 (65) words, a 5-random-word password is about as strong as a 11-random-character password.
77765 = 28430288029929701376 ≈ 3 * 1019
6211 = 52036560683837093888 ≈ 5 * 1019
Some applications hide the password you are typing on the screen by printing dots or asterisks. This allows someone watching your screen to count the number of characters in your password. The NCIM Group wants you to find out whether or not this compromises the strength of your password.
You must write a program that calculates the number of possible passwords that can be generated given:
the dictionary of words, the amount of words used to generate the password and the length of the password.