![]() |
|
|
This example shows how to encrypt a string of data using the simple Hill cipher. It is not a very strong encryption scheme but will suffice for many basic applications. The VI can encrypt and decrypt a string. Because the encrypted string can contain characters which may be difficult to transfer over a network or store in a file, the VI also generates a hexadecimal version of the string which can be easily shared. For decryption you can choose to use the original string or the hexadecimal version of the string.
The chosen encryption key must be a matrix with a valid inverse. The VI checks for the validity of the encryption key. In the example the encryption key is a 3x3 matrix, but the example can be easily expanded to use larger square matrices.
Information on the Hill cipher can be found in Wikipedia here.
There are no comments on this document