Skip to content
Allin

Securing a Home Wi-Fi Network: the Key, the Protocol and the Guest Network

Published 8/26/2026 · 13 min read · Developer tools

Daniel Okonkwo

Daniel OkonkwoFront-end developer and tech writer at Allin

Web performance · File formats

Checked against 4 sources

View profile
In short

The generator on this page draws from crypto.getRandomValues: WpaKeyTool calls randStr, randStr calls rngInt, and rngInt only falls back to Math.random when the crypto object does not exist, which in a browser it always does. The key is not predictable. Two caveats from reading the same code. rngInt takes the remainder of a 32-bit draw, so on the default 76-symbol pool 44 symbols of 76 are favoured by a relative 1.77 in a hundred million — far below anything that matters, but the sibling password generator on this site uses rejection sampling instead and its own source comment argues against exactly this modulo. And the length slider goes down to 8, which is the WPA2 floor: 8 characters over 76 symbols is precisely 50.0 bits, and nothing in the interface says so. The default of 20 characters is 125.0 bits, which no offline attack reaches. Length matters because of what WPA2 does with the passphrase: it stretches it into the key with PBKDF2, 4096 iterations of HMAC-SHA1 salted with the network name, then an attacker who captures one four-way handshake can grind candidates offline forever. WPA3-Personal replaces that with SAE, and the Wi-Fi Alliance is explicit that the only remaining route is repeated active attacks with one guess each — so a memorable passphrase stops being catastrophic. Transition mode hands most of it back, because WPA2 and WPA3 clients share one BSS and one password, so the offline attack returns through the WPA2 side. Turn WPS off: CERT/CC VU#723755 shows the PIN space collapsing from 100 million to about 11 000 by design, not by bug.

The generator's random source audited line by line, what SAE actually removes, why transition mode gives most of it back, and the thing every guest-network guide leaves out.

First: where does this key come from?

A key generator whose randomness is weak is worse than no generator, because it hands you a string that looks unguessable and is not. So the first thing to check is the chain, and here it is short. WpaKeyTool builds a pool from the ticked character classes and calls randStr for each key. randStr picks one character per position through rngInt. rngInt reads four bytes from crypto.getRandomValues and only reaches Math.random if the crypto object is missing entirely — a branch a browser never takes. The key is cryptographically random. That is the answer, and it is the one that matters.

Two smaller things fall out of the same reading. rngInt returns the remainder of a 32-bit draw modulo the pool size, and 2 to the 32 is not a multiple of 76, so on the default pool 44 symbols of 76 come up with one extra chance in about 56.5 million — a relative excess of 1.77 in a hundred million, which costs a fraction of a millionth of a bit and matters to nobody. It is worth naming only because the password generator on this same site does the correct thing, drawing again when the value lands past the largest usable multiple, and its source comment argues against exactly the modulo used here. Second, and more usefully: the length control goes down to 8, which is the shortest passphrase the standard permits, and 8 characters over the default 76-symbol pool is precisely 50.0 bits. There is no strength read-out anywhere in this tool, so nothing tells you that the lowest setting it offers is the one that has to be attacked rather than guessed.

The defaults are good: 20 characters, all four classes on, a 76-symbol pool, 125.0 bits. Tick the no-ambiguous-characters box and the pool drops to 71 — it strips zero, capital O, lowercase L, one and capital I — which costs two bits at that length and buys you a key you can read aloud to a guest. Note what it does not strip: lowercase o, five and S, eight and B. If the key is going to be dictated or typed on a television remote, read it back before you commit to it.

Why the passphrase carries everything under WPA2

WPA2-Personal never uses your passphrase as a key. It stretches it into a 256-bit pre-shared key with PBKDF2, 4096 iterations of HMAC-SHA1, salted with the network name — the mechanism is defined in IEEE Std 802.11, and PBKDF2 itself is specified in RFC 8018. Two consequences follow. The salt being the SSID rather than a random value means every network called linksys shares one precomputed table, which is why a distinctive network name is worth something. And 4096 iterations makes each candidate roughly four thousand times more expensive than a bare hash, which slows an attacker down by a fixed factor and no more.

The attack does not require access to the network. The four-way handshake that a client and an access point exchange when the client joins is transmitted in the clear, and it contains enough material to verify a candidate passphrase. Anyone within radio range can record one — or force one by knocking a device off and waiting for it to reconnect — and then grind offline, at their own pace, on their own hardware, with no rate limit and nothing you can observe. That is why entropy is the whole of the defence under WPA2. A memorable passphrase is a candidate in a wordlist. A random one is not: 12 characters from the default pool is 75.0 bits, 16 is 100.0, and the default 20 is 125.0 — numbers no offline campaign reaches regardless of hardware.

What SAE removes, and what transition mode gives back

WPA3-Personal replaces the pre-shared key with Simultaneous Authentication of Equals, defined in IEEE Std 802.11-2016 and updated in 802.11-2020. The change is not incremental. In the Wi-Fi Alliance's own words, an adversary cannot passively observe an exchange, or take part in one, and then try all possible passwords without further interaction; the only remaining route is repeated active attacks in which the adversary gets a single guess per attack. That is the difference between an offline campaign of billions of candidates and an online one, over the air, one at a time, in front of you. SAE also gives forward secrecy: even if the password becomes known later, a recorded exchange cannot be decrypted from it.

The Wi-Fi Alliance draws the practical conclusion itself: because WPA3-Personal resists offline dictionary attacks, users can choose passwords that are easier to remember and easier to enter while keeping a high level of security. On a WPA3-only network, a passphrase you can say out loud is defensible in a way it never was under WPA2. Not any passphrase — one guess per active attack still adds up over weeks, so anything in the first few thousand entries of a wordlist is still a bad idea — but the catastrophic gap between memorable and random closes.

Transition mode is where that reasoning breaks. A WPA3-Personal access point in transition mode runs WPA2 and WPA3 clients on one basic service set, with the same password, so that older devices keep working. Two things follow. The four-way handshake of any WPA2 client on that network is still recordable and still verifies the same passphrase offline, so the protection SAE was bought for is simply not present for that password. And the network has to advertise itself as protected-management-frames capable rather than required, so that clients without that support can associate at all — the Wi-Fi Alliance says plainly that the full benefits of WPA3-Personal are only available in WPA3-Personal only mode. The practical rule: in transition mode, treat the passphrase exactly as if the network were WPA2, which means random and long, which means the generator on this page.

The guest network protects the LAN, not the line

A guest network is a second service set with its own password, whose clients are placed on a separate segment with no route to the main one. That is genuinely worth doing, and it is worth doing for your own devices too, not only for visitors. Anything that speaks to the internet, is never updated and has a manufacturer who has forgotten it — a camera, a bulb, a television, a printer — belongs on the guest side, because the value of the isolation is not that you distrust the guest, it is that you distrust the device. On the main network, a compromised gadget sits on the same segment as your file shares, your backups and your router's administration page.

What almost every guide leaves out is the other half. A guest network separates the local network; it does not separate the internet connection. Guest traffic leaves through the same modem, over the same line, behind the same public address, counted against the same data allowance and logged by the same provider. Whatever a guest device sends is attributable to your subscription exactly as if it had been sent from your own laptop. Client isolation, sometimes labelled AP isolation, adds one more thing and only one: it stops guest devices from seeing each other on that segment, which is useful in a flat share and irrelevant to what leaves through the router. And check one detail on your own hardware, because vendors differ: whether the guest segment can still reach the router's own administration interface. If it can, the isolation stops at a login page.

Turn WPS off, and the two-SSID answer the Wi-Fi Alliance now recommends

Wi-Fi Protected Setup was meant to remove the passphrase from the joining process, and its eight-digit PIN mode removed the passphrase's strength with it. CERT/CC vulnerability note VU#723755 sets out the mechanism: the access point's rejection messages reveal whether the first half of the PIN is correct, and the last digit is a checksum of the others, so what looks like 100 million possibilities is about 11 000. That is a protocol design flaw, not a manufacturer's bug — it applies wherever external-registrar PIN mode is on. How long the remaining space takes depends entirely on the access point: CERT cites a measured 189 hours to exhaust every PIN, and notes that many routers have no lockout policy at all, which makes a real attack far faster. Turn it off. Push-button mode is a smaller problem but still a window; if the interface only offers one switch, use it.

One last thing, and it is recent. In its 2026 deployment guidance the Wi-Fi Alliance acknowledges that some older equipment simply misbehaves on a network configured for transition mode, and its first recommended alternative is to run two service sets on the same access point — one WPA3, one WPA2 — configured with different passwords on each. That is worth reading twice, because it turns a second SSID from a convenience into a security control, and because it settles the passphrase question cleanly: the WPA2 network gets 20 random characters from a generator, the WPA3 network gets whatever you can remember, and neither password can be used to attack the other. Where the hardware supports it, the Alliance's newer compatibility mode does the same job on one SSID by hiding WPA3 from devices that cannot cope with seeing it.

What each mode changes, and what the passphrase has to be under it (entropy figures for the generator's default 76-symbol pool)
ModeOffline attack on a captured handshakeManagement frame protectionPassphrase required
WPA2-Personal onlyYes — unlimited, offline, undetectableOptional since 2012Random, 16–20 chars (100–125 bits)
WPA3-Personal transitionYes — via the WPA2 clients, same passwordCapable, not requiredRandom, 16–20 chars — treat as WPA2
WPA3-Personal only (SAE)No — one guess per active attackRequired for every clientMemorable is defensible; avoid the top of any wordlist
Two service sets, WPA3 + WPA2Only against the WPA2 network's own passwordRequired on the WPA3 setDifferent passwords on each — random on WPA2
WEP or WPA with TKIPIrrelevant — the cipher itself is brokenNoneNo passphrase rescues this; change the equipment
WPA Key GeneratorCreate strong Wi-Fi WPA/WPA2 passphrases (8–63 chars) with chosen character types and no ambiguous letters.Try the tool

Frequently asked questions

How long should a Wi-Fi passphrase be?
The standard allows 8 to 63 characters, and 8 is not a target, it is a floor. On this generator's default 76-symbol pool, 8 characters is 50.0 bits, 12 is 75.0, 16 is 100.0 and the default 20 is 125.0. Under WPA2 or WPA3 transition mode, where a captured handshake can be attacked offline without limit, pick 16 at the very least and 20 if you will only type it once per device. Under WPA3 only, the length matters far less because there is no offline attack to survive — but you still gain nothing by going short.
Does hiding the network name help?
Not against anyone who matters, and it can hurt. A hidden network still transmits its name every time one of your own devices looks for it, so the name is recoverable by listening for a few minutes, and your phone now broadcasts that it is looking for that specific network wherever you take it. What the network name genuinely affects is different: WPA2 uses it as the salt in the key derivation, so a common name like a manufacturer default shares precomputed tables with every other network of that name. Pick a distinctive name, leave it visible.
Should I filter by MAC address?
It is not a security control. MAC addresses travel unencrypted in every frame, including on a protected network, so an attacker within range reads the list of permitted addresses simply by listening, and setting a network interface to any address is a one-line command. Filtering costs you real time whenever a visitor arrives or you replace a device, and buys nothing an attacker cannot step over in a minute. Spend the same effort on a WPA3-only network and a random passphrase.
My router only offers WPA2/WPA3 mixed. Is that fine?
It is fine as long as you understand that you are running WPA2 with a WPA3 label on it, from the passphrase's point of view. Mixed is transition mode: both kinds of client share one service set and one password, protected management frames are advertised as available rather than mandatory, and the WPA2 handshakes on that network remain crackable offline. Give it a long random passphrase and revisit the setting once nothing on your network needs WPA2. If your equipment supports two service sets, the Wi-Fi Alliance's own recommendation is to split them, with a different password on each.
Is a guest network enough to keep smart-home devices safe?
It contains them, which is the right goal, but it does not secure them. On the guest segment a compromised camera cannot reach your file shares or your backups, and with client isolation on it cannot reach the other guest devices either. What it can still do is everything that goes outward: contact its own manufacturer, join a botnet, and send traffic that arrives at its destination carrying your public address. The guest network limits the blast radius inside your home; it does not limit what leaves it. Pair it with keeping such devices updated, and with turning off any remote-access feature you do not actually use.

Articles you may find interesting

All guides
GuideWhat a Password Manager Cannot MeasureEntropy prices one attack: offline guessing against a stolen hash. Above roughly 90 bits the number stops deciding anything — and the meter on this site under-reported a random 20-character password in 300 draws out of 300.GuideEncrypt a File, Then Send the Key Down a Different RoadThe encryption is the easy half. Here is exactly what the browser tool does to your file — cipher, key derivation, salt, nonce — and why an encrypted attachment with the passphrase in the same thread protects nothing at all.ExplainerHow Subnet Masks Work: CIDR, Network Bits, and Usable HostsUnderstand how a subnet mask splits an IP address into network and host parts, what /24 means, and how to count usable hosts.ExplainerPassword Entropy: What a Strength Meter Cannot KnowEntropy measures the process that produced a password, not the characters in it. H = L x log2(R) is only true when every character was chosen at random — which is exactly why a meter scoring a human-invented password on its character classes is measuring the wrong thing.ExplainerBig O Notation for Beginners: O(1), O(n), O(n squared), and O(log n) ExplainedBig O describes how an algorithm's work grows as input grows. Here is what O(1), O(n), O(n squared), and O(log n) mean and why the difference matters.ExplainerWhat Is UTF-8 and Unicode? Code Points, Byte Encoding, and Why UTF-8 WonUnicode assigns every character a code point; UTF-8 encodes those code points in one to four bytes. Here is how it works and why it beat the alternatives.

Related tools

The generator audit above describes the code shipped on this site in August 2026, read line by line rather than assumed. The protocol facts come from the Wi-Fi Alliance's own published material and from CERT/CC; the derivation of the pre-shared key from a passphrase is defined in IEEE Std 802.11, which is not freely readable and is therefore named rather than linked. Router firmware differs: what your access point labels WPA2/WPA3, mixed, guest isolation or WPS may not map exactly onto the modes described here, so read your own settings page before changing anything, and write the new passphrase down somewhere before you apply it.

Sources

Spotted a mistake in this article?