using matrices to build encrypter