title: How to gain access to Asp.Net Core encryption keys?
body: <p>A cookie provided by call:</p>
  
  <pre class="lang-cs prettyprint-override"><code>await HttpContext.Authentication.SignInAsync("MyCookieMiddlewareInstance", principal);
  </code></pre>
  
  <p>is stored in encrypted state. How to get encryption key? </p>
  
  <p><strong>IMPORTANT</strong>: this question has grown from my <a href="https://stackoverflow.com/questions/42842511/how-to-manually-decrypt-an-asp-net-core-authentication-cookie/42857830?noredirect=1#comment72914288_42857830">original question</a> about cookie decryption. Thanks to <a href="https://stackoverflow.com/users/1415614/ron-c">Ron C</a> and his great answer.</p>