Re: Encrypting Email: What do I Need?
From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 11/20/03
- Next message: Shel Blauman[MSFT]: "RE: mscorcfg / permissions / message queues"
- Previous message: Mike: "Encrypting Email: What do I Need?"
- In reply to: Mike: "Encrypting Email: What do I Need?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 19 Nov 2003 18:02:35 -0500
"Mike" <Michael.Serfass@LathamSoftware.com> wrote in message
news:eCp5lAvrDHA.4092@tk2msftngp13.phx.gbl...
> I am working on an application for a financial institution. It's written in
> C#, .NET framework 1.1, running on Win2K. The application runs a process
> that gathers sensitive information, and emails it to various lawyers. This
> information needs to be encrypted. I have a X.509 certificate. The
> recipients have their own X.509 certificates. I have a private/public key
> pair, as do the recipients. I have their public keys, they have mine. We are
> all keeping our private keys to ourselves. I must encrypt the email,
> including all it's attachments.
OK .. you understand the above correctly.
> What objects do I use for this? The only asymmetric class that will encrypt
> anything is the RSACryptoServiceProvider. That maxes out at 117 bytes, which
> is well below the size of one attachment, let alone the entire email. The
> symmetric encryption objects will handle more bytes, but that entails
> trading private keys. Trading private keys is not an option. So what do I
> use? I'm not a new developer, but I am new to encryption. What am I missing?
You are missing the concept of "enveloping" messages.
Here's how it works (and how S/MIME secure email does it):
- you generate a secret random symmetric key (3DES, AES, ...) and
use that key to bulk-encyrpt any size data
- you use the PUBLIC key of any recipient(s) to encrypt THAT the symmetric key bytes
- you can then send both the symetric-encrypted data and encrypted secret key to the
recipients
- the recipients can decrypt the secret symmetric key, with their RSA private key,
and then use the "recovered symmetric key" to decrypt the data.
The preferred way to do this is with the format CMS/PKCS#7 EnvelopedData which
is supported in CryptoAPI, CAPICOM but currently NOT in .NET Framework 1.1.
Next release of .NET Framework will support EnvelopedData.
An article will appear either tomorrow or Friday describing EnvelopedData and
.NET usage (i.e. encryption of symmetric keys with recipient RSA public keys) at
MSDN Security size.
- Michel Gallant
MVP Security
- Next message: Shel Blauman[MSFT]: "RE: mscorcfg / permissions / message queues"
- Previous message: Mike: "Encrypting Email: What do I Need?"
- In reply to: Mike: "Encrypting Email: What do I Need?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|