Hill 2×2 Cipher Decoder

Explicit invertible2×2 Hill decoding of column digraph vectors mod 26. Classical educational encoding only; not secure encryption, no hidden normalization or inferred key.

Description

Hill decoding uses the key matrix's modular inverse.

Hill decoding uses the key matrix's modular inverse.1

Ciphertext must follow the same letter-pair and padding convention as the encoder. Use Hill 2×2 Cipher Decoder to evaluate the supplied inputs under the specific model below.

When to use Hill 2×2 Cipher Decoder

Use Hill 2×2 Cipher Decoder 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 Hill 2×2 Cipher Decoder and understand its results

  1. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
  2. Enter Text, Key matrix using the field table and validation rules below, then run the tool.
  3. Read Transformed and interpret units, signs, ordering and placeholders as explained below.
  4. 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 fieldMeaningValue typeRequirement
textTextstringRequired; constraints below
keyMatrixKey matrixarray of arrayRequired; constraints below

Enter even-length uppercase A–Z ciphertext and a 2×2 integer key with entries from 0 to 25 whose determinant is invertible modulo 26. Compute inverseDeterminant×adjugate modulo 26 and multiply each two-letter column vector by that inverse. Empty text is accepted and no padding is removed.

plainPairColumn = inverse(keyMatrix)×cipherPairColumn mod 26

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
transformedTransformedstring
json
{
  "input": {
    "text": "HIAT",
    "keyMatrix": [
      [
        3,
        3
      ],
      [
        2,
        5
      ]
    ]
  },
  "output": {
    "transformed": "HELP"
  }
}

Limitations and assumptions

Ciphertext must follow the same letter-pair and padding convention as the encoder. 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 Encoder for a related task: A two-by-two Hill cipher transforms letter pairs by matrix multiplication modulo twenty-six.

Use Two-Square Cipher Tool for a related task: A two-square transformation uses two independently supplied letter grids.

References

  1. Hill 2×2 Cipher Decoder — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies