山模密码加密26模 [英] 26 modulo in hill cipher encryption

查看:234
本文介绍了山模密码加密26模的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读关于 Hill Cipher 加密算法,从维基百科。我看到我有一个键作为矩阵,必须乘以值的矩阵。但有两件我不明白的事情。

I am reading about Hill Cipher encryption algorithm, from the wikipedia. I see that I have a key as a matrix that must multiply by the the matrix of values. But there are 2 things I don't understand.

我不知道(mod 26)的意思。我知道它是模26,但我不知道它是应用什么?

I don't know the mean of (mod 26). I know it is modulo 26, but I don't know for what it is applied?

对于第二个问题,我不明白矩阵[15 14 7]来自?

As for the second issue, I can't understand where the matrix [15 14 7] is coming from?

非常感谢任何好的解释。

Any good explanation will be highly appreciated .

推荐答案

26 是字典的长度,恰好是英文字母(A到Z)的长度。使用模运算符可以将矩阵乘法(加密)的每个可能输出映射到字母表中的一个字母( 834 = 2(mod 26),这是 B ),它可以以一串字母的形式存储加密的邮件。

26 is the length of your dictionary, which happens to be the length of the English alphabet (A to Z). Using the modulo operator allows you to map every possible output of the matrix multiplication (encryption) to a letter in the alphabet (834 = 2 (mod 26) which is B), which lets you store the encrypted message in the form of a string of letters.

[15 4 7] 来自矩阵 [67 222 319](mod 26)

< img src =https://i.stack.imgur.com/TFxoa.pngalt =在此输入图像说明>

三等号符号表示矩阵 [67 222 319] 等于 [15 4 7] modulo 26.左边的每个元素 - 手矩阵应该与右边矩阵中的相应元素一致为模26,因此您可以将模运算符应用于左侧矩阵中的每个元素,以获得右侧矩阵中的每个元素。

The triple equals sign means that the matrix [67 222 319] is congruent to [15 4 7] modulo 26. Every element in the left-hand matrix should be congruent modulo 26 to the corresponding element in the right-hand matrix as well, so you apply the modulo operator to every element in the left-hand matrix to get every element in the right-hand matrix.

这篇关于山模密码加密26模的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆