WiFi allows four handshakes without any password transmission, and I've figured out the truth about the master key

Last week, a friend anxiously messaged me saying someone had been waiting downstairs with a laptop for a long time, with lines of data scrolling on the screen, asking if my WiFi password had been stolen. I told him to relax: even if he was in jail for a year, he wouldn't be able to catch the password you typed. He was even more confused—couldn't find the password, so how did my neighbor get to use my home network before? This article breaks down these two things: how exactly is a password verified, and which link is actually "broken"?
To get straight to the point: the password you entered has never been found online
Many people imagine that connecting to WiFi means sending the password to the router, which then pulls out a pair of notebooks: 'Matched, let's pass.' If they really did that, the person caught would have already made money—the password flew through the air and was intercepted halfway.
The actual approach is the opposite. Your router already knows the password (you set it yourself), and your phone knows it (you entered it and it's stored locally). Both machines know the passwords, so what you need to confirm is that 'the other really knows.' There's no need to keep sending passwords back and forth; instead, you can use the passwords on the spot to solve a problem that only those who know can get it right. This confirmation process consists of four handshakes, less than two seconds in total. When the little spinning in your status bar is spinning, the two are doing this.
So the person downstairs can catch the questions and answers you exchanged, but can't catch the password itself. This isn't just the router's mercy; it's that from the day the protocol was designed, it never gave the password a chance to come out of the factory.
Before shaking hands, do one thing: use the password to stir up round 4096
Before the formal handshake, both sides must first process the code into a "base material," which is called PMK in jargon. The processing method sounds pretty crude: base material = PBKDF2 (password, WiFi name, 4096 rounds)—your password plus WiFi name, throw it into the hash function and spin it 4,096 times, and the resulting segment is garbled text that no one can recognize.
I ran this thing on my computer, and there was a particularly interesting detail. If you use the same password "wojia2010" and pair it with the WiFi name "Home," the base will start with 0588fdf1; if paired with "Home5G," it will start with 93d538cb—completely different matters. But as long as the name and password remain unchanged, counting ten thousand times results are exactly the same.
This explains something you've definitely encountered: router changing the WiFi name, even though the password hasn't changed, all family devices have to be re-entered — the base material is calculated by the name, and once the name is changed, all the base components are replaced, and the old key can't unlock the new one. Conversely, When replacing a router, copying the WiFi name and password directly into the old device will connect dozens of devices without notice. The same principle follows: if the key material doesn't change, the key won't change.
Four
handshakes and unboxing: the plaintext only flies random numbers, the code is like yeast hidden in the finished product
The base is ready, and the handshake begins. No need to memorize the terminology; just remember a metaphor: both sides exchange random numbers as flour, the code as yeast—the yeast stays in their homes from start to finish, and in the end, both sides bake the same piece of bread at home.
| plaintext | that was sentto whom | in which steps | |
|---|---|---|---|
| (1) | Router → phone | random number A | plaintext |
| (2) | Phone → router | Random numbers B + stamped credentials (MIC) | arein plain random numbers, stamps are calculated |
| (3) | Router → phone | pass stamp verification, multicast key GTK | encryption |
| (4) | Bidirectional | From then on,every frame is encrypted with a new key | — |
The middle step is the soul: each side takes the same base material, adds the random numbers A and B sent to each other, and adds the other side's MAC address (which is the device's ID number), and each calculates a key exclusive to this connection. The phone stamps a fixed message with this key and sends it over, and the router itself gets a stamp too. Two stamps make a pair—if they match, it means the phone really knows the password. Throughout the trip, neither the password nor the base material had left the house; outside the door were only random numbers and stamped finished products.
There are two other clever aspects of this design. The key contains random numbers, and the random numbers change each time, so your keys today and tomorrow are different. Even if the person catching the bag steals the finished product this time, next time won't count; The phone and TV share a router, and each has their own keys. If one device's key is missing, the others won't be affected.
If the password isn't online, how can others connect to your home
?Back to the question at the beginning. If you can't catch the password for packet detection, your website will still be exploited. There are only two main routes, and the first one accounts for 90%.
The first point has nothing to do with cracking: software like master keys works by a password sharing pool of "everyone for me, I for everyone." Whoever installs it to connect to your home WiFi or enters the correct password will have the password clearly transmitted to its cloud shared library. The next person to walk downstairs at your house opens the app, which pulls out the string from the library and automatically fills it in—it looks like a 'crack', but in fact, someone who connected to your network's network made a copy of the key and posted it online. The most unfortunate case is that the owner installs it themselves and connects to their own WiFi, essentially contributing their own password to the database. If you want to check who cleared the network and how to prevent it, The article on anti-mooching is even more detailed.
The second is the real technical route: grab the clutch and try it slowly at home. Random numbers and stamps flying in your hand can be caught in the bag. The attacker takes a dictionary home and tries it one by one: suppose the password is "12345678"—calculate the base material, key, and stamp. Compare it with the stamp you catch, and if it's different, switch to the next candidate. The whole process doesn't require router involvement; it runs offline on your own computer, hence the name offline brute-force breaking.
The protocol designer also guarded against this trick: the 4096 wheel stirring wasn't for nothing—it was a deliberate slowdown on speed bumps for calculation. I tested it on the old desktop computer in my study, and it could only count over 400 times per second. Sounds okay? Let's check the accounts.
How long the password must be to hold up: I used my own computer to run the bank account
Demolition is all about the number of combinations—every longer password and bigger character pool, the number of combinations multiplies. Here's the actual test (single-threaded caliber, attackers can get hundreds or thousands of times faster with a graphics card, but the relative relationship remains unchanged):
| Password style | combinations | : afterreplacing the GPU | with a single thread, my old desktop |
|---|---|---|---|
| digits of pure numbers | , 100 million types | , about 61 hours | ,minutes to |
| , 10 digits of pure numbers | 10 billion characters | ,how | many hours in half a year |
| 8 lowercase letters plus numbers | , 2.8 trillion characters | , about 200 | months, many cards, a few days |
| 12 digits with | a 10 symbol to the powerof 23 | tothe power of the order 33 trillion years | and a cosmic restart would be impossible to complete |
The pattern is simple and direct: length works better than fancy ones. 8-digit pure numbers are as if they are not set in front of the graphics card; Pulling it above 12 bits and mixing in uppercase and lowercase numeric symbols, just the number of combinations reaches the level of 10 to the 23rd power, and the world's computing power piled up is useless. If you can't remember the garbled text, use a long sentence no one can guess, like "My router was bought for 129 yuan in 2019," 19 characters, and the length still outshines most dictionaries.
Additionally, the WPA3 router completely blocks the offline brute-force route: it switches to a new authentication method called SAE, where every password test must be connected directly with the router. Packet capture cannot be tried offline at home, and repeated attempts can lead to being neglected. So, the article advising you to use WPA3 for new devices is not for novelty, but because it's really an extra wall. If your old router only has WPA2, setting the password to a long and mixed password is all you can do.
Four things you can do at home, ranked by importance
First, change the password to a 12-bit or longer hybrid or a long sentence. The most cost-effective step, a one-minute process, instantly made most people who tried to free up the internet from the internet give up.
Second, don't install suspicious key-type apps, and remind elders at home not to install them. Most likely, your home isn't being destroyed, but shared. It's best to enable a guest network guest network, set a separate password—no matter how much the guest shares it, it can't reach your main network, and once isolation is activated, you can't even reach your home NAS.
Fourth, stop using outdated encryption methods. If the backend encryption options still show WEP or WPA plus TKIP from over a decade ago, switch to WPA2 or WPA2/WPA3 hybrid options as soon as possible. WEP-style encryption can really be cracked live in minutes; it doesn't matter how long your password is.
A final reminder for myself: connecting to WiFi, from searching the phone to the name (routers broadcast every 0.1 seconds, scanned the article), four handshakes here, then
Article URL: https://www.shunot.com/en/lybk/1257.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.
