Vigenère Key-Length IoC Estimator
Compute per-candidate-key-length pooled within-column IoC and explicit eligible-pair denominators; absent pairs sentinel−1, distinct from whole-text IoC and no recovered-key claim.
Description
Index of coincidence compares repeated letters within candidate key-position columns.
Index of coincidence compares repeated letters within candidate key-position columns.1
It provides evidence for candidate periods rather than identifying a key or proving a cipher type. Use Vigenère Key-Length IoC Estimator to evaluate the supplied inputs under the specific model below.
When to use Vigenère Key-Length IoC Estimator
Use Vigenère Key-Length IoC Estimator 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 Vigenère Key-Length IoC Estimator and understand its results
- Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
- Enter Text, Max candidate key length using the field table and validation rules below, then run the tool.
- Read Candidate key lengths, Pooled within column io c, Eligible ordered pair counts 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 |
| maxCandidateKeyLength | Max candidate key length | number | Required; constraints below |
Enter nonempty uppercase A–Z ciphertext and an integer maximum candidate period from 1 to 128. For each period, partition letters by index modulo period. Pool same-letter ordered pairs and eligible ordered pairs across columns, then divide the two totals. A period with no eligible pairs returns −1 as an unavailable-estimate sentinel. The tool reports all candidate statistics and does not select a true key length.
pooledIOC = ΣcolumnsΣletters n(n−1)/Σcolumns size(size−1); no eligible pairs→−1 Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| candidateKeyLengths | Candidate key lengths | array of number |
| pooledWithinColumnIoC | Pooled within column io c | array of number |
| eligibleOrderedPairCounts | Eligible ordered pair counts | array of number |
{
"input": {
"text": "ABAB",
"maxCandidateKeyLength": 2
},
"output": {
"candidateKeyLengths": [
1,
2
],
"pooledWithinColumnIoC": [
0.3333333333333333,
1
],
"eligibleOrderedPairCounts": [
12,
4
]
}
} Limitations and assumptions
It provides evidence for candidate periods rather than identifying a key or proving a cipher type. 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 Kasiski Examination Period Guesser for a related task: Kasiski examination considers distances between repeated letter groups.
Use Chi-Squared English Fitness Scorer for a related task: A Pearson letter-fit score compares observed counts with a supplied positive frequency model.
References
-
Vigenère Key-Length IoC Estimator — tool.io
Similar or alternative tools
- Kasiski Examination Period Guesser
Kasiski examination considers distances between repeated letter groups.
- Chi-Squared English Fitness Scorer
A Pearson letter-fit score compares observed counts with a supplied positive frequency model.