SV: Java -> .NET RSA Encryption

Fredrik Hesse <[email protected]> Mon, 4 Apr 2005 14:34:36 +0200
Newsgroups gmane.comp.security.web-applications,gmane.comp.security.programming,gmane.comp.security.vulnerabilities
Message-ID <0E1AFF618B72D7478F000242316D112903339F80@srv1liljeholmen.liljeholmen.nexus.se>
Ok, if its that way around, the simplest way (for development purposes)
would be:
Use the Microsoft tool makecert.exe to generate a certitifcate:
makecert.exe -r -n "CN=3DMyCertificateName;L=3DStockholm;C=3Dse" -b =
01/01/2005 -e
01/01/2010 -ss my
this will create a self-signed certificate with the commonname
"MyCErtificateName", and place it in the personal folder of your user
certificate store.
To have a look at it:
Start mms.exe, select add/remove snap-in and select certificates and
my personal, then expand personal and you will see it.
From here you can also export a copy of the certificate (not the =
private
key), by opening the certificate and flipping to the second tab and
selecting copy to file (be sure to select Base-64 encoding!)
then you can import the certificate into a java keystore by:
keytool -import -keystore <keystore name> -file <the filename you =
exported
it to>

Regards
Fredr!k
=20

-----Ursprungligt meddelande-----
Fr=E5n: john bart
Till: [email protected]; [email protected];
[email protected]; [email protected];
[email protected]
Skickat: 2005-03-31 08:12
=C4mne: RE: Java -> .NET  RSA Encryption

What are the main steps to generate a key pair, put the private in the
.NET=20
environment and the public in java keystore?

>A tip regarding the exchange of keys:
>Traditional Java keystores does not allow you to import or export a
private=20
>key. Only to generate it >in the keystore.
>However, you can load a PKCS12 (pfx) file as a keystore instead.
>So by generating the keys using OpenSSL and packaging them as a=20
>PKCS12-package you can >make them available for both platforms without =

>installing additional providers.
>
>Regards
>Fredr!k

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's =
FREE!

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/