Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

encrypt using RSA? (newbee)
hi
wanted to make a test to encrypt/decrypt using RSA.

ia managed to create the public and private key but have problem using
them to encrypt anything.

i try to create a Cipher (as one can do using DES), but then i get:

Cipher rsaCipher;
rsaCipher = Cipher.getInstance("RSA");

when i run the proram i get:
java.security.NoSuchAlgorithmException: Cannot find any provider
supporting RSA


maybee i should do it in a rather different way, but how?

thanks
stig

Report this thread to moderator Post Follow-up to this message
Old Post
stig
03-20-04 01:54 AM


Re: encrypt using RSA? (newbee)
Here are some simple samples which compare RSA encryption in Java2, .NET
and CryptoAPI:
http://www.jensign.com/JavaScience/dotnet/RSAEncrypt

- Michel Gallant
MVP Security
http://www.jensign.com

"stig" <_nospam_stigerikson@yahoo.se> wrote in message news:c1puld$a21$1@oden.abc.se...[col
or=darkred]
> hi
> wanted to make a test to encrypt/decrypt using RSA.
>
> ia managed to create the public and private key but have problem using
> them to encrypt anything.
>
> i try to create a Cipher (as one can do using DES), but then i get:
>
> Cipher rsaCipher;
> rsaCipher = Cipher.getInstance("RSA");
>
> when i run the proram i get:
> java.security.NoSuchAlgorithmException: Cannot find any provider
> supporting RSA
>
>
> maybee i should do it in a rather different way, but how?
>
> thanks
> stig[/color]



Report this thread to moderator Post Follow-up to this message
Old Post
Michel Gallant
03-20-04 01:54 AM


Re: encrypt using RSA? (newbee)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"stig" <_nospam_stigerikson@yahoo.se> ha scritto nel messaggio
news:c1puld$a21$1@oden.abc.se...

| java.security.NoSuchAlgorithmException: Cannot find any provider
| supporting RSA

You're using Java Cryptography Architecture (JCA).
To work with it, you must use one or more
cryptographic provider.

A Cryptographic provider provides you some implementation of
known cryptographic algorithms (including RSA).

Exception (reported above) indicates you that Security System can't
find
any provider implementing RSA algorithm.

You can get a free provider (called BouncyCastle Provider)
from web at http://www.bouncycastle.org or .com (I don't remember).

Now you must proceeded in this way:

1. Add the jar file that you have downloaded from BC
site (as indicated above) to your classpath.

2. Register BC provider dinamically into your Security
System as below:
Security.addProvider(new
org.bouncycastle.jce.provider.BouncyCastleProvider());

3. Use RSA implementation provided by BC (Bouncy Castle)
as follow:
rsaCipher = Cipher.getInstance("RSA"); or explicity
rsaCipher = Cipher.getInstance("RSA","BC");

I hope that my english is readable :-(

Hi,
GianpieroP

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/ AwUBQEPGFZ4sPKh9SaicEQJasgCgysbl54qGsbTq
xQ7B8iNMoipLTdgAnjTY
36vTsba/OpFMTGPk0898Az/l
=8bkv
-----END PGP SIGNATURE-----



Report this thread to moderator Post Follow-up to this message
Old Post
GianpieroP
03-20-04 01:54 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Security archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 01:07 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.