Function Repository Resource:

HillCipherDecrypt

Source Notebook

Decrypt a string encrypted by a Hill cipher

Contributed by: Swastik Banerjee

ResourceFunction["HillCipherDecrypt"][cipher,key]

decrypts the cipher String encrypted by the Hill cipher algorithm using key.

Details and Options

ResourceFunction["HillCipherDecrypt"] is commonly used in capture-the-flag cryptanalysis challenges.

Examples

Basic Examples (1) 

Decrypt an encrypted Hill cipher into its corresponding plaintext using the known key:

In[1]:=
ResourceFunction["HillCipherDecrypt"]["lrzlhhombgichae", "GYBNQKURP"]
Out[1]=

Properties and Relations (1) 

The key and cipher must be strings:

In[2]:=
ResourceFunction["HillCipherDecrypt"]["POH", "GYBNQKURP"]
Out[2]=

Publisher

Wolfram Summer School

Version History

  • 1.0.0 – 29 July 2020

Related Resources

Author Notes

Does not support keys which are non-invertible when converted to matrix.

License Information