I'm confused about how WannaCrypt's hybrid encryption scheme works after watching Computerphile's "How WannaCrypt Encrypt's Your Files" video a number times. Below is my thought process to make it easier to pinpoint my misunderstanding.
- A public and private key pair is generated for the client, Cpub and Cpriv. These are generated whenever the malware is installed on someone's machine and is unique to the infected to ensure that the ransom be paid in each instance.
- In the ransomware's executable is a server's public key, which has a private key, but is kept secret in an off-site location. I'll refer to these as Spub and Spriv.
- Cpriv is encrypted with Spub. Cpriv cannot be decrypted without Spriv.
- An AES symmetric key, Kf, is used to rapidly encrypt a machine's files.
- Kf is then encrypted with Cpub.
- In order to get to Kf, we need Cpriv, but we can't get to Cpriv because it has been encrypted with Spub. To get to Cpriv, we need Spriv.
The chain of encryption:
- Encrypt files with Kf
- Encrypt Kf with Cpub
- Encrypt Cpriv with Spub
The chain of decryption:
- Pay the ransom (but don't IRL)
- The server gives the client Spriv
- Spriv decrypts Spub, giving the client Cpriv
- Cpriv decrypts Cpub, giving the client Kf
- Kf, a symmetric key, is used to decrypt the files
All keys with the exception of Spriv are on the client's machine, but are encrypted. Buying Spriv starts a decryption chain giving access to one's files again.
Is my understanding of WannaCrypt's encryption method correct? Are there any important steps or pieces of information that I'm missing here?