How a One-Way Calculation Becomes a Lock

A classic encryption method called RSA starts with two very large prime numbers. A prime is a whole number divisible only by 1 and itself. The system multiplies the primes and publishes the product as part of a public key—the information a bank’s server can share openly so a browser can encrypt a message for it.

The private key depends on knowing the original primes. Multiplication is straightforward, but given a sufficiently large product, finding its prime factors is extraordinarily difficult for ordinary computers. The gap between those two tasks lets the server keep the private key secret even though the public key is visible.

What Happens When You Sign In

The browser and bank use cryptographic protocols to establish a protected connection. In a classic RSA setup, the math helps authenticate the server or establish secure key material; the two sides then use a shared session key to encrypt the stream of data. That symmetric encryption is much faster for handling the many messages exchanged during a session.

The protection therefore comes from a chain of steps, not from putting each password or transfer through a giant multiplication. If an attacker cannot recover the private key or otherwise defeat the connection, intercepted traffic remains unreadable.

The Math Is One Part of the Safeguard

RSA is an influential example, but modern secure connections can use other public-key methods, and a banking site’s safety also depends on sound software, device security, and account protections. The underlying mathematical challenge still illustrates the design principle: a task can be easy in one direction and prohibitively hard to reverse.

That asymmetry is what makes a public key useful. A bank can let anyone use it to lock information, while only the holder of the matching private key can unlock it—without needing to keep the locking key secret.