title: Data protection API suddenly very slow
body: <p>Our application is using the <a href="https://msdn.microsoft.com/en-us/library/ms995355.aspx" rel="nofollow">Data Protection API</a> (via the <a href="https://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.aspx" rel="nofollow"><code>ProtectedData</code></a> class) to encrypt a password before storing it. It was working fine until recenly, but suddenly the <code>Protect</code> method started taking 2 seconds to return (instead of about 0.5ms). Things to note:</p>
  
  <ul>
  <li>it still works normally on my colleagues' machines</li>
  <li>we're using <code>DataProtectionScope.CurrentUser</code>; if I switch to <code>DataProtectionScope.LocalMachine</code>, it works normally again (but that's not what I want)</li>
  <li>I tried to restart the crypto service, which had no effect</li>
  <li>I tried to restart the computer, which had no effect either</li>
  </ul>
  
  <p>What could be causing this? How can I fix it (preferably without reinstalling Windows)?</p>