Safekipedia
Key management

Shared secret

Adapted from Wikipedia · Adventurer experience

Shared secret

In cryptography, a shared secret is a piece of information known only to the people or systems talking to each other in a secure communication. This secret is often a key used in a symmetric cryptosystem. It might be a PIN code, a password, a passphrase, a large number, or some random bytes.

The shared secret can be decided before communication begins. In this case, it is called a pre-shared key. Or, it can be made at the start of a conversation using special ways like a key-agreement protocol. These ways might use public-key cryptography, such as the Diffie–Hellman method, or symmetric-key cryptography like Kerberos.

This secret helps keep information safe. It can be used to check the identity of someone logging into a system through methods like challenge–response. It can also help make keys for hiding messages or adding extra safety called MACing. Often, the shared secret is mixed with something called an initialization vector to make unique keys for each message, like in the derived unique key per transaction method.

Shared secrets are also often used to check users in web APIs, making sure only allowed people can see or use certain information or services.

This article is a child-friendly adaptation of the Wikipedia article on Shared secret, available under CC BY-SA 4.0.