Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:36:09+00:00 2026-05-12T07:36:09+00:00

I was reading about Key Containers in .NET as a secure a place to

  • 0

I was reading about Key Containers in .NET as a secure a place to store a private key for asymmetric cryptography and digital signing.

My question is how secure is the Key Container? because I’ve found out if I know the key container name, then i will be able to retrieve the private key using the following:

// Create the CspParameters object and set the key container 
// name used to store the RSA key pair.
CspParameters cp = new CspParameters();
cp.KeyContainerName = ContainerName;

// Create a new instance of RSACryptoServiceProvider that accesses
// the key container MyKeyContainerName.
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);

// Display the key information to the console.
Console.WriteLine("Key retrieved from container : \n {0}", rsa.ToXmlString(true));

Are Key Containers a secure place to store private keys ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:36:09+00:00Added an answer on May 12, 2026 at 7:36 am

    That really depends on your requirements.

    The keystore behind RSACryptoServiceProvider is really the CryptoAPI key store. Keys here are stored on the filesystem protected under the user credentials (if using the user store) or the machine credentials (if using the machine store). This means that an attacker that has access to the proper credentials will be able to extract the private key.

    This will be true for all crypto implementations that do not store the key in a smartcard, hardware security module, TPM chip etc.

    To protect against a less capable attacker, the CryptoAPI and hence RSACryptoServiceProvider gives you the possibility of setting the key to non-exportable. This means that CryptoAPI/.NET will refuse to perform the private key export for you (but a knowledgeable attacker will still be able to work around this). To do this, generate the key with CspProviderFlags.UseNonExportableKey.

    You can also use CspProviderFlags.UseUserProtectedKey which will ask the user for confirmation and an optional additional password whenever the private key is used.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 258k
  • Answers 258k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Firstly, don't use css() to hide them when you're also… May 13, 2026 at 10:53 am
  • Editorial Team
    Editorial Team added an answer Named pipes would be the fastest method, but it only… May 13, 2026 at 10:53 am
  • Editorial Team
    Editorial Team added an answer Also store the file time stamp (or last time changed… May 13, 2026 at 10:53 am

Related Questions

(NOTE: I've updated this question from the initial inquiry about child containers towards creating
Update I asked this question quite a while ago now, and I was curious
I was reading about self-referential has_many :through data situations today, because I'm trying to
I'm coming up the learning curve for Swing and am reading about InputMap and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.