Replacement password simple encryption and decryption

From Sharp Frog, 1 Year ago, written in Plain Text, viewed 210 times.
URL https://pastebin.vip/view/a3064c5b
  1. 置换密码
  2.  
  3. 假设 一段字母明文   yueliangredehuo,秘钥san
  4.  
  5. 一、加密过程:
  6.  
  7. 1,秘钥san在从a到z的字母表里面,出现次序排出来
  8. s    3
  9. a    1
  10. n    2
  11. 这个排序不看字母本身,而看的是这一组秘钥在字母表里面的出现次序,因此必定有有个排在第一位
  12.  
  13.  
  14.  
  15. 2,因为秘钥是3位,把明文按照三个一行写出来
  16.  
  17. y   u   e
  18. l    i    a
  19. n   g   r
  20. e   d   e
  21. h   u   o
  22.  
  23. 3,将秘钥排在明文上方
  24.  
  25. 3   1   2
  26. y   u   e
  27. l    i    a
  28. n   g   r
  29. e   d   e
  30. h   u   o
  31.  
  32. 4,秘钥的作用,就是排出来次序
  33.  
  34. 从次序1开始,把每一列写出来,横向排列
  35.  
  36. 第一列:uigdu  
  37. 第二列:eareo
  38. 第三列:yineh
  39.  
  40. 5,组合起来成为密文
  41. uigdu  eareo   yineh
  42.  
  43.  
  44.  
  45. 二、解密过程:
  46. 1,将秘钥san排序  
  47. s    3
  48. a    1
  49. n    2
  50.  
  51. 2,将密文排序
  52.  
  53. 1          2          3
  54. uigdu  eareo   yineh
  55.  
  56. 3,按照秘钥次序重新排列
  57.  
  58. 3               1             2
  59. yineh       uigdu       eareo
  60.  
  61. 4,将次序分别写成列
  62. 第一部分
  63. y
  64. i
  65. n
  66. e
  67. h
  68. 第二部分
  69. u
  70. i
  71. g
  72. d
  73. u
  74. 第三部分
  75. e
  76. a
  77. r
  78. e
  79. o
  80.  
  81. 5,重新按照列组合出来
  82. 3   1   2
  83. y   u   e
  84. l    i    a
  85. n   g   r
  86. e   d   e
  87. h   u   o
  88.  
  89. 6,将明文排成一行
  90.  
  91. yueliangredehuo
  92.  
  93. 解密完成
  94.  

Reply to "Replacement password simple encryption and decryption"

Here you can reply to the paste above

captcha

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