Guest User

Challenge #6 - Code #2 - Explanation

a guest
Oct 25th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. The Input of "IOF ITGSE SM YC ISZYZTA LGA ANWOZUK RIX YB ZIRIZIYM NUN HC HP IICE SM YR IVEPOOZY" is: "THE WORLD IS MY COUNTRY ALL MANKIND ARE MY BRETHREN AND TO DO GOOD IS MY RELIGION"
  2.  
  3.  
  4. (NOTE: The following explanation of how the code works is not how I originally encoded for this challenge, I used a completely different method. After analyzing the code a bit more, coincidentally, it resembles a variation of the vigenere cipher. I used this explanation because I assumed the concept would be best understood that way, but if you wish to see the original way then just PM me.)
  5.  
  6.  
  7. I've studied Code #2 a little bit more after I made it and discovered a few things about it that will hopefully make it easier for you to understand.
  8.  
  9.  
  10. Code #2 & 3 are a lot less picky than Code #1.
  11. To understand Code #2, it'd be best if you already understood how the Vigenere Cipher works.
  12.  
  13.  
  14. There are 5 different groups of letters:
  15.  
  16. 1: UCSD
  17. 2: QBVGLP
  18. 3: YJNRZT
  19. 4: AMFKWX
  20. 5: EIHO
  21.  
  22. The reason why I chose for the letters to be in those specific groups/order is irrelevant now, so all you need to make note of is that for this code, the letters are in that arrangment.
  23.  
  24. Now we just create a vigenere table with these letters:
  25.  
  26. The first column will just be the regular alphabet in order, (A-Z), and the 2nd column will be next instance of that particular row/group.
  27.  
  28. For example:
  29.  
  30. 1st column up to 5 letters:
  31. 1
  32. A
  33. B
  34. C
  35. D
  36. E
  37.  
  38. 1st & 2nd column up to 5 letters:
  39.  
  40. 1 2
  41. A M
  42. B V
  43. C S
  44. D U
  45. E I
  46.  
  47. Because:
  48.  
  49. Row A is apart of this group: AMFKWX
  50. ROW B is apart of this group: QBVGLP
  51. ROW C is apart of this group: UCSD
  52. ROW D is apart of this group: UCSD
  53. ROW E is apart of this group: EIHO
  54.  
  55. Meaning:
  56.  
  57. Columns & Rows 1-5 would be:
  58. 1 2 3 4 5
  59. A M F K W
  60. B V G L P
  61. C S D U C
  62. D U S D U
  63. E I H O E
  64.  
  65.  
  66. You would do this for the 26 columns and 26 rows thus making a vigenere table using these letter configurations.
  67.  
  68.  
  69. So if we have an input of: TEST CODE
  70.  
  71. We encode by finding (T)EST on the top row of the vigenere table and the T(E)ST on the Left most column and find the intersection between the two, which would be: O
  72.  
  73. Continue to do this process until the last letter of the word:
  74.  
  75. TEST = OST
  76.  
  77. For the last letter, you find TES(T) on the top row and (T)EST on the left most column, which would be: Y
  78.  
  79. Now continue this process for the rest of the input, TEST CODE, and it will leave you an output of: OSTY ICOC
  80.  
  81.  
  82. That's all there is to this code. :D
  83.  
  84. Thanks for participating for Code #1! :D
  85.  
  86.  
  87. - DWC
Advertisement
Add Comment
Please, Sign In to add comment