Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CAPICOM within .NET

51 views
Skip to first unread message

Rono

unread,
Feb 3, 2006, 10:22:05 AM2/3/06
to
I am using .NET 2.0 and am writing an app that imports data from a previous
version. One field in the old database stores data encrypted using CAPICOM
that I would like to decrypt. I don't want to reference the CAPICOM.dll
(which is version 2.0.0.3) using Interop and would like to do this entirely
within .NET. Can someone provide me with some sample code on how to do
this? Thanks in advance.

Ron


Joe Kaplan (MVP - ADSI)

unread,
Feb 3, 2006, 11:54:38 AM2/3/06
to
I think the CAPICOM EncryptedData format is actually proprietary to CAPICOM.
You will need to use CAPICOM to decrypt it. Here is the quote from MSDN:

Note CAPICOM does not support the PKCS #7 EncryptedData content type but
uses a nonstandard ASN structure for EncryptedData. Therefore, only CAPICOM
can decrypt a CAPICOM EncryptedData object.

However, you might consider writing a little batch process to migrate all of
the encrypted data to a structure that just uses some symmetric encryption
like AES that .NET can handle.

Joe K.

"Rono" <nos...@please.com> wrote in message
news:uCP4yVNK...@TK2MSFTNGP15.phx.gbl...

Mitch Gallant

unread,
Feb 3, 2006, 12:51:19 PM2/3/06
to
Or .. if you insist on using .NET to decrypt a CAPICOM EncryptedData format,
here is a bit of information:
http://www.jensign.com/JavaScience/dotnet/DeriveBytes

- Mitch Gallant
MVP Security
www.jensign.com

"Joe Kaplan (MVP - ADSI)" <joseph....@removethis.accenture.com> wrote in message
news:%23owBCKO...@TK2MSFTNGP14.phx.gbl...

Rono

unread,
Feb 13, 2006, 11:05:26 AM2/13/06
to
That looks useful, but if someone has already implemented code for this
process, it would be nice if it could be posted here. Thanks.

Ron

"Mitch Gallant" <jens...@community.nospam> wrote in message
news:ekKT0pOK...@TK2MSFTNGP09.phx.gbl...

0 new messages