# HSM4 SSL: Leveraging HSMs for Enhanced Intra-Domain Security +
## 3 HSM4 SSL Architecture
### HSM4 SSL: Low-Level Architecture
#### 3.3.4 Adaptive Driver Communication Protocol (ADCP)  
Communication between different components is facilitated using the ADCP. The ADCP is a JSON-based messaging protocol that forms the backbone of the communication infrastructure within HSM4 SSL. The standardized format, shown in Figure 7, provides a structured approach to exchanging information and instructions. The message is organized into two primary objects: the header and the body. Figure 6: The HSM4 SSL hardware abstraction layer (HAL). The header object includes keys such as _message_direction_, which denotes if this message is a request for a service or a response to the client. This key can also hold a value to indicate that a message is for internal purposes, such as messages between managers for information exchange. Another key is the _\"message_id\"_, which assigns a unique serial number to each message, starting from \"1\" and incrementing with each new message. This enables the tracking and referencing of messages within the system. The _\"message_type\"_ key indicates the specific HSM operation to be performed. The _\"source_mac_address\"_ key represents the MAC address of the device or entity sending the message, enabling internal architecture usage and the association of cryptographic elements with their corresponding hosts. Similarly, the _\"source_ip_address\"_ key denotes the IP address of the source device, providing additional internal architecture usage information. Further, the _\"timestamp\"_ key in the header serves to record the time at which the message is generated, providing a temporal reference for tracking and synchronization purposes within the architecture. Additionally, the header contains the _\"dest_hsm_module\"_ key, which specifies the destination HSM where the command should be executed. It identifies the path to the HSM library file responsible for handling the requested operation. By incorporating these standardized header objects, the message format ensures consistency, interoperability, and efficient processing across different HSM-related operations and systems. Figure 7: The adaptive driver communication protocol (ADCP) standard JSON-based message. The body object of the message format, on the other hand, encapsulates the specific keys and values related to the intended operation or task. Within the body section, additional keys and values that are specific to the operation defined in the header are included. For instance, the _\"session_label\"_ key represents the label or name assigned to the secure session being initialized or an identification of where to store generated cryptographic elements. This allows for the proper identification and management of different sessions within the HSM. The _\"credentials\"_ sub-object contains the _\"admin_pin\"_ and _\"user_pin\"_ keys. These credentials are utilized for administrative and user-level operations, granting access to the token's cryptographic functions and enabling authentication and authorization. Furthermore, the _\"key_info\"_ sub-object encompasses keys related to the generation of cryptographic key pairs. The _\"type\"_ key specifies the type of cryptographic algorithm to be used, such as RSA, AES, or EC. The _\"length\"_ key denotes the desired length of the generated encryption key. Additionally, the _\"label\"_ key assigns a unique name or label to the generated public-key pair, facilitating identification and management. Finally, the _\"id\"_ key provides an ID number for the generated public-key pair, enabling easy referencing and retrieval when needed. Moreover, for X.509 certificate generation requests, the _\"csr_details\"_ sub-object serves as a repository for storing critical CSR details. These details encompass two key attributes: _\"csr\"_, which encapsulates the CSR data received from the client for signing, and _\"csr_file\"_, which specifies the file path where the CSR is to be saved within the HSM4 SSL server.