Non-TCP Applications of Keychain
Non-TCP applications such as RIP and ISIS can initialize or de-initialize with the Keychain module through the exposed initialization application programming interface (API) provided with Keychain.
When an application needs to send packets, it performs the process shown in the following figure.
Figure 1 Process to send packets in Non-TCP application
- Through the Keychain API, the application queries Keychain for the active send key-id. When it receives the active key-id, the application constructs the packet data for which a MAC needs to be calculated. Then it sends the packet data to Keychain.
- Keychain generates a MAC for the packet data and sends the calculated MAC to the application.
- The application formulates a packet with authentication information and sends it out.
When an application receives a packet, it performs the process shown in the following figure.
Figure 2 Process to receive packets in Non-TCP application
The application extracts the packet authentication information.
The application sends the authentication information (Keychain name, packet data, key-id, algorithm type, MAC) to Keychain.
Keychain re-calculates a MAC and compares the generated MAC with the received MAC. If the MACs match, Keychain returns a success message to the application. Otherwise, Keychain returns a failure message.
The application accepts or rejects the packet based on the Keychain validation.
When an application that does not carry the key-id in the packet, such as ISIS, receives a packet, it performs the following process:
- The application extracts the authentication information and sends the information (Keychain name, packet data, algorithm type, MAC) to Keychain for validation.
- Keychain re-calculates the MAC for each active receive key-id and compares them with the MAC received in the packet. If the MACs match, then Success is returned to the application; otherwise, failure is returned to the application.
- The application accepts or rejects the packet based on the Keychain validation.