Skip to main content

How Can Lightning Be Hotter Than the Surface of the Sun?

How Can Lightning Be Hotter Than the Surface of the Sun? For roughly twenty to thirty microseconds, the channel of air a lightning bolt has just punched through the atmosphere sits at something like 30,000 degrees Celsius. The visible surface of the sun  the layer astronomers call the photosphere  runs at about 5,500 degrees Celsius. Do the arithmetic and a bolt over an open field briefly outruns a star by a factor of roughly five. That fact gets repeated often enough to have become trivia-night reflex, and repetition has flattened the strangeness out of it. The stranger question sits underneath: what, precisely, is being measured when someone assigns a temperature to a flash of electricity that exists for less time than it takes to blink? Lightning itself is not a thing with a temperature, not the way a stove burner or a cup of coffee has one. It's a current, a sudden and enormous movement of electric charge between cloud and ground, or between two regions of the ...

How Does a Website Know Your Password Is Correct Without Knowing It?

How Does a Website Know Your Password Is Correct  Without Ever Knowing Your Password?


You type your password into a login box you've used a hundred times before  your email, maybe your bank  and hit enter. For a fraction of a second, nothing happens. Then the page either welcomes you back or tells you the password was wrong. That pause, barely long enough to notice, is doing something most people never stop to question. Somewhere on a server you'll never see, your password is being checked against something. But if that server is built properly, it isn't holding onto the actual word you typed, not the one you set months ago, not even a scrambled copy of it. So what, exactly, is it comparing your input to? That's the real question behind how websites verify passwords, and the answer involves one of computing's quietly elegant tricks.


The easy assumption is that somewhere there's a giant spreadsheet: your username in one column, your actual password sitting right next to it in another, and logging in is just a lookup  does the box match the column? Some services genuinely have worked this way, which is precisely why, when they get breached, headlines mention lists of real passwords turning up in plain text online. But a properly designed modern system, following guidance from bodies like OWASP and NIST, never keeps a readable copy of your password once your account exists. Not because the password itself is unimportant, but because storing it in recoverable form is treated as an unnecessary risk. (Whether every website on the internet actually follows this is a separate question  plenty of poorly built ones don't.)

What gets stored instead is the output of a hash function: a mathematical procedure that takes any input, however long, and turns it into a fixed-length string that bears no visible resemblance to the original. Feed it "MyPassword123" and you might get something resembling 7f9a3e21b04c8d... (a string I've invented for illustration; no real hash function would produce anything so short or so tidy). Three properties matter here. Feed the same input through the same hash function under the same conditions and you always get the same output  it's consistent, not random. Change a single character of the input, even just capitalizing one letter, and the output changes completely and unpredictably; cryptographers call this the avalanche effect. And critically, there's no straightforward way to run the function backward  no formula that takes the hash and hands you the password that produced it.

So here's what actually happens the instant you hit enter. Your password travels to the server over an encrypted connection (that's the padlock icon doing its job). The server doesn't compare it to a stored password, because there isn't one. Instead, it runs your freshly typed password through the same hashing procedure used back when you first set it, and lands on a result. That result gets set beside the value already sitting in the database  the one produced the last time you chose that password. Match, and you're in. No match, and you're rejected.

That's the whole trick. The server never needs your actual password back  only agreement between two derived values it computed the same way, twice, at different times.

There's a hole in this, though, if it's done too simply. Because hashing is deterministic, everyone who picks "password123" ends up with the identical stored hash. An attacker holding a breached database full of such hashes doesn't need to attack each one individually  they can precompute the hashes for millions of common passwords just once, store the results in a giant reference table (sometimes called a rainbow table), and instantly recognize matches across every account in that database, and every other database that used the same scheme. This is exactly the shortcut salting exists to kill.

A salt is a random value, unique to each account, generated the moment a password is first set. Rather than hashing the password alone, the system hashes the password glued to its salt: password plus salt goes into the function, and what comes out is what gets stored, with the salt sitting right beside it in the same record. The salt isn't secret  anyone who steals the database gets it along with everything else  but it doesn't need to be secret to do its job. Two people who both choose "password123" but land different random salts end up with completely different stored hashes.

That's all salting really is. No secrecy required, just uniqueness  enough to make a precomputed table worthless and force an attacker to redo the work, one account at a time. It doesn't make cracking impossible. It removes the one shortcut that made it cheap at scale.

Encryption and hashing get confused constantly, and the difference matters here. Encryption is built to be reversed: something gets scrambled using a key, and anyone holding that key can unscramble it back to the original. Password hashing is built to do the opposite job  there's no key tucked away anywhere that turns a hash back into a password, because reversal was never the intention. The server isn't holding onto what you typed at all; it's holding onto a derived shape produced from what you typed, and all it can do from here is check whether some new attempt casts that same shape again.

An honest login and a break-in attempt look identical to a hash function  both are just an input passing through the same procedure. The difference is scale. One person logging in triggers this computation exactly once, and a fraction of a second's delay is invisible to them. An attacker guessing passwords by brute force might try billions of candidates, and if each attempt carries even a small computational cost, that cost multiplies into something enormous at billions of repetitions. This is why modern password hashing schemes are deliberately slow, or deliberately memory-hungry, rather than as fast as the underlying hardware allows. Argon2, winner of the 2015 Password Hashing Competition, underlies OWASP's current recommended default in its Argon2id variant; bcrypt, scrypt, and PBKDF2 remain widely used alternatives, chosen depending on compatibility needs or regulatory requirements. None of these algorithms works alone  each is one layer in a system that also depends on salting, sensible configuration, and how the rest of the login flow is built.

So what happens when a database of these hashes actually gets stolen, which does happen? Nowhere near as catastrophic as a plain-text leak, but not nothing either. The attacker can't simply read off passwords, but they can run an offline attack: take a list of likely passwords, hash each candidate using the correct salt and the same slow algorithm, and compare the result to what was stolen, repeating this at whatever pace their hardware allows, with no lockouts, no failed-attempt counters, nobody watching. Common and reused passwords fall to this kind of attack surprisingly fast, since attackers already have enormous lists of real passwords harvested from previous breaches to try first. A long, unique password stays out of practical reach even against unlimited offline guessing. Strong hashing and a decent password aren't substitutes for each other; the system holds up only when both are doing their part.

This also explains something people rarely connect to the rest of the picture: why "Forgot your password?" almost never emails you your old password back. If the plain version genuinely was never retained, there's nothing to send  the system isn't being coy, it structurally cannot produce what it never kept. What it can do instead is verify your identity through some other channel and let you set a brand-new password, which then gets salted and hashed all over again before storage.

Strip away everything around it and a single login reduces to a short relay: your typed password meets a stored salt, the pair moves through a hashing routine tuned to be inconveniently slow, and whatever emerges gets set beside a value already waiting in the database from the day you last chose that password. They line up, or they don't. Nothing about your original password needs to exist anywhere in that chain for the comparison to work.

Which brings the whole thing back to that half-second pause after you hit enter. In that gap, no one  not the server, not an administrator, not the database itself  is checking your password against your password. They're checking whether two derived values, produced under the same rules, happen to agree. That a system can confirm a secret without ever holding the secret is one of the stranger ideas sitting underneath something as mundane as a login box. And it rests on ground less solid than it feels: every hash function used this way depends on the assumption that reversing it is computationally infeasible, not on any proof that reversal is actually impossible. Whether genuine one-way functions  easy to compute forward, intractable to invert  exist at all in the strict mathematical sense is still an open problem in theoretical computer science, tied to the unresolved question of whether P equals NP. It's known that if one-way functions exist, P cannot equal NP. Nobody has managed to prove it the other way around.

YOU MAY ALSO LIKE




Comments

Popular posts from this blog

Mpemba Effect Explained: Can Hot Water Freeze Faster Than Cold?

Mpemba Effect Explained: Can Hot Water Freeze Faster Than Cold? At Magamba Secondary School in Tanzania, in 1963, a thirteen-year-old named Erasto Mpemba was racing the clock, not the thermometer. His class was making ice cream  boil the milk, stir in the sugar, let it cool to room temperature, then claim a slot in the school refrigerator's single ice tray. Slots were scarce. Another boy, worried about being shut out, skipped the boiling step entirely and poured his milk in cold. Mpemba, further behind and unwilling to lose his place too, did the opposite: he shoved his mixture into the freezer while it was still hot from the stove. Ninety minutes later the two boys checked. Mpemba's had set into ice cream. The other boy's was still liquid. He asked his physics teacher to explain it. The answer, as Mpemba later recounted it himself, was blunt: "You were confused, that cannot happen." He let it go, for a while. Years later, at Mkwawa Secondary School in...

Scientists Are Building Harry Potter's Invisibility Cloak

Scientists Are Building Harry Potter's Invisibility Cloak Harry Potter slipped it over his shoulders and vanished. No spell, no wand movement, just a piece of fabric that bent light around him like he was never there. Readers accepted it instantly. Of course a cloak could do that. Magic works however the story needs it to. Here is the strange part. Physicists have spent the last two decades trying to build a version of that cloak using nothing but the laws of electromagnetism. Not metaphorically. Not as a marketing gimmick. Actual peer reviewed experiments, published in Science, have made real objects vanish from certain kinds of detection. The cloak is not fiction anymore. It is a live engineering problem, and the material at the center of it has a name: the metamaterial. So how does a piece of engineered matter learn to hide something from light? To answer that, we need to start with something you have never had to think about before. How you see anything at all. HOW SEEING ACTUA...

Tooth Regrowth Drug: Could Humans Really Grow a Third Set of Teeth?

Tooth Regrowth Drug: Could Humans Really Grow a Third Set of Teeth? Every so often, a routine dental X-ray turns up something unexpected: a fully formed extra tooth sitting quietly in the jaw of someone who already has a complete adult set. Dentists call it a supernumerary tooth. To a small group of researchers in Japan, that stray tooth became a clue that the instructions for building a tooth aren't entirely switched off once the permanent set comes in. That idea now sits behind one of regenerative medicine's more closely watched experimental therapies: a tooth regrowth drug currently in human clinical trials, built on the hope of a third set of teeth instead of only dentures or implants. Humans follow a fixed script: twenty baby teeth in early childhood, replaced by thirty two permanent teeth meant to last a lifetime. Lose one as an adult and nothing grows back. The research behind this drug asks something narrower than whether humans can grow teeth from nothing: ...

Why Do Old Books Smell So Good? The Hidden Chemistry Behind That Familiar Scent

Why Do Old Books Smell So Good? The Science Behind the Scent Pull a paperback you haven't touched in years off a shelf and open it, and something happens before you've read a single word. A smell rises off the pages, warm and faintly sweet, somewhere between a candle shop and a woodshop. It's instantly recognizable, though almost nobody can describe it precisely. Why do old books smell the way they do? Not because paper simply gets old in some vague, unexplained sense. Paper, ink, glue, thread, and cover materials are all quietly reacting with oxygen, moisture, and light over the years, and the molecules produced by those reactions drift into the air where your nose picks them up. The smell of old books isn't one substance. It's a mixture of dozens of compounds, and the blend depends on what a particular book is made of and where it's spent its life. The Chemistry of Paper Aging Paper is built mainly from cellulose, a long chain molecule made of repe...

Inside the iPhone: The Apple Technology You Never See

Inside the iPhone: The Apple Technology You Never See Hold an iPhone up to the light and you can see almost nothing. A slab of glass, a ring of aluminum, a camera cluster that catches your reflection. Nothing about the outside hints at what happens in the half-second after you tap the shutter button, or the quarter-second it takes to recognize your face across a room, or the path a text message takes on its way to the nearest cell tower. Most of what an iPhone actually does happens in places you're not meant to see  inside chips Apple designed from scratch, inside a second, sealed-off computer that lives next to the one you interact with, inside processing pipelines that discard and rebuild the picture you just took before you ever look at it. None of this is secret in the conspiratorial sense. Apple publishes technical documentation on most of it, files patents, gives conference talks, even lets outside researchers poke at parts of it. But "publicly documented...

The Secret Speed of Gravity: Does Gravity Travel at the Speed of Light?

The Secret Speed of Gravity: Does Gravity Travel at the Speed of Light? On August 17, 2017, a disturbance reached Earth that had been crossing the universe since long before anything capable of noticing it existed. Two neutron stars, orbiting each other in a galaxy called NGC 4993, had spiraled together and merged, sending a ripple through spacetime that LIGO's detectors in Louisiana and Washington picked up after a journey of roughly 130 million years. Exactly 1.74 seconds later, NASA's Fermi Gamma-ray Space Telescope and the European Space Agency's INTEGRAL observatory recorded a burst of gamma rays arriving from the same patch of sky. Two entirely different kinds of signal, generated by two different physical processes, having traveled for longer than most mammal species have existed  arriving within less than two seconds of each other. That gap is the whole story, in miniature, because it's so small relative to the distance traveled that it forces a ques...