Kasiski Examination Period Guesser
Count actual repeated-ngram position-pair distances and divisor votes, overlapping ngrams explicit; candidates not a recovered key length. Classical educational encoding only; not secure encryption, no hidden normalization or inferred key.
Description
Kasiski examination considers distances between repeated letter groups.
Kasiski examination considers distances between repeated letter groups.1
Divisibility votes suggest candidate periods but do not choose a unique key length. Use Kasiski Examination Period Guesser to evaluate the supplied inputs under the specific model below.
When to use Kasiski Examination Period Guesser
Use Kasiski Examination Period Guesser to evaluate the supplied inputs under the specific model below. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
How to use Kasiski Examination Period Guesser and understand its results
- Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
- Enter Text, Ngram length, Max candidate period using the field table and validation rules below, then run the tool.
- Read Repeated ngram distances, Candidate periods, Distance divisibility votes and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| text | Text | string | Required; constraints below |
| ngramLength | Ngram length | number | Required; constraints below |
| maxCandidatePeriod | Max candidate period | number | Required; constraints below |
Enter uppercase A–Z text of at most 512 characters, an n-gram length from 2 to 8 and maximum period from 2 to 128. Collect overlapping positions of repeated n-grams and distances between every pair of their occurrences. Count distances divisible by each period from 2 through the maximum, preserving that period order. More than 10000 pair distances is rejected; short or empty text yields no distances and zero votes. Votes suggest candidates without identifying a key.
vote[p] = count(repeatedNgramPairDistances divisible by p), for p=2..maximum Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| repeatedNgramDistances | Repeated ngram distances | array of number |
| candidatePeriods | Candidate periods | array of number |
| distanceDivisibilityVotes | Distance divisibility votes | array of number |
{
"input": {
"text": "ABCABCABC",
"ngramLength": 3,
"maxCandidatePeriod": 6
},
"output": {
"repeatedNgramDistances": [
3,
6,
3,
3,
3
],
"candidatePeriods": [
2,
3,
4,
5,
6
],
"distanceDivisibilityVotes": [
1,
5,
0,
0,
1
]
}
} Limitations and assumptions
Divisibility votes suggest candidate periods but do not choose a unique key length. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use Vigenère Key-Length IoC Estimator for a related task: Index of coincidence compares repeated letters within candidate key-position columns.
Use Bigram English Fitness Score for a related task: Bigram fitness sums corpus-dependent log scores for adjacent symbol pairs.
References
-
Kasiski Examination Period Guesser — tool.io
Similar or alternative tools
- Vigenère Key-Length IoC Estimator
Index of coincidence compares repeated letters within candidate key-position columns.
- Bigram English Fitness Score
Bigram fitness sums corpus-dependent log scores for adjacent symbol pairs.