Hi all,
I have been trying to learn and understand distributed programming with E.
My primary concern when I started was how communication between two objects are established securely and how the continued sending of messages remained secure. From what I understand, these are concerns of CapTP and VatTP. My chief sources of information were Erights.org, ELib, and M. Miller's dissertation.
>From what I've read, the following steps are more or less how the establishment of communication and sending of messages happens. I just wanted to make sure I was on the right track in my understanding, and I would appreciate any feedback as to whether I am indeed grasping the concepts correctly and any clarification of the details I think I'm missing:
Assuming 3 vats: A, B, C with objects Alice, Bob, and Carol respectively. The process of establishing communication between Alice and Bob followed by Alice's introduction of Carol to Bob proceeds as follows:
1. Physically hand URI designating Alice to Bob via PGP mail, telephone etc. With the URI being some form of the YURL as specified in HTTPSY(
http://www.waterken.com/dev/YURL/httpsy/). This URI specifies [VatA's ID (a base 32 encoding of the SHA-1 hash of VatA's public key), sequence of hints as to where VatA is, Swiss# identifying Alice (large random integer)]. Why SHA-1 though?... I seem to remember a Schneier article saying Sha-1 was broken by some Chinese Researchers.
2. VatB receives URI, and looks for VatA using sequence of hints.
3. VatB authenticates correct VatA by verifying that this vat "candidate" knows the private key associated with VatA's public key. Exactly how is this done? I don't really understand how VatB determines VatA's knowledge of the correct private key. I know that here:
http://www.waterken.com/dev/YURL/httpsy/ it says that servers are authenticated via verification of a constructed certificate chain. I know httpsy, is related to E's CapTP, but I remember reading elsewhere, that E rejects the use of certificates in its protocols.
4. Once VatA is authenticated, VatB establishes a connection with VatA as per VatTP, and then sets up a proxy object that represents the local reference to Alice. VatA does the same thing(sets up proxy object to represent reference to Bob). I know the swiss number is used sometime in this process, but I'm not sure exactly when.
5. Alice sends Bob a reference to Carol. Reference here is the URI designating Carol and the location of VatC. The process carried out by VatB in 3, is followed again in search of VatC.
-- Regarding the sending of messages, my main concern was the result of eavesdropping on packets on a wireless network via a tool like WireShark. So, once the communication link has been established, the messages must be sent securely. So each TCP packet is encrypted via Triple DES-EDE with Cipher Block Chaining, and even if somehow an eavesdropper managed to decrypt a packet, aren't there still many other layers of encryption in each packet for him to tackle?
Now to put things into practice, I wrote a chat program based on the tutorial by Marc Stiegler at
http://www.skyhunter.com/marcs/echat-writeup.html , but with updated syntax.(It wasn't until later that I realized how similar it was to the chat program towards the end of E in a Walnut minus the persistence features). As I was testing it, I noticed that on the CS department's small wireless network that most of the time the chat program could establish a connection between my Mac and my friend's PC both running the program. However, sometimes, the operation would timeout and I would get an exception thrown. I also tried it on the larger campus wide Wifi network. Unfortunately, the program can never establish a connection. I attempted to run the program several times, and both situations: where I gave my friend a URI to my program, and he the URI to his. Strangely enough, when my connection timed out, I received exactly that: a Socket connection timeout exception. But on my friend's pc, he always receives a NumberFormatException. Can anyone offer some kind of solution or advice to correct this problem? To make the URI, I am using the makeSturdyRef.temp(obj) to create the sturdy ref, and then sending that to introducer.sturdyToURI(sr). Then to change that uri into an object, I use introducer.sturdyFromURI(uri).getRcvr(). Are there perhaps, more updated methods I should be using?
Thanks again. Your advice is greatly appreciated,
Jimmy