In cryptography, a shared secret is a piece of data known only to the people or systems involved in a secure communication. This secret is usually a key used in a symmetric cryptosystem, and it can be something like a PIN code, a password, a passphrase, a large number, or a set of random bytes.
The shared secret can be agreed upon before communication starts, in which case it is called a pre-shared key. Alternatively, it can be created at the beginning of a conversation using special methods like a key-agreement protocol. These methods might use public-key cryptography, such as the Diffie–Hellman technique, or symmetric-key cryptography like Kerberos.
This secret plays an important role in keeping information safe. It can be used to verify the identity of someone logging into a system through methods like challenge–response. It can also help create keys used for encrypting messages or adding extra protection called MACing. Often, the shared secret is mixed with something called an initialization vector to create unique keys for each message, like in the derived unique key per transaction method.
Shared secrets are also commonly used to verify users in web APIs, helping to ensure that only authorized people can access 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.
Safekipedia