RE: RSACrypto.. - can I reuse the private key and more..?
From: Eric Dan (nospam_at_stopspamming.com)
Date: 08/16/05
- Next message: ubiquitousspor: "Re: can you put a strong name assembly in a role?"
- Previous message: Eric Dan: "RE: encrypting with private key and decrypting with public?"
- In reply to: Eric Dan: "RSACrypto.. - can I reuse the private key and more..?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 16 Aug 2005 07:02:01 -0700
Some more answers to myself :-)
I have found a way to import a key to another machine using the
RSACryptoServiceProvide.
However it does not work with keys created by the sn.exe tool, there is an
exception when trying to decrypt/export such keys - any idea why?
steps:
- Create a new key in a named container (cspparameters)
- Export to xml (public + private)
- Go to the other machine
-Create RSACryptoServiceProvide with the same params for the CSP as above
-Call rsa...fromXml (use the output xml created above)
- rsa... PersistKey ..
- And it works - now the 2 machines use the same private key
-- Thanks Eric "Eric Dan" wrote: > > Using the default constructor of RSACryptoServiceProvider - it creates a new > pair of keys - public + private. > > 1) Is there a way to reinstall the private key on another machine? (I know > that I can export the private key, but can I force the class to reinstall it > using the exported data? > > 2) Is it possible to encrypt/decrypt using a key pair created by sn.exe > tool? (is there a deterministic way to know the actual key index ? I also > realized that there is also a problem when trying to decrypt with a private > key created by sn tool - an exception occurs - I have used thr right > container name and tried to decrypt info which has been encrypted with the > public key) > > 3) Is there a centrilized location for answering all these questions? > > > -- > Thanks in advance > Eric
- Next message: ubiquitousspor: "Re: can you put a strong name assembly in a role?"
- Previous message: Eric Dan: "RE: encrypting with private key and decrypting with public?"
- In reply to: Eric Dan: "RSACrypto.. - can I reuse the private key and more..?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
Loading