A private key is the secret part of an asymmetric cryptographic key pair. The public key is the part that can be distributed. Depending on the algorithm and intended use, the private key can be required to produce a signature, decrypt data or take part in establishing session secrets. Applications use key pairs suited to the purpose. The private key remains available only to authorised people and systems.

Signing and decryption

When signing a document, the application uses the private key assigned to that operation. The recipient can verify the signature with the associated public key. Verification helps confirm the integrity of the document and the signature's connection to the key. To associate the key with a person or organisation, an application uses trusted information appropriate for the context, such as the details of a verified digital certificate.

In an asymmetric encryption system, an application can use the recipient's public key to protect data or the symmetric key that protects that data. The recipient needs the corresponding private key for the operation defined by the system. The same public and private key concept appears in different applications. The algorithm and configuration determine which operation a particular key can perform.

USB cryptographic device connected to a work laptop
Some keys can be stored on a dedicated cryptographic device.

Storing and accessing a key

A key can be stored in a cryptographic module, in a key management service or as a protected file, depending on the system. Some devices perform the cryptographic operation and let the application use the result without exporting the key. The business checks who can request the operation, how access is approved, which information is logged and how authorised copies are handled.

Maintain an inventory of keys by purpose and application. For each one, record an identifier, the owner, the place where it is managed, the period of use and the replacement procedure. The inventory can be shared with the people who manage it. Secret material stays in the place and format defined by the system. A copy in a code repository, ticket or conversation creates another place from which the key could be exposed.

An example from a business application

An application signs reports that it sends to a partner. If there are signs that an unauthorised copy of the key could have reached a shared folder, the team identifies the key and the period during which it could have been accessed. The owner stops using the suspect key to sign new reports, prepares a replacement key pair and coordinates updating the trusted public key the partner uses. If a certificate is associated with the key, the team also follows the applicable revocation procedure.

Losing access calls for a decision based on the key's purpose. For signing, a new key allows future operations once verifiers have been updated. For previously encrypted data, access may depend on controlled retention of the key required for decryption or another recovery mechanism built into the system. Periodically check the recovery procedure under controlled conditions without exposing keys used in production.

Operations involving historical data depend on what the key was used for. To verify an old signature, the public key and evidence about its validity at the time of signing matter. Recovering encrypted data may require the private decryption key. Document the two needs separately, along with access controls and retention periods.

Treat key replacement as a change involving dependent systems. Before the change, confirm who verifies signatures or uses the service and when they can update the public part. Afterwards, check a normal operation and determine when the old key can be retired under the applicable policy. This kind of plan reduces interruptions and gives the team a record of the cryptographic identities that remain active.

Review provider dependencies before deciding where to store a key. If the service moves or the contract ends, the team should know which operations are still needed and how the keys will be available for them.