Advertisement
Guest User

The grind. Solution.

a guest
May 18th, 2021
677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.08 KB | None | 0 0
  1. http://www.itstoohard.com/puzzle/HbSoihCS/wSisvbi8
  2.  
  3. There are 5 images and a hint.
  4.  
  5. The contents of the pictures are red herrings. However, the title mentions URLs (Locate uniform resources.). All the herring image URLs have a letter at the end of them. Imgur URLs are usually 7 characters long, not 8. You may notice this with the smaller herring image because the appended "t" makes it tiny.
  6.  
  7. The "i" image is just the letter "i".
  8.  
  9. Take all the letters from the images and you get "girth" however you need to anagram (nag a ram) it so it becomes "right" which is the key.
  10.  
  11. You are then given a broken image. Itstoohard.com may not display it properly so you need to extract the URL from the source.
  12.  
  13. Download the broken image, you would be able to view it. It is 240x69 and it is not meant to be 69 (nice) so change it.
  14.  
  15. To change the resolution of a .png image, you need to modify the header data.
  16.  
  17. https://en.wikipedia.org/wiki/Portable_Network_Graphics#Critical_chunks
  18.  
  19. Import the image into in a (preferably online) hex editor tool.
  20.  
  21. In the header chunk, find the hexadecimal representation of 69 (which is 45) and change it to a larger number (such as the original image size which is 360 pixels so 01 68 in hex) so that the entire image can be seen.
  22.  
  23. Export/save the image.
  24.  
  25. If done correctly, you will see that the image is a modified "The Thirteenth Labour" card from Perplex City. If you didn't know, you can reverse image search to find it.
  26.  
  27. https://perplexcitywiki.com/wiki/The_Thirteenth_Labour
  28. https://perplexcitywiki.com/wiki/Talk:The_Thirteenth_Labour
  29.  
  30. You first need to transcribe the text on the image. It reads:
  31. -
  32.  
  33. 32/12/5
  34.  
  35. 47 6F 6F 64 2E 20 54 68 69 73 20 69
  36. 73 20 74 68 65 20 66 69 6E 61 6C 20
  37. 73 74 65 70 2E 20 55 73 65 20 61 20
  38. 6B 65 79 2C 20 67 65 74 20 74 68 65
  39. 20 70 61 72 61 6D 65 74 65 72 73 20
  40. 72 69 67 68 74 2C 20 64 65 63 6F 64
  41. 65 20 69 74 20 70 72 65 66 65 72 61
  42. 62 6C 79 20 77 69 74 68 20 43 2C 20
  43. 63 6F 6E 76 65 72 74 20 69 74 20 66
  44. 72 6F 6D 20 68 65 78 20 61 6E 64 20
  45. 74 68 65 6E 20 75 73 65 20 74 68 65
  46. 20 72 65 73 75 6C 74 20 61 73 20 50
  47. 61 73 74 65 62 69 6E 3A 20 31 32 20
  48. 42 39 20 30 36 20 37 45 20 37 36 20
  49. 44 42 20 36 42 20 37 46
  50.  
  51. -
  52. While some characters are harder to read, only the last lines are really important.
  53.  
  54. This hex code translates to:
  55. -
  56.  
  57. Good. This is the final step. Use a key, get the parameters right, decode it preferably with C, convert it from hex and then use the result as Pastebin: 12 B9 06 7E 76 DB 6B 7F
  58.  
  59. -
  60.  
  61. Like the original image, this puzzle also requires RC5. For context, the five cows come from: https://www.distributed.net/Main_Page
  62.  
  63. Here is the documentation and wikipedia article with some relevant C code:
  64.  
  65. http://people.csail.mit.edu/rivest/Rivest-rc5rev.pdf
  66. https://en.wikipedia.org/wiki/RC5
  67.  
  68. Based off the "You may also need a security site!" hint, one site has a working implementation of RC5 using C code:
  69. https://asecuritysite.com/encryption/rc5
  70.  
  71. There are many shoddy or dated implementations so it was intended that you can search for and take the working code from the asecuritysite's rc5 page and run it in any online C IDE. Using the existing code as an example.
  72.  
  73. The title of the card is the notation for the RC5 settings which means it needs 32 bits, 12 rounds and a 5 byte key (which just means the key is 5 letters). The key that was given earlier was "right" which is the 5 byte key needed. Convert "right" to hexadecimal so that it can be used in the code. right -> 7269676874
  74.  
  75. From the code, you need to change two default settings: #define b as 5 (instead of 16) and #define c as ceil(8*b/w). (This means 8x5/32=1.25 and round it up to 2.) So c is 2. If you do not change c then you will get the "incorrect" decryption.
  76.  
  77. The code from this site only outputs the encryption. You need to modify the code so it can output the decryption. The code already has a RC5_DECRYPT function defined so that can be used. There are a couple of easy ways to do this. The easiest is in the RC5_DECRYPT function (in main), change the input parameter to be "pt1" (plaintext 1) and the output parameter to be ct (ciphertext) "RC5_DECRYPT(pt1,ct);" then run the program. "Ciphertext" would display the decoded RC5 text. It is: 78624455 69697156
  78.  
  79. 78624455 69697156 from hex translates to: xbDUiiqV
  80.  
  81. Append it to the end of the pastebin url to get the link: https://pastebin.com/xbDUiiqV
  82.  
  83. The first full name of the creator of this cryptosystem (RC5) is Ronald so Ronald is the answer.
  84.  
  85. Here is the code taken from https://asecuritysite.com/encryption/rc5 and modified to decode this puzzle:
  86. -
  87.  
  88. /* RC5REF.C -- Reference implementation of RC5-32/12/16 in C. */
  89. /* Copyright (C) 1995 RSA Data Security, Inc. */
  90. #include <stdio.h>
  91. //#include <time.h> // unused
  92. #include <string.h>
  93. #include <stdlib.h>
  94. #include <stdint.h> // needed for uint32_t
  95.  
  96. // replaced unsigned long int as it's 64 bits on this platform
  97. // using uint32_t allow for platform independance
  98. typedef uint32_t WORD; /* Should be 32-bit = 4 bytes */
  99. #define w 32 /* word size in bits */
  100. #define r 12 /* number of rounds */
  101. #define b 5 /* number of bytes in key */
  102. #define c 2 /* number words in key = ceil(8*b/w)*/
  103. #define t 26 /* size of table S = 2*(r+1) words */
  104. WORD S[t]; /* expanded key table */
  105. WORD P = 0xb7e15163, Q = 0x9e3779b9; /* magic constants */
  106. /* Rotation operators. x must be unsigned, to get logical right shift*/
  107. #define ROTL(x,y) (((x)<<(y&(w-1))) | ((x)>>(w-(y&(w-1)))))
  108. #define ROTR(x,y) (((x)>>(y&(w-1))) | ((x)<<(w-(y&(w-1)))))
  109.  
  110. void RC5_ENCRYPT(WORD *pt, WORD *ct) /* 2 WORD input pt/output ct */
  111. { WORD i, A=pt[0]+S[0], B=pt[1]+S[1];
  112. for (i=1; i<=r; i++)
  113. { A = ROTL(A^B,B)+S[2*i];
  114. B = ROTL(B^A,A)+S[2*i+1];
  115. }
  116. ct[0] = A; ct[1] = B;
  117. }
  118.  
  119. void RC5_DECRYPT(WORD *ct, WORD *pt) /* 2 WORD input ct/output pt */
  120. { WORD i, B=ct[1], A=ct[0];
  121. for (i=r; i>0; i--)
  122. { B = ROTR(B-S[2*i+1],A)^A;
  123. A = ROTR(A-S[2*i],B)^B;
  124. }
  125. pt[1] = B-S[1]; pt[0] = A-S[0];
  126. }
  127.  
  128. void RC5_SETUP(unsigned char *K) /* secret input key K[0...b-1] */
  129. { WORD i, j, k, u=w/8, A, B, L[c];
  130. /* Initialize L, then S, then mix key into S */
  131. for (i=b-1,L[c-1]=0; i!=-1; i--) L[i/u] = (L[i/u]<<8)+K[i];
  132. for (S[0]=P,i=1; i<t; i++) S[i] = S[i-1]+Q;
  133. for (A=B=i=j=k=0; k<3*t; k++,i=(i+1)%t,j=(j+1)%c)
  134. { A = S[i] = ROTL(S[i]+(A+B),3);
  135. B = L[j] = ROTL(L[j]+(A+B),(A+B));
  136. }
  137. }
  138.  
  139. int main(int argc, char *argv[]) {
  140. WORD i, j, pt1[2], pt2[2], ct[2]; // = {0,0}; // unused
  141. unsigned char key[b];
  142. char val1[100]; // unsigned causes compiler warnings
  143. char val2[100]; // unsigned causes compiler warnings
  144.  
  145. //time_t t0, t1; // unused
  146. //if (sizeof(WORD)!=4) // unused
  147.  
  148. printf("RC5-32/12/5\n");
  149.  
  150. //pt1[0]=ct[0]; pt1[1]=ct[1]; // unused
  151. //for (j=0;j<b;j++) key[j] = 2; // unused
  152.  
  153. char *key1 = "7269676874"; //was missing 2 zeros
  154. strcpy(val1, "12B9067E");
  155. strcpy(val2, "76DB6B7F");
  156.  
  157. if (argc>1) key1=argv[1];
  158. if (argc>2) strcpy(val1, argv[2]);
  159. if (argc>3) strcpy(val2, argv[3]);
  160.  
  161. pt1[0] = (int)strtol(val1, NULL, 16);
  162. pt1[1] = (int)strtol(val2, NULL, 16);
  163.  
  164. //unsigned int bytearray[12]; // unused
  165. int str_len = strlen(key1);
  166. // changed format string to remove compiler warning
  167. // and {} to match code style below
  168. for (i = 0; i < (str_len / 2); i++)
  169. sscanf(key1 + 2 * i, "%2hhx", &key[i]);
  170.  
  171. /* Setup, encrypt, and decrypt */
  172. RC5_SETUP(key);
  173. RC5_ENCRYPT(pt1,ct);
  174. RC5_DECRYPT(pt1,ct);
  175.  
  176. /* Print out results, checking for decryption failure */
  177. printf("Key:\t\t");
  178. // replaced str_len with b, stops errors if strlen(key1)!=b
  179. for (j = 0; j<b; j++) printf("%.2X", key[j]);
  180. printf("\nPlaintext\t%.8X %.8X",pt1[0], pt1[1]);
  181. printf("\nCiphertext\t%.8X %.8X\n",ct[0], ct[1]);
  182. if (pt1[0]!=pt2[0] || pt1[1]!=pt2[1])
  183. printf("Decryption Error! Though not really because you got the answer!");
  184. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement