Crypto Gone Rogue: A Tale of Ransomware, Key Management and the CryptoAPI