I know the plaintext and ciphertext. I want to find the vector key which is used to encrypt the text. here is the step I want to do.
- The convert the ciphertext and plaintext into matrix of n x n.
- Find the inverse of the matrix which is equal to MM-1..
- Use the function $k=p-c \pmod{26}$ to get the keys. This function delivered from $C=P\cdot K \pmod {26}$.
anything else, I missed or wrong? I cannot implement it in the code, not sure what wrong