We help IT Professionals succeed at work.

Trusted applets

vidz7
vidz7 asked
on
hi experts

these questions might sound silly but i've been getting different answers from different people.

1) Is there a difference between a trusted applet and a signed applet? If yes, what is it?

2) What do i need to make one applet running on machine1  open a socket connection to another applet running on machine2 and vice versa?

3) Is signing an applet a big trouble? Where is the best place to get step by step and comprehensive info on this subject.

4) What is the difference between a public key and a private key? And how do digital signatures work?


Any comment wld be highly appreciated.
Thanx
Vidz
Comment
Watch Question

Hi


1)There are two ways for an applet to be considered trusted:

The applet is installed on the local hard disk, in a directory on the CLASSPATH

The applet is signed by an identity marked as trusted in your identity database

So in short even if the applet is signed it is not always
trusted.This depends on the user to trust a signed applet

http://java.sun.com/sfaq/


3)Signing an applet becomes messy when you have
to deal with multiple browsers(which you need to most of the times
)

http://developer.java.sun.com/developer/technicalArticles/Security/Signed/

for explorer
http://www.suitable.com/CodeSigningSignExp.shtml

for netscape
http://www.rgagnon.com/javadetails/java-0122.html

4)In public key encryption, two  keys are generated together by a key generation algorithm; anything encrypted with one key can only be decrypted by the other key.

There is a very clear description of this

http://www-106.ibm.com/developerworks/security/library/j-secevol1/?dwzone=security

http://developer.java.sun.com/developer/qow/archive/99/


2)Applet communication has following security
restrictions
 The applets originate from the same server
(from the same directory on the server for some browsers).

The applets are running on the same page and in the same browser window.

but you can communicate if applets are located in different
browser windows

refer this:
http://www.javaworld.com/javaworld/javatips/jw-javatip101.html


Hope this has helped to clear some of the things
for your question 2:

Untrusted applets can only communicate back to the server from which they are loaded (the host that delivered the .class files).


If you need to communicate with another server, you'll either have to sign your applet (and the user will have to trust you),

or

setup a proxy server on your web server to facility the communication between hosts.
Hi
found something interesting for question 2)

The applets don't have to be running on the same page, in the same browser, or on the same computer. As long as the applets originate from the same computer, they can communicate through the server that's running on that originating computer.

http://www.ecs.umass.edu/ece/wireless/people/emmanuel/java/applet/communication/workaround.html

Explore More ContentExplore courses, solutions, and other research materials related to this topic.