# CyberChef Challenge #21

The challenge data/input is:

The solution must be done by using https://gchq.github.io/CyberChef recipe(s).

I passed all previous 20 challenges on my own without any assistance, but this one seems pretty strange, so far I spent 1 week trying to figure it out but I couldn't till now. I am not asking for full answer, just a kick in the right direction (the first 2 or 3 recipe(s)).

The solved challenge message comes in the form of:

Congratulations, you have completed CyberChef challenge #21!

The code for this challenge is UUID.

The next challenge can be found at https://pastebin.com/LINKCODE
• Hi and welcome to RE.SE. So what's your question? Dec 28 '20 at 22:05

Run a histogram. Use the known text as a crib.

int  chr count
48   0   0
49   1   8
50   2   11
51   3   12
52   4   7
53   5   13
54   6   11
55   7   9
56   8   17
57   9   9
58   :   0
59   ;   0
60   <   0
61   =   0
62   >   0
63   ?   0
64   @   0
65   A   14
66   B   6
67   C   14
68   D   4
69   E   14
70   F   6
71   G   5
72   H   18
73   I   0
74   J   7
75   K   11
76   L   10
77   M   11
78   N   10
79   O   0
80   P   10
81   Q   11
82   R   13
83   S   14
84   T   11
85   U   10
86   V   8
87   W   6
88   X   9
89   Y   12
90   Z   11
91   [   0
92   \   0
93   ]   0
94   ^   0
95   _   0
96   `   0
97   a   9
98   b   8
99   c   10
100      d   15
101      e   5
102      f   13
103      g   8
104      h   6
105      i   15
106      j   7
107      k   10
108      l   0
109      m   8
110      n   4
111      o   11
112      p   9
113      q   9
114      r   5
115      s   10
116      t   9
117      u   12
118      v   6
119      w   9
120      x   7
121      y   11
122      z   5

If you look at the unique characters in the cipher, you'll notice I,O and l (lowercase) are missing. Unique Chars 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.

• How did you produce the histogram? What is the known text? Dec 30 '20 at 3:08
• Count the characters of the cipher. I used the ASCII range from 48 to 122. If the solution has the form given above as the solver challenge message above, you will be able to produce output which contains "CyberChef" through some series of applications of transformations. A Crib is just something clear-text you know is in the cipher. Dec 30 '20 at 6:39
• So you were able to get the full solved challenge message, or you are just sharing the logic that should work? Dec 30 '20 at 8:30
• I'm just sharing the logic I would use from basic cryptanalysis. For example, there are only 58 distinct characters used, and 563 characters in the cipher. The clear-text example has 41 distinct characters and is 164 characters long. If you look at the unique characters in the cipher, you'll notice I,O and l (lowercase) are missing. Unique Chars 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. Dec 30 '20 at 15:37
• These challenges are meant for individuals to solve on their own through learning. OP could study cryptanalysis techniques and apply those. I think that's what GHCQ wants, a way to show you'd be a good candidate for work. That said, I couldn't find where challenge #1 is, maybe it would be fun. Dec 30 '20 at 15:37

This one's actually pretty simple.

From_Base58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',true)
Rotate_right(2,false)
From_Base85('0-9a-zA-Z.\\-:+=^!/*?&<>()[]{}@%\$#')

I think how I did this one was noticing the lack of punctuation in the initial string. From there I believe I just used the magic operation to get the next 2 operations. Good luck with #22!