At the Graz Linux Days, grommunio hosted a highly acclaimed coding challenge. Of the 23 participants, 9 were able to present successful results. The grand prize winner, selected by lottery, has now picked up his prize at the grommunio office.

It actually sounds pretty simple, doesn’t it?
“For this task, you need to write C/C++ code in the \src\main.cpp file to solve the challenge at the end of this Readme file. MinGW64 with gcc/g++ 15.2 is used, which is automatically set up in a local directory and can be used with the following commands.”
What might sound incomprehensible to many non-technical people doesn’t seem difficult to programmers – at least at first glance. In principle, the four tasks grommunio had included were certainly solvable, and so 23 Linux experts took on the challenge one Saturday in April in Graz.
Programming Under Time Pressure
Many participants struggled with the time limit within which they had to find the correct solution using code they had written themselves. The initial estimate of 20 minutes proved far too optimistic; even within the final 40 minutes allotted, only 9 participants were able to find correct solutions.
As a result, the two specially prepared Windows machines in Graz were occupied almost continuously on Saturday, with more than seven hours allocated to the challenge itself.
The Coding Challenge setup
grommunio employees had created new user accounts on the computers, set up VSCode as the editor, and automated various commands via Windows cmd scripts to speed up the compilation and submission process.

A participant successfully completing the challenge with the tools provided by grommunio.
“We set up a small HTTP endpoint that, in combination with a shell script on the challenge computers, allowed us to generate personalized input for each participant based on their email address and then respond with feedback on their attempts to solve the problem,” explains Fabian Ortner of grommunio (pictured above). “A Readme file then provided a more detailed description of what needed to be done for the programming task, and so a fairly simple, automated process was created to make participation as easy as possible.”
But the “as simple as possible” part didn’t last long. For the challenge, participants would have to fix a malfunctioning mail server by writing a small conversion script. In the README, the first of four tasks to be solved begins with:
“It appears that each line contains an integer multiple of 8 characters, so let’s try to interpret these as individual bytes. For example:
010001000101000101001010 0x44 0x51 0x4A
010001000101000001001100 => 0x44 0x50 0x4C
010000100101000101001100 0x42 0x51 0x4C
We know that the old mail server used a very simple encryption method after exporting the email:
- Take each line of text, i.e., each byte
- For each line, perform an XOR encryption with the key `grommunio`, character by character
- If a line is longer than the key, simply apply the key again, starting with the first character.”
More requirements and tasks followed that really made their heads spin. Only few participants were able to come up with the correct solutions.
But even those who didn’t succeed had something to look forward to: in the end, a random drawing among all participants determined who would receive the promised PlayStation. The winner Andreas was invited to pick it up on the 30th floor of the Donautower in Vienna, in grommunio’s headquarters.
The solution? It won’t be posted here, but the README file with the full problem statement is available below this post. Without the server built by grommunio for the Graz Linux Days, however, it will take a bit of imagination…
Learn more about grommunio at the Graz Linuxdays in this article.
Coding Challenge Instructions
This challenge requires you to write some C/C++ code inside .\src\main.cpp to solve the challenge at the end of this readme. It uses MinGW64 with gcc/g++ 15.2 which is set up automatically in a local directory and can be used with the following commands.
There are four important commands for the included script:
1. To Register your E-Mail address and start the 20min timer:
.\glt.cmd start
2. To just build your code:
.\glt.cmd build
3. To build and run your code and print it’s output to the terminal:
.\glt.cmd build_and_run
4. To build, run and submit your solution:
.\glt.cmd submit
The command used to build your solution has no optimizations enabled by default:
g++.exe -static -O0 -g -std=c++17 src\main.cpp -o build/app.exe
Challenge
To start the challenge, first put your E-Mail address in the user.txt file and then use the start command to get your input. We only use it, to contact you in case you win the drawing. You only need to change the result variable in your code and then run the submit command to check whether it is correct.
WOW. What happened to that E-Mail during migration? Somehow one of your E-Mails got corrupted during the setup of your new mail server. It seems to only consist of binary symbols split into a few lines (your input). There seems to be an integer multiple of 8 symbols per line, so let’s try interpreting them as individual bytes. For example:
010001000101000101001010 0x44 0x51 0x4A
010001000101000001001100 => 0x44 0x50 0x4C
010000100101000101001100 0x42 0x51 0x4C
We know that the old mail server used a really simple encryption after exporting the Email:
- Take each line of text, i.e. each byte
- XOR each line with the key grommunio character-wise
- If a line is longer than the key, simply reuse the key starting from the first character.
0x44 ^ g = 0x23 0x51 ^ r = 0x23 0x4A ^ o = 0x25
0x44 ^ g = 0x23 0x50 ^ r = 0x22 0x4C ^ o = 0x23
0x42 ^ g = 0x25 0x51 ^ r = 0x23 0x4C ^ o = 0x23
That looks more promising already, but still there are many messed up characters…
In earlier times the old mailserver already had problems with offsets on individual character values, with the offset depending on two things:
- A horizontal checksum of your E-Mail address
- the index of the character in a line and the line number it is in
At the time, the server calculated a horizontal checksum, by simply adding all byte values of your E-Mail address together.
[email protected] => (m=109) + (a=97) + (x=120) + ... = 2888
Then, for each character, it’s positive offset was calculated by taking the checksum modulo it’s position in the line. To correct this error we therefore have to subtract the offset values from each of the bytes. Additionally these offsets are then shifted left by one character after each line.
0x23 - (2888 % 1) = '#' 0x23 - (2888 % 2) = '#' 0x25 - (2888 % 3) = '#'
0x23 - (2888 % 2) = '#' 0x22 - (2888 % 3) = ' ' 0x25 - (2888 % 1) = '#'
0x23 - (2888 % 3) = '#' 0x23 - (2888 % 1) = '#' 0x25 - (2888 % 2) = '#
Now this looks like a correct message! But to ensure we have a correct algorithm, we need to calculate the element-wise product of the offset values times the character-values of each used key-character and sum them up for each #-character in the message. (\n and \r should be discarded)
(g=103)*0 + (r=114)*0 + (o=111)*2
+ (g=103)*0 + (o=111)*0
+ (g=103)*2 + (r=114)*0 + (o=111)*0 = 428
You need to write this sum of element-wise products to the result variable to finish the Coding Challenge!
Good Luck!

