Tutorial 2009-12-30


Required modules

  • SPADE (included);
  • Tkinter;
  • python-dns.


cedric@debian:~/pyChatter/source/spade$ python configure.py spade_platform_address


Launch the SPADE platform:

cedric@debian:~/pyChatter/source/spade$ python runspade.py &
cedric@debian:~/pyChatter/source$ python authenticationAgent.py &

And the clients:

cedric@debian:~/pyChatter/source$ python2.5 simpleGui.py --name Bob --ontology ontoBob &
cedric@debian:~/pyChatter/source$ python2.5 simpleGui.py --name Alice --ontology ontoAlice &
cedric@debian:~/pyChatter/source$ python2.5 simpleGui.py --name Oscar --ontology ontoOscar

Later these parameters will be settable thanks to the user interface.

Screen shots

Registration of the clients


The only service registered in the directory facilitator is the authentication agent. The authentication agent is in charge of serving requests of clients

  • manage the XML file of known client agents;
  • provides informations (ontology, public key) to a client about an other client;
  • in the future will be responsible of the CHAP authentication.

After having launched the three clients, two kind of services are now present in the directory facilitator (as shown above). The new service "client_agent" is the service of all clients. To find interlocutors, it just to search clients registered in the service called "client_agent".


This step is crucial to share the needed informations (RSA public key and ontology) with the authentication agent.


After the registration of the three clients, the XML file of the authentication agent looks like this:

<?xml version="1.0" ?>

Thanks to this file the authenticator is able to provide to Bob the RSA public key (and ontology) of Alice.

Selection of interlocutors


By selecting Bob and Alice, Oscar will automatically and in a transparent manner retrieve the RSA public keys of Alice and Bob.


Now Oscar is able to encrypt messages destined to Alice and Bob with the appropriate RSA key. Alice and Bob will decrypt the message with their private key.


Now Bob is alone as we can see in the browser (DF) and with the Tkinter interface.

Generation of new RSA key


If Bob generates a new RSA key, for the moment he has to manually publish the new one. This functionality will be implemented later. As you can see above, Alice has encrypt the message with the old public key of Bob. So, Bob is not able to decrypt the message.

Oscar has not published his public key


Here the nasty Oscar has not published his public key. So even if Bob accepts the invitation, Oscar will not be added to Bob's interlocutors list. Bob is safe!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License