Symmetric Cryptography Starts With a Shared Secret
Symmetric cryptography uses shared secrets to protect information. For encryption, the same secret key turns readable data into a protected form and turns it back again. The mathematical method can be public; the key has to remain secret.
Cryptography is the use of mathematical methods to protect information. A key is a data value those methods use. Programs that exchange protected information need the appropriate shared secret to encrypt and decrypt it, or to check that a message has not been changed.
That arrangement helps solve two different problems: keeping a message private and checking whether it has been changed. Understanding the difference prevents “encrypted” from becoming a promise it can't keep.
- Carry sensitive files on a drive that stays locked without your PIN.
- Unlock it on any computer, with no software to install.
- Lose it without losing sleep: the contents are encrypted in hardware.
From readable message to protected data
Suppose two programs need to exchange a private appointment note. The sending program takes the readable note, called plaintext, and encrypts it using a secret key. The result is ciphertext, the protected form sent to the other program.
The receiver uses the same key with the matching decryption method to recover the note. Knowing which encryption method was used doesn't supply the secret value needed for that operation.
AES, the Advanced Encryption Standard, is one example of a symmetric encryption algorithm, or set of mathematical steps. It is a block cipher, which works on fixed-size chunks of data. Software needs additional rules to apply that building block to complete messages.
The encryption key and the published algorithm therefore have different jobs. Everyone can know the procedure without knowing the secret value needed to recover the message.
Hiding a note doesn't check its contents
Confidentiality means keeping information from people who aren't allowed to read it. Integrity concerns whether information has been altered improperly. Encryption by itself doesn't automatically provide both.
Symmetric cryptography also includes message authentication codes. These use a shared secret to produce a check value for a message. The receiver uses the secret to verify the check, helping detect changes and establish that someone with the key produced it.
That last wording matters when several people hold the same key. A valid shared-key check cannot, by itself, identify which one of those people created it. A digital signature uses a private key to sign and a corresponding public key to check the signature; the two methods aren't interchangeable.
The National Institute of Standards and Technology's key-management guidance explains these separate security services and why systems may need to combine them.
One way to combine secrecy and change detection is authenticated encryption. AES in Galois/Counter Mode, or AES-GCM, is an example. It encrypts information and produces an authentication check. The receiver checks the protected message rather than assuming that unreadable-looking data must be intact.
One Shared Key or a Matched Pair?
The conversation still needs its keys
The shared-secret arrangement leaves another problem: how do the programs get the right secrets before exchanging private information?
A surrounding protocol, or agreed set of communication rules, can handle that work. TLS 1.3 is a useful example. TLS stands for Transport Layer Security; it protects a connection between communicating programs.
Its opening exchange, called the handshake, establishes shared secret values and agrees on settings for protection. TLS then protects the traffic with authenticated encryption, using separate keys for the data sent in each direction, as the TLS 1.3 specification describes.
Systems can combine symmetric methods with public-key methods, an approach explained further in hybrid encryption. The programs exchanging the appointment note need that shared secret before one can send a note the other can read.
A Symmetric Key Has a Life Beyond the Encrypted File

Block Ciphers: Why Strong Encryption Needs More Than AES

Hybrid Encryption: Two Kinds of Keys, One Protected Message

QUOTE:
"Amateurs hack systems, professionals hack people."
