13 votes
Accepted

An unbreakable Hill cipher?

The Hill cipher is vulnerable to known-plaintext attack. Once the attacker gets $n$ plaintext/ciphertext pair it can break the cipher by solving a system of linear equations. Consider AES, it is not ...
kelalaka's user avatar
  • 48.5k
4 votes
Accepted

Are there ready-to-use software that can try many decryption techniques on a ciphertext, with no information?

The project Cryptool does some if not all of what you want. I have not used it extensively, but it seems quite well documented. Below from the webpage: CrypTool 1 (CT1) was the first version of ...
kodlu's user avatar
  • 22.5k
4 votes
Accepted

Hill's Cipher - Known Plaintext Attack

Actually it seems to me that you are using the wrong basis and got the key for the other way around: Suppose you have the plain text $x_1 = \pmatrix{5\\17}$ and $x_2= \pmatrix{8\\3 \\}$ and the ...
Lery's user avatar
  • 7,679
3 votes
Accepted

What weaknesses are worth investigating in this non-linear matrix cipher?

Well, with this cipher, we have: $$\mathcal{E}(p) + \mathcal{E}(q) = \mathcal{E}(p+q)$$ (and the addition operation is adding the matrix elements modulo 256) That is, it is linear; the standard linear ...
poncho's user avatar
  • 147k
3 votes
Accepted

Z superscript confusion

Usually $\mathbb{Z}^3$ denotes the triple cartesian product (triplets) of the set of integers, so it is a set consisting of all triplets $(a,b,c)$ where $a,b,c \in \mathbb{Z}$ Which makes sense, ...
Amit's user avatar
  • 432
2 votes
Accepted

How does hill cipher key exchange takes place?

In the Hill cipher, like in any symmetric cipher, it is assumed that both parties have the same secret key already. Securely exchanging a key is not part of the symmetric algorithm, neither is it its ...
Henno Brandsma's user avatar
2 votes

What weaknesses are worth investigating in this non-linear matrix cipher?

As poncho mentioned, your cipher is linear. You seemed initially to think that it was quadratic. This is just an answer to say that it is well-known that your equation can be rewritten to be of the ...
Mark Schultz-Wu's user avatar
2 votes
Accepted

Problem while decrypting Hill cipher

These modular equations are not uniquely solvable: $$\begin{bmatrix}7&2\\ 10& 20\end{bmatrix}, \begin{bmatrix}7&2\\ 23& 7\end{bmatrix}, \begin{bmatrix}20&15\\ 10& 20\end{...
Henno Brandsma's user avatar
1 vote

Hill cipher concepts

The Hill Cipher as one of the classical cipher is invented by Lester S. Hill in 1929. It is the first polygraphic cipher that can operate more than one letter at a time. There is a rule for key K: <...
kelalaka's user avatar
  • 48.5k
1 vote

Impossible hill cipher question

Two independent ideas: In the Hill cipher, elements of matrices are in the ring of integers modulo the number of characters in the alphabet used, usually $n=26$. Therefore, as long as the denominator ...
fgrieu's user avatar
  • 141k
1 vote

Are there ready-to-use software that can try many decryption techniques on a ciphertext, with no information?

The other answer about CrypTool led me after some links to the freeware CryptoCrack, which seems to be a great tool. Here is how to use it on a simple example (taken from the documentation): Paste <...
Basj's user avatar
  • 553
1 vote
Accepted

Block cipher linearity (in relation to hill ciphers)

Yes, you can convert the Hill Cipher into almost any mode of operation. For simplicity, assume that $M$ represent the key matrix and $P$ represent the plaintext vector and $C$ is the corresponding ...
kelalaka's user avatar
  • 48.5k
1 vote
Accepted

Hill Cipher Plaintext Attack: Dealing with Non-uniqueness of Matrix Inverses?

More standard is that we multiply a column with a plain text vector to get the cipher text vector so the known plain text equation (the first two pairs) yield $$KP=C = K\begin{bmatrix}5 & 8\\17 &...
Henno Brandsma's user avatar
1 vote

Hill Cipher how to encrypt and decrypt when both "I" and "J" are in plaintext

"KEYWORD" is a weird format for a Hill cipher, aren't you confused with the Playfair cipher? There you work with a 5x5 matrix where I and J are often conflated into I (as 26 is one too big) and the ...
Henno Brandsma's user avatar
1 vote

Hill Cipher with unequal matrix

It's indeed standard to add pre-agreed padding characters at the end to make the plain text a multiple of $n$ when we use an $n \times n$ encryption matrix. So your encoded plain text could be $$\...
Henno Brandsma's user avatar
1 vote

Hill Cipher with unequal matrix

To make the plaintext matrices equal, you could use padding with a null character, such as using "X". For example with "ATTACKS", you would get the following vectors: $$ \begin{bmatrix}A\\T\\T\end{...
SamG101's user avatar
  • 613
1 vote

Hill cipher: How to find an unknown key of unknown size

Assuming that $2\times2$ matrix is used, and the encryption starts from the first letter of the plaintext, the key can be found by just calculating the "encryption" with size of $4$ plain- and ...
M.P's user avatar
  • 225
1 vote

Hill cipher -- obtain matrix key

The key is 4 long, so should be a $2 \times 2$ matrix. In members of $\mathbb{Z}_{26}$ CFDG becomes $2, 5, 3, 6$ in the usual A ...
Henno Brandsma's user avatar
1 vote

Hill cipher -- obtain matrix key

The key is 4 characters long, therefore it must be in a 2 × 2 matrix. The numbers in this matrix must be the inverse of the encryption key matrix, and there are various methods to work this out (see ...
SamG101's user avatar
  • 613
1 vote

Hill Cipher if the length of the string is not divisible by the Key Dimensions

This is a standard problem in modern cryptography (eg for CBC-mode). The standard solution is to use Padding or some other agreed-upon mechanism to encode variable-length messages as a multiple of ...
SEJPM's user avatar
  • 46k
1 vote
Accepted

Clarification on Hill Cipher crib dragging technique

I suppose (as you use a length $4$ crib) that your encryption matrix $C$ is of the form $$\begin{bmatrix} k_{11} & k_{12}\\ k_{21} & k_{22}\\ \end{bmatrix}$$ and so assuming word $(w_1, w_2, ...
Henno Brandsma's user avatar
1 vote

cofactor matrix in Hill cipher

Over any (commutative unitary) ring $R$, the inverse of $$E=\begin{bmatrix} a&b\\c&d\end{bmatrix}, a,b,c,d \in R$$ (if it exists), can be found by first computing the determinant $f:=ad-bc$. ...
Henno Brandsma's user avatar
1 vote

cofactor matrix in Hill cipher

I think the adjugate matrix is the transpose of the cofactor matrix. (Btw, I do not think this is a crypto question.)
Shan Chen's user avatar
  • 2,715
1 vote

Hill-Chiffre - How can I find the Matrix $X$

In general case, let $A\cdot X=B $. Then: $${(A^T\cdot A)^{-1}}\cdot A^T\cdot A \cdot X={(A^T\cdot A)^{-1}}\cdot A^T \cdot B$$ So $$X={(A^T\cdot A)^{-1}}\cdot A^T \cdot B.$$ Edit: Another way to ...
Meysam Ghahramani's user avatar
1 vote

Figuring out key in hill cipher (chosen-plaintext attack)

An easier way to say what Ilmari Karonen said is: Choose the plaintext to be the identity matrix. Thus, when it is multiplied by the key, the resultant ciphertext will be the key it self.
Waleed Mortaja's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible