Re: Question about signing XML and RSA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 02/24/04


Date: Tue, 24 Feb 2004 08:21:36 -0500

Here is a handy .NET tool, which helps you find your CspParameters
credentials for any existing RSA keys populating your Current User
MY keystore:
    http://www.jensign.com/JavaScience/dotnet/keypal

- Michel Gallant
   MVP Security

"Pieter Philippaerts" <Pieter@nospam.mentalis.org> wrote in message
news:eOKtqBr%23DHA.2516@TK2MSFTNGP11.phx.gbl...
> "David Lindgren" <david.lindgren@hogia.se.REMOVE!> wrote
> > I am trying to sign my XML files with private/public keys but I have
> noticed
> > that initiating the RSA key with either RSA.Create() or FromXMLString()
> > takes a lot of time. I wonder why?
>
> That's because the default constructor of the RSACryptoServiceProvider
> creates a new public/private key pair whenever it's called.
>
> > Is it possible to skip this part and read
> > in the keys directly? What is the fastest way to get a RSA key to pass
> > SignedXML.SigningKey ? I have generated keys already.
>
> If you store your keys in a CryptoAPI key store, you can use the
> RSACryptoServiceProvider(CspParameters) constructor to initialize an
> RSACryptoServiceProvider instance. This is the fastest option because all it
> has to do is associate the instance with the stored key.
> If you don't want to put your key in a crypto store, you can use the
> RSACryptoServiceProvider(int) constructor and pass it '512' to let it
> generate a 512-bit key pair [this should be pretty fast] and then import
> your key using the FromXMLString() method.
>
> Regards,
> Pieter Philippaerts
> Managed SSL/TLS: http://mentalis.org/go.php?sl
>
>



Relevant Pages

  • Re: Question about signing XML and RSA
    ... > that initiating the RSA key with either RSA.Createor FromXMLString ... That's because the default constructor of the RSACryptoServiceProvider ... If you store your keys in a CryptoAPI key store, ...
    (microsoft.public.dotnet.xml)
  • Re: Question about signing XML and RSA
    ... > that initiating the RSA key with either RSA.Createor FromXMLString ... That's because the default constructor of the RSACryptoServiceProvider ... If you store your keys in a CryptoAPI key store, ...
    (microsoft.public.dotnet.security)
  • Re: Question about signing XML and RSA
    ... >> that initiating the RSA key with either RSA.Createor FromXMLString ... > That's because the default constructor of the RSACryptoServiceProvider ... > If you store your keys in a CryptoAPI key store, ... > RSACryptoServiceProvider instance. ...
    (microsoft.public.dotnet.security)
  • Re: CryptAcquireContext question!
    ... It is an RSA key. ... On the other way a want to acces from my CSP to the ... Certificate store MY. ... >> that identifies the key container to the CSP. ...
    (microsoft.public.platformsdk.security)