seegongsik
Saved words
seegongsik
Security · how trust is kept

In a world you cannot trust, how do we stay safe

Keep secrets, confirm nothing was changed, and tell whether the other side is real. From hashing and salting to symmetric keys, public keys, and key exchange, then signatures, certificates, and HTTPS, and on to firewalls, social engineering, and design principles. It closes the whole journey with the truth that perfect security does not exist, which is to say, with how to manage risk.

15 / 15
01The rules of a world you can't trust
On a network you can't know who might peek at, change, or intercept a message while it travels strange roads. So the goals security tries to protect are three. Keeping it secret so others can't read it (confidentiality), keeping it unchanged on the way (integrity), and keeping it usable whenever needed (availability). Take the first letters and we call it CIA. These three are goals to protect, not ways to protect. The means come separately. One of them is checking that the other side really is who they claim to be: authentication. Like a password, you show something only you know to prove who you are. In short, security sets up the three goals of confidentiality, integrity, and availability in a world you can't trust, and protects them with means like authentication. Not confusing goals with means is the first step.
02Turning it into something you cannot reverse, the hash
A security hash turns input into a fingerprint in one direction only. Input to fingerprint comes out easily, but fingerprint back to input cannot be done. So we do not store a password as is, only its fingerprint. Even if the store leaks, it holds only fingerprints, so the original passwords are not directly known. At login we turn the entered value into a fingerprint again and check whether it matches the stored fingerprint. If they match, you pass. The same input always yields the same fingerprint, which is why this comparison works. This looks similar to the hash we saw in data, but its purpose differs. The data hash is used to find things fast, while this security hash is used so it cannot be reversed. One-way fingerprint, store only the fingerprint, verify by comparison. That is how a hash protects.
03The trap of identical passwords, a pinch of salt
The same password becomes the same hash. So just by looking at stored hashes one can tell who used the same password, and a risk appears of a password being guessed back through a table that lists common passwords and their hashes ahead of time. The fix is simple. Add a pinch of a random value, different per person, to the password before hashing. This pinch is called a salt. A salt is not a secret; it only needs to differ per person. Add a salt and even the same password gives an entirely different hash. Then a pre-built table no longer matches in one shot, and stored hashes no longer look identical. In short, the trap where the same password becomes the same hash is undone with a per-person salt, making even the same password a different hash. That is salting.
04Several ways to prove that you are you
Authentication is proving that you are you. The materials for proving fall into three kinds. Something you know (like a password, held in your head), something you have (like a phone or a key, held in your hand), something you are (like a fingerprint or a face, attached to your body). Using just one means it ends if that one leaks, but requiring two stacked together is far safer. This is called multi-factor. And authentication is not the same as authorization. Authentication checks who you are; authorization then decides what you may do. Even once you are confirmed, what you may do is set separately, and can be taken back if needed.
05A lock that opens only with the key, encryption
A message sent plainly is plaintext, so anyone along the path reads it as is. Encryption locks the plaintext with a key, turning it into a meaningless scramble (ciphertext). The locked text can be read but its meaning cannot be told. To read it again you must unlock it with the right key, and a wrong key does not open it. So encryption keeps a secret in two places. First, in transit. While crossing the internet, intercepted content stays protected. Second, at rest. While held on a device or server, it is safe even if someone peeks. In short, plaintext is exposed, encryption locks it, only the key unlocks it, and so the secret is kept both in transit and at rest. How to share that key safely comes in the next lesson.
06Lock and unlock with one key, symmetric encryption
Symmetric encryption uses the same key to lock and to unlock. You need only one key, so it is simple, and it locks and unlocks even large data very fast. That is why it is widely used. But it has a decisive weakness. For a distant partner to unlock, that person must hold the same key, yet the very path of sending that key is risky. If it gets copied along the way, the lock becomes meaningless, and if you do not send it, the partner can never unlock. Risky to send, useless not to send, a dead-end dilemma. This is the key delivery problem. The strength of speed and the puzzle of how to hand the key over are one and the same. The public-key method in the next lesson is what solves this very dilemma.
07The magic of two keys, public key
Public key cryptography uses a pair of two keys. One is the public key, fine to give to anyone, and one is the private key, held only by you. What the public key locks opens only with its matching private key. No other key, not even the public key that locked it, can open it. So a recipient's public key is safe to publish to the whole world. Anyone can lock a message with that public key, and only the person holding the matching private key can open it. The key distribution headache of symmetric keys disappears, because there is no secret key to hand over at all. The public key is like handing out padlocks, the private key is your own key. That is the magic of two keys.
08Sharing a key in secret
Public keys are safe but slow. So in practice we send the real content with one fast symmetric key. The problem is how to share that symmetric key safely. The answer is to build it together. Pictured as mixing colors, both start from a public color everyone knows, each blends in a private color, and they send only the blended color to each other. Mixing your own private color back into the color you received, both people arrive at the very same final color. That final color is the shared secret, the symmetric key. Someone watching in the middle sees the public color and the blended colors that passed by, but without each private color they cannot make the same final color. One caution: key exchange is not the same as encrypting content with a public key. Key exchange is the procedure where two sides build the same secret together, and only then do they use that symmetric key to trade the real content quickly.
09Checking a letter is real, the signature
A digital signature uses public key cryptography in reverse. The sender attaches a signature to the message with their own private key. Only that person has the private key, so only that person can produce that signature. The receiver verifies the signature with that person's public key. If verification passes, two things are proven at once: authenticity, that it truly came from that person, and integrity, that not a single character changed along the way, because even a tiny change to the content breaks the check. If encryption is locking content to keep it secret, a signature does not lock at all, it proves who sent it and that it was not altered. Locking is for secrecy, signing is for authenticity and integrity. The same one pair of keys, just flipped in direction, does both.
10Is this public key really theirs, certificates
To use a public key safely, you must be able to trust that the public key really belongs to that person or site. Because if someone in the middle hands over a fake public key pretending it is genuine, that is dangerous. So a body everyone trusts, a certificate authority (CA), steps in. The CA vouches by signing, with its own private key, that this public key truly belongs to this site. That vouching document is exactly a certificate. A browser already carries a list of CAs it trusts. So when it receives a certificate a site sent, it can trace upward and check whether it is vouched for by a trusted CA's signature. If the vouching holds, it passes; if a place not on the trust list signed it, or the vouching does not match, the browser raises a warning. This web of trust, linking who vouches for whose public key, is the public key infrastructure (PKI). A certificate is, in effect, a trustworthy proof of identity attached to a public key.
11The lock where everything meets, HTTPS
HTTPS is the lock where everything you learned in this area meets. In networking you saw the flow, here you see why it is safe. Safety comes from three loops closing. First, a certificate confirms the other side is truly that site. This loop blocks impersonation. Second, a public key safely shares a fast symmetric key, so no key needs secret delivery. Third, that symmetric key encrypts the content and even checks its integrity. This loop blocks eavesdropping and tampering. The lock is shut only when all three loops close together. If even one is missing, it is not safe. So the little lock in the address bar is not a mere picture, it is a signal that authentication, key exchange, and encryption have all closed.
12The gatekeeper at the door, the firewall
A firewall is a gatekeeper that inspects incoming and outgoing traffic by rules. Traffic comes and goes through doors called ports, and the firewall sets a rule per door for whether to allow or block. A rule usually decides based on the source or destination and which door the traffic arrives at. The key is default deny. It lets through only what is explicitly allowed and blocks anything unknown by default. The fewer doors left open, the smaller the surface visible from outside, that is the attack surface, so it is safer. So a good habit is to open only the doors you truly need and keep the rest shut. The firewall is a gatekeeper at the door, the default is to block the unknown, the fewer open doors the safer. That is the heart of the firewall.
13The weakest link is people
No matter how strong the ciphers and locks, the weakest link is people. Instead of breaking technology, attackers sometimes aim at human trust, a rushed mind, and the wish to help. This is called social engineering. All we really need is the awareness that such attacks exist. There is no need to memorize methods, only to build defense habits. The core is two things. First, the more sudden and urgent a request, the more you stop and confirm it through another channel. If someone demands something by phone, do not ask back on that number, confirm separately on the official one. Second, never casually tell anyone secrets like passwords or one-time codes. In the end, security is not only a technical problem but a problem of trust. The habit of slowing down, suspecting, and verifying is the strongest shield.
14The principles that design safety
Good security comes not from one technology but from design principles. First, least privilege. Give everyone only as much access as they need, and take it back when the task is done. The less power held, the less there is to lose. Second, defense in depth. Do not trust a single layer; place several layers to block. When one layer is breached, the next one catches. Third, default deny. Block everything except what is explicitly allowed. It is safer not to let in what you do not know. Fourth, the simpler the safer. The more complicated the structure, the more unseen gaps grow. Simple is easy to inspect. These principles last even as individual techniques change. So when you learn a new technology, weighing it by the principles first keeps you from losing your way.
15There is no perfect security
There is no perfect security. Any lock can be shaken given enough time and effort, and above all, every notch you raise security, convenience drops a notch and cost rises a notch. The three trade off against each other. So the goal of mature security is not to make risk zero, but to manage risk. Zero is unreachable, and chasing it paralyzes life. Instead you look at what matters and how much, keep only as much risk as you can accept, and block the rest. So the right answer differs by situation. Just as a personal notepad and a bank vault do not use the same lock, you choose a balance point that fits the weight of what you protect. Not chasing perfection but choosing balance: this is the grown-up way of seeing security.
Was this helpful? Support seegongsik