Keys, secure randomness and certificates
A key needs a lifecycle
A cryptographic key is a value that controls a cryptographic operation. Security depends on generating, storing, using, replacing and retiring keys appropriately. A bookstore’s encrypted backup can become unreadable if the decryption key is lost; if it is exposed, confidentiality may be lost. Plan authorized recovery separately from ordinary access.
Randomness for secret keys
Use the cryptographically secure random generator provided by a reputable operating system or cryptographic library, following the selected scheme’s key-generation API. Dates, names and ordinary simulation random generators are not suitable substitutes. A public fixed test key can help check a known example, but must never become a production secret. Some algorithms also need a nonce, a value subject to scheme-specific uniqueness or randomness rules; do not assume every nonce must be secret.
Certificates connect keys to identities
A public-key certificate contains a public key and identifying information signed by an issuer. A certificate authority (CA) can provide a chain of trust to a trusted root. In a web connection the client must check the relevant trust chain, validity period, intended hostname and other applicable policy. A certificate does not include the owner’s private key.
Recognize trust and recovery failures
If a fictional supplier certificate names a different host, stop and have the configuration checked rather than disabling verification. An expired certificate needs authorized renewal or correction of the underlying cause, not a bypass. A suspected key compromise requires incident handling, revocation where applicable, replacement and review of affected data. Replacing a key alone cannot undo earlier exposure; older protected data may require its original key to recover.
Practice: plan a key inventory
For a fictional backup key and a website signing key, record purpose, responsible owner, permitted access, generation method, replacement trigger and recovery plan. Do not write real key values in the inventory. Identify which certificate information may be public and which key material must be protected. Next chapter: secure configuration and layered defenses.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Keys, secure randomness and certificates — knowledge check
Apply the cryptographic concept to fictional scenarios.
Which is appropriate for generating production cryptographic keys?
What may a public-key certificate contain?
A web certificate names a different host. What should the user do?
What is a risk of losing the only backup decryption key?
A fixed test key is published with an example. Where may it be used?