Encryption, aka cryptography, is used to secure data at rest, stored in servers, and in motion, as transmitted over the network. Cryptography involves mathematical operations that convert the original plaintext into an unintelligible ciphertext (encryption) and the reverse process, converting ciphertext to plaintext (decryption).
Cryptographic algorithms apply these algorithms in combination of keys, which serve as a secret knowledge to complete the algorithmic operations correctly. And these keys require management as part of ongoing cyber hygiene — which is what we'll focus on in in this article.
Cryptographic keys are analogous to the number combinations used to secure a physical safe. Only the authorized user(s) of the safe have knowledge of the safe combination keys.
The safe may employ a complex mechanism for keeping the door locked, but even the strongest of safe may provide no security against penetration — if the key combination is known to an unauthorized adversary attempting to break the lock.
In the digital world, communication takes place over the network, between different entities at different geographic locations, who may or may not be able to share key knowledge between each other. So how do you share the secret key knowledge that enables secure communications over the network, where an adversary may be present as a man in the middle eavesdropper?
The goal of any cryptography scheme is to ensure the following:
Online services encrypt both data in transit as well as data-at-rest to ensure protection against attackers through a combination of techniques and tools.
(Related reading: common data encryption methods.)
Key management, or management of encryption keys, is the process of putting certain standards in place to ensure the security of cryptographic keys in an organization. Basically, it is the separation of keys from data to achieve flexibility and security.
You can have multiple keys for the same data or the same key for multiple files, key backup and recovery, etc.
Effective use of cryptography requires key management, which refers to the all-encompassing activities in handling cryptography keys during the entire lifecycle. It is designed to defend against two attacks, which refer to the key exchange problem:
Let’s review the key management lifecycle:
The first step is generating a cryptography key using an approved set of rules, including the use of a pseudo-random generator.
Next, we move into the process of setting up, configuring and testing keying material, including:
The distribution of keys between two or more entities involved in the communication. The process may involve a Key Generation or Key Agreement, where a new key is produced as a function of the secret (key) information possessed by the individual communicating parties.
We will explore this process in detail later, as it differentiates between symmetric private key cryptography and asymmetric public key cryptography.
Now the key must be certified — an authentication using digital signatures (issued by a third-party certification authority) that unambiguously associates the key with the appropriate sources. Users are registered as authorized members of the security domain to which these digital signatures may apply.
Key usage ensures the operational availability of keying material during the applicable crypto period of the keys. Depending on the type of key establishment protocols, the key may be temporary (session key) and need revocation at the expiration end of the digital certificate.
Cryptography keys must be stored with a high degree of confidentiality, integrity, and availability (the CIA triad). The storage location may not be an active memory but only acquired from an operational memory available to cryptographic algorithms.
Mechanisms that allow authorized entities to update and retrieve the keys stored in the operational memory. This follows the principle of securing data at rest and is useful for reconstructing a key from archived keying information.
The key is destroyed or deregistered when no further key management operations are applicable to the associated source entities. These entities may have completed the communication process or may no longer be eligible for the key certification process.
Now, let’s revisit #3 from above — key establishment — and see how this key management lifecycle applies to the two types of cryptography schemes:
In symmetric key cryptography, the same secret key is used for encryption and decryption. This is also called private key cryptography. It looks like this:
Here's when to use private keys:
Asymmetric key cryptography is a combination of a public key and secret private key is used for encryption and decryption. This is also called public key cryptography. It works like this:
Hash functions play a vital role in cryptographic systems by ensuring data integrity. They convert input data into a unique, fixed-size hash value. Even the slightest alteration to the input generates a completely different hash, allowing users to detect tampering effectively.
For example, hash functions are integral to digital signatures, where they help verify the authenticity of files. Additionally, they are used in secure password storage and in checking data integrity during transmission or storage.
Message Authentication Codes (MACs) provide a robust mechanism for verifying both the integrity and authenticity of a message. A MAC is created by combining a secret key with the message through a cryptographic algorithm. The recipient, using the same key, validates the MAC to confirm the message is untampered and verify the sender's identity.
This approach is fundamental to secure communication protocols like HTTPS, ensuring that data remains trustworthy even in transit.
The handling of encryption keys in memory directly impacts the security, performance, and reliability of cryptographic systems. Below are key considerations for managing memory in the context of encryption key management:
Disable paging for key storage: Keys should not be paged to disk, as this could lead to persistent exposure. Use non-paged memory for storing encryption keys.
Use cryptographic modules that comply with recognized standards such as FIPS 140-3, NIST 800-57 or ISO/IEC 27001, ensuring robust memory management practices.
Hardware Security Modules (HSMs) handle cryptographic operations within a secure hardware boundary, ensuring that keys never leave the protected memory.
Encryption key management is an essential aspect of ensuring data security. It involves a systematic approach to generating, storing, using, and destroying cryptographic keys throughout their lifecycle.
By implementing robust key management strategies and adhering to best practices, organizations can safeguard sensitive information, prevent unauthorized access, and maintain the integrity and authenticity of their data.
See an error or have a suggestion? Please let us know by emailing splunkblogs@cisco.com.
This posting does not necessarily represent Splunk's position, strategies or opinion.
The world’s leading organizations rely on Splunk, a Cisco company, to continuously strengthen digital resilience with our unified security and observability platform, powered by industry-leading AI.
Our customers trust Splunk’s award-winning security and observability solutions to secure and improve the reliability of their complex digital environments, at any scale.