Two-Square Cipher Tool
Explicit horizontal two-square rectangle (same-row swaps, no special identity rule) digraph substitution. Classical educational encoding only; not secure encryption, no hidden normalization or inferred key.
Description
A two-square transformation uses two independently supplied letter grids.
A two-square transformation uses two independently supplied letter grids.1
Grid orientation and rectangle conventions must match before ciphertext can be compared. Use Two-Square Cipher Tool to evaluate the supplied inputs under the specific model below.
When to use Two-Square Cipher Tool
Use Two-Square Cipher Tool 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 Two-Square Cipher Tool and understand its results
- Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
- Enter Text, Caller square a, Caller square b, Decode using the field table and validation rules below, then run the tool.
- Read Transformed 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 |
| callerSquareA | Caller square a | string | Required; constraints below |
| callerSquareB | Caller square b | string | Required; constraints below |
| decode | Decode | boolean | Required; constraints below |
Enter even-length text using ABCDEFGHIKLMNOPQRSTUVWXYZ and two exact permutations of that 25-letter alphabet. In each pair retain each source row and exchange the two column coordinates between the keyed squares. This is horizontal two-square: applying it twice restores the text, and the current decode flag does not change the operation. Empty text is allowed; no J merging or filler insertion is performed.
(rowA,colA),(rowB,colB) → squareA[rowA,colB], squareB[rowB,colA] Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| transformed | Transformed | string |
{
"input": {
"text": "AB",
"callerSquareA": "ABCDEFGHIKLMNOPQRSTUVWXYZ",
"callerSquareB": "ABCDEFGHIKLMNOPQRSTUVWXYZ",
"decode": false
},
"output": {
"transformed": "BA"
}
} Limitations and assumptions
Grid orientation and rectangle conventions must match before ciphertext can be compared. 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.
This educational transformation or format check does not establish modern cryptographic confidentiality, authentication or key security.
Alternative or Complementary methods
Use Hill 2×2 Cipher Decoder for a related task: Hill decoding uses the key matrix's modular inverse.
Use Bifid Cipher Tool for a related task: Bifid fractionates symbols through two-dimensional coordinates within blocks.
References
-
Two-Square Cipher Tool — tool.io
Similar or alternative tools
- Hill 2×2 Cipher Decoder
Hill decoding uses the key matrix's modular inverse.
- Bifid Cipher Tool
Bifid fractionates symbols through two-dimensional coordinates within blocks.