Topaz Filer - Email filing software
Asymmetric encryption questions
Messages   Related Types
This message was discovered on microsoft.public.dotnet.faqs.


FullMetalAnorak
Hi,

I want to use public, private key encryption so after looking at the help I
am going to use RSACryptoProvider, I see that if I want to serialize out the
public, private keys I use the method 'ExportParameters' that returns the
RSAParameters object which can be serialized as XML.

Does this contain all the information required to recreate an
RSACryptoProvider?

Does this contain both the public and private keys?

Do I need to extract out the public key for my client or just provide all
the information from the serialized object?

Can you persist the keys generated in the RSACryptoProvider?

Cheers

Ollie

Reply to this message...
Vote that this is a GOOD answer...
 
Double-click to open VS solution with elevated permissions on Windows 7
New BootFX DBGet build available
 
    
Chad Myers
"FullMetalAnorak" <Click here to reveal e-mail address> wrote in message
news:eKOkYLEGCHA.2544@tkmsftngp08...
[Original message clipped]

Yes.

[Original message clipped]

It always contains the public, but the "exportPrivateData" flag
on the ExportParameters() method determines whether it exports
the private key.

[Original message clipped]

Yes. You can write the bytes or xml to a file, however, storing private
key data is a bad practice unless you do so according to key storage
standards.

..NET has no managed support for secure key storage. You must use
the unmanaged Win32 CryptoAPI methods for storing keys securely.

What I think you're looking to do is do key exchange. If you want
to create an encrypted session, you should generate a keypair
on the server, then use something like RSAOAEPKeyExchangeFormatter
and Deformatter to properly send the server's public key to the
client. Then, using that new RSA encrypted channel, you can send
the session key for your TripleDES (or other symmetric alg)
encryption session.

It's not a good idea to use RSA to do full encryption as its
slower than symmetric algorithms such as TripleDES or Rijndael.

-c

Reply to this message...
Vote that this is a GOOD answer...
 
Twitter and Snow… simple #uksnow
Windows 7 compatible tool for mounting ISO images
 
    
Ollie
Chad,

Ii was not thinking of making a secure channel to pass data down the wire or
to another process, but since you mentioned is this how it is 'meant' to be
done?

Ollie

"Chad Myers" <Click here to reveal e-mail address> wrote in message
news:#qz0SXGGCHA.1744@tkmsftngp13...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Chad Myers
"Ollie" <Click here to reveal e-mail address> wrote in message
news:OrpVxkGGCHA.2424@tkmsftngp10...
[Original message clipped]

Ollie,

What I was explaining is how to establish a TripleDES session
between two peers on an unsafe network (the Internet) safely.

What are you trying to do?

-c

[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Introduction to BootFX’s Object Relational Mapping Functionality article now live on CodeProject
Xenu Link Sleuth
 
    
Ollie
well I was 'playing around' with encryption and looking at encrpyting data
that is in different formats - strings, files, XML documents, byte arrays
etc so I thought I would start with symmetric algorithms so I wrote an
'easy' to use encrpytion library for personal use in any future .Net
developments, so know I am looking at asymmetric encryption....

Ollie

"Chad Myers" <Click here to reveal e-mail address> wrote in message
news:OM606qGGCHA.2148@tkmsftngp08...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Chromium OS – really?
Invocation Software – the new name for the makers of Topaz Filer
 
    
FullMetalAnorak
Nice One Chad

More answers in a few lines than the whole of MSDN help....

Cheers

Ollie

"Chad Myers" <Click here to reveal e-mail address> wrote in message
news:#qz0SXGGCHA.1744@tkmsftngp13...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Chad Myers
It gets hairy real quick. A nice fellow from MS helped me
struggle through it.

Start down that road and if you get stuck again, let me know.

-c

"FullMetalAnorak" <Click here to reveal e-mail address> wrote in message
news:udLLVdGGCHA.1744@tkmsftngp13...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Agile Modeling
Creating colourways for Web development
 
 
System.Security.Cryptography.RSA
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAParameters
System.Security.Cryptography.TripleDES




Ad
BootFX
Reliable and powerful .NET application framework.
Looking to invest in a major software project? Technical and commercial advice available here.
Other Helpful Sites
MBR 247
Topaz Filer
SharePoint Email Filing
Software Advisory Services
 
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734