HighTechTalks DotNet Forums  

Assymetric Encryption - Interorperability between Java2, .NET and Openssl

Dotnet Security microsoft.public.dotnet.security


Discuss Assymetric Encryption - Interorperability between Java2, .NET and Openssl in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
mathew alexander
 
Posts: n/a

Default Assymetric Encryption - Interorperability between Java2, .NET and Openssl - 03-01-2005 , 02:28 PM






Hi,
I am porting an application from Java to .NET. The application encrypts
data using RSA, and this data is sent to a Linux box where it is decrypted
using
openssl libraries. Public(.crt file) and Private Keys(.key file) are
generated on the Linux box with openssl routines.

The java application uses the following cipher to encrypt the data.

Cipher cipher = Cipher.getInstance("RSA/ECB/PKCSIPadding","BC")

what is the equivalent .NET security provider for this?

I am assuming it is the RSACryptoService Provider. The
RSACryptoServiceProvider however initializes with a CspParameter. How will I
import my .crt public key into a windows key container.

thanks,

Mathew



Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: Assymetric Encryption - Interorperability between Java2, .NET and Openssl - 03-01-2005 , 07:46 PM






Hi Matthew,

The easiest thing to do would probably be to load your .crt file into a
Windows key container, then use the RSA CSP to access that key and do your
decryption. I'm not familiar with OpenSSL at all ... would it be easy to
P/Invoke to it and have it import the key for you?

-Shawn
http://blogs.msdn.com/shawnfa
--
This posting is provided "AS IS" with no warranties, and confers no rights.


Note:
For the benefit of the community-at-large, all responses to this message
are best directed to the newsgroup/thread from which they originated.
--------------------
Quote:
From: "mathew alexander" <mmathew (AT) red-usa (DOT) com
Subject: Assymetric Encryption - Interorperability between Java2, .NET
and Openssl
Date: Tue, 1 Mar 2005 14:28:50 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <eELPKUpHFHA.3500 (AT) TK2MSFTNGP14 (DOT) phx.gbl
Newsgroups: microsoft.public.dotnet.security
NNTP-Posting-Host: 65.204.56.55
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
4.phx.gbl
Quote:
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.security:9291
X-Tomcat-NG: microsoft.public.dotnet.security

Hi,
I am porting an application from Java to .NET. The application encrypts
data using RSA, and this data is sent to a Linux box where it is decrypted
using
openssl libraries. Public(.crt file) and Private Keys(.key file) are
generated on the Linux box with openssl routines.

The java application uses the following cipher to encrypt the data.

Cipher cipher = Cipher.getInstance("RSA/ECB/PKCSIPadding","BC")

what is the equivalent .NET security provider for this?

I am assuming it is the RSACryptoService Provider. The
RSACryptoServiceProvider however initializes with a CspParameter. How
will I
import my .crt public key into a windows key container.

thanks,

Mathew





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.