Wi-Fi? Why not! | Jacob Hegy

Jacob Hegy
6 min readApr 1, 2024

--

How much do you actually know about wi-fi?

It’s become something that we take for granted nowadays. In fact, it’s been 20 years since the first wi-fi accessible devices were released on the consumer market. There’s a whole generation who’s probably never even interfaced with broadband or dial-up, yet of the billions of people that use wi-fi everyday, how many do you think could tell you how it actually works let alone how it’s secured?

There’s a certain beauty to me in understanding the everyday world, so join me and let’s dive into how wi-fi actually works and what our modern security for it looks like.

“Turn that noise up DJ!”

Let’s start off with the basics. When it comes to wi-fi there are two important devices: the modem and the router. The modem is responsible for receiving electrical signals from your internet service provider and converting that into a stream of information in the form of bits (1’s and 0's). The router then takes those bits and converts them into a radio signal that it broadcasts out to devices listening for said signal.

This is the same principal as how AM/FM radio works. The difference in this case is the frequency of the waves. Frequency (measured in hertz, represented with Hz) means how many times a wave cycles per second where each cycle is a repetition of the wave. AM radio broadcasts have a frequency ranging between 540 kHz and 1700 kHz, FM falls between 88 MHz and 108 MHz, and wi-fi sits around either 2.4 GHz and 5 GHz (though you might see some going up to 6 GHz nowadays). In other words, wi-fi is transmitting radio waves that repeat upwards of 5 BILLION times per second.

Now all these numbers are well and good, but what significance do they hold? Well they’re important for three reasons that are relevant to us: speed, range, and collisions.

The first two are fairly simple to understand. Higher frequency = higher speed because more information can be sent out every second, but higher frequency also means lower range. Why is that? Well think about it like this: with every cycle of the wave, a tiny bit of energy is lost making it harder for the wave to keep traveling. The more quicker those cycles go, the faster energy is lost and the quicker the signal drops off completely. This is why you can pick up AM/FM radio stations all around your city but can only access your wi-fi inside your own house or for a short distance outside.

Wi-fi also has two sets of frequency ranges for this very reason. A 2.4 GHz network will have a greater range but a slower speed. Meanwhile the 5 GHz network will offer a higher transfer speed at the expense of range. It’s left up to the end user to decide what’s best for them.

“Whose line is it anyway?”

What about collisions though? Well let’s first get into what a collision is. A collision means two waves have both been received at the same time, causing interference and breaking up the signal for the listener. This is the idea employed with noise cancelling headphones. They pick up on sounds and create signals that are exactly opposite to them to cancel them out. That’s also why they’re not great at stopping sudden, quick sounds; it’s hard to calculate such a wave on the spot.

So if wi-fi is basically a bunch of radio waves being sent in an area, how are collisions avoided? The answer is simple: taking turns.

To make a very complex process simple, imagine a bunch of flashlights pointed at someone. They need to know what light is on and for how long. If a bunch of lights turn on at one, they’ll have no idea which one to watch. Instead, only one flashlight is on at any given moment. By doing this, they can pay attention to one target at a time and take in information.

That’s the whole idea with simple collision avoidance. Wi-fi does that while transmitting and receiving radio waves millions of times per second. Each device waits for its turn to send out a signal before going back to listening for other signals. This ensures that no toes get stepped on.

What the heck’s a “WPA”?

So we’ve covered wi-fi now, but you might be wondering “what’s stopping devices from just listening to each other’s transmissions to steal information?” This is where our friend WPA comes in.

WPA stands for “Wi-Fi Protected Access”. It’s the second wireless security standard, being the follow-up to WEP. There are three versions of WPA: WPA, WPA2, and WPA3. For this post, we’re just gonna look at WPA and WPA2.

So what exactly does it do? Well I think one of the easiest ways to understand it is to look at a parallel found in sports: pitching signs.

In baseball, the catcher needs to know what’s coming before the pitcher throws it so that they can properly catch the pitch. Issue is, the pitcher is 60 feet away and standing right in front of the batter. How can they possibly communicate? Well, many teams choose to use what are called “pitch signs”. These are typically hand signals that the catcher will do for the pitcher so that they can agree on a pitch and sync up.

So now we’ve got a solution, the catcher does some movement with their hands, the pitcher sees that movement, knows what pitch to throw, and then throws it. That’s all fine and dandy, but what’s to stop the other team from just stealing those signs and signaling to the batter what pitch is coming?

The solution is quite simple: the pitcher and catcher agree on a certain sequence of signs that they both know before they even take the field. Based on the agreed upon sequence, the meaning of each signal changes. To an outside observer with no information other than the signs, this makes the signs essentially gibberish.

This is the whole idea of WPA. Communication performed out in the open (in this case over a wireless network) needs some way to be protected from outside observers while still being understood between the participants in the conversation. The solution to this is using some kind of password to encrypt and decrypt the data in transit.

Conclusion

If you’re a nerd like me you might be asking how exactly WPA works. That’s a fantastic question, but a question for another day.

I’m gonna leave things here for this article. It’s already long and would only get longer if I took the time to fully explain WPA. For those of you that want to learn more check out my follow-up article on WPA here!

Thanks for reading! I had a great time throwing this article together. I tried to keep things as beginner friendly as I could with all the technical terms, so I hope you enjoyed!

That’s all for now! Catch ya later!

--

--

Jacob Hegy

Computer science graduate sharing my pursuits into cybersecurity and IT! I post about my studies and challenges I do! | Next Article: More HTB Sherlocks