All postsSecurity

Security Through Obscurity: The Oldest Bad Idea That Refuses to Die

Aug 1, 2026·15 min read

Every few years, security through obscurity gets declared dead — and every few years, it turns out someone is still renaming their admin account, moving SSH to a random port, or base64-encoding an API payload and calling it "encryption." The practice never really goes away, because the instinct behind it is completely natural: if nobody can find the door, nobody can walk through it.

The problem is that this instinct is a poor substitute for an actual lock. This post looks at where the idea comes from, why security professionals distrust it so strongly, where it still has a legitimate (if modest) place, and how the same debate plays out today in something as ordinary as an API.

Where the Idea Comes From

The term dates back further than most people expect. In 1883, French cryptographer Auguste Kerckhoffs laid out a principle that still anchors modern security thinking: a cryptographic system should stay secure even if everything about it — except the key — becomes public knowledge. A research write-up tracing the history of the idea notes that for centuries, secrecy was the dominant approach to designing secure systems, with military communications relying mainly on the fact that few people understood how they worked rather than on any inherently secure cipher. Kerckhoffs argued the opposite: a well-designed system should assume the enemy already knows exactly how it works, and survive anyway.

This is easy to confuse with "secrecy is bad," but that's not quite it. A password, a private key, a signing secret — these are still secrets, and they're essential. What Kerckhoffs objected to was relying on secrecy about the mechanism itself: the algorithm, the protocol, the lock design. Mechanism-secrecy is fragile in a way that key-secrecy isn't, because a mechanism is shared across every user of the system, gets studied, gets leaked, and — once it's out — can't be changed as easily as swapping a password.

An Even Older Origin Story

Kerckhoffs wasn't even the first to make this argument publicly. Three decades earlier, in 1851, English locksmith Alfred Charles Hobbs demonstrated to a stunned public how supposedly unpickable, state-of-the-art locks could in fact be picked. Critics worried that showing everyone the flaw would just teach criminals how to exploit it. Hobbs's reply, as recorded on Wikipedia's overview of the topic, has become one of the earliest and most quoted rebuttals to obscurity-based thinking: "rogues are very keen in their profession, and know already much more than we can teach them." His point was that the people most motivated to find a flaw — the actual attackers — will find it with or without public disclosure; the only question is whether the defenders find out about it in time to fix it too.

The term "security through obscurity" itself has a murkier, more folkloric origin. One story traces it to MIT's Incompatible Timesharing System (ITS) community in contrast to the neighboring Multics project, where security was taken far more seriously. Within the self-mocking ITS culture, the phrase reportedly described their own system's threadbare documentation and obscure commands — the joke being that by the time an outside "tourist" figured out how to cause trouble, they usually felt enough a part of the community to lose the urge. It's a nice reminder that the phrase started out as an in-joke about accidental obscurity, long before it became a formal critique of deliberate obscurity as a design choice.

A Ledger of Systems That Tried It and Lost

Abstract arguments are one thing; a track record is another. According to the history compiled on Wikipedia, a long list of telecommunication and digital rights management cryptosystems have relied on keeping their algorithms secret rather than public and peer-reviewed — and have, over time, been broken anyway. That list includes components of the GSM mobile standard, GMR satellite phone encryption, GPRS data encryption, several RFID encryption schemes, and — as recently as 2023 — the encryption used in TETRA, the radio standard relied on by police and emergency services across much of Europe. In every case, the same story played out: the algorithm's secrecy held for years, then researchers reverse-engineered it anyway, and every deployed system built on top of it was suddenly exposed all at once, with no way to quietly swap out a "key" the way you'd rotate a compromised password.

Modern anti-malware software is called out as one of the largest remaining strongholds of security-through-obscurity thinking still in everyday use: antivirus vendors keep their detection signatures secret, which sets up a permanent arms race where attackers keep finding novel ways to slip past detection while defenders keep inventing new secret signatures to catch them. It works well enough to be worth doing, but it's never a final answer — it's an ongoing chase, not a solved problem.

More recently, the same instinct showed up in an unexpected place: election infrastructure. In January 2020, NPR reported that Iowa Democratic Party officials refused to disclose security details about the mobile app being used to report caucus results, reasoning that they didn't want to hand attackers a blueprint. Cybersecurity experts weren't convinced, arguing that withholding an app's technical details doesn't meaningfully protect the system it's guarding — a modern echo of the exact argument locksmiths were having in 1851.

Standards bodies have been consistent on this point for a long time. NIST's guidance on general server security explicitly warns that system security should not depend on the secrecy of an implementation or its components, and the MITRE Corporation's Common Weakness Enumeration project formally catalogs the problem as its own entry, CWE-656: "Reliance on Security Through Obscurity."

None of that means obscurity is worthless everywhere. Wikipedia's overview draws a useful distinction: obscurity's effectiveness depends heavily on whether it sits on top of otherwise sound security practices or is being asked to carry the whole job alone. Used as one layer among several, it's treated as a legitimate security tool rather than a discredited one — and in recent years, more deliberate, engineered versions of the idea have actually gained ground in the security field under names like Moving Target Defense and cyber deception, where systems are intentionally randomized, disguised, or seeded with decoys specifically to waste an attacker's time and resources. That's a far cry from a hardcoded API key split across three JavaScript variables — it's obscurity treated as a real, engineered discipline rather than an afterthought.

Why Security People Reach for Their Pitchforks

Ask why "security through obscurity is bad" on any security forum and you'll get a fairly consistent answer, distilled down over decades of hard lessons: hiding the design of a system creates a false sense of safety without addressing the underlying weakness. Security researcher Robert Graham, writing about the cliché, argues that the real point isn't obscurity at all but transparency — and that transparency is good for security for much the same reason it's good in government, where it enables accountability. Only by exposing a system's design to scrutiny — peer review, penetration testing, public disclosure of flaws — can weaknesses actually get found and fixed, rather than sitting undiscovered until an attacker stumbles onto them.

This is also why the open-source world has historically leaned so hard on "many eyes make bugs shallow" as a security argument, and why cryptographic algorithms like AES aren't secret at all — they're published, standardized, and attacked by thousands of researchers for years before anyone trusts them. The algorithm is public. Only the key is secret. That split is the whole point.

Obscurity in the Wild: A Few Familiar Battlegrounds

The debate isn't abstract — it shows up in ordinary sysadmin decisions all the time, and the arguments on both sides are worth taking seriously rather than dismissing.

Renaming the Administrator account. Windows hardening guides have recommended this for years: rename the built-in Administrator account so an attacker can't target a known username directly. A well-known Microsoft TechNet debate on the topic opened by noting that in some circles the term "security by obscurity" is treated as nearly a slur among security professionals — yet the same piece went on to give real weight to the argument that renaming the account still eliminates a real, cheap attack vector, even if it isn't a complete defense on its own.

Moving SSH off port 22. This might be the most litigated obscurity debate in operations. Automated bots scan port 22 constantly, so moving SSH to a random high port cuts down that noise dramatically — one systems administrator who made the switch after years on the default port described their authentication logs shrinking from hundreds of daily attempts down to a handful almost overnight. But the same writer was blunt about what that change actually buys you, summing it up in one line: changing your SSH port is obscurity, not real security. A targeted attacker running a full port scan finds the service either way; what changed is the volume of drive-by noise, not the ceiling on what a determined attacker can do.

Obfuscated or "hidden" API endpoints. The same pattern shows up constantly in web and mobile development. Developers try to disguise API calls — encoding a payload, scrambling a URL path, hiding a key in minified JavaScript — hoping that if the request doesn't look readable in a browser's Network tab, it's somehow protected. It isn't. Anything a client needs in order to make a request has to exist somewhere the client can read it, which means anyone willing to open developer tools can read it too.

DRM and software licensing. Digital rights management schemes and license-key obfuscation are, almost by definition, security through obscurity applied to code instead of network traffic — and they sit alongside GSM, GPRS, and TETRA in the ledger of secret-algorithm systems that eventually got broken anyway, for exactly the reason Kerckhoffs predicted: the "secret" is baked into something the attacker has full, unsupervised access to (their own machine, their own binary), so cracking it is a matter of time and patience, not a fundamental barrier.

So Is Obscurity Ever Legitimate?

Here's where the conversation usually gets more honest than the "obscurity bad, always" soundbite suggests. Most practitioners who've actually run production infrastructure will tell you obscurity isn't worthless — it's just not sufficient, and it needs to know its place in the stack. Identity-security vendor Okta puts this nuance plainly: obscurity works best as a complementary layer used alongside other real security controls, not as a standalone defense.

That distinction — complementary layer versus sole defense — is really the whole debate in one sentence. Changing your SSH port doesn't stop a targeted attacker, but it does cut the ambient noise of automated scanning, freeing up your logs and attention for things that matter. Renaming an admin account doesn't stop a skilled intruder who's already inside your network, but it removes one of the laziest, most automatable first moves available to an opportunistic one. Security commentator Bruce Schneier captured the honest middle ground well: obscurity makes information harder to find or understand, which makes a system safer in a probabilistic sense — but "safer" is not the same as "inaccessible." Reduced probability of compromise is a real, measurable benefit. It just isn't the same thing as an actual barrier, and treating it as one is where teams get burned.

The Analogies That Make It Click

Some of the clearest explanations of this idea don't come from academic papers at all — they come from the kind of plain-language back-and-forth that fills a long-running Stack Overflow thread on the topic. A few of the analogies from that discussion are worth stealing, because they make the abstract argument concrete.

One answer frames it as burying money under a tree versus locking it in a safe. Buried money is only safe as long as nobody knows where it's buried; a safe sitting in plain view on a street corner is still safe, because what protects it isn't its location but the lock. A follow-up comment on that same answer adds the detail that really makes the distinction click: if someone discovers your password, you just change it — a minor inconvenience. If someone discovers where the money is buried, you have to physically dig it up and relocate the entire stash, and if the "burial spot" was baked into a piece of software, you'd have to rewrite the program itself. That's the recoverability argument in miniature: a compromised key is cheap to replace, a compromised mechanism is not.

That same thread makes a related point about peer review. One answer argues that the best way to evaluate or improve a security product is to have it examined by a large, skeptical group of outsiders — and that products designed to work as a sealed "black box" can never get that benefit, which tends to invite the suspicion (often justified) that they wouldn't hold up to scrutiny anyway. It's the same logic that makes open, published algorithms like AES trustworthy: thousands of qualified people have already tried to break them and failed, in public, over years.

Several answers in the thread also push back on a subtler danger: the assumption baked into most obscurity schemes that you're clever and your users — or attackers — are not. One contributor put it bluntly: relying on obscurity tends to assume you're smart and everyone else is not, and unless that assumption is backed by real evidence rather than confidence, both your users and any attackers will eventually work out the hidden method, find the unlinked page, or pull the plaintext password straight out of a compiled binary. Another commenter compared weak, obscurity-based protection to driving without a seatbelt: technically survivable in plenty of ordinary situations, but not something you'd want to rely on the one time it actually matters.

Finally, more than one answer in that thread makes the same observation about scale: obscurity that depends on a secret nobody has bothered to look for tends to collapse instantly, and completely, the moment even one person does look. Once a "hidden" backdoor, bug, or exploit is stumbled onto by a single curious person, word travels fast — within a day, it's no longer obscure to anyone.

It's also worth noting the debate isn't entirely one-sided even within that same thread. One reply points out that steganography — hiding a secret message inside an ordinary image or audio file rather than encrypting it outright — is arguably security through obscurity by definition, since the entire point is that an observer can't even tell a hidden message exists. And unlike most obscurity schemes, some research on steganographic detection has produced a genuinely counterintuitive result: under certain conditions, throwing more detection algorithms at a suspected stego-channel can actually increase the amount of data that can be hidden in it undetected, rather than making concealment harder. It's a reminder that "hiding that something exists" and "hiding how something works" aren't quite the same category of obscurity, even if they get lumped together in casual conversation.

A Concrete Modern Example: Obscured APIs vs. a Properly Verified JWT

It's worth walking through a before-and-after, because this is where the abstract debate turns into a decision most developers actually have to make. Picture a typical "obscured" API:

  • The endpoint path looks like /api/x7f2q/data instead of /api/data, on the theory that a random-looking path is harder to guess.
  • The request payload is base64-encoded or run through a simple substitution cipher before it's sent, so it doesn't look like readable JSON in a Network tab.
  • A hardcoded API key sits in the front-end bundle, lightly disguised by splitting the string across a few variables.

None of this stops a determined user. The random path is visible the moment the page fires a request. Base64 decodes in one line of browser console JavaScript. A hardcoded key is sitting in the shipped bundle for anyone to search for. All of it is obscurity: friction for the casual observer, no real barrier for anyone who opens developer tools with intent.

Now compare that to a basic JWT (JSON Web Token) setup done properly:

  • The user authenticates once, and the server issues a signed token containing claims like the user's ID and an expiry time.
  • The client attaches that token to every subsequent request, typically as an Authorization: Bearer <token> header.
  • The server verifies the token's signature on every single request using a secret or key only it holds. If the signature doesn't check out, or the token has expired, the request is rejected — regardless of whether the caller knows the endpoint's real name or anything else about how the API is built.

The endpoint path can be /api/data, fully documented in public API docs, with zero obfuscation, and this version is more secure than the disguised one above. That's Kerckhoffs' principle applied to a modern stack: the mechanism (how JWTs are issued and verified) can be completely public, because the actual secret — the server's signing key, and each user's ability to obtain a valid token — is the only thing doing real work.

But "we use JWT" isn't a magic phrase that ends the conversation either; it's a floor, not a ceiling. A few habits quietly turn a JWT setup back into obscurity dressed up as security:

  • Decoding a token without verifying it. Reading claims out of a JWT without checking its signature is no different from trusting a client-supplied cookie that says isAdmin: true.
  • Accepting a weak or missing signing algorithm. Some early JWT libraries would accept a token that claimed to have no signature at all, or let the client dictate the algorithm — letting an attacker forge a token by construction.
  • Long-lived tokens with no revocation path. A token valid for 30 days with no way to invalidate it early turns a single leak into a month-long compromise.
  • Storing the token somewhere obscurity-minded rather than security-minded. Stashing a JWT in localStorage because it's "less obvious" than a cookie doesn't stop a cross-site scripting bug from reading it straight out.
  • Trusting the signature but skipping authorization. A valid signature proves the token is genuine; it says nothing about whether this user should be allowed to hit this endpoint. That check still has to happen on the server, every time.

Done properly, a JWT does what obscurity only pretends to do: it gives the server a cheap, reliable way to answer "do I actually trust this request?" on every call, using a secret the client never sees and can't forge. Done carelessly, it becomes a more official-looking version of the same obscurity trap — a secret-looking string that nobody actually checks.

The Takeaway

Security through obscurity isn't a myth or a rookie mistake invented by confused developers — it's a genuinely old, genuinely tempting idea with a long track record of buying just enough false confidence to get organizations hurt. It shows up everywhere: renamed admin accounts, relocated SSH ports, obfuscated API payloads, disguised license checks. In every one of these cases, the pattern is the same. Obscurity can reduce noise, discourage casual attackers, and buy a system a bit of breathing room. What it cannot do is replace a real security boundary — a verified signature, an authenticated session, a properly scoped permission check — because the moment the "hidden" detail gets out, and it eventually does, a system that depended on it has nothing left standing behind it.

Kerckhoffs made that case in 1883, using locks and ciphers. Every generation since has relearned it with whatever technology happens to be new — Windows accounts, SSH daemons, mobile apps, and now REST APIs and JWTs. The lesson doesn't change: design as if the attacker already knows how your system works, and make sure that knowledge alone still isn't enough to get in.