RC03: Short week updates

October 08, 2023

I'm attending the Fall 2 batch at Recurse Center! Posts in this series cover things I'm working on or find interesting during my time here.
Note: 25th November 2023
This post confuses the layers in which TUN and TAP operate. I've left the mistake as-is to reflect the confusion that I had when I was working on this then.

This week has been a shorter week, or at least felt so, in part due to a personal emergency.

Things I did this week

  • Looked into using TAP on macOS, but found out that TAP doesn’t quite work on macOS anymore (unless I go through a bunch of hoops). Then looked into other ideas to make my TCP implementation play nice with the macOS network stack. Current ideas include using pf to drop all outgoing RST packets to a specific IP address that I’m testing against, or somehow intercepting and modifying TCP packets intended for the network stack using the divert + pf (inspired by this SO answer). Or going down a layer and working with TUN, since I’m already filtering ethernet packets. I’m definitely at a point where I feel like I’ve reached diminishing returns in terms of googling and reading, and would need to start prototyping to move forward.
  • Continued working on the cryptopals crypto challenges and cracked a Vigenère cipher (Set 1, Challenge 6). It’s been very fun figuring out how to solve this and then discussing with other folks and comparing our approaches.
  • I also spent more time this week learning the basics of crypto theory and delving deeper into Rust concepts, the former to help me make better sense of the challenges I’m working on and the latter to reduce friction when programming in Rust, especially when it comes to handling borrow checker errors.
  • Attended a workshop on the creative process and talked to other Recursers about how they approach their work.

Plans for next week

  • Figure out how to use TUN on macOS with Rust, and see if this is sufficient to move forward and establish a TCP connection with a remote server. If this fails, create a linux VM and continue with TAP instead.
  • Finish up the lectures on stream ciphers.
  • Go through Chapter 2 of Rust for Rustaceans.
  • Get to Set 2 of the cryptopals crypto challenges.

Stacey Tay

Hi! I’m Stacey. Welcome to my blog. I’m a software engineer with an interest in programming languages and web performance. I also like making 🍵, reading fiction, and discovering random word origins.