# Key ceremony

In cryptography, a key ceremony is a ceremony held to generate or use a cryptographic key.
A public example is the signing of the DNS root zone for DNSSEC.

## Root key signing ceremony

In public-key cryptography and computer security, a root-key ceremony is a procedure for generating a unique pair of public and private root keys. Depending on the certificate policy of a system, the generation of the root keys may require notarization, legal representation, witnesses, or “key-holders” to be present. A commonly recognized practice is to follow the SAS 70 standard for root key ceremonies.
At the heart of every certificate authority (CA) is at least one root key or root certificate and usually at least one intermediate root certificate. This “root key” is a unique key that must be generated for secure server interaction with a protective network, often called the "root zone". Prompts for information from this zone can be made through a server. The keys and certificates serve as the credentials and safeguards for the system. These digital certificates are made from a public key and a private key.

### Instances

The following examples A and B are at opposite ends of the security spectrum, and no two environments are the same. Depending on the level of protection required, different levels of security will be used.

#### Possibility A: Identification and non-repudiation for email and web access

Unless the information that is being accessed or transmitted is valued in terms of millions of dollars, it is generally adequate that the root key ceremony be conducted within the security of the vendor's laboratory. The customer may opt to have the root key stored in a hardware security module, but in most cases, the safe storage of the root key on a CD or hard disk is admissible. The root key is never stored on the CA server.

#### Possibility B: MRTD Cards and e-Passports

Machine Readable Travel Documents (MRTDs) require a much higher level of security. When conducting the root key ceremony, the government or organization will require rigorous security checks on all personnel in attendance. Those normally required to attend the key ceremony include a minimum of two administrators from the organization, two signatories from the organization, one lawyer, a notary, and two video camera operators, in addition to the CA software vendor's technical team.

### Overview

The actual generation of the root key-pair typically occurs in a secure vault, with no external communication except for a single telephone line or intercom. Upon securing the vault, all present personnel must verify their identity using at least two legally recognized forms of identification. The lawyer in charge logs every person, transaction, and event in a root key ceremony log book, with each page notarized. From the moment the vault door closes until its reopening, everything is also video recorded. The lawyer and the organization's two signatories sign the recording, which is also notarized.
As part of the process, the root key is divided into up to twenty-one parts, each secured in a safe with a key and numerical lock. The keys are distributed to up to twenty-one people, and the numerical codes are distributed to another twenty-one people.

### Providers

The CA vendors and organizations, such as RSA, VeriSign, and Digi-Sign, implement projects of this nature where conducting a root key ceremony would be a central component of their service.

## IBM HSM key ceremony

A hardware security module (HSM) key ceremony is a procedure where the master key is generated and loaded to initialize the use of the HSM. The master key is at the top of the key hierarchy and is the root of trust to encrypt all other keys generated by the HSM. A master key is composed of at least two parts. Each key part is normally owned by a different person to enhance security.

### Master key types

The master key is stored within the HSM. IBM HSMs support two types of cryptographic mechanisms:
* The PKCS#11 mechanism, called IBM Enterprise PKCS #11 (EP11), creates a high-security solution for application programs developed for this industry-standard API.
* The IBM Common Cryptographic Architecture (CCA) mechanism provides many functions of special interest in the finance industry, extensive support for distributed key management, and a base on which custom processing and cryptographic functions can be added.
Depending on the cryptographic mechanisms that the HSM supports and the key objects that are encrypted by the master key, the following types of master keys are available:
* EP11 HSMs
** EP11 symmetric master key: used to encipher all kinds of sensitive materials, including secret key objects and intermediate state information containing secret key materials.
* CCA HSMs
** SYM master key: used to encipher DES symmetric key objects
** ASYM master key: used to encipher PKA-RSA asymmetric key objects
** AES master key: used to encipher AES, HMAC symmetric key objects
** APKA master key: used to encipher PKA-ECC asymmetric key objects

### HSM key ceremony types
#### On-premise HSM Key Ceremony

For IBM Z and Linux One Systems, the HSMs are used to perform cryptographic operations. The HSM has 85 domains, with each having its own set of master keys. Before using the system, the HSM Key Ceremony must be conducted to load the master key securely and properly. For EP11 HSMs, the master key parts are stored on smart cards and loaded to the HSM with the Trusted Key Entry (TKE) workstation. For CCA HSMs, the master key parts can be stored either on smart cards or in files on the TKE workstation.

#### Cloud HSM Key Ceremony

EP11 HSM is currently the only type of HSM that supports Key Ceremony in the cloud. Both the cloud command-line interface (CLI) and smart cards are provided to load the master key parts to the cloud HSM. IBM Cloud Hyper Protect Crypto Services is presently the only key management service and cloud HSM in the cloud to provide HSM key ceremony through both CLI and smart cards.

### Master key part storage

Depending on the key ceremony types, the master key parts can be stored either on smart cards or in files on the workstation.
Smart cards are protected by a personal identification number (PIN) that must be entered on a smart card reader pad. Each master key part owner has one smart card, and only the owner knows its PIN. This solution ensures that the master key parts never appear in the clear outside the smart cards.
Compared with the smart card solution, the workstation solution does not require the procurement of smart card readers and smart cards. This solution uses workstation files encrypted with keys derived from a file password to store master key parts. When the keys are used, file content is decrypted and appear temporarily in the clear in workstation memory.

## In blockchain technology

A key ceremony can be used to generate the private key for a cryptocurrency wallet. For Multiparty Computation (MPC), key ceremonies are used to split parts of keys to participants securely. It is also used in Zero-Knowledge Proofs (zKP) protocols for key generation.