Technical specifications and blockchain architecture details for Phala Network.
What are the consequences if certain keys are leaked? If a WorkerKey is leaked, the attackers can decrypt all the messages sent to it such as the ClusterKey of its cluster, which can be used to access the ContractKeys of that cluster. Attackers could even impersonate a worker to provide false results to users. Such malicious activity can be detected by comparing the results from multiple workers, and then the chain would slash the compromised worker and confiscate that worker’s staked PHA; If a ContractKey is leaked, the attackers can decrypt the states and all the historical inputs of that contract; If a ClusterKey is leaked, the attackers can know the above information of all the contracts in that cluster; If the MasterKey is leaked, then all historical data is leaked.
What can we do if the worst case happens? Phala has implemented the Key Rotation for gatekeepers, which means that with the permission of the Council, gatekeepers can update the MasterKey, then correspondingly the ClusterKeys and ContractKeys. So when the worst case happens, we will first register the new gatekeepers with the latest hardware, deregister all the old ones (since they are likely to be vulnerable) and switch to a new MasterKey.