首页 > 编程知识 正文

希尔密码,密码编码学与网络安全第七版pdf

时间:2023-05-03 12:54:11 阅读:162935 作者:3780

希尔密码

Now、 hillcipherisaverybasiccryptographictechniquewhichisusedtoconvertastringintociphertext.thistechniquewasinventedbyanamericanmanmericanmantericted ershill '.thisisapolygraphicsubstitutioncipherbecausethesubstitutionorencryptionisperformedontheblockock itworksonmultiplettion irstpolygraphiccipherwhichwasoperableonmorethan3symbols。

目前,Hill Cipher是用于将字符串转换为密文的非常基本的加密技术。 这项技术是由美国数学家“悲伤爆米花”发明的。 这是多图形替换密码,因为字符上的块将进行替换或加密。 可以同时处理多个字符。 这是第一个可用于三个或更多符号的多重密码。

简化技术

实施技术

加密(Encryption ) In Hill Cipher,eachletterisrepresentedbyanumbermodulo 26.soaccordingtothis,A=0,B=1,C=2, z=25.astringwillbegiventoyouandyouhavetomakeacolumnmatrixusingtheletter-numbererrelationshipshownabove.we ' lllbegivena shouldnotbezerootherwisewecannotapplyhillciphertechnique.thiskeymatrixwillbeusedindecryptionaswell.wenedtomultiplythesetwet

在Hill Cipher中,每个字符都用模仿26的数字来表示。 因此,A=0,B=1,C=2,Z=25。 提供字符串。 必须使用上面显示的字符和数字关系创建列矩阵。 还将获得密钥矩阵。 有必要确认重要性不是零。 否则,就无法应用希尔密码技术。 该密钥矩阵也用于解密。 我们需要把这两个矩阵相乘。 使用希尔密码的密文表达式如下:

Here,nistheorderofmatrixorwecansaythenisthenumberofletterswearetakingatoncetoencrypt.now, you ' llgetcolumnmatrixofordernx1whichwillhavenumbersfrom0to 25.youjusthavetoreplacethenumberwithelettersfromtherelationshionshiom

其中n是矩阵的阶数。 或者,n可以说是我们一次加密的字符数。 这样就得到了顺序为nx 1的列矩阵。 这个列矩阵的数字是0到25。 只需用上面所示关系的文字替换数字,就可以准备密文。

解密) the letter-numbererrelationshipwillremainthesameinthedecryptionpart.we ' llusetheinverseofthekeymatrixione esame.weneedtomultiplytheinverseofthekeymatrixwitheciphertextmatrixwe ' vegotfromtheencryptiontechnique.the

字符和数字的关系在解密的部分不变。 解密使用密钥矩阵的反函数。 矩阵的顺序不变。 需要对从加密技术中得到的密文矩阵进行密钥矩阵的逆乘法运算。 公式如下。

Example:

例如:

letustakeplaintext 3360 dogandthekeymatrixis :

采用纯文本吧。 DOG和密钥矩阵如下所示。

D=3,O=14,G=6 so our column matrix is:

D=3,O=14,G=6,所以我们的列矩阵如下。

nowwehavetoapplythemultiplicationasshownintheencryptionformula.aftermultiplyingandapplyingmodulo 26 wegotthisciphertextmatrix 36

这里,需要应用加密公式中所示的乘法。 乘以模型26并应用后,我们得到了这个密文矩阵:

Now,22=W,11=L,24=Y

目前,22=W,11=L,24=Y

So cipher text of DOG is WLY

所以DOG的密文是WLY

no WWE ' lldodecryptionandwe ' llusethegeneratedciphertexttoconvertittoplaintext.first of all,wenedtofindtheinverseofthekeymall

现在开始进行解密,使用生成的密文转换为纯文本。 首先,我们需要找到密钥矩阵的逆矩阵。 因此,我们的密钥矩阵的逆如下。

nowaftermultiplyingtheinversematrixwiththeciphertextmatrixthatwe ' vegeneratedintheeencryption,wecangetoutplaintextmatrixagagaion

在此,将逆矩阵乘以加密生成的密文矩阵后,可以再次得到纯文本矩阵。

soaftermultiplyingandtakingmodulo 26,the decrypted matrix is:

因此,26倍后,解码的矩阵如下。

3=D,14=0 and 6=G,sothisisequaltotheplaintextitmeansourencryptionanddecryptionbothareright.now,thehillciphertechniqitertechechniqiquted

3=D,14=0和6=G,因此与纯文本相同。 这意味着加密和解密是正确的。 希尔密码技术结束了。

3:https://www.include help.com/cyber-security/hill-cipher.aspx翻译

希尔密码

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。