パスワードの解読方法の一つとして, 全ての文字の組合せを試みる総当たり攻撃がある。“A”から“Z”の26種類の文字を使用できるパスワードにおいて, 文字数を4文字から6文字に増やすと, 総当たり攻撃でパスワードを解読するための最大の試行回数は何倍になるか。
令和元年度 秋期 ITパスポート試験 問80
This question's explanation and your answers so far.
問 80
Incorrectア
“2” is the mistake of treating the increase in the number of characters (6−4=2) directly as the factor. The total number of combinations grows exponentially with the number of characters, so even when the length increases by 2 digits it does not become merely 2 times; it becomes 26 to the 2nd power = 676 times.
Incorrectイ
“24” is a value with no basis and does not match 26 to the 2nd power = 676. It seems to be confused with something like the difference in the number of character types (for example, mistakenly thinking 26−2) or a factorial or some other calculation, but the correct factor is 676 times.
Incorrectウ
“52” is 26×2, a value resulting from a misunderstanding such as “adding the number of character types once for each added character (2 characters), or simply doubling it.” In reality it takes effect through multiplication (26×26), so 26 to the 2nd power = 676 times is correct.
- エ
正解 A brute-force attack tries every possible combination of usable characters one after another, so the maximum number of trials can be expressed as “the number of character types raised to the power of the number of characters.” There are 26 character types, from “A” to “Z.” With 4 characters there are 26 to the 4th power patterns, and with 6 characters there are 26 to the 6th power patterns. The increase factor is 26 to the 6th power ÷ 26 to the 4th power = 26 to the power of (6−4) = 26 to the 2nd power = 676 (times). Therefore “エ” is the correct answer. You can reach the same result by noting that when the number of characters increases by 2, you multiply by the number of character types once for each added digit, giving 26×26=676 times.
- Maximum number of trials for a brute-force attack = the number of usable character types raised to the power of the number of characters. When the number of characters increases by n, it grows by a factor of (the number of character types) to the nth power.
- In this problem the number of characters increases by 2, so the factor is 26 to the 2nd power = 26×26 = 676 times. This shows that the longer a password is, the more exponentially difficult it becomes to crack.