Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / March 2005

Tip: Looking for answers? Try searching our database.

Encryption using a private key

Thread view: 
Divya Mali - 11 Mar 2005 21:26 GMT
Hi,

IBM's java (JDK 1.4.2) does not let encryption of data using a private key?
Is this is a standards restriction or is this IBM's implementation
restriction? I am wondering why this should be disallowed

Thanks,

Ganesh
Chris - 16 Mar 2005 07:53 GMT
> Hi,
>
[quoted text clipped - 6 lines]
>
> Ganesh

Hi,
Encrypting data with a private key does not make sense. The purpose of
encrypting data is to hide it from all but the intended recipient.
Since all operations done by a private key are undone by the public
key, if you were to encrypt with your private key, that would mean
anyone who had your public key (i.e. anyone at all) could decrypt,
which would be pointless. Encrypting is always done with the public
key, so that only the intended recipient (who has the private key)
can decrypt.

If you wanted to encrypt with the private key so that you could "try"
to decrypt with the public key, with the idea being that if the
decryption works right, it must have been encrypted with the proper
private key in the first place, then you're not looking for
encryption. What you want is signing, available in
java.security.Signature. A Signature object allows you to pass in the
data to sign, and will later output a small block of bytes. You send
the original data and the block of bytes together. The recipient can
use the Signature object along with the original data and the
signature bytes (and your public key) to verify the signature.

Chris
J H - 22 Mar 2005 22:45 GMT
I am having the same issue.  The SecretKey gets us the mimimum we need.
Why is this not supported in the latest builds from IBM?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.