Module cipher_crypt::hill [−][src]
In classical cryptography, the Hill cipher is a polygraphic substitution cipher based on linear algebra.
Invented by Lester S. Hill in 1929, it was the first polygraphic cipher in which it was practical (though barely) to operate on more than three symbols at once. The matrix used for encryption is the cipher key, and it should be chosen randomly from the set of invertible n × n matrices (modulo 26).
Please note that this cipher uses the external library
rulinalg to perform the linear algebra calculations. If
you want to create an instance of the Hill
struct using the new
function, then you will
need to add a dependency on the rulinalg
crate in Cargo.toml
. Alternatively, you could
avoid dealing with matrices altogether by creating an instance of Hill
via the function
Hill::from_phrase(...)
.
Structs
Hill |
A Hill cipher. |