<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
    <title>Re: 维吉尼亚密码加密解密教程 - Code666 (代码贴、代码片段)</title>
    <description>Re: 维吉尼亚密码加密解密教程 - Code666 (代码贴、代码片段)</description>
    <atom:link href="http://www.code666.cn/view/rss/1473b4c1" rel="self" type="application/rss+xml" />
    <link>http://www.code666.cn/</link>
    <language>en</language>
<item>
    <title>加密解密</title>
    <link>http://www.code666.cn/view/93bdcd49</link>
    <pubDate>Tue, 10 May 2022 14:50:09 +0800</pubDate>
    <dc:creator>dudu</dc:creator>
    <guid isPermaLink="false">http://www.code666.cn/view/93bdcd49</guid>
    <description><![CDATA[https://blog.csdn.net/weixin_46024145/article/details/114840238 Vigenere算法如何进行加密操作？ https://blog.csdn.net/aaa_hao/article/details/122747243 【密码学】Vigenere 维吉尼亚算法加解密 维吉尼亚密码加密解密教程 假设我们要加密一段字母： huan ying&#8230;]]></description>
    <content:encoded><![CDATA[<div class="cpp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">https<span style="color: #008080;">:</span><span style="color: #666666;">//blog.csdn.net/weixin_46024145/article/details/114840238 &nbsp; &nbsp;Vigenere算法如何进行加密操作？</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">https<span style="color: #008080;">:</span><span style="color: #666666;">//blog.csdn.net/aaa_hao/article/details/122747243 &nbsp; 【密码学】Vigenere 维吉尼亚算法加解密</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">维吉尼亚密码加密解密教程</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">假设我们要加密一段字母： &nbsp; huan &nbsp;ying &nbsp;ni 。 &nbsp; 秘钥是hello</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">1</span>，首先制作字母表</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">写一排字母<span style="color: #008000;">&#40;</span>大小写通用），下一行写上对应的数字 &nbsp;从<span class="nu0">0</span>到<span class="nu0">25</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">a &nbsp;b &nbsp;c &nbsp;d &nbsp;e &nbsp;f &nbsp;g &nbsp;h &nbsp;i &nbsp;j &nbsp;k &nbsp; l &nbsp; m &nbsp; n &nbsp; o &nbsp; p &nbsp; q &nbsp; r &nbsp; s &nbsp; t &nbsp; u &nbsp; v &nbsp; w &nbsp; x &nbsp; y &nbsp; z</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">0</span> &nbsp;<span class="nu0">1</span> &nbsp;<span class="nu0">2</span> &nbsp;<span class="nu0">3</span> &nbsp;<span class="nu0">4</span> &nbsp;<span class="nu0">5</span> &nbsp;<span class="nu0">6</span> &nbsp;<span class="nu0">7</span> &nbsp;<span class="nu0">8</span> &nbsp;<span class="nu0">9</span> &nbsp;<span class="nu0">10</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">12</span> &nbsp;<span class="nu0">13</span> &nbsp;<span class="nu0">14</span> &nbsp;<span class="nu0">15</span> &nbsp;<span class="nu0">16</span> &nbsp;<span class="nu0">17</span> &nbsp;<span class="nu0">18</span> &nbsp;<span class="nu0">19</span> &nbsp;<span class="nu0">20</span> &nbsp;<span class="nu0">21</span> &nbsp;<span class="nu0">22</span> &nbsp;<span class="nu0">23</span> &nbsp;<span class="nu0">24</span> &nbsp;<span class="nu0">25</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">2</span>，将待加密的明文huan ying &nbsp;ni转换成数字</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">如 &nbsp;huan ying ni 。 转换之后是</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">h &nbsp;u &nbsp; a &nbsp;n &nbsp; &nbsp; &nbsp;y &nbsp; i &nbsp; n &nbsp; g &nbsp; &nbsp; &nbsp; n &nbsp; i</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span> &nbsp;<span class="nu0">20</span> &nbsp;<span class="nu0">0</span> &nbsp;<span class="nu0">13</span> &nbsp; &nbsp; <span class="nu0">24</span> &nbsp;<span class="nu0">8</span> &nbsp; <span class="nu0">13</span> &nbsp;<span class="nu0">6</span> &nbsp; &nbsp; &nbsp; <span class="nu0">13</span> &nbsp;<span class="nu0">8</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">3</span>,将秘钥hello转换成数字并循环显示，重复位数和明文位数一样，如明文为<span class="nu0">10</span>位，则密文也是<span class="nu0">10</span>位</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">h &nbsp; e &nbsp; l &nbsp; l &nbsp; o &nbsp; h &nbsp; e &nbsp; l &nbsp; l &nbsp; o</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span> &nbsp; <span class="nu0">4</span> &nbsp; <span class="nu0">11</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">14</span> &nbsp;<span class="nu0">7</span> &nbsp; <span class="nu0">4</span> &nbsp; <span class="nu0">11</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">14</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">4</span>, 将明文和秘钥按位数相加,注意空格要留空，标点符号不需要转换，直接写在密文相应位置</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">14</span> &nbsp;<span class="nu0">24</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">24</span> &nbsp; &nbsp; &nbsp;<span class="nu0">38</span> &nbsp;<span class="nu0">15</span> &nbsp;<span class="nu0">17</span> &nbsp;<span class="nu0">17</span> &nbsp; &nbsp; &nbsp; <span class="nu0">24</span> &nbsp;<span class="nu0">22</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">5</span>，多于<span class="nu0">25</span>的数字减去<span class="nu0">25</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">14</span> &nbsp; <span class="nu0">24</span> &nbsp; <span class="nu0">11</span> &nbsp; <span class="nu0">24</span> &nbsp; &nbsp;<span class="nu0">13</span> &nbsp; <span class="nu0">15</span> &nbsp; <span class="nu0">17</span> &nbsp; <span class="nu0">17</span> &nbsp; <span class="nu0">24</span> &nbsp; <span class="nu0">22</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">6</span>，参照密码表，转换成字母密文为</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">o &nbsp; y &nbsp; l &nbsp; y &nbsp; &nbsp; n &nbsp; p &nbsp; &nbsp;r &nbsp; &nbsp;r &nbsp; &nbsp;y &nbsp; &nbsp;w</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span>,因此huan &nbsp;ying &nbsp;ni 。的密文是</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">oylz nprr yw。 &nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">秘钥为hello</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000040;">---------------------------------------------------------</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">解密过程</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">1</span>，将密文 &nbsp;oylz nprr yw。 &nbsp;转换成数字</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">14</span> &nbsp; &nbsp;<span class="nu0">24</span> &nbsp; &nbsp; &nbsp;<span class="nu0">11</span> &nbsp; &nbsp;<span class="nu0">24</span> &nbsp; &nbsp; <span class="nu0">13</span> &nbsp; &nbsp; <span class="nu0">15</span> &nbsp; &nbsp; <span class="nu0">17</span> &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">17</span> &nbsp; &nbsp; &nbsp;<span class="nu0">25</span> &nbsp; &nbsp; &nbsp;<span class="nu0">22</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">2</span>， 将秘钥hello转换为数字，循环重复，和明文一致</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">h &nbsp; e &nbsp; l &nbsp; l &nbsp; o &nbsp; h &nbsp; e &nbsp; l &nbsp; l &nbsp; o</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span> &nbsp; <span class="nu0">4</span> &nbsp; <span class="nu0">11</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">14</span> &nbsp;<span class="nu0">7</span> &nbsp; <span class="nu0">4</span> &nbsp; <span class="nu0">11</span> &nbsp;<span class="nu0">11</span> &nbsp;<span class="nu0">14</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">3</span>，密文减去秘钥</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span> &nbsp; &nbsp; &nbsp;<span class="nu0">20</span> &nbsp; &nbsp; <span class="nu0">0</span> &nbsp; &nbsp;<span class="nu0">13</span> &nbsp; &nbsp; &nbsp;<span style="color: #000040;">-</span><span class="nu0">1</span> &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">8</span> &nbsp; &nbsp; &nbsp;<span class="nu0">13</span> &nbsp; &nbsp; &nbsp;<span class="nu0">6</span> &nbsp; &nbsp; <span class="nu0">14</span> &nbsp; &nbsp; <span class="nu0">8</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">4</span>，如果出现负数就加上<span class="nu0">25</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">7</span> &nbsp;<span class="nu0">20</span> &nbsp;<span class="nu0">0</span> &nbsp;<span class="nu0">13</span> &nbsp; &nbsp; <span class="nu0">24</span> &nbsp;<span class="nu0">8</span> &nbsp; <span class="nu0">13</span> &nbsp;<span class="nu0">6</span> &nbsp; &nbsp; &nbsp; <span class="nu0">13</span> &nbsp;<span class="nu0">8</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">5</span>，转换成明文字母</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">h &nbsp;u &nbsp; a &nbsp;n &nbsp; &nbsp; &nbsp;y &nbsp; i &nbsp; n &nbsp; g &nbsp; &nbsp; &nbsp; n &nbsp; i</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span class="nu0">6</span>，整理得到</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">huan ying ni</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">秘钥：hello</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
</ol></div>]]></content:encoded>
</item>
</channel>
</rss>
