secret key
A value known only to the parties allowed to use it, needed to create or check an HMAC or to encrypt and decrypt data.
Anyone who obtains the key can forge signatures and decrypt data.
In more detail
Keys must be random, long enough, stored as secrets and never committed to source code. Symmetric encryption uses the same key on both sides.
Related terms
- secret — Any value that grants access, such as a password, access token or private key, and must be kept out of code and version control.
- HMAC — A way of combining a secret key with a hash function to produce a tag that shows a message came from someone holding the key and was not changed.
- symmetric encryption — Encryption where the same secret key both encrypts and decrypts, as with AES.
Taught in
- Cryptographic Primitives: node:crypto & Ciphers — Node.js Internals & Backend Services