Score:1

Calculate the key of a Hill-cipher using known plain- and ciphertext

mh flag

I know I should calculate the multiple inverse of plaintext with ciphertext $\pmod {26}$. However, the problem I have is that the plaintext is a $3 \times 4$ matrix which is not square, so how would I get an inverse?

Should I get the inverse of one side (left or right) of the plaintext or is there another way?

Daniel S avatar
ru flag
HINT: https://en.wikipedia.org/wiki/Row_echelon_form
Score:0
za flag

There is definitely a mistake being made somewhere here. I believe you have fundamentally misunderstood how the hill cipher works.

  1. Your plaintext should be a string of characters, not a matrix.
  2. The hill cipher key must be a square matrix, thus cannot be 3x4. The reason for this is as you pointed out, a non-square matrix does not have an inverse thus the ciphertext would not be decryptable.
  3. The hill cipher operates on chunks ("blocks") of the plaintext to encrypt.

No matter what your text is, you should be able to split it into encryptable/decryptable chunks which map between plain and cipher text. The length of each chunk, n, tells you the dimensions of your key matrix (n x n).

Amer Yassir avatar
mh flag
Thanks for your clarification , I indeed have square key and implemented encryption and decryption, but then I wanted to get the key out of plain and cipher, but I don't know the steps , for example if you have p.t =("thegoldisburiedinorono") and c.t = ("gzscxnvcdjzxeovcrclsrc") what is main steps to get the key (knowing it's "frep")?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.