image showing progress up to this point The computer controlling the robotics section is a bit of an older one, but don't worry, even this system does not store its passwords in clear text but hashed. Due to its memory limitations the password hashing routines are written in some form of concatenative language. Concatenative languages are easy to implement, so they are quite attractive on resource-starved systems. A program is always on a single line. Each word is interspersed by some spaces. Numbers are pushed on the stack and commands operate on the stack. For example 1 2 + 4 * would push 1 and then 2 onto the stack, then + would pop them both off the stack and put 3 on top of the stack. 4 again would simply push 4 to the stack (so the stack is now 3 4) and finally * would compute 12 from 3 and 4.

Due to its age the machine works only with unsigned 32-bit numbers. But it can handle all the common operations +, * for addition and multiplication, % for the modulo operation and or and xor for bitwise or and exclusive-or. Another important command is dup which pops off the top element of the stack but pushes it two times after that. So 3 dup would leave 3 3 on the top of the stack.

To save further space only the round function of the hash function is actually presented. To compute the actual hash value each round function expects an initial value on the first stack followed by the first character of the password. Then the round function leaves the computed hash on top of the first stack. So let's see some code as an example:

xor 16777619 *

This code is the round function of the FNV-1a hash function. It's initial value is 2166136261. To compute the fnv1a hash value of the password ab we would first do 2166136261 97 xor 16777619 * , which would leave 3826002220 on top of the stack. Then the next iteration would be 3826002220 98 xor 16777619 * and this would compute 1294271946. The numbers 97 and 98 are the ascii codes of a and b.

But this machine is actually a parallel stack machine and can run multiple programs at once but all at the same speed.

3 1 -
     5 4 *

The second program only pushes 5 onto the stack after the first program computed 2. But we also need a way to communicate between multiple programs. Take for example the following round function of the String.hashCode method.

v 31 * +
      ^

Here we can see two new commands ^ and v which pop the top of the stack of their program and push it onto ths stack of the above or below running program. So, using the same procedure as above we would get 95994 when hashing aX1 using this new round function and an initial value of 0. And as a bit more complex example the following code is the round function of the SDBM hash function:

v dup v 64 *              +
       dup v 65536 * - + ^
                    ^

And the SDBM hash for the password 123456 is 3780441283.

Your input is also such a round function. What is the hash of the password eastersdev for your round function and an initial hash of 0?

Please login to download your input.