coprocessor/docs/fundamentals/tkms/zama.md
The Key Management System (TKMS) is a self-contained service for performing sensitive cryptographic operations, including for a native FHEVM or a co-processor. It offers:
One KMS instance can support multiple applications at the same time. This is implemented via per application or per application type smart contracts running in the KMS. These smart contracts are customizable to for instance implement application specific authorization logic (e.g. ACLs).
The KMS system is facilitated through a gateway service which is designed not to be required to be trusted, thus a malicious Gateway Service will not be able to compromise correctness or privacy of the system, but at most be able to block requests and responses between the FHEVM and the KMS. However, this can be prevented by simply deploying multiple Gateways Services.
Furthermore we observe that it is possible to implement payment to a Gateway service through the KMS blockchain, thus incentivizing such a service to be honest and reliable.
The Gateway Service consists of two different Connectors in order to decouple a specific FHEVM from a specific KMS. This will make it simpler to roll new blockchain protocols on either the FHEVM or KMS side without requiring modifications to the Gateway, but instead only require the writing of new Connectors.