Fibonacci

hardware FCSC 2023 solved on

star

Description

This time, you are asked to code the Fibonacci sequence.

The machine is initialized with a random value n (in the register R5) and will contain (in R0) the element Fib(n) once the code is executed. As a reminder:

  • Fib(0) = 0,
  • Fib(1) = 1,
  • Fib(n) = Fib(n - 1) + Fib(n - 2).

The bytecode will be sent in hexadecimal format, which can be generated using the provided assembler (assembly.py file).

The documentation of the virtual machine is available on this page.

Files

  • docker-compose.yml
  • assembly.py
    18.64 KiB – dc0970c915e15e4356a54ee592ec0c10aa39db0f31e33ddc50a38d5f80897dea
  • challenge.py
    839 B – 243a7193c3e5441472192fe6122961a95235197e2fcd91384c30ff46b9805adb
  • machine.py
    11.31 KiB – 216f14947d8daedfc71175035487674a0687d5b66ecedb61120330df1ebceff0

Author

Neige

Challenge Instructions

  1. First, download docker-compose.yml:
    curl https://hackropole.fr/challenges/fcsc2023-hardware-asm-fibonacci/docker-compose.public.yml -o docker-compose.yml
  2. Launch the challenge by executing in the same folder:
    docker compose up
  3. Then, in another console, access the challenge with Netcat:
    nc localhost 4000
⚠️ Important: You must solve the challenge by interacting with the Docker container through the exposed network port. Any other way is not considered valid.

In case you encounter problems, please consult the FAQ.

Flag

Share my success on Fediverse, Twitter, Linkedin, Facebook, or via email.

Submit your solution

You can submit your writeup for this challenge. Read the FAQ to learn how to proceed.

You need to be logged in to submit a writeup.

Writeups

There are no public solutions for this challenge yet, but you can submit yours after getting the flag.