Re: re: re: encryption and decryption

From Bitty Dove, 1 Year ago, written in Plain Text, viewed 214 times. This paste is a reply to Re: re: encryption and decryption from YW - view diff
URL https://pastebin.vip/view/deae9920
  1. 维吉尼亚密码加密解密教程
  2.  
  3. 假设我们要加密一段字母:   huan  ying  ni 。   秘钥是hello
  4.  
  5. 1,首先制作字母表
  6.  
  7. 写一排字母(大小写通用),下一行写上对应的数字  从0到25
  8.  
  9. a  b  c  d  e  f  g  h  i  j  k   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z
  10.  
  11. 0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25
  12.  
  13. 2,将待加密的明文huan ying  ni转换成数字
  14.  
  15. 如  huan ying ni 。 转换之后是
  16. h  u   a  n      y   i   n   g       n   i
  17. 7  20  0  13     24  8   13  6       13  8
  18.  
  19.  
  20. 3,将秘钥hello转换成数字并循环显示,重复位数和明文位数一样,如明文为10位,则密文也是10位
  21.  
  22. h   e   l   l   o   h   e   l   l   o
  23. 7   4   11  11  14  7   4   11  11  14
  24.  
  25. 4, 将明文和秘钥按位数相加,注意空格要留空,标点符号不需要转换,直接写在密文相应位置
  26.  
  27. 14  24  11  24      38  15  17  17       24  22
  28.  
  29. 5,多于25的数字减去25
  30.  
  31. 14   24   11   24    13   15   17   17   24   22
  32.  
  33. 6,参照密码表,转换成字母密文为
  34.  
  35. o   y   l   y     n   p    r    r    y    w
  36.  
  37. 7,因此huan  ying  ni 。的密文是
  38. oylz nprr yw。  
  39.  
  40. 秘钥为hello
  41.  
  42.  
  43. ---------------------------------------------------------
  44.  
  45. 解密过程
  46.  
  47. 1,将密文  oylz nprr yw。  转换成数字
  48. 14    24      11    24     13     15     17        17      25      22
  49.  
  50. 2, 将秘钥hello转换为数字,循环重复,和明文一致
  51. h   e   l   l   o   h   e   l   l   o
  52. 7   4   11  11  14  7   4   11  11  14
  53.  
  54. 3,密文减去秘钥
  55. 7      20     0    13      -1        8      13      6     14     8
  56.  
  57. 4,如果出现负数就加上25
  58.  
  59. 7  20  0  13     24  8   13  6       13  8
  60.  
  61. 5,转换成明文字母
  62. h  u   a  n      y   i   n   g       n   i
  63.  
  64. 6,整理得到
  65. huan ying ni
  66. 秘钥:hello
  67.  

Reply to "Re: re: re: encryption and decryption"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website